Why Is There Yogurt In Your Cap?

If you are like me, you’ve added different NICs to your laptop/PC and had them end up with strange names like “eth2″ when they should be named “eth1″, or whatever is next in line. Well, I know how to fix that (on SLED 10, at least). There is a file, /etc/udev/rules.d/30-net_persistent_names.rules that dictates what the NICs get named. Mine looked like this: (I’ve bolded the ones I want to remove)

SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:41:e2:dd:6b", IMPORT="/lib/udev/rename_netiface %k eth0"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:00:86:50:aa:ca", IMPORT="/lib/udev/rename_netiface %k eth1"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0f:b5:89:29:43", IMPORT="/lib/udev/rename_netiface %k eth2"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:19:d2:34:dc:00", IMPORT="/lib/udev/rename_netiface %k eth3"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:04:e2:fe:a3:98", IMPORT="/lib/udev/rename_netiface %k eth4"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:13:f7:2d:9a:07", IMPORT="/lib/udev/rename_netiface %k eth5"

The eth1, 3 and 4 NICs are not present, so we need to take them out of the file. You’ll have to go by MAC address of the NIC here. I went through and removed the non-existent NIC lines, and changed the assignments of the present NICs. Now my file looks like this:

SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:41:e2:dd:6b", IMPORT="/lib/udev/rename_netiface %k eth0"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:0f:b5:89:29:43", IMPORT="/lib/udev/rename_netiface %k eth1"
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:13:f7:2d:9a:07", IMPORT="/lib/udev/rename_netiface %k eth2"

After you make any changes to this, you’ll need to reboot the system, as the kernel reads this in at boot time. Additionally, if you run VMWare of any sort, you’ll need to run vmware-config.pl and reconfigure your virtual network settings to match up with any changes you made.

Leave a Reply

Proudly powered by WordPress. Theme developed with WordPress Theme Generator.
Copyright &Copy; Why Is There Yogurt In Your Cap?. All rights reserved.