after cloning a Linux host, if you do not make changes will be unable to access the Internet, in fact, as long as two steps to solve the problem of the Internet.
The author's system for the CentOS 6.x, the reader can be based on their own system for the corresponding operation.
First step: Empty/etc/udev/rules.d/70-persistent-net,rules
[email protected] ~]# >/etc/udev/rules.d/70-persistent-net.rules
Step two: Edit the NIC configuration file
1, first view the original configuration file
[email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Type=ethernet
uuid=406eb8c9-ab26-4150-b7c7-3ac925f09903
Onboot=yes
Nm_controlled=yes
Bootproto=none
ipaddr=192.168.6.45
Prefix=24
gateway=192.168.6.1
dns1=202.106.0.20
Defroute=yes
Ipv4_failure_fatal=yes
Ipv6init=no
Name= "System eth0"
Hwaddr=00:50:56:b1:60:4d
2. Remove the UUID and hwaddr two lines and modify the IP address you want.
[Email protected] ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Type=ethernet
Onboot=yes
Nm_controlled=yes
Bootproto=none
ipaddr=192.168.6.42
Prefix=24
gateway=192.168.6.1
dns1=202.106.0.20
Defroute=yes
Ipv4_failure_fatal=yes
Ipv6init=no
Name= "System eth0"
3. After reboot, you can surf the Internet.
[email protected] ~]# Shutdown-r now
Who has a better way to share it out oh.
This article is from the "Night Passers-by" blog, please be sure to keep this source http://kevinhao.blog.51cto.com/5204735/1618652
Cloning Linux host, no internet problems