使用命令:
使用 ip link
ip link set eth0 name eth2
ip link set eth1 name eth0
ip link set eth2 name eth1
修改配置文件
修改
/etc/sysconfig/network-scripts/ifcfg-eth0中的
DEVICE=eth0
HWADDR=00:1e:ec:0f:79:f6
並將下面文件中修改成和上述一致
/etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x14e4:0x1713 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:ec:0f:79:f6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x14e4:0x1713 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:ec:0f:79:f7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"