机子是双网卡的
安装gentoo时载板的网卡对应eth0
pci网卡对应的eth1,需要设置dhcp还是static方式
安装好进入gentoo后不知道为什么就互换了(漂移吧)。。。
载板网卡为eth1,pci网卡为eth0
另外校园网的认证程序也是默认eth0的。。。烦死
google一下
得到 http://os.it168.com/a2007/0905/961/000000961970.shtml
可知ethX与网卡的对应关系在/etc/udev/rules.d/XX-persistent-net.rules 中
我的是/etc/udev/rules.d/70-persistent-net.rules
cat /etc/udev/rules.d/70-persistent-net.rules
kimffy@gentoo-kimffy ~ $ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6c:f0:49:df:10:01", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:83:45:e9:e8:00", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
按网卡对应的mac(ATTR{address}段)作调整