How to change default network interface name to “eth0″ in CentOS/RHEL 7



Edit file /etc/default/grub and Search for the line “GRUB_CMDLINE_LINUX” and append the following: “net.ifnames=0 biosdevname=0″ after auto rhgb quiet .

Will look like this:
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto  vconsole.keymap=us rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"

Now create new configuration based on the current running system
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-e95ce9b9214e4b8dab09feac2cdf5004
Found initrd image: /boot/initramfs-0-rescue-e95ce9b9214e4b8dab09feac2cdf5004.img
done

Rename  old network configuration file and change DEVICE name ens33 to eth0 in ifcfg-eth0
# mv /etc/sysconfig/network-scripts/ifcfg-ens33 /etc/sysconfig/network-scripts/ifcfg-eth0

Reboot system and check the status
# ifconfig
eth0: flags=4163  mtu 1500
        inet 192.168.35.150  netmask 255.255.255.0  broadcast 192.168.35.255
        inet6 fe80::808:fded:4e90:3dad  prefixlen 64  scopeid 0x20
        ether 00:0c:29:fc:2e:d1  txqueuelen 1000  (Ethernet)
        RX packets 51  bytes 6126 (5.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 82  bytes 14020 (13.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0