我已经安装了一个新的网卡。 它显示为eth2。 我希望它是eth1。 我怎么能做到这一点?
编辑/etc/udev/rules.d/70-persistent-net.rules
你可能有这样的东西:
# PCI device 0x14e4:0x165a (tg3) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:19:07:90:e4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x10ec:0x8139 (8139too) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:79:b8:72:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" # PCI device 0x10ec:0x8169 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:a5:84:de:62", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
删除以NAME="eth1"
结尾的行,并将eth2
重命名为eth1
,如下所示:
# PCI device 0x14e4:0x165a (tg3) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:19:07:90:e4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x10ec:0x8169 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:a5:84:de:62", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
重启
Red Hat发行版上的接口configuration应该位于:
的/ etc / SYSCONFIG /networking的脚本
您将需要寻找适合您的界面的脚本进行修改。