VMware centos7 Destination Host Unreachable

现象:
不管是ping网关还是外网都出现了

[root@rocketmqOS ~]# ping 192.168.23.2
PING 192.168.23.2 (192.168.23.2) 56(84) bytes of data.
From 192.168.23.163 icmp_seq=1 Destination Host Unreachable
From 192.168.23.163 icmp_seq=2 Destination Host Unreachable
From 192.168.23.163 icmp_seq=3 Destination Host Unreachable

解决方案:
vmware导航栏-编辑-虚拟网络编辑器
检查网关
在这里插入图片描述
在这里插入图片描述
可知网关配置为192.168.23.2,起始和结束IP地址分别从128开始到254

1.关闭虚拟机
2.属性设置改为自定义
在这里插入图片描述
3.重启服务器
4.检查配置是否正确
vim /etc/sysconfig/network-scripts/ifcfg-ens33

在这里插入图片描述
ip要在dhcp范围内,网关和子网掩码配置正确
若有问题则修改改配置保存并重启网络
service network restart
再次ping

[root@rocketmqOS ~]# ping 192.168.23.2
PING 192.168.23.2 (192.168.23.2) 56(84) bytes of data.
64 bytes from 192.168.23.2: icmp_seq=1 ttl=128 time=0.122 ms
64 bytes from 192.168.23.2: icmp_seq=2 ttl=128 time=0.164 ms
64 bytes from 192.168.23.2: icmp_seq=3 ttl=128 time=0.101 ms
64 bytes from 192.168.23.2: icmp_seq=4 ttl=128 time=0.544 ms
[root@rocketmqOS ~]# ping www.baidu.com
PING www.a.shifen.com (111.206.208.133) 56(84) bytes of data.
64 bytes from 111.206.208.133 (111.206.208.133): icmp_seq=1 ttl=128 time=4.79 ms
64 bytes from 111.206.208.133 (111.206.208.133): icmp_seq=2 ttl=128 time=4.78 ms

完成

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值