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
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地址都一致. ...
- 解决vmware虚拟机克隆后启动centos报错device eth0 does not seem to be present, delaying initialization
centos启动报错: device eth0 does not seem to be present, delaying initialization ifcfg-eth0的配置文件里保存了以前的M ...
- centOS下yum报错
CentOS下yum报错 备注:当我们在CentOS下使用yum命令的时候,会报一些错误,一下是我总结的几个解决问题的方法.(保证自己的服务器可以上网) 一.关于Loaded plugins: fas ...
- Device eth0 does not seem to be present, delaying initialization: Linux Networking
copy centos 报错 Device eth0 does not seem to be present, delaying initialization: Linux Networking # ...
- CentOS6.5 重启网络报错:Bringing up interface eth0: Error: Connection activation failed: Device not managed by NetworkManager or unavailable
CentOS6.5 重启网络报错: Bringing up interface eth0: Error: Connection activation failed: Device not manage ...
- CentOS 7.2重启网络报错 Failed to start LSB: Bring up/down
CentOS 7.2重启网络报错 Failed to start LSB: Bring up/down 我的虚拟机原本有两块网卡,一块叫eno16777736,另一块叫eno5033674.本来是正常 ...
- 重启网卡报错:Device eth0 does not seem to be present
ifconfig...没有看到eth0..然后重启网卡又报下面错误. 故障现象: service network restartShutting down loopback insterface: ...
- 网络报错:“The connection is not for this device.”
网络报错:“The connection is not for this device.” 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 记得在前几天工作的时候,有一个同时通过微信 ...
- VMware报错:“device eth0 does not seem to be present, delaying initialization ”
转自:http://blog.sina.com.cn/s/blog_77126fa501018s3d.html vmlite虚拟机启动出错,就把这个虚拟机删除掉重新建立,系统虚拟硬盘使用之前的,启动系 ...
随机推荐
- NodeJs之进程守护
进程守护 由于nodejs的单线程的脆弱性,一旦遇到运行错误便会严重到退出node进程导致系统或应用瘫痪,所以pm2,forever出现了,帮助我们实现进程的重启,这只是他们的特性之一. 实例演示进程 ...
- java布尔值进行and和or逻辑运算原理
先看看如下代码: public class Test { public static void test() { boolean a = true; boolean b = false; if (a ...
- 仿Iconfont-阿里巴巴矢量图标库 搜索动画
效果图如下 style <Style x:Key="BtnSearch" TargetType="{x:Type Button}"> <Set ...
- 浅析ThreadLocal
这是我的第一篇博客,条理不是很清晰,不过还是希望能对大家有所帮助. 首先明确一下这个类的作用,ThreadLocal类是用来为每个线程提供了一份变量的副本,即每个线程的局部变量.每个线程都在自己的栈空 ...
- DroidPlugin插件化开发
360手机助手使用的 DroidPlugin,它是360手机助手团队在Android系统上实现了一种插件机制.它可以在无需安装.修改的情况下运行APK文件,此机制对改进大型APP的架构,实现多团队协作 ...
- 【CSS学习】字符实体
在html开发中,有一些字符,不适于直接写出,比如:大于号>小于号<<br />一般格式:&+实体名+;实体有很多,记住常用的大于号>小于号<双引号&quo ...
- 关于一条定制长按Power键弹出Dialog的需求
如题,需要定制长按Power键弹出的Dialog,UI上的大致效果是:全屏,中间下拉按钮“Swipe Down To Power Off”下拉关机,底部左右两侧“Reboot”,“Cancel”按钮, ...
- iOS BUG的解决
当iOS程序报这样的错误 ld:261 dulicate symbols for architecture x86_64 clang:error:linker command failed with ...
- HDU 1728 逃离迷宫(DFS||BFS)
逃离迷宫 Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可 ...
- Freeplane中的自动边线颜色功能
今天我将电脑上的Freeplane从1.3.11升级到了1.5.18.发现新版本已经没有了1.3.11中的菜单选项Format → “Automatic edge color”.搜索了一下才发现,该功 ...