1、修改前我的网卡信息是这样的:

wKiom1m_gmqAaqD9AABcl54AQ84297.png-wh_50

2、打开网卡配置文件,把配置文件中的NAME参数改成eth0

命令:【root@localhost etc# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736

wKiom1m_goOD6zrHAAAlNdQJnW8289.png-wh_50

3、将网卡的配置文件的文件名改成ifcfg-eth0:

命令:root@localhost network-scripts# mv ifcfg-eno16777736  ifcfg-eth0

wKiom1m_grmyP8z6AAAS6DmEwqc496.png-wh_50

4、修改grub配置文件,即“/etc/sysconfig/grub在“GRUB_CMDLINE_LINUX”变量中添加一句“net.ifnames=0 biosdevname=0.

 

命令:【root@localhost network-scripts# vi  /etc/sysconfig/grub

wKiom1m_gy3AAYsRAAAeSRfzAbY948.png-wh_50

 

5:重新生成grub配置:

命令:root@localhost network-scripts#grub2-mkconfig  -o  /boot/grub2/grub.cfg

wKiom1m_g0qxsZH2AAAiCYItWpQ497.png-wh_50

 

6步:重启系统,查看网卡信息,顺便测试一下上外网(说明修改成功!!):

wKiom1m_g16h7KGrAABmSZNrsmM080.png-wh_50