# sudo ifconfig eth0 down
Eth0:error while getting interface flags:no such device
Then, based on this error, the current IP information is viewed and the results are as follows:
# ifconfig-a
The result did not find eth0, but appeared eth4. Immediately understand the cause of the error,because the device was not found when the Eth0 service was closed with a command. According to these keywords, the Internet to find the relevant solution, and here is the solution: Move/delete rules file。
This is because the (Ubuntu) system has a new network card (ETH4), while the configuration file that saves the NIC MAC address and device name is/etc/udev/rules.d/70-persistent-net.rules, the network configuration of the NIC is saved in/etc/network /interfaces, this configuration file holds the configuration information for eth0. After moving/deleting the rules file, restarting the Ubuntu system will automatically recreate the new rules file, identify the new network card as eth0, and use the newly configured eth0 network configuration information.
# sudo Mv/etc/udev/rules.d/70-persistent-net.rules/etc/udev/rules.d/70-persistent-net.rules_bak
Or:
#sudo Rm/etc/udev/rules.d/70-persistent-net.rules
Re-start (Ubuntu) system, on the command side input: Ping www.baidu.com, can get the expected results.
In addition, there are other solutions, Links: http://www.ourubuntu.com/learn/2010/0225/779.html
Eth0:error while getting interface flags:no such device no eth0 there are other ETH