Network interface name changed to “renamex”

Leave a comment

On VMware virtual machine hot added new virtual network interface (NIC). The newly added network interface is of VMXNET3 type. Initially kernel named the new network interface as “eth0”. Post server reboot network interface device name changed from “eth0” to “rename2”. But the other existing network interface name remains same as “eth1”.

[    3.582159] eth0: NIC Link is Up 10000 Mbpsvmware-suse-guest-vmxnet3-nic
[    3.598345] eth1: NIC Link is Up 10000 Mbps
[    3.741375] udev: renamed network interface eth0 to rename2
[  130.435772] bonding: bond0: Adding slave eth1.

Found this behavior in SUSE Linux 11 SP4 system with kernel version “3.0.101-63”. Most important it is VMware VM.

Will it be persistent?

The new network interface (rename2) was fully functional. I am able to configure IP and connect to the network. Still confused about why the network interface device named in non-standard format? The bonding slaves are identified through kernel device names. Much worried about would this new name be persistent across reboot or vmotion?

Not sure, hence wanted to change the device name back to standard format such as “ethx”. Along with that have to ensure device name should be persistent.

Query network interface status

This is the current adapter status after reboot.

# ifstatus rename2
    rename2   device: VMware VMXNET3 Ethernet Controller (rev 01)
              No configuration found for rename2

# ifstatus eth0
    eth0      device: VMware VMXNET3 Ethernet Controller (rev 01)
    eth0      is up

# hwinfo --netcard |egrep -i 'HW|device file|driver'
  Driver: "vmxnet3"
  Driver Modules: "vmxnet3"
  Device File: rename2
  HW Address: 00:50:56:85:0e:7d
  Driver Info #0:
    Driver Status: vmxnet3 is active
    Driver Activation Cmd: "modprobe vmxnet3"

------

  Driver: "vmxnet3"
  Driver Modules: "vmxnet3"
  Device File: eth0
  HW Address: 00:50:56:8a:43:bf
  Driver Info #0:
    Driver Status: vmxnet3 is active
    Driver Activation Cmd: "modprobe vmxnet3"

Note: The “hwinfo” command may not work in redhat systems.

Solution

Step1 – Failed

As first step, added custom udev rule like below in /etc/udev/rules.d/70-persistent-net-rules. This rule will change the kernel name “rename2” to “eth2”. It did not work as expected.

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, KERNELS==”0000:0b:00.0″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”rename*”, NAME=”eth2″

After few reboot attempts above rule got erased from system. Do not know how? Again one of network interface been named as “rename2”.

Step2 – Succeeded

Found VMware tools running with out-dated version in problematic guest. That is SUSE Linux 11 SP4. Updated VMware-tools to latest available version and did reboot the server.

Amazing!!  The available two network interface cards been named as eth0 & eth1 by kernel automatically.

If you are not sure about installing VMware tools please follow this VMware KB article. It help you to install latest version of VMware-tools on Linux guests.

Root cause

I was excited to know the root cause. The kernel named network interface madly because the current udev rules could not able to handle VMXNET3 type interfaces properly. May those rules would have been placed by previous version of VMware tools. The latest VMware-tools read the kernel event and placed appropriate udev rules. This can be seen in file /etc/udev/rules.d/70-net-persistent-rules.

# PCI device 0x15ad:0x07b0 (vmxnet3)

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:85:3f:40″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

# PCI device 0x15ad:0x07b0 (vmxnet3)

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:85:42:98″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

Thereafter VMware tools will take care of providing persistent device names whenever you add new virtual network interface card or disk. By inserting appropriate udev rules automatically. It sound great, isn’t?

Second victim

Found the same behaviour in another SUSE 11 SP4 system. As said above kernel behaves madly while naming network interface cards. See the dmesg output. This issue has been sorted out by upgrading VMware tools.

[    3.454559] eth0: NIC Link is Up 10000 Mbps
[    3.463366] eth1: NIC Link is Up 10000 Mbps
[    3.547585] udev: renamed network interface eth0 to rename2
[   95.435545] udev: renamed network interface eth1 to eth0

At last found solution. I would like to hear feedback? Please post here.

Leave a Reply

Your email address will not be published. Required fields are marked *