CentOS7 modify Nic name
Port naming rules for CentOS7
Nic ports before CentOS6/RHEL6 are named eth *
After CentOS7/RHEL7, the gigabit network port is emN or enp * (N = integer), and The 10-Gigabit network port is p1p2.
Steps for modifying the mode to eth
Edit File
1) vi/etc/sysconfig/grub
GRUB_TIMEOUT = 5
.................
GRUB_CMDLINE_LINUX = "rd. lvm. lv = centos/swap vconsole. font = latarcyrheb-sun16
Net. ifnames = 0 biosdevname = 0rd. lvm. lv = centos/root crashkernel = auto
Vconsole. keymap = us rhgb quiet"
...................
Note: The above marked red is the part to be modified
2) execute the command to take effect
Grub2-mkconfig-o/boot/grub2/grub. cfg
3) Add the planning file vi/etc/udev/rules. d/70-persistent-net.rules.
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 74: 20: cb: xx: 45 ",
ATTR {type} = "1", KERNEL = "eth *", NAME = "eth0"
..........................
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 87: 6e: xx: 86 ",
ATTR {type} = "1", KERNEL = "eth *", NAME = "ethN"
Restart the system!
In addition, we recommend that you write HWADDR in each/etc/sysconfig/network-scripts/ifcfg-eth * Nic configuration file to avoid exceptions!