首页 > 代码库 > CentOS Linux解决Device eth0 does not seem to be present

CentOS Linux解决Device eth0 does not seem to be present

在KVM里安装的CentOS Linux系统。断电后重启系统,网络突然不通。

ifconfig -a|more没有看到eth0.。然后重启网络服务,报错如下:

故障现象:

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]

解决办法:

1.首先,打开/etc/udev/rules.d/70-persistent-net.rules

vi /etc/udev/rules.d/70-persistent-net.rules:
然后记录下来eth1网卡的mac地址。

2.打开/etc/sysconfig/network-scripts/ifcfg-eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0:

把DEVICE="eth0"  改成  DEVICE="eth1"  ,
把eth0的当前HWADDR地址改成已经记录下来eth1网卡的mac地址。HWADDR="XX:XX:XX:XX:XX:XX".

3.最后,重启网络

service network restart
或者

/etc/init.d/network restart

这样,网络服务就正常了。


本文出自 “林夕” 博客,请务必保留此出处http://lutaoxu.blog.51cto.com/4224602/1569459

CentOS Linux解决Device eth0 does not seem to be present