Mar 8, 2009

Cloning servers/changing hardware: network problem with eth0

Last week i took a hard disk out of one computer and put it into another one.
Operating system was debian lenny, so no worries about re-activating the OS. But the computer started without bringing up the network on eth0. After some investigation i knew
  • the network card was known by the kernel:
    03:05.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)
  • the appropriate kernel module was loaded
  • if i changed eth0 to eth1 in /etc/network/interfaces, the second network interface was used without any problem

So what was going on here?
The only difference between the two computers was the MAC address of the NICs...
After some further investigation, here the solution:

The package udev had created a file named /etc/udev/rules.d/z25_persistent-net.rules
and this file contained the following entry:

SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:12:34:56:78:90", NAME="eth0"

After changing the MAC inside this file, eth0 came up on the new computer like expected.

No comments:

Post a Comment