故障前的操做:node
DELL刀片裝的是CentOS6.3的操做系統,網卡識別的是em1和em2,因爲工做須要作了槽位調整,並啓動了刀片vim
故障現象:centos
啓動後網絡不通,經過iDRAC登陸後route查看缺省路由正常;網絡
重啓網絡服務:oop
[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]字體
分析問題和解決:ui
以前在別的文章中咱們提過70-persistent-net.rules文件,因此看了一下:操作系統
[root@nodeA ~]# vi /etc/udev/rules.d/70-persistent-net.rulesrest
# 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.ip
# 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
………………
問題解決~!