Note

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

How to: change a network interface name on CentOS 7

Overview:

CentOS 7 has introduced a naming convention for network interfaces that can result in long interface names. You may see this warning during installation:

On some systems, network interface naming conventions can vary, leading to potential issues when InterWorx attempts to append identifiers to longer names.

Network interface names are limited to 16 characters in CentOS. InterWorx appends :iwn to interface names when an IP address is added through InterWorx. If the interface name exceeds 16 characters then the name is truncated, which may conflict with existing interface names.

Solution:

One option is to switch to the old naming convention used in CentOS 6. To do so first edit the /etc/default/grub file by adding these options:

net.ifnames=0 biosdevname=0

Make sure to add these at the end of the  GRUB_CMDLINE_LINUX variable. Test the configuration with the grub command below:

grub2-mkconfig**

If there are no errors apply the change:

grub2-mkconfig -o /boot/grub2/grub.cfg

Then copy your existing network configuration file to the new interface name. For example, if your interface name was originally eno16777984:

cd /etc/sysconfig/network-scripts
cp ifcfg-eno16777984 ifcfg-eth0

Then open ifcfg-eth0 and edit the device name from “eno16777984” to “eth0”:

DEVICE="eth0"

Then reboot your server or restart networking with:

service network restart