Consistent Network Device Naming in RHEL 7

Share this article

  • Traditionally, Linux OSes named network interfaces in the format ethN (e.g. eth0, eth1, etc.). This assignment did not establish any relationship between the interface name and its location on the server. Hence, on a multihomed server, the OS might swap interface names (e.g. eth0 becomes eth1 and vice versa) upon reboot depending on how the drivers were loaded.
  • Dell developed the biosdevname utility (and released it under GPL) to address the network interface name assignment problem on multihomed servers by using fixed names based on firmware/topology/location information.
  • v197 of systemd introduced native support (net.ifnames) for different naming policies into systemd/udevd to address this issue.
  • So, biosdevname and net.ifnames allow for the assignment of fixed names to network interfaces or provide consistent network device naming.
  • One disadvantage of such fixed names is that they’re difficult to read and remember, given that they refer to locations on the server.

Disabling Consistent Network Device Naming on RHEL7

  • If needed, it is recommended to disable consistent network device naming only on servers with a single network interface, as for such servers, there isn’t more than one network interface for consistent network device naming to be relevant.
  • This is achieved by disabling both biosdevname and net.ifnames as per the following method on RHEL7 :

STEP 1: Modify the GRUB2 configuration

  • Edit /etc/default/grub and add  biosdevname=0 net.ifnames=0 to the end of the assignment of GRUB_CMDLINE_LINUX, to disable biosdevname and net.ifnames as shown below:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=vg00/root rd.lvm.lv=vg00/swap rd.lvm.lv=vg00/usr rhgb quiet biosdevname=0 net.ifnames=0"
  • Verify if your modification is acceptable while generating a GRUB configuration file by executing the following command:
sudo grub2-mkconfig
If you see any errors in the output of the above command, then check your modification.

STEP 2: Update the GRUB2 configuration

Execute the following command to update the GRUB2 configuration with the changes.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

STEP 3: Configure Network Interface

Upon disabling consistent network device naming, you may configure the network interface with the name eth0 by disabling NetworkManager and creating /etc/sysconfig/network-scripts/ifcfg-eth0.

STEP 4: Reboot

You may reboot the server using the following command:
sudo reboot

References:

  1. Dell Whitepaper on Consistent Network Device Naming
  2. freedesktop.org article on Predictable Network Interface Names
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Share this article

About: mrkips


Leave a Reply

Your email address will not be published. Required fields are marked *