vim /etc/sysconfig/grub
#往文件中GRUB_CMDLINE_LINUX行中value中添加”net.ifnames=0 biosdevname=0”内容。
#执行grub2-mkconfig -o /boot/grub2/grub.cfg
#重启系统
[root@compute ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=9f392bc3-0d09-4593-bcd9-d4e2c7c72685
DEVICE=eno16777736
ONBOOT=yes
IPADDR=192.168.111.163
NETMASK=255.255.255.0
GATEWAY=192.168.111.1
DNS1=192.168.111.2
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=9f392bc3-0d09-4593-bcd9-d4e2c7c72685
DEVICE=eno16777736
ONBOOT=yes
IPADDR=192.168.111.163
NETMASK=255.255.255.0
GATEWAY=192.168.111.1
DNS1=192.168.111.2