Results 1 to 7 of 7
For some reason whenever I reboot the server at work the eth number changes and increments by one.
So when the system reboots eth0 becomes eth1, and the next time ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-10-2008 #1Linux Engineer
- Join Date
- Oct 2004
- Location
- Vancouver
- Posts
- 1,366
eth renaming upon reboot?
For some reason whenever I reboot the server at work the eth number changes and increments by one.
So when the system reboots eth0 becomes eth1, and the next time it reboots it becomes eth2, etc.
The problem with this is that the internet cannot establish the static connection until I update the names of the eth devices in /etc/network/interfaces and then run /etc/init.d./networking start. For some reason though the eth is now called eth9. Today when I started the server, I had to change the values listed as eth8 in the interfaces file to eth9 before restarting the networking daemon.
Is there some way to specify which eth# a card is based upon its hardware (mac) address?Last edited by genesus; 04-10-2008 at 06:13 PM. Reason: *typo
Operating System: GNU Emacs
- 04-14-2008 #2
Sounds familiar. But you didn't post information about your distro...
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds
- 04-17-2008 #3
I have the same issue, I am up to eth56 atm.
A new Acer laptop, 7520 - Suse 10.3 - 64 bit. KDE
I see forcedeth setting the nic up, I am not familiar with that.
kumado
- 04-18-2008 #4Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
see /etc/udev/rules.d/*net*persistent*
there you can assign a MAC (hwaddr) to a device name eth<n>. perhaps you have some kind of dummy device which has no initial MAC so rebooting creates a new one and assings a new eth<n> to it.
- 04-18-2008 #5
70-persistent-net.rules has ( sorry for the long listing )
and the file 77-network.rules has:HTML Code:<code> # This file was automatically generated by the /lib/udev/write_net_rules # program run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single line. # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:4c:b9:17", NAME="eth0" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:3a:5a:16", NAME="eth1" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:e3:19:aa", NAME="eth2" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:be:79:8a", NAME="eth3" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:16:8e:e8", NAME="eth4" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:eb:34:28", NAME="eth5" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:a0:87:5f", NAME="eth6" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:fd:50:73", NAME="eth7" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:12:da:14", NAME="eth8" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:4a:ed:ee", NAME="eth9" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:d2:09:31", NAME="eth10" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:4c:ff:d8", NAME="eth11" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:da:61:2b", NAME="eth12" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:d4:1f:fc", NAME="eth13" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:2a:b2:d4", NAME="eth14" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:39:8a:dd", NAME="eth15" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:0e:ca:dc", NAME="eth16" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:a8:02:c9", NAME="eth17" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:c2:cb:14", NAME="eth18" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:7d:52:8e", NAME="eth19" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:d5:5c:1e", NAME="eth20" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:51:1b:af", NAME="eth21" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:be:4b:69", NAME="eth22" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:c0:92:f1", NAME="eth23" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:dd:d1:a1", NAME="eth24" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:1e:74:1e", NAME="eth25" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:58:6f:bc", NAME="eth26" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:ff:60:0c", NAME="eth27" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:df:f3:fa", NAME="eth28" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:90:6c:c5", NAME="eth29" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:68:68:8d", NAME="eth30" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:76:25:09", NAME="eth31" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:57:78:6e", NAME="eth32" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:20:67:e2", NAME="eth33" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:52:62:e9", NAME="eth34" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:36:50:1d", NAME="eth35" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:f2:1d:84", NAME="eth36" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:86:0a:50", NAME="eth37" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:3c:28:40", NAME="eth38" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:3b:d0:63", NAME="eth39" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:c6:66:66", NAME="eth40" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:97:24:79", NAME="eth41" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:65:91:6f", NAME="eth42" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:ca:58:b7", NAME="eth43" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:6d:a7:5c", NAME="eth44" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:6f:83:42", NAME="eth45" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:67:d9:e8", NAME="eth46" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:9a:fb:7d", NAME="eth47" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:f8:2e:7b", NAME="eth48" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:0c:6a:a5", NAME="eth49" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:3d:76:01", NAME="eth50" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:0e:8b:6e", NAME="eth51" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:a4:4d:64", NAME="eth52" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:d5:0b:85", NAME="eth53" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:b0:4f:6e", NAME="eth54" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:f2:52:fd", NAME="eth55" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:d3:09:e0", NAME="eth56" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:67:0c:a7", NAME="eth57" # PCI device 0x10de:0x054c (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:00:6c:c3:a2:32", NAME="eth58" </code>
HTML Code:<code> # Driver module ipw3945 requires an userspace daemon to register network # interfaces. SUBSYSTEM=="drivers", ACTION=="add", DEVPATH=="/bus/pci/drivers/ipw3945", RUN+="ipw3945d.sh" # Network interfaces will be set up automatically by ifup if they are configured # and service network is active. # We also call ifdown although the interface vanished already, because there # might be things to clean up. (E.g. killing ifplugd) # There are interfaces which are created with ifup. We have to ignore these # interfaces here. SUBSYSTEM=="net", ENV{INTERFACE}=="ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*|bond*|vlan*|modem*|dsl*", GOTO="skip_ifup" SUBSYSTEM=="net", ACTION=="add", RUN+="/sbin/ifup $env{INTERFACE} -o hotplug" SUBSYSTEM=="net", ACTION=="remove", RUN+="/sbin/ifdown %k -o hotplug" LABEL="skip_ifup" </code>
and last of interest in there was: 75-persistent-net-generator.rules
HTML Code:<code># do not edit this file, it will be overwritten on update # these rules generate rules for persistent network device naming ACTION!="add", GOTO="persistent_net_generator_end" SUBSYSTEM!="net", GOTO="persistent_net_generator_end" # device name whitelist KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" # ignore the interface if a name has already been set NAME=="?*", GOTO="persistent_net_generator_end" # ignore Xen virtual interfaces SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" # build device description string to add a comment to the generated rule SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver" SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)" DRIVERS=="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}" # skip "locally administered" MAC addresses ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end" DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}" ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" LABEL="persistent_net_generator_end" </code>
I post for info and maybe more help but thanks for the area to look in.
kumado
- 04-19-2008 #6
There are problems with the mac address which changes every time you restart your box. => Network interface id and mac address change on every boot - Ubuntu Forums
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds
- 04-21-2008 #7Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
in 70-persistent-net.rules you can assign your NIC's MAC to one eth<n> device. but since there are 59 different MACs assigned to different ethernet devices, the MAC of your device probably changes during boot. what kind of device is it? try to erase this entries and set a fix MAC in boot.local with 'ifconfig eth<n> hw ether nn:nn:nn:nn:nn:nn' and write this MAC in your 70-persistent-net.rules file.
greets,
McBain


Reply With Quote
