我安装了一个新的NIC。它以eth2的形式出现。我希望是eth1。我怎么能这么做?
发布于 2012-10-05 05:40:34
编辑/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"
重新启动
发布于 2014-11-26 04:02:30
您在Red发行版上的接口配置应该位于:
/etc/sysconfig/network-脚本
您将希望为您的接口寻找要修改的适当脚本。
https://serverfault.com/questions/435074
复制相似问题