Chinaunix首页 | 论坛 | 博客
  • 博客访问: 130126
  • 博文数量: 25
  • 博客积分: 290
  • 博客等级: 二等列兵
  • 技术积分: 210
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-30 23:13
文章分类

全部博文(25)

文章存档

2015年(10)

2014年(7)

2011年(3)

2010年(1)

2008年(4)

我的朋友

分类: LINUX

2015-01-29 23:44:16

gentoo linux 网卡eno1677736修改成eth0 的方法

localhost ~ # cd /etc/conf.d
建立eth0的配置文件,添加信息如下:
localhost conf.d # cat net.eth0
config_eth0=”192.168.1.21 netmask 255.255.255.0 brd 192.168.1.255″
routes_eth0=”default via 192.168.1.1″

2、建立eth0的启动文件,并设置开机启动
localhost conf.d # cd /etc/init.d/
localhost conf.d # ln -s net.lo net.eth0
localhost conf.d # rc-update add net.eth0 default

3、设备名变更是较新版udev做的事,因为使用了传统命名方式,可以建一空文件
localhost init.d # cd /etc/udev/rules.d/
localhost rules.d # touch 80-net-name-slot.rules

设置以上内容后,重启就可以了
localhost ~ # dmesg | grep eth
[    2.622345] jme: JMicron JMC2XX ethernet driver version 1.0.8
[    8.166952] pcnet32: eth0: registered as PCnet/PCI II 79C970A
[    9.001497] pcnet32 0000:02:00.0 eth0: link up
localhost ~ # ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 192.168.1.21  netmask 255.255.255.0  broadcast 192.168.1.255
inet6 fe80::250:56ff:feaf:1a6d  prefixlen 64  scopeid 0x20<link>
ether 00:50:56:af:1a:6d  txqueuelen 1000  (Ethernet)
RX packets 555  bytes 47970 (46.8 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 291  bytes 37487 (36.6 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 18  base 0x2000





补充:如果只使用DHCP客户端自动分配IP,请执行以下操作:

emerge dhcpcd
rc-update add dhcpcd default

阅读(2957) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~