VirtualBox中克隆出现的eth0错误的问题

来源:互联网 发布:最简单的游戏编程 编辑:程序博客网 时间:2024/06/05 19:13

CentOS6.7安装中出现的问题解决

解决办法: 首先,打开/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示:



vi /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 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8f:89:9
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:bd:1
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

也就是说,克隆的时候把网卡的MAC地址也克隆了,导致了有两个系统有相同的MAC地址。于是,要么把DEVICE=eth0改成DEVICE=eth1,然后HWADDR改成00:0c:29:75:d1:d7;要么在70-persistent-net.rules文件中把eth0的地址改成00:0c:29:75:d1:d7,同时把eth1的配置注释掉,然后在ifcfg-eth0中修改HWADDR。之后再service network restart即可。


记录下,eth1网卡的mac地址00:0c:29:50:bd:17</br>
接下来,打开/etc/sysconfig/network-scripts/ifcfg-eth0</br>
vi /etc/sysconfig/network-scripts/ifcfg-eth0</br>
将 DEVICE="eth0"  改成  DEVICE="eth1"  ,</br>
将 HWADDR="00:0c:29:8f:89:97" 改成上面的mac地址  >HWADDR="00:0c:29:50:bd:17",</br>
最后,重启网络</br>
service network restart


/etc/udev/rules.d/70-persistent-net.rules文件中的网卡地址英文初始的时候都是小写  而/etc/sysconfig/network-scripts/ifcfg-eth0英文都是大写


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