Recipes

Disable consistent network device naming

  1. Edit /etc/default/grub and add "biosdevname=0 net.ifnames=0" to GRUB_CMDLINE_LINUX line
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet biosdevname=0 net.ifnames=0"
  1. Regenerate grub configuration: grub2-mkconfig -o /boot/grub2/grub.cfg

  2. Rename /etc/sysconfig/network-scripts/ifcfg-en* to ifcfg-eth*

cd /etc/sysconfig/network-scripts

mv ifcfg-ens192 ifcfg-eth0

  1. Edit the configuration file and replace these two lines with eth0

vi ifcfg-eth0

NAME=eth0
DEVICE=eth0
  1. Reboot the server: reboot