Header Shadow Image

Disable Linux Network Interface Renaming

Here we will adjust two boot options to prevent the newer releases of RHEL 7, CentOS 7 and Fedora from renaming our interfaces with names such as enp3S0, enp5s6, enp5s0, enp3s6 etc.  

To prevent our network interfaces from getting renamed, we can add two simple kernel parameters to our configuration to reenable out traditional naming of eth0, eth1, eth2, bond0 etc.  Simply add the following line to /etc/default/grub ( Symlinked to /etc/sysconfig/grub ) then run grub2-mkconfig to generate the /boot/grub2/grub.cfg if editing the first file doesn't work, to revert the system to the expected naming convention:

kernel /vmlinuz-3.10.5-201.fc19.i686 ro root=LABEL=/ SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us net.ifnames=0 biosdevname=0

And your interfaces will be named with ethX again:

[root@localhost log]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::20d:88ff:fe38:a34  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:88:38:0a:34  txqueuelen 1000  (Ethernet)
        RX packets 8661  bytes 8553277 (8.1 MiB)
        RX errors 0  dropped 58  overruns 0  frame 0
        TX packets 5480  bytes 667657 (652.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@localhost log]#

And that's it!


Leave a Reply

You must be logged in to post a comment.

  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License