Linux CentOS网络启动Failed问题:“Bringing up interface eth0: Device eth0 does not seem to be present”

来源:互联网 发布:网络招聘广告 编辑:程序博客网 时间:2024/05/17 09:17

故障现象:

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)执行ifconfig -a,显示接口信息,如下面例子中的“eth2”;

[root@node1 ~]# ifconfig -a
eth2      Link encap:Ethernet  HWaddr 08:00:27:5C:95:96  
          inet addr:192.168.0.142  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe5c:9596/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2773 errors:0 dropped:0 overruns:0 frame:0
          TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:244703 (238.9 KiB)  TX bytes:33666 (32.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

2)执行vi /etc/udev/rules.d/70-persistent-net.rules,打开70-persistent-net.rules文件如下面例子所示;

记录下,eth2网卡的mac地址“08:00:27:5c:95:96”。

# 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:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:5e:f4:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:98:77:60", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:5c:95:96", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

3)执行vi /etc/sysconfig/network-scripts/ifcfg-eth0,打开ifcfg-eth0文件,修改DEVICE和HWADDR值

将 DEVICE="eth0"  改成  DEVICE="eth2"  ,
将 HWADDR值改成上面的mac地址,即 HWADDR="08:00:27:5c:95:96"

4)执行service network restart或者/etc/init.d/network restart,重启网络


至此,问题解决!!

阅读全文
0 0
原创粉丝点击