|
|
发表于 2009-7-18 13:36:50
|
显示全部楼层
比如我现在这台机的/etc/udev/rules.d/70-persistent-net.rules :# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI device 0x10de:0x00df (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:4d:03:22:d1", NAME="eth0"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:4c:78:1e:75", NAME="eth1"
如果你想 udev 下次重新搜索分配 net 设备,你就把其中的# PCI device 0x10de:0x00df (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:4d:03:22:d1", NAME="eth0"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:4c:78:1e:75", NAME="eth1
都删了,如果你是单网卡,我推荐你这样做。但如果你是多网卡,只想改其中的一个,那么你就把原来占用 eth0 的那个删了,把你想指向 eth0 的那个的 NAME 那儿改成 NAME="eth0" |
|