gentoo小技巧:调整ethX对应的网卡

机子是双网卡的

安装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}段)作调整


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值