#CentOS 7.0更改网卡名称eth
##change network interface from enoxxxxxxx to ethxxxxxxx
1.modify /etc/sysconfig/grub add "net.ifnames=0 biosdevname=0" on GRUB_CMDLINE_LINUX
[root@localhost ~]$ vim /etc/sysconfig/grub
GRUB_CMDLINE_LINUX=" crashkernel=auto net.ifnames=0 biosdevname=0 rhgb quiet"
2.run grub2-mkconfig regenerate grub.cfg
[root@localhost ~]$ grub2-mkconfig -o /boot/grub2/grub.cfg
3.rename network interface config file nema
[root@localhost ~]$ mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]$ mv /etc/sysconfig/network-scripts/ifcfg-eno33554984 /etc/sysconfig/network-scripts/ifcfg-eth1
4.rename network interface name
[root@localhost ~]$ vim /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]$ vim /etc/sysconfig/network-scripts/ifcfg-eth1
5.important step.if not you will lose your network card.
[root@localhost ~]$ vi /etc/udev/rules.d/90-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a3:b1:5c", ATTR{type}=="1", KERNEL=="eth*", NAME="eno16"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a3:b1:8e", ATTR{type}=="1", KERNEL=="eth*", NAME="eno10"
6.reboot
[root@localhost ~]$ reboot
[root@localhost ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:50:8c:6b brd ff:ff:ff:ff:ff:ff
inet 172.16.8.5/24 brd 172.16.8.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe50:8c6b/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:50:8c:75 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.5/24 brd 192.168.2.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe50:8c75/64 scope link
valid_lft forever preferred_lft forever
DONE