Niki Kovacs
2015-Feb-04 17:23 UTC
[CentOS] Traditional network interface naming scheme vs. persistent naming
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 -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
dE
2015-Feb-04 17:32 UTC
[CentOS] Traditional network interface naming scheme vs. persistent naming
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 KovacsThose 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.
Les Mikesell
2015-Feb-04 17:38 UTC
[CentOS] Traditional network interface naming scheme vs. persistent naming
On Wed, Feb 4, 2015 at 11:23 AM, Niki Kovacs <info at microlinux.fr> 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? >Probably more than you want to know about this weirdness and the multiple ways of doing it: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/Networking_Guide/Red_Hat_Enterprise_Linux-7-Networking_Guide-en-US.pdf -- Les Mikesell lesmikesell at gmail.com
Possibly Parallel Threads
- Redefine ethX interface names in CentOS 5.11?
- Traditional network interface naming scheme vs. persistent naming
- Bug#748052: Bug#748052: xen-hypervisor-4.3-amd64: No USB keyboard after booting into Dom0
- How to restore the old network interface name?
- Redefine ethX interface names in CentOS 5.11?