1. disabling predictable naming rules
# Vim/etc/default/grub
Add two sentences: net.ifnames=0 biosdevname=0
Grub_timeout=5
Grub_default=saved
Grub_disable_submenu=true
grub_terminal_output= "Console"
grub_cmdline_linux= "Rd.lvm.lv=centos/root rd.lvm.lv=centos/swap net.ifnames=0 biosdevname=0 rhgb quiet"
Grub_disable_recovery= "true"
# Grub2-mkconfig-o/boot/grub2/grub.cfg
Generating GRUB configuration file ...
Found Linux Image:/boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd Image:/boot/initramfs-3.10.0-229.el7.x86_64.img
Found Linux Image:/boot/vmlinuz-0-rescue-a8ecfd39a4014521ae54ccef4ada1c67
Found initrd Image:/boot/initramfs-0-rescue-a8ecfd39a4014521ae54ccef4ada1c67.img
Done
2. Modify the NIC configuration file
# cd/etc/sysconfig/network-scripts/
# MV Ifcfg-enoxxxxxx Ifcfg-eth0
3. Modify the name of the device
# Vim/etc/udev/rules.d/70-persistent-ipoib.rules
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:e0:17:54", attr{type}== "1", kernel== "eth*", name= "eth0"
4, restart the system can
This article is from "Huboss's automated operation and Maintenance Road" blog, please be sure to keep this source http://huboss.blog.51cto.com/9883568/1754890
Modify the NIC name in CENTOS7/RHEL7