[CentOS] Using eth0 on desktops with single network interface

Scott Robbins scottro at nyc.rr.com
Thu Apr 19 18:14:39 UTC 2012


On Thu, Apr 19, 2012 at 01:22:49PM -0400, Alfred von Campe wrote:
> On Apr 19, 2012, at 11:25, Scott Robbins wrote:
> 
> > http://fedoraproject.org/wiki/Talk:Features/ConsistentNetworkDeviceNaming
> 
> Removing the biosdevname RPM sounds promising, and I'll test it with a kickstart install this afternoon.  However, what's the best way to fix existing systems?  If I just remove the biosdevname RPM and reboot, I don't think that eth0 will come up, as there is no ifcfg-eth0 script.  Do I have to rename the ifcfg-em1 script and fix the DEVICE name inside the file?  Or is there a way to regenerate  the ifcfg-eth0 file from the command line?
> 

What I do is this for an existing one.  

I change /etc/sysconfig/network-scripts/ifcfg-whatever to ifcfg-eth0 (or
whatever it might be, e.g., eth0 and eth1).  

Then, in the file itself, I edit the necessary line.  (I think it's just
one line, I don't have one here to look at, but IIRC, it's just the one
line that uses pc1p1 or em1 or whatever, and I change that to, for
example, eth0).

The other lines in the file should be fine--the ones referring to
hardware address, IP, and so on. 

As mentioned, I rename the file.  One then removes the biosdevname
package.  I've never gotten it working without a reboot--service network
restart doesn't work for me--on the other hand, I think I've only run
into it with Fedora so far.

To further complicate matters, the last that I read, on virtual
machines, it will continue to use eth0, eth1, and so on, rather than
this new naming scheme.


-- 
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6




More information about the CentOS mailing list