公司服务器上周挂了后,须要新的系统,因而用了以前服务器导出的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