For When You Can't Have The Real Thing
[ start | index | login ]
start > CentOS > 6 > Revert To eth Device Names

Revert To eth Device Names

Created by dave. Last edited by dave, 9 years and 351 days ago. Viewed 3,034 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
(2014-05-05)

Problem:

I have a piece of software that expects my first ethernet device to be called eth0, not em1.

Solution:

This worked for me.

  • add "biosdevname=0" to the kernel line in grub
  • create a /etc/udev/rules.d/70-persistent-net.rules with these two lines (make sure the MAC addresses are those from your interfaces, not these):
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:b1:56:ca:f0:56", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:05:ca:21:82:79", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
  • rename the ifcfg-em1 file to ifcfg-eth0 and edit appropriately (change the device name) and do the same for any other defined interfaces you have
Reboot and it should come up.

(>>Source:>>http://allaboutfedora.blogspot.ca/2011/10/f15-going-back-to-eth0-eth1.html)

Commentary

RedHat does >>some hand-waving saying that potentially this might be a bad idea, to the point of saying biosdevname=0 should be considered an install-time option. On the other hand it talks about removing the 70-persistent-net.rules file and that didn't exist for me. So bad things might be about to happen to me down the road, but so far I'm OK.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt