修改/etc/udev/rules.d/70-persistent-net.rules 文件
vi /etc/udev/rules.d/70-persistent-net.rules
打开后会有两行信息如下:
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?“, ATTR{address}==”00:0c:29:5a:6c:73”, ATTR{type}==”1”, KERNEL==”eth“, NAME=”eth0”
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?“, ATTR{address}==”00:0c:29:e5:6b:c4”, ATTR{type}==”1”, KERNEL==”eth“, NAME=”eth1”
删除第一行,然后将第二行最后NAME="eth1" 改为NAME="eth0",如下:
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?“, ATTR{address}==”00:0c:29:e5:6b:c4”, ATTR{type}==”1”, KERNEL==”eth“, NAME=”eth0”