CentOS 下网络报错 Device eth0 does not seem to be present

在执行network服务重启后,出现Device eth0 does not seem to be present  问题,主要是因为系统之前有多个网卡配置,和配置文件不匹配造成的。

解决这种问题,思路是先看系统网卡配置文件中目前的配置情况,然后再在网络配置文件中修改相应的配置

具体现象:

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、查看网络配置文件

cat /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 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:6f:02:c2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:d0:74:01", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bc:4e:d6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:78:35:ae", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

在使用ifconfig命令执行后,显示的网卡为最后一个eth3,现在我们不需要eth3,想改回eth0。在/etc/sysconfig/network-scripts/文件夹中只有ifcfg-eth0

# 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 0x8086:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:6f:02:c2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:d0:74:01", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bc:4e:d6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:78:35:ae", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

最后条记录是目前在用的网卡的数据,包括mac地址信息,需要把最后一条的网卡名称从eth3,改成eth0,然后修改ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0c:29:78:35:ae"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
NETMASK=255.255.255.0
IPADDR=192.168.114.128
GATEWAY=192.168.114.1

吧hwaddr改成70-persistent-net.rules文件中最后一条记录的mac地址。

重启修改成功。

注意:

如果没有关闭NetworkManager,则需要关闭

service NetworkManager stop

chkconfig NetworkManager off

时间: 2024-10-10 10:55:20

CentOS 下网络报错 Device eth0 does not seem to be present的相关文章

vbox克隆虚拟机,网卡启动报错“Device eth0 does not seem to be present”

vbox克隆虚拟机,网卡启动报错"Device eth0 does not seem to be present". 需要看下面三个地方:确保文件名,设备名,mac地址都一致. mac地址以vbox的设置页面上的为准. /proc/net/dev /etc/udev/rules.d/70-persistent-net.rules /etc/sysconfig/network-scripts 我这边的情况是: /proc/net/dev 文件里并不是eth0----eth3,而是eth4

虚拟机CentOS复制到其他主机vm下IP地址无效(Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization)

Bringing up interface eth0:  Device eth0 does not seem to be present, delaying initialization 在虚拟机VM下安装的CentOS遇到这个问题,我是将centos.vmx放到其他的VM下打开 #dhclient #service network restart Shutting down loopback insterface:                                        

Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatcher.Dispatcher :27] - Dispatcher initialization failedUnable to load configuration. - Class: java.net.AbstractPlainSocketImplFile: AbstractPlainSocket

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

在VMware里克隆出来的CentOS Linux.. ifconfig...没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restartShutting down loopback insterface:                                                                                                     [  OK  ]Bringing up loo

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

在VMware里克隆出来的CentOS Linux.. ifconfig...没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restartShutting down loopback insterface:                                                                                                     [  OK  ]Bringing up loo

CentOS中Device eth0 does not seem to be present错误解决办法

今天克隆的虚拟机,当需要多台虚拟机的时候,试用克隆真是方便,不过遇到了 Device eth0 does not seem to be present 的问题,在网上找到遇到同样问题的解决方法, 很顺利的解决,记录之: ifconfig…没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restart Shutting down loopback insterface: [ OK ] Bringing up loopback insterface: [

VMware CentOS Device eth0 does not seem to be present

在VMware里克隆出来的CentOS Linux.. ifconfig...没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restartShutting down loopback insterface:                                                                                                     [  OK  ]Bringing up loo

CentOS Linux解决Device eth0 does not seem to be present 但是没有发现eth1

http://www.linuxidc.com/Linux/2012-12/76248.htm 此标题已经是有人写过的了.但是为什么拿来重写? 我复制完,没有发现有eth1这个网卡 为什么呢?需要选中 重新初始化所有网卡的MAC地址 后来我又尝试了另一种方法 vi /etc/udev/rules.d/70-persistent-net.rules   删除原eth0,      然后把eth1改成eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0

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

通过OVF部署Linux主机后提示 ringing up interface eth0:  Device eth0 does not seem to be present,delaying initialization. 解决办法: 首先,打开/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示: # vi /etc/udev/rules.d/70-persistent-net.rules# This file was automatically