CentOS 7.x System network card naming rules are redefined, may be "eno167777xx", and so on, we will change the network card name to eth0 this.
First, cd/etc/sysconfig/network-scripts/ #进入网卡配置目录
MV eno16777736 Ifcfg-eth0 #修改名称
Second, Vi/etc/sysconfig/grub #编辑
Add a "net.ifnames=0 biosdevname=0" to the "grub_cmdline_linux" variable
Third, the operation command:grub2-mkconfig-o/boot/grub2/grub.cfg #重新生成grub配置并更新内核参数
Iv. rules for adding udev
Create a network adapter rule "70-persistent-net.rules" in the "/ETC/UDEV/RULES.D" directory and write the following statement:
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:dc:dd:ad", attr{type}== "1", kernel== "eth*" , name= "Eth0"
#ATTR {address}== "00:0c:29:dc:dd:ad" is the MAC address of the NIC
VI 70-persistent-net.rules #添加
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:dc:dd:ad", attr{type}== "1", kernel== "eth*" , name= "Eth0"
Nic has been changed to eth0