Change network interfaces to old eth0 naming

You may noticed that network cards in new Linux have a new naming schema that will looks like eno1236558 or ens 3365777 , and you may don’t feel comfortable with that, the good news that you can get back old naming to eth0 , eth1 , … , let’s do it.

01. Edit grub default values :
vim /etc/default/grub

add the this tow values [ biosdevnames=0 net.ifnames=0 ] to the line that start with GRUB_CMDLINE_LINUX , it will be something like that in UBUNTU (on CentOS it may have many options, add values near the end or whatever ) :

GRUB_CMDLINE_LINUX="biosdevnames=0 net.ifnames=0"
02. Test changes :
grub2-mkconfig

If no errors , it is OK , let’s make it persistent .

03. Make changes persistent :
grub2-mkconfig -o /boot/grub2/grub.cfg

** you may also need to remove default config files for old names in CentOS before reboot.

rm -f /etc/sysconfig/network-scripts/ifcfg-eno*
reboot
04. Test :
ifconfig
ip addr

The NIC interfaces names changed to eth0 , eth1 , … based on how many interface on your system  .
Congratulation .

 

 

Comments are closed.