【Linux】Ubuntu无法ping通开发板、宿主机、baidu的一种解决办法


VMware下装的Ubuntu,修改了Ubuntu 的ip后无法联网无法ping通各类网段,然后按照网上的一堆办法越整越乱,,,最后重设虚拟网卡解决。

一、报错信息
1、ping开发板

ping 192.168.1.136
PING 192.168.1.136 (192.168.1.136) 56(84) bytes of data.
From 192.168.237.155 icmp_seq=1 Destination Host Unreachable
From 192.168.237.155 icmp_seq=2 Destination Host Unreachable
From 192.168.237.155 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.136 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4045ms
pipe 3

2、ping宿主机

ping 192.168.1.55
PING 192.168.1.55 (192.168.1.55) 56(84) bytes of data.
From 192.168.237.155 icmp_seq=1 Destination Host Unreachable
From 192.168.237.155 icmp_seq=2 Destination Host Unreachable
^C
--- 192.168.1.55 ping statistics ---
5 packets transmitted, 0 received, +2 errors, 100% packet loss, time 4046ms
pipe 2

3、ping baidu

ping baidu.com
ping: unknown host baidu.com

二、添加、移除网卡
1、查看当前网卡信息 # ifconfig
在这里插入图片描述
2、添加一个网卡,vmware菜单栏,虚拟机—>设置。
添加一个网卡
在这里插入图片描述
3、查看当前网卡信息,多了一个网卡
在这里插入图片描述
4、移除旧的网卡,重启下 # reboot

在这里插入图片描述
5、查看当前网卡信息

在这里插入图片描述

6、测试ping baidu,成功

ping baidu.com
PING baidu.com (39.156.69.79) 56(84) bytes of data.
64 bytes from 39.156.69.79: icmp_seq=1 ttl=128 time=27.0 ms
64 bytes from 39.156.69.79: icmp_seq=2 ttl=128 time=25.4 ms
64 bytes from 39.156.69.79: icmp_seq=3 ttl=128 time=25.3 ms

--- baidu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 25.349/25.944/27.004/0.751 ms

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值