Alfred von Campe
2012-Apr-19 14:41 UTC
[CentOS] Using eth0 on desktops with single network interface
What is the best way to stop CentOS 6 from renaming the eth0 interface to em1? I've googled a bit and found many relevant posts, but have still not come up with an elegant solution. One of the resources I found was http://www.arachnoid.com/linux/network_names/index.html, and while the Python script contained therein does create a new udev rule that renames em1 back to eth0 it feels kludgy and requires me to manually create the ifcfg-eth0 script. I'm looking for a way to stop udev from renaming the interface in the first place, preferably something that allows me to automate it via kickstart so that any new systems I deploy will have a permanent fix. I'll push a fix to any systems I already have deployed with CentOS 6 that have this problem. On some of my systems I have a 70-persistent-net.rules file with a comment that says it was generated by /lib/udev/write-net-rules, but I don't remember what I did to get it generate that rule, much less how to automate it and get it to work reliably (on one of my systems I have that rule but the interface is sill named em1). BTW, the em1 name only appears to be an issue on my newer Dell desktops; the older IBM/Lenovo systems I support are all using eth0 Thanks, Alfred
Scott Robbins
2012-Apr-19 15:25 UTC
[CentOS] Using eth0 on desktops with single network interface
On Thu, Apr 19, 2012 at 10:41:07AM -0400, Alfred von Campe wrote:> What is the best way to stop CentOS 6 from renaming the eth0 interface to em1?I don't know when CentOS started doing this--I know when I did a fresh CentOS 6.x install (back when 6.x was first available), it didn't do it. I believe the Fedora solutions should work. http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming Oops, that's not the solution.... that's here.. http://fedoraproject.org/wiki/Talk:Features/ConsistentNetworkDeviceNaming -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6