ens33 to eth0
Change Default Network Interface Name ens33 to old eth0 in RHEL / Centos 7

Change Default Network Interface Name ens33 to eth0 in RHEL / Centos 7

We noticed that in many of new Linux version Linux/Unix machine network interface name has been changed from eth to ens. In these case sometime we think to change it to old eth naming. In this tutorial we will see How to change Default network interface name ens33 to eth0 in centos 7 and rhel 7 (Linux).

At the time of Boot interfaces are always assigned by ethX it is named by the kernel, where X is is the lowest currently unused number that is starts from 0 (zero). The kernel has no ability to ensure drivers or interfaces are presented in the same order every time. Because of this, every time the system boots, it is necessary that some OS function ensures a given interface is always assigned the same name, so renaming of interfaces will be seen during the boot process. In RHEL 7, this OS function is provided by systemd’s Predictable Network Interface feature. Starting RHEL 7, RedHat has introduced Consistent Network Device Naming which ensures network devices are given consistent names across reboots. It is strongly recommended this feature is not disabled. But if you still want the old ethX naming for the network interfaces, then follow the following steps given below.

Change default Network Interface name ens33 to eth0

  1. First of all, Open /etc/default/grub file and append both net.ifnames=0 and biosdevname=0 parameter values to the files GRUB_CMDLINE_LINUX parameter. To disable Consistent Network Device Naming and the biosdevname naming scheme on RHEL 7/Centos 7.

2. Rebuild the /boot/grub2/grub.cfg file by running the grub2-mkconfig command

3. Go to “/etc/sysconfig/network-scripts” directory  and then Copy the “ifcfg-ens33” network configuration file with new file name “ifcfg eth0“.

4. After Copying the file Open new “ifcfg-eth0” file and edit it as shown below and then Change connection profile NAME as “Wired” and DEVICE name as “eth0“.

Make sure that you made changes in NAME  and DEVICE parameter as shown Below. Once, you have made changes in this network interfaces save all changes.

5. Then start/restart the system using this command to reflect the changes.

6. After restarting the system check network interface with ifconfig or nmcli command.

Method 1: ifconfig command

Method 2: nmcli command

That’s it, This is all about How to change Default network interface name ens33 to eth0 in centos 7 rhel 7 (Linux). If you want to ask any question about this Tutorial comment Below and always Remember to stay connected with the GeekyVaibhav.com for Latest updates about the Linux.

LEAVE A REPLY

Please enter your comment!
Please enter your name here