Ø 作者:王××(zbwangjian@***.cn)
有啥方法知道在suse上的网卡配置文件和eth0/eth1的对应关系?比如下面这2个配置文件linux-0xlc:~ # ll /etc/sysconfig/network/ifcfg-eth-id-00:1c:c4:a5:8a:8* -rw-r--r-- 1 root root 299 Oct 30 17:48 /etc/sysconfig/network/ifcfg-eth-id-00:1c:c4:a5:8a:8e -rw-r--r-- 1 root root 260 Oct 30 17:48 /etc/sysconfig/network/ifcfg-eth-id-00:1c:c4:a5:8a:8f |
答复:
看下面文件的内容,通过mac地址的对应,可以知道网卡配置文件和eth0/eth1的对应关系。
linux-0xlc:~ # cat /etc/udev/rules.d/30-net_persistent_names.rules
SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:1c:c4:a5:8a:8f", IMPORT="/lib/udev/rename_netiface %k eth1"SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:1c:c4:a5:8a:8e", IMPORT="/lib/udev/rename_netiface %k eth0" |
参考:
SuSE修改网卡标识的方法
http://hi.baidu.com/nj_linux/blog/item/d3006c2300ab865e93580701.html