1、修改配置
[root@localhost network-scripts]# vim /etc/default/grub
GRUB_CMDLINE_LINUX行加入net.ifnames=0 biosdevname=0
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
2、重新加载配置
[root@localhost network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-957.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-957.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-ccf3d5b13ad841fda22e7b52d42376df
Found initrd image: /boot/initramfs-0-rescue-ccf3d5b13ad841fda22e7b52d42376df.img
done
3、修改网上名称
[root@localhost network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@localhost network-scripts]# mv ifcfg-eno16777736 ifcfg-eth0
[root@localhost network-scripts]# vim ifcfg-eth0
主要修改:
NAME=eth0
DEVICE=eth0
其它的根据业务要求修改。
4、重启网络
[root@localhost network-scripts]# systemctl restart network