VMWare克隆Centos之后,网卡设置

  编辑网卡设备
1  vi /etc/udev/rules.d/70-persistent-net.rules

会看到有2块网卡eth0和eth1,eth0为原系统的,eth1为重新生成
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:e8:0a:33", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
//新生成网卡
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:5e:f5:f1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

前面加#注释掉第一个网卡,更改第2个网卡为eth0,记录下mac地址。

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

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


编辑完成保存退出。

2修改MAC
 #vi /etc/sysconfig/network-scripts/ifcfg-eth0

修改MAC地址”00:0c:29:e8:0a:33”为”00:0c:29:5e:f5:f1”

 3重启系统

#reboot

重启系统问题就解决了。


你可能感兴趣的:(VMWare)