After Centos7 is installed, modify the NIC name eth0.
First, let's disable this predictable naming rule. You can pass the Kernel Parameter "net. ifnames = 0" at startup. This is achieved by editing/etc/default/grub and adding "net. ifnames = 0" to the grubw.linelinux variable.
Run this command to regenerate GRUB configuration and update kernel parameters.
$ Sudo grub2-mkconfig-o/boot/grub2/grub. cfg
Next, edit (or create) A udev network naming rule file (/etc/udev/rules. d/70-persistent-net.rules) and add the following line. Replace it with your own MAC address (08: 00: 27: a9: 7a: e1) and interface (sushi ).
$ Sudo vi/etc/udev/rules. d/70-persistent-net.rules
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 08: 00: 27: a9: 7a: e1 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "sushi"
Finally, restart the computer and verify the new interface name.
Note: view the mac address of the NIC in linux
1. ifconfig-a where the HWaddr field is the mac address
2. Run cat/sys/class/net/eth0/address to view the mac address of eth0.
3. Run cat/proc/net/arp to view the mac address of the remote ip address connected to the local machine.