免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1761 | 回复: 0
打印 上一主题 下一主题

修改eth5为eth0 [复制链接]

论坛徽章:
5
寅虎
日期:2015-01-20 09:16:52亥猪
日期:2015-01-21 14:43:44IT运维版块每日发帖之星
日期:2015-12-17 06:20:00每日论坛发贴之星
日期:2015-12-17 06:20:00每周论坛发贴之星
日期:2015-12-20 22:22:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-07 10:07 |只看该作者 |倒序浏览
我的以前是eth5
root@ubuntu:/etc/udev/rules.d# ifconfig

eth5      Link encap:Ethernet  HWaddr 00:0c:29:c6:bc:7c  
          inet addr:192.168.16.25  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fec6:bc7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1111 errors:0 dropped:0 overruns:0 frame:0
          TX packets:871 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:152479 (152.4 KB)  TX bytes:106075 (106.0 KB)
          Interrupt:18 Base address:0x2000
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4000 (4.0 KB)  TX bytes:4000 (4.0 KB)
更改如下文件,看好你的mac地址
root@ubuntu:/etc/udev/rules.d# vim /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.

# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:0e:ad:8a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"
# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:26:0b:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:d5:16:28", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:fe:47:db", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3e:b1:4f", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
下面这里mac地址我对应的,是eth5,我改为eth0了
# PCI device 0x1022:0x2000 (pcnet32)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:c6:bc:7c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
root@ubuntu:/etc/udev/rules.d# init 6

重启后从新登录
root@ubuntu:~# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0c:29:c6:bc:7c  
          inet addr:192.168.16.25  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fec6:bc7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8409 (8.4 KB)  TX bytes:11509 (11.5 KB)
          Interrupt:18 Base address:0x2000
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6124 (6.1 KB)  TX bytes:6124 (6.1 KB)


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/71666/showart_2020418.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP