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

來源:互聯網
上載者:User

標籤:centos 配置eth0 提示device does not seem to be present

 

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

一.故障現象:

[[email protected] ~]# 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]

 

解決辦法:

[[email protected] ~]# rm -rf /etc/udev/rules.d/70-persistent-net.rules

[[email protected] ~]# reboot ………………

[[email protected] ~]# service network restart

Shutting down loopback insterface:                                                         [   OK   ]

Bringing up loopback insterface:                                                              [   OK   ]

Bringing up interface eth0:                                                                     [   OK   ]

[[email protected] ~]#

 

二.另一種方法

造成這樣的原因,是因為在虛擬機器(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 
sysconfig/network-scripts/ifcfg-eth1

修改DEVICE="eth0" 
為DEVICE="eth1"


可刪掉uuid、物理地址

然後重啟啟動網卡嘗試下

 

三.比第一種更深入一點

 

 

故障前的操作:

DELL刀片裝的是CentOS6.3的作業系統,網卡識別的是em1和em2,由於工作需要做了槽位調整,並啟動了刀片

 

故障現象:

啟動後網路不通,通過iDRAC登入後route查看預設路由正常;

重啟網路服務:

[[email protected] ~]# 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檔案,所以看了一下:

[[email protected] ~]# 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"

儲存退出~!

[[email protected] ~]#reboot

………………


本文出自 “IT網路” 部落格,請務必保留此出處http://531572034.blog.51cto.com/4383413/1828044

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.