The classic naming scheme for network interfaces applied by the kernel is to simply assign names beginning with
“eth0”, “eth1”, … to all interfaces as they are probed by the drivers, but these names do not necessarily
correspond to actual hardware slots, PCI geography, USB port number, etc. This introduces a unpredictable naming problems.
CentOS/RHEL 6 has introduced a method for consistent and predictable network device naming for network interfaces.
These features uniquely determine the name of network interfaces in order to make locating and differentiating the
interfaces easier and in such a way that it is persistent across later boots, time, and hardware changes. However,
this naming rule is not turned on by default on CentOS/RHEL 6.
Starting with CentOS/RHEL 7, the predictable naming rule is adopted by default. Under this rule, interface names
are automatically determined based on firmware, topology, and location information.
Here the topology is
en is for Ethernet
o is for on-board
The number is a firmware/BIOS provided index.
A minor disadvantage of this new naming scheme is that the interface names are somewhat harder to read than the traditional names.
For example, you may find names like enp0s3. Besides, you no longer have any control over such interface names.
If, for some reason, you prefer the old way, and want to be able to assign any arbitrary name of your choice to an interface on
CentOS/RHEL 7, you need to override the default predictable naming rule, and define a MAC address based udev rule.
For this first, let’s disable the predictable naming rule by passing “net.ifnames=0” kernel parameter during boot.
This is achieved by editing /etc/sysconfig/grub and append the content “net.ifnames=0 biosdevname=0“ at the line “GRUB_CMDLINE_LINUX”
Then regenerate GRUB configuration with updated kernel parameters by the command
root@server:~$ grub2-mkconfig -o /boot/grub2/grub.cfg
Rename “Eno” network file using”mv”command, type:
mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
Edit “/etc/sysconfig/network-scripts/ifcfg-eth0 ” configuration file and set the value of “Name” and “Device” field to “eth0″.
Then reboot system, after rebooting system, using “ifconfig” command check network interface information again.