公司服務器上週掛了後,須要新的系統,因而用了以前服務器導出的CentOS6的鏡像。 成功部署後,發現沒法訪問,控制檯登錄後發現network.service沒起來,因而重啓network.服務器
[root@localhost]# service network restart Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth1: Error: No suitable device found: no device found for connection'System eth1'. [FAILED]
發現多了個eth1,因而打開**/etc/udev/rules.d/70-persistent-net.rules**內容:oop
...... # PCI device 0x15ad:0x07b0 (vmxnet3) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:0b:4c:2a", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
發現NAME="eth1" 而且MAC地址與**/etc/sysconfig/network-scripts/ifcfg-eth0中的不一致,因而修改70-persistent-net.rules中的eth1
爲eth0
,並將ifcfg-eth0中的MAC 值改成70-persistent-net.rules**中的MAC地址值. 而後重啓便可。ui