zoukankan      html  css  js  c++  java
  • eth0: error fetching interface information: Device not found

    转载,原文出处:http://zh888.blog.51cto.com/1684752/775447

    亲测有效,感谢作者!!!

    ----------------------------分割线----------------------------------------------------

    eth0不见了的处理方法
     
    1.刚开始运行ifconfig eth0发现网卡不见了。
    [root@localhost ~]# ifconfig eth0
    eth0: error fetching interface information: Device not found //但是network-scripts里的配置文件全部是eth0的,为什么获取不到也不知道为什么?
    处理解决方法只能用eth1替换eth0了,自己创建modprobe.conf文件里面alias eth0 e1000e但是不能识别。
     
    2.[root@localhost network-scripts]# mii-tool //查看网卡连接状态
       eth1: negotiated 100baseTx-FD, link ok
     
    3.[root@localhost network-scripts]# ifconfig eth1//能发现eth1网卡
     
    4.[root@localhost network-scripts]# mv ifcfg-eth0 ifcfg-eth1//修改eth0为eth1
     
    5.[root@localhost network-scripts]# vi ifcfg-eth1
    DEVICE=eth1//把eth1修改为eth0
    ONBOOT=yes//启动激活
    TYPE=Ethernet
    BOOTPROTO=static//静态ip
    IPADDR=192.168.xx.40
    NETMASK=255.255.255.0
    GATEWAY=192.168.xx.254
     
    6.[root@localhost ~]# cd /etc/sysconfig/networking/ //进入networking目录
    [root@localhost networking]# ls//里面有两个文件把里面的设备修改为ifcfg-eth1即可。
    devices  profiles
     
    7.[root@localhost devices]# /etc/rc.d/init.d/network restart //重新启动network守护进程。
    Shutting down interface eth1:                              [  OK  ]
    Shutting down loopback interface:                          [  OK  ]
    Bringing up loopback interface:                            [  OK  ]
    Bringing up interface eth1:                                [  OK  sss]
     
    8.[root@localhost devices]# ping www.baidu.com //最后ping 百度通了
    PING www.a.shifen.com (220.181.111.148) 56(84) bytes of data.
    64 bytes from 220.181.111.148: icmp_seq=1 ttl=52 time=33.1 ms
    64 bytes from 220.181.111.148: icmp_seq=2 ttl=52 time=33.3 ms
    64 bytes from 220.181.111.148: icmp_seq=3 ttl=52 time=33.4 ms
     
    遇到的问题:
    刚开始因为以为驱动问题,lsmod看了一下加载的驱动为e1000e,所以在 /etc/modprobe.d/里添加了modprobe.conf文件可是还是不行。
    dmesg查看启动信息查看网卡信息为e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
    后来查看/lib/modules/2.6.32-71.el6.i686/modules.alias 添加alias eth0 e1000e 还是不行,只能用eth1代替eth0
  • 相关阅读:
    zigbee设备在Zstack中的体现
    第十一章 多态性练习
    IAR 下载 Fatal error: Failed to identify device. Check connections and/or reset hardware
    第十章 继承与派生练习题
    第九章 类和对象练习题(下)
    代码实现判断主机字节序(大端 or小端 )-- 面试题
    winrar解压时出现诊断信息怎么办?
    在线编译网站(持续更新)
    离线环境升级python及安装模块
    Zabbix监控DB,Tomcat
  • 原文地址:https://www.cnblogs.com/songziqing/p/5505708.html
Copyright © 2011-2022 走看看