网络接口的永久性命名
SUSE:
在SUSE9.3中,SUSE更改了检测网卡和接口的方法。在过去,网络配置和硬件初始化联合进行,在9.3中,硬件配置与网络配置相互独立。例如,如果某个网卡失败,将给检测到的下一个网卡分配接口名称(如eth0),在多网络环境中,这可能成为致命错误。如果需要能使用一个特定网卡,应该添加 PERSISTENT_NAME=nic0 到该网卡的配置文件(/etc/sysconfig/network/ifcfg-*),nic0 是想赋予该卡的永久性名称。这个名称不能是普通接口名称(eth0,wlan0等),并且必须具有唯一性,以便它不会妨碍SUSE9.3使用网络方式的方式。
如果不设置永久性名称,网络接口更改它们的名称所导致的问题,在SUSE10.0中已经解决,它有一个方法,在文件/etc/udev/rules.d/30-net_persistent_names.rules中记住每个接口的名称。PERSISTENT_NAME将不再在/etc/sysconfig/network/ifcfg-*文件中设置。
Slackware 12:
/etc/udev/rules.d/75-network-devices.rules
# Local network rules to name your network cards.
#
# These rules were generated by nethelper.sh, but you can
# customize them.
#
# You may edit them as needed.
# (If, for example, your machine has more than one network
# card and you need to be sure they will always be given
# the same name, like eth0, based on the MAC address)
#
# If you delete this file, /lib/udev/nethelper.sh will try to
# generate it again the next time udev is started.
KERNEL=="eth?", ATTR{address}=="00:16:d3:92:03:2a", NAME="eth0"
阅读(1393) | 评论(0) | 转发(0) |