Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently changed which interfaces are members of my NIC bond. The first ubuntu server I made the adjustments on worked fine, but my second one has ran into issues. Ifconfig is showing a "rename2" interface present. How can I get this all straitened out?

Looking at the output of the udev rule, I want "eth2" and "eth0" to be members of the bond.

EDIT: Okay Matt's fix below fixes this problem temporally. It returns a few reboots later and I have to repeat the process! Any ideas?

Here is /etc/udev/rules.d/70-persistant-net.rules file

# 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, and change only the value of the NAME= key.

# PCI device 0x10ec:/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="a0:f3:c1:00:a0:7a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:99:13:0c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.5/0000:03:00.0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:99:13:0d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

My /etc/network/interfaces

#loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth2
iface eth2 inet manual
bond-master bond0

auto eth1
iface eth1 inet static
address 10.1.10.199
netmask 255.255.255.0
gateway 10.1.10.1
dns-nameservers 8.8.8.8 8.8.4.4

auto eth0
iface eth0 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 192.168.1.2
netmask 255.255.255.0
#bond mode 0 is rr
bond-mode balance-rr
bond-miimon 100
bond-slaves none
mtu 9000

ifconfig -a

bond0     Link encap:Ethernet  HWaddr 00:25:90:99:13:0d  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe99:130d/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:9000  Metric:1
          RX packets:5236 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:782916 (782.9 KB)  TX bytes:395078 (395.0 KB)

eth1      Link encap:Ethernet  HWaddr 00:25:90:99:13:0c  
          inet addr:10.1.10.199  Bcast:10.1.10.255  Mask:255.255.255.0
          inet6 addr: fe80::225:90ff:fe99:130c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10277 errors:0 dropped:415 overruns:0 frame:0
          TX packets:4073 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1384868 (1.3 MB)  TX bytes:540020 (540.0 KB)
          Interrupt:16 Memory:fe9e0000-fea00000 

eth2      Link encap:Ethernet  HWaddr 00:25:90:99:13:0d  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:9000  Metric:1
          RX packets:5236 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:782916 (782.9 KB)  TX bytes:395078 (395.0 KB)
          Interrupt:17 Memory:feae0000-feb00000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:12570 (12.5 KB)  TX bytes:12570 (12.5 KB)

rename2   Link encap:Ethernet  HWaddr 00:25:90:99:13:0c  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

cat /var/log/syslog | grep -i eth

Feb 27 14:42:42 emtestserver2 kernel: [    1.707645] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Feb 27 14:42:42 emtestserver2 kernel: [    1.708359] r8169 0000:01:00.0: eth0: RTL8168e/8111e at 0xf8410000, 00:25:90:99:13:0c, XID 0c200000 IRQ 43
Feb 27 14:42:42 emtestserver2 kernel: [    1.708390] r8169 0000:01:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Feb 27 14:42:42 emtestserver2 kernel: [    1.835800] e1000e 0000:02:00.0: eth1: (PCI Express:2.5GT/s:Width x1) 00:25:90:99:13:0c
Feb 27 14:42:42 emtestserver2 kernel: [    1.835830] e1000e 0000:02:00.0: eth1: Intel(R) PRO/1000 Network Connection
Feb 27 14:42:42 emtestserver2 kernel: [    1.835935] e1000e 0000:02:00.0: eth1: MAC: 3, PHY: 8, PBA No: 0101FF-0FF
Feb 27 14:42:42 emtestserver2 kernel: [    1.943729] e1000e 0000:03:00.0: eth2: (PCI Express:2.5GT/s:Width x1) 00:25:90:99:13:0d
Feb 27 14:42:42 emtestserver2 kernel: [    1.943759] e1000e 0000:03:00.0: eth2: Intel(R) PRO/1000 Network Connection
Feb 27 14:42:42 emtestserver2 kernel: [    1.943863] e1000e 0000:03:00.0: eth2: MAC: 3, PHY: 8, PBA No: 0101FF-0FF
Feb 27 14:42:42 emtestserver2 kernel: [    8.009312] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb 27 14:42:42 emtestserver2 kernel: [    8.009330] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Feb 27 14:42:42 emtestserver2 kernel: [    8.009345] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
Feb 27 14:42:42 emtestserver2 kernel: [    8.090179] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Feb 27 14:42:42 emtestserver2 kernel: [    8.505554] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Feb 27 14:42:42 emtestserver2 kernel: [   10.229052] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
Feb 27 14:42:42 emtestserver2 kernel: [   10.229064] e1000e 0000:02:00.0: eth1: 10/100 speed: disabling TSO
Feb 27 14:42:42 emtestserver2 kernel: [   10.229637] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Feb 27 14:44:10 emtestserver2 udevd[399]: error changing net interface name rename2 to eth1: File exists
Feb 27 14:51:45 emtestserver2 kernel: [    1.726543] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Feb 27 14:51:45 emtestserver2 kernel: [    1.727347] r8169 0000:01:00.0: eth0: RTL8168e/8111e at 0xf8422000, 00:25:90:99:13:0c, XID 0c200000 IRQ 46
Feb 27 14:51:45 emtestserver2 kernel: [    1.727377] r8169 0000:01:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Feb 27 14:51:45 emtestserver2 kernel: [    1.835779] e1000e 0000:02:00.0: eth1: (PCI Express:2.5GT/s:Width x1) 00:25:90:99:13:0c
Feb 27 14:51:45 emtestserver2 kernel: [    1.835809] e1000e 0000:02:00.0: eth1: Intel(R) PRO/1000 Network Connection
Feb 27 14:51:45 emtestserver2 kernel: [    1.835914] e1000e 0000:02:00.0: eth1: MAC: 3, PHY: 8, PBA No: 0101FF-0FF
Feb 27 14:51:45 emtestserver2 kernel: [    1.947925] e1000e 0000:03:00.0: eth2: (PCI Express:2.5GT/s:Width x1) 00:25:90:99:13:0d
Feb 27 14:51:45 emtestserver2 kernel: [    1.947957] e1000e 0000:03:00.0: eth2: Intel(R) PRO/1000 Network Connection
Feb 27 14:51:45 emtestserver2 kernel: [    1.948088] e1000e 0000:03:00.0: eth2: MAC: 3, PHY: 8, PBA No: 0101FF-0FF
Feb 27 14:51:45 emtestserver2 kernel: [    7.896332] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Feb 27 14:51:45 emtestserver2 kernel: [    7.896349] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Feb 27 14:51:45 emtestserver2 kernel: [    7.896363] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
Feb 27 14:51:45 emtestserver2 kernel: [    8.030196] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Feb 27 14:51:45 emtestserver2 kernel: [    8.257699] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Feb 27 14:51:45 emtestserver2 kernel: [    8.877181] bonding: bond0: Adding slave eth2.
Feb 27 14:51:45 emtestserver2 kernel: [    8.953427] bonding: bond0: enslaving eth2 as an active interface with a down link.
Feb 27 14:51:45 emtestserver2 kernel: [    9.028338] e1000e 0000:03:00.0: eth2: changing MTU from 1500 to 9000
Feb 27 14:51:45 emtestserver2 kernel: [   10.013072] e1000e: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
Feb 27 14:51:45 emtestserver2 kernel: [   10.013088] e1000e 0000:02:00.0: eth1: 10/100 speed: disabling TSO
Feb 27 14:51:45 emtestserver2 kernel: [   10.013786] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Feb 27 14:51:47 emtestserver2 kernel: [   11.741054] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Feb 27 14:51:47 emtestserver2 kernel: [   11.780038] bonding: bond0: link status definitely up for interface eth2, 1000 Mbps full duplex.
Feb 27 14:53:13 emtestserver2 udevd[411]: error changing net interface name rename2 to eth1: File exists
Feb 27 14:53:13 emtestserver2 kernel: [   98.504821] bonding: bond0: Interface eth0 does not exist!
share|improve this question
    
If you could post the dmesg output for the NIC detection parts that may help. From memory the rename stuff is all related to whats in the 70-persistent-net.rules file. –  Matt Feb 27 '13 at 23:30
    
Alright one sec, Matt. –  Matthew Feb 27 '13 at 23:33
    
the syslog had more material –  Matthew Feb 27 '13 at 23:39

1 Answer 1

up vote 1 down vote accepted

Backup the file 70-persistent-net.rules. Then clear it out 70-persistent-net.rules so that it has no entries in it. Reboot.

After reboot verify it's now looking normal.

As I recall if the persistent-net rules has any issues like mac addresses different, it'll create those rename adapters. I did have something like this happen a few months back and clearing this file helped.

Also on my systems where bonding is working, I list the bond interface first like this. Not sure if that would make things work better for you or not.

auto bond0
iface bond0 inet static
  address 192.168.1.2
  network 192.168.1.0
  netmask 255.255.255.0
  bond-slaves none
  bond-mode 4
  bond-mmimon 100
  bond-lacp-rate 1

auto eth0
iface eth0 inet manual
  bond-master bond0
  bond-primary eth0 eth1

auto eth1
iface eth1 inet manual
  bond-master bond0
  bond-primary eth0 eth1
share|improve this answer
    
Removing the udev rule fixed it. I didn't know if I could remove it. ;) Thanks! I will also edit my interfaces file just incase. –  Matthew Feb 27 '13 at 23:46
    
I believe that file is created if it doesn't exist. It just means that if you swap NIC's cards around in PCI slots or remove one or add another card etc etc... it guarantees that once assigned eth0 will always belong to a particular device with a particular mac address etc. You could imagine the chaos if the device names changed in a firewall if you need to add another ethernet card. It is a slight annoyance if you have a portable hard drive that you carry around and plug into different computers. The device names will keep changing. –  Matt Feb 28 '13 at 0:31
    
Matt, it's constantly doing this now. If I fix it, then it's back in a few reboots and its killing my DRBD configuration. Any ideas?? This all started after changing the bonding configuration several times. –  Matthew Feb 28 '13 at 18:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.