Example:
vi /etc/udev/rules.d/70-persistent-net.rules
[root@server ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program,run by the persistent-net-generator.rules rules file.
#
# You can modify it,as long as you keep each rule on a single
# line,and change only the value of the NAME= key.
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:50:56:bc:8e:6c",ATTR{type}=="1",KERNEL=="eth*",NAME="eth1"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:81:6a",NAME="eth0"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:2b:83",NAME="eth10"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:9b:f1",NAME="eth2"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:53:f2",NAME="eth9"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:46:32",NAME="eth3"
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net",ATTR{address}=="00:50:56:bc:9f:0c",NAME="eth8"
[root@server ~]#
http://www.jb51.net/os/RedHat/233588.html
原文链接:https://www.f2er.com/centos/380461.html