For some reason, Ubuntu keeps assigning my network interface wrong MAC address. This happens only after fresh boot (I have dual boot with WinXP, if I start Windows first and then restart to Ubuntu without switching computer off, the MAC is correct).
Contents of /etc/udev/rules.d/70-persistent-net.rules:
Code:
# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:19:ef:1c:3d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x001c (ath5k_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:17:c4:78:f4:f8", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:70:8b:13:72", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# USB device 0x:0x (rtl8187)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:1f:36:13:ed", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:f3:f5:ef:fe:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
Only the last MAC (00:f3:f5:ef:fe:56) is correct, the other two for eth0, eth1 are wrong. However, I keep getting only eth1 with incorrect MAC as the only network interface available.
I tried deleting the eth0, eth1 lines from /etc/udev/rules.d/70-persistent-net.rules and disabling /lib/udev/rules.d/75-persistent-net-generator.rules, but the problem persists, i.e. Ubuntu seems to be ignoring the udev rules.
EDIT: I made a workaround by adding
Code:
auto eth0
iface eth0 inet dhcp
hwaddress ether 00:f3:f5:ef:fe:56
to /etc/network/interfaces and it works. However, I'd still like to know why Ubuntu ignores my udev rules, regardless whether the workaround happens to work or not...