天天看点

Centos 配置eth0 提示Device does not seem to be present

一.故障现象:

[root@c1node01 ~]# service network restart

shutting down loopback insterface:                                                       [   ok  ]

bringing up loopback insterface:                                                            [   ok  ]

bringing up interface eth0:  device eth0 does not seem to be present,delaying initialization.                    [failed]

解决办法:

[root@c1node01 ~]# rm -rf /etc/udev/rules.d/70-persistent-net.rules

[root@c1node01 ~]# reboot ………………

shutting down loopback insterface:                                                         [   ok   ]

bringing up loopback insterface:                                                              [   ok   ]

bringing up interface eth0:                                                                     [  

ok   ]

[root@c1node01 ~]#

二.另一种方法

造成这样的原因,是因为在虚拟机(vmware)中移动了centos系统对应的文件,导致重新配置时,网卡的mac地址变了,输入ifconfig -a,找不到eth0

·······

安装完一个centos虚拟机,又拷贝一份,开机后网卡无法正常启动,报错:device eth0 does not seem to be present, 

delaying initialization

解决:# mv /etc/sysconfig/network-scripts/ifcfg-eth0 

sysconfig/network-scripts/ifcfg-eth1

vim 

修改device="eth0" 

为device="eth1"

然后重启启动网卡尝试下

三.比第一种更深入一点

故障前的操作: dell刀片装的是centos6.3的操作系统,网卡识别的是em1和em2,由于工作需要做了槽位调整,并启动了刀片

故障现象:

启动后网络不通,通过idrac登录后route查看缺省路由正常;

重启网络服务:

[root@nodea ~]# service network restart shutting down loopback insterface: [ ok ] bringing up loopback insterface: [ ok ] bringing up interface em1: device em1 does not seem to be present,delaying initialization. [failed]

分析问题和解决:

之前在别的文章中我们提过70-persistent-net.rules文件,所以看了一下:

[root@nodea ~]# vi /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 0x14e4:0x163a (bnx2) subsystem=="net", action=="add", drivers=="?*", attr{address}=="24:b6:fd:ab:76:1e", attr{type}=="1", kernel=="eth*", name="eth1"

# pci device 0x14e4:0x163a (bnx2) subsystem=="net", action=="add", drivers=="?*", attr{address}=="24:b6:fd:ab:76:1c", attr{type}=="1", kernel=="eth*", name="eth0"

发现name的名称不正确,依次将上述红色字体中的eth0改为em1,eth1改为em2;

*切记:网卡编号由mac地址大小决定,mac越小网卡编号越小;

如下:

…………

# pci device 0x14e4:0x163a (bnx2)

subsystem=="net", action=="add", drivers=="?*", attr{address}=="24:b6:fd:ab:76:1e", attr{type}=="1", kernel=="eth*", name="em2"

# pci device 0x14e4:0x163a (bnx2) subsystem=="net", action=="add", drivers=="?*", attr{address}=="24:b6:fd:ab:76:1c", attr{type}=="1", kernel=="eth*", name="em1"

保存退出~!

[root@nodea ~]#reboot

………………

问题解决~!

<a target="_blank" href="http://www.cnblogs.com/fbwfbi/archive/2013/04/29/3050907.html">转载地址</a>

继续阅读