码迷,mamicode.com
首页 > 系统相关 > 详细

Linux解决Device eth0 does not seem to be present

时间:2015-03-07 22:41:13      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:

克隆的系统,重启网卡时,报错!

克隆的系统,首先它的物理地址是一样的,所以要先生成一个物理地址。
第一步删除/etc/udev/rules.d/70-persistent-net.rules文件
#rm -rf /etc/udev/rules.d/70-persistent-net.rules
第二步:重启系统
#reboot
生成物理地址保存在哪里呢?
在这里:
[root@linux ~]# cat /etc/udev/rules.d/70-persistent-net.rules
技术分享
这个时候还不行,需要修改网络IP配置文件中IP地址及MAC地址和70-persistent-net.rulesMAC一致,修改设备名称,也要一致:


[root@Nagios-Linux rules.d]# cat 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:3d:bd:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
[root@Nagios-Linux rules.d]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

 

第三步:编辑MAC地址

[root@linux ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth1"
BOOTPROTO="static"
HWADDR="00:0c:29:3d:bd:b4"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="c3eedb2c-5894-4a7e-8f3e-8575667d44b3"
IPADDR=192.168.10.32
PREFIX=24
GATEWAY=192.168.10.2
DNS1=8.8.8.8

技术分享
 

 

 

 

 

 

 

 

 

 第四步:重启网卡

#service network restart

 

Linux解决Device eth0 does not seem to be present

标签:

原文地址:http://www.cnblogs.com/zsls/p/4321001.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!