Re: Traditional network interface naming scheme vs. persistent naming

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



On 02/04/15 22:53, Niki Kovacs wrote:
Hi,

I'm currently experimenting with CentOS 7 in order to get a grasp of everything that's new.

After having read the FAQ entry on network interface names, I decided to revert to the tradictional interface naming scheme by adding the relevant kernel options to the bootloader. This went well, I have now two interfaces names 'eth0' and 'eth1' as expected.

In my office I have another server with two network interface cards, running Slackware64 14.1. On a stock Slackware installation, as soon as there is more than one NIC, the system creates a file /etc/udev/rules.d/70-persistent-net.rules, which looks like this:

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="2c:27:d7:15:54:a1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:64:8a:4c:c2", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Usually I have a 50 % chance of getting the network interface right (well, according to Murphy, I have more like a 100 % chance of getting it wrong the first time :oD). In that case, I simple edit the 70-persistent-net.rules file, permutate the "eth0" and "eth1" entries and then reboot.

How would I go about that under CentOS with traditional interface names? The 70-persistent-net.rules file doesn't exist. Do I have to create it from scratch?

Cheers,

Niki Kovacs

Those are udev rules (which's now integrated with systemd in CentOS 7).

You don't have to create a new one, but you have to find the one. I suggest reading up on the udev rules file.
_______________________________________________
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