Re: Traditional network interface naming scheme vs. persistent naming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Le 04/02/2015 18:48, m.roth@xxxxxxxxx a écrit :
That directory, and that file, exist in CentOS, also, since 6. And the new
naming... it's*so*  much easier to deal with... yeah, right, I'll run the
install, and wait till it hangs, so I can see that the NIC is named, what
was it, on that HP last month, oh, yeah, I need to use ip -f inet link,
far simpler than ifconfig, yes, it's ens3f0....

         mark "why would I*possibly*  prefer a same-on-every-box eth0?"*

* For the satire-impaired, this is satire.

LOL !!!

After a bit more experimenting, looks like I've found a clean solution for this. Simply create the /etc/udev/rules.d/70-persistent-net.rules file from scratch and edit it like this:

# /etc/udev/rules.d/70-persistent-net.rules
#
# eth0
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
  ATTR{address}=="00:1e:c9:42:84:7b", ATTR{type}=="1", \
  KERNEL=="eth*", NAME="eth0"
# eth1
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", \
  ATTR{address}=="00:30:f1:6a:2f:40", ATTR{type}=="1", \
  KERNEL=="eth*", NAME="eth1"

Reboot, and everything's working as expected.

Cheers,

Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info@xxxxxxxxxxxxx
Tél. : 04 66 63 10 32
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos





[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux