On Sun, Feb 10, 2008 at 19:27:23 +0200, Tero Mäntyvaara wrote: > Florian Kulzer wrote: >> On Sat, Feb 09, 2008 at 11:58:38 +0200, Tero Mäntyvaara wrote: >>> I have got Debian 4.0r2 and Gigabyte M61P-S3 motherboard and I >>> noticed it has "dynamic" MAC address :-/ >>> >>> I tried to fix the problem with the help of document >>> http://www.debian-administration.org/articles/501 but with no >>> success. The problem is that every time I boot my system Debian >>> finds the new ethernet interface and so I do not have internet >>> connection.
[...] > Many thanks for your answer! :-) Here is the information you requested: > > # lspci -nn | grep -i net > 00:07.0 Bridge [0680]: nVidia Corporation MCP61 Ethernet [10de:03ef] (rev a2) > > # dmesg | egrep -i 'mac|eth' > ACPI: PCI Interrupt Link [LMAC] (IRQs 5 7 9 10 *11 14 15) > forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.56. > forcedeth: using HIGHDMA > 0000:00:07.0: Invalid Mac address detected: 3f:3d:75:4d:1a:00 > Please complain to your hardware vendor. Switching to a random MAC. > eth0: forcedeth.c: subsystem: 01458:e000 bound to 0000:00:07.0 > eth1394: eth0: IEEE-1394 IPv4 over 1394 Ethernet (fw-host0) > eth6: no IPv6 routers present > > # /sbin/ifconfig > eth6 Link encap:Ethernet HWaddr 00:00:6C:B1:C1:64 > inet addr:10.11.12.12 Bcast:10.11.12.255 Mask:255.255.255.0 [...] > # cat /etc/udev/rules.d/z25_persistent-net.rules > # This file was automatically generated by the /lib/udev/write_net_rules > # program, probably run by the persistent-net-generator.rules rules file. > # > # You can modify it, as long as you keep each rule on a single line. > # MAC addresses must be written in lowercase. > > # Firewire device 001a4d0000e18fd8 (ohci1394) > SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:4d:00:00:e1:8f:d8", > NAME="eth0" > > # PCI device 0x10de:0x03ef (forcedeth) > SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:44:27:b6", > NAME="eth1" [ snip: Udev dutifully adds a rule at every reboot because it thinks that each semi-random 00:00:6c:* MAC address corresponds to a new device. Right now we are at eth6. ] > # PCI device 0x10de:0x03ef (forcedeth) > SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:b1:c1:64", > NAME="eth6" > > # cat /etc/network/interfaces > # This file describes the network interfaces available on your system > # and how to activate them. For more information, see interfaces(5). > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > allow-hotplug eth1 > iface eth1 inet dhcp > > Additional information: > The problem is that OS thinks that the MAC address is invalid some how. > I verfied that OS informs at every boot that MAC address is invalid. I > was wondering if this is result of incorrectly programmed Ethernet > physical controller MAC address? My PHY-controller is Realtek RTL8211. I would try this: Edit /etc/udev/rules.d/z25_persistent-net.rules so that it looks like this (not including the "-----" delimiter lines): ------------------------------------------------------------------------ # This file was automatically generated by the /lib/udev/write_net_rules # program, probably run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single line. # MAC addresses must be written in lowercase. # Firewire device 001a4d0000e18fd8 (ohci1394) SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:4d:00:00:e1:8f:d8", NAME="firewire" # PCI device 0x10de:0x03ef (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:*", NAME="eth0" ------------------------------------------------------------------------ Watch out if your email client wraps long lines: There should be exactly two rules (the rest of the lines are comments); each rule starts with "SUBSYSTEM==...", ends with "NAME=...", and has to be written in one line. The idea here is to a) make sure that the firewire device does not interfere with the assignment of eth* names, and b) use the "*" wildcard so that udev recognizes all the possible MAC addresses of the MCP61 as being the same device. (If I understand forcedeth.c correctly, it always picks a MAC address starting with 00:00:6c; only the last three bytes are chosen randomly.) To be on the safe side, I would furthermore use the trick from the debian-administration article to make sure that this computer always presents the same MAC address to the rest of the network. Therefore I would change the stanza for the primary network interface in /etc/network/interfaces to refer to eth0 and add one line to make one of the valid 00:00:6c:* MAC addresses stick (leave the loopback device stanza as it is): # The primary network interface allow-hotplug eth0 iface eth0 inet dhcp hwaddress ether 00:00:6c:b1:c1:64 Then you can reboot and keep your fingers crossed. -- Regards, | http://users.icfo.es/Florian.Kulzer Florian |