赞
踩
Centos7.4克隆后,克隆的2,3台无法ping通百度,以及无法通过ip来ping通第1台。但是,奇怪的是,因为配置了hosts,所以可以通过主机名ping通。
- [root@cdh2 ~]# ping 192.168.0.8
- PING 192.168.0.8 (192.168.0.8) 56(84) bytes of data.
- ^C
- --- 192.168.0.8 ping statistics ---
- 3 packets transmitted, 0 received, 100% packet loss, time 2000ms
-
- [root@cdh2 ~]# ping cdh1
- PING cdh1 (192.168.0.108) 56(84) bytes of data.
- 64 bytes from cdh1 (192.168.0.108): icmp_seq=1 ttl=64 time=0.502 ms
- 64 bytes from cdh1 (192.168.0.108): icmp_seq=2 ttl=64 time=0.687 ms
- 64 bytes from cdh1 (192.168.0.108): icmp_seq=3 ttl=64 time=0.744 ms
- 64 bytes from cdh1 (192.168.0.108): icmp_seq=4 ttl=64 time=0.894 ms
- ^C
尽管在克隆后,将网卡的MAC重新生成,但是好像无效。
所以,需要移除克隆的虚拟机中,原始第1台的网卡,重新添加一个网卡并且生成MAC,才可以。
后续:尴尬的是后面发现最初是ip错了,本来是108,ping的时候是8。当然不通了!但是,现在已经按照后面步骤修改,所以无法验证了。所以,现在暂时默认还是这个可以解决的吧。
记录MAC地址:00:50:56:2E:19:29
- [root@cdh2 ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
-
- TYPE=Ethernet
- PROXY_METHOD=none
- BROWSER_ONLY=no
- BOOTPROTO=static
- DEFROUTE=yes
- IPV4_FAILURE_FATAL=no
- IPV6INIT=yes
- IPV6_AUTOCONF=yes
- IPV6_DEFROUTE=yes
- IPV6_FAILURE_FATAL=no
- IPV6_ADDR_GEN_MODE=stable-privacy
- NAME=ens33
- HWADDR=00:50:56:2E:19:29
- UUID=09739527-55c7-4515-88bc-760ea7d3fe5a
- DEVICE=ens33
- ONBOOT=yes
- IPADDR=192.168.0.109
- NETMASK=255.255.255.0
- GETWAY=192.168.0.1
- #DNS1=192.168.0.1
- DNS1=8.8.8.8

主要:
- HWADDR=00:50:56:2E:19:29为上面记录的mac地址
- IPADDR=192.168.0.109
- NETMASK=255.255.255.0
- GETWAY=192.168.0.1
- #DNS1=192.168.0.1
- DNS1=8.8.8.8
reboot
- [root@cdh2 ~]# ping 192.168.0.108
- PING 192.168.0.108 (192.168.0.108) 56(84) bytes of data.
- 64 bytes from 192.168.0.108: icmp_seq=1 ttl=64 time=14.5 ms
- 64 bytes from 192.168.0.108: icmp_seq=2 ttl=64 time=16.0 ms
- 64 bytes from 192.168.0.108: icmp_seq=3 ttl=64 time=16.9 ms
- ^C
- [root@cdh2 ~]# ping www.baidu.com
- PING www.a.shifen.com (180.101.49.11) 56(84) bytes of data.
- 64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=1 ttl=52 time=11.1 ms
- 64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=2 ttl=52 time=10.2 ms
- 64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=3 ttl=52 time=9.63 ms
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。