ifconfig
command does not show the network interface (for example, eth0
), but may show a new one (for example, eth1
). sudo /etc/init.d/networking restart
shows the error:SIOCSIFADDR: no such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: no such device
Failed to bring up ethX
dmesg | grep eth
may show a message similar to:udev: renamed network interfaces ethX to ethY
To work around this issue, change the persistent udev rules for the network interfaces:
/etc/udev/rules.d/70-persistent-net.rules
in a text editor:sudo vim /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xy", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
ATTR{address}=
field. For example:ATTR{address}=="xx:xx:xx:xx:xx:xw" ... NAME="eth0" # old
ATTR{address}=="xx:xx:xx:xx:xx:xz" ... NAME="eth1" # new
ATTR{address}=="xx:xx:xx:xx:xx:x1" ... NAME="eth0" # old
ATTR{address}=="xx:xx:xx:xx:xx:x2" ... NAME="eth0" # new
ATTR{address}=="xx:xx:xx:xx:xx:x3" ... NAME="eth0" # new