1)修改网卡配置文件并更名ios
cd /etc/sysconfig/network-scripts/vim
mv ifcfg-eno16777736 ifcfg-eth0ide
vi ifcfg-eth0 ui
NAME=eth0ip
2)修改grub文件并从新生成grub配置文件it
vim /etc/default/grubio
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root crashkernel=auto rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us net.ifnames=0 biosdevname=0 rhgb quiet"console
grub2-mkconfig -o /boot/grub2/grub.cfgclass
3)设置udev文件
配置
vim /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:0C:29:7C:96:05",ATTR{type}=="1",KERNEL=="eth*",NAME="eth0"
4)重启
reboot
以上方法的确能够成功,本身使用另外一种方法,即第一步使用nmtui,进行Networ
kManager。具体步骤为nmtui---> Edit a connection---->改网卡名为eth0。第二步为上边
步骤的第一步和第二步,而后直接重启就能够了