vim /etc/udev/rules.d/70-persistent-net.rules
可以看到eth0 eth1兩個。
注釋 NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:48:85:9c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
將 NAME="eth1" 改成NAME="eth0"
並將 ATTR{address}=="00:0c:29:48:85:9c",中的網卡地址改到
/etc/sysconfig/network-scripts/ifcfg-eth0 文件中,HWADDR="00:0C:29:48:85:9C",使他們對應。
reboot 重啟使之生效