Note

You are viewing the documentation for an older release of Interworx (8.0). To see documentation for the current generally available release of Interworx, click here: 8.2.

How To: Change a Network Interface Name

EL7 introduced a new naming convention for network interfaces that can result in long interface names.

This convention has continued into EL8 and EL9.

InterWorx appends :iw{n} to the interface name when an IP address is added through InterWorx.

As network interface names are limited to 16 characters, if the interface name exceeds 16 characters, the name is automatically truncated. This may conflict with existing interface names, and has the potential to cause networking issues.

To Change the NetWork Interface Name to Match eth0 Conventions

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. Using a text editor, open /etc/default/grub. The following example uses the Vim text editor:

    vim /etc/default/grub
    
  3. In edit mode, add the following to the end of the GRUB_CMDLINE_LINUX variable:

    net.ifnames=0 biosdevname=0
    
    • The line will look like this:

      GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"
      
  4. Save the change and exit the file

  5. Run the following to test the configuration:

    grub2-mkconfig**
    
  6. If there are no errors apply the change:

    grub2-mkconfig -o /boot/grub2/grub.cfg
    
  7. Copy the existing network configuration file to the new interface name

    • Example, changing eno16777984 to eth0:

    cd /etc/sysconfig/network-scripts
    cp ifcfg-eno16777984 ifcfg-eth0
    
  8. With a text editor, open the network configuration file

    vim ifcfg-eth0
    
  9. In edit mode, edit the DEVICE variable to reflect the new name

    DEVICE="eth0"
    
  10. Save the change and exit the file

  11. Reboot, or restart networking

systemctl restart network