Wednesday, December 23, 2009

New MAC ID is always set to eth1

When the default ethernet is set to eth0 but that hardware no longer exists, the PC fails to connect to the network. And that eth0 cannot be set by hand either because udev causes MAC ID conflict on change of hardware.

Possible cause : udev is automatically configured to set the old MAC ID as eth0 and the new ones as eth1

So edit 70-persistent-net.rules to correct this.
Goto /etc/udev/rules.d/70-persistent-net.rules

Look for the entry

# PCI device 0x31e4:0x5555b (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:##:##:##:##:##", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


Now we can see that this is the new MAC ID and this is automatically set to eth1 by udev during boot .So change eth1 to eth0 and comment out the eth0 line.

Restart networking (/etc/init.d/networking restart) to let changes take effect. If it does not then restart.

No comments:

Print chess board in command line

The following bash one-liner will print a chess board in a terminal (the script works for the shells bash and ksh only) for (( i = 1; i ...