Search This Blog


New Interface Naming Conventions

To have interfaces named in a more consistent fashion not only is RedHat pushing forward biosdevname on Dell systems. They've now introduced a consistent network interface naming convention using systemd+udev.

The way in which it functions is well described in redhat documentation.

Basically, it's an iterative approach to finding a consistent naming convention via PCI Bus mappings which should provide more consistency than the "I detected this interface first therefore it should be eth0" convention.

In order to figure what devices will be named though can be a bit tricky and mapping those devices back to actual cards can be even harder depending on the tools you have at your disposal.

I'll show an example of how network interfaces can be named

For example, my first Intel interface is:
04:02.0 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)
 Subsystem: Super Micro Computer Inc Device 117a
 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 54
 Memory at dd300000 (64-bit, non-prefetchable) [size=128K]
 I/O ports at 3000 [size=64]
 Capabilities: [dc] Power Management version 2
 Capabilities: [e4] PCI-X non-bridge device
 Capabilities: [f0] MSI: Enable- Count=1/1 Maskable- 64bit+
 Kernel driver in use: e1000

Since the convention for RHEL7 is to name via pci bus mapping using ps[f][d] if it cannot find any firmware name, I will end up with


We can confirm this by doing an ip addr show
ip addr show enp4s2f0
2: enp4s2f0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:30:48:2e:ed:d8 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic enp4s2f0
       valid_lft 149435sec preferred_lft 149435sec
    inet6 fe80::230:48ff:fe2e:edd8/64 scope link 
       valid_lft forever preferred_lft forever

Now these features can be disabled if required by supplying the following kernel parameters:
This will remove any kind of new naming conventions including biosdevname

To make these modifications perform the following:
Edit /etc/default/grub
At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
Save the file
Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
Type "reboot"

Example results when removing kernel parameters:
No parameters: NIC identified as "enp5s2".
Parameter biosdevname=0: NIC identified as "enp5s2".
Parameter net.ifnames=0: NIC identified as "em1".
Parameter net.ifnames=0 AND biosdevname=0: NIC identified as "eth0".

These naming conventions may be difficult to remember but they can definitely be easier to keep consistent. What you might want to do is support all naming conventions for the sake of reboot consistency.

IMPORTANT NOTE: Interface names are naming using hex. So interfaces with a name of 42 would appear as 66.


No comments:

Post a Comment