Dec 102008
 

This is happening, for instance, when moving a Virtual Machine from one Server to another or when changing the physical network adapter of a server.

The reason is that NIC’s MAC Address changes, therefore Linux perform a new HW detection and creates new adapter definition, ending in situation where there’s no more eth0 but only eth1… and if /etc/networks was configured to use eth0 it will default to DHCP mode causing issues.

How to solve?

You need to edit file /etc/udev/rules.d/70-persistent-net.rules

In this file you will find one line per each network device detected.

For instance in case of detected eth1 and disappeared eth0 it will probably read something like:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:74:1f:c6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:72:6f:c8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

where the second entry reports the currently detected MAC address.

How to solve this?

Delete the first line and edit the second line changing "eth1" in "eth0"… then I guess you need to reboot and eth0 will automagically reappear.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)