天天看點

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>

繼續閱讀