更换或加装网卡的eth编号顺序配置

  某些机器未重装系统更换网卡后,之前的eth0,eth1消失,变为新网卡eth2和eth3
在文件中可以进行调整
vim /etc/udev/rules.d/70-persistent-net.rules里面记录了mac地址与网卡名的对应关系,删除掉就对应条目,更改网卡名重启即可!

# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:64:53:20", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x10d3 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:64:53:21", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

你可能感兴趣的:(rules,网卡,udev)