CentOS虚拟机克隆后网卡配置问题

http://www.linuxidc.com/Linux/2013-02/79804.htm

方式1: 

1)修改/etc/sysconfig/network-scripts/ifcfg-eth0 为 /etc/sysconfig/network-scripts/ifcfg-eth1 

2)配置/etc/sysconfig/network-scripts/ifcfg-eth1 

# 修改为eth1 

DEVICE="eth1" 

BOOTPROTO="static" 

# 硬件地址取自eth1(通过“ifconfig -a”获取) 

HWADDR="00:0C:29:91:42:2C" 

MTU="1500" 

NM_CONTROLLED="yes" 

ONBOOT="yes" 

IPADDR=192.168.152.101 

NETMASK=255.255.255.0 

GATEWAY=192.168.152.2 

3)service network restart 

方式2: 

1)修改/etc/udev/rules.d/70-persistent-net.rules 

拷贝eth1的硬件地址到eth0 

删除eth1信息 

2)配置/etc/sysconfig/network-scripts/ifcfg-eth0 

DEVICE="eth0" 

BOOTPROTO="static" 

HWADDR="00:0C:29:91:42:2C" 

MTU="1500" 

NM_CONTROLLED="yes" 

ONBOOT="yes" 

IPADDR=192.168.152.101 

NETMASK=255.255.255.0 

GATEWAY=192.168.152.2 

3)reboot 

方式3(未测试): 

1)删除/etc/udev/rules.d/70-persistent-net.rules 

2)配置/etc/sysconfig/network-scripts/ifcfg-eth0 

DEVICE="eth0" 

BOOTPROTO="static" 

HWADDR="00:0C:29:91:42:2C" 

MTU="1500" 

NM_CONTROLLED="yes" 

ONBOOT="yes" 

IPADDR=192.168.152.101 

NETMASK=255.255.255.0 

GATEWAY=192.168.152.2 

3)reboot

你可能感兴趣的:(centos,虚拟机克隆,网卡配置问题)