admin管理员组文章数量:1635684
我的是ubuntu环境,之前还可以,换了网络后ping 测试环境或者其他环境ping 不通,
因为我是用的桥接模式,
ping 的时候报错:
From 172.20.0.1 icmp_seq=197 Destination Host Unreachable
这里有问题,应该从我自己的网卡上路由出去,怎么会从172.20.0.1路由出去呢?
查看下我的路由:route
root@my-computer:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 eth0
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 cbr0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.34.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-3a7bc24366c5
172.21.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-253a8450fb36
发现多了两个虚拟网卡br,
删除多余的网卡:ifconfig 网卡名 down
把这两个网卡删除后:
route
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 eth0
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 cbr0
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.18.34.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
就正常了;
近日发现linux的机器无法解析域名,首先想到了是DNS的问题。问了网络负责人之后DNS和虚拟网卡同属于一个网段了。解决方法删除这个虚拟网卡br-xxxxxxxxxxx。
ubuntu 删除虚拟网卡_u014221090的专栏-CSDN博客_ubuntu 删除虚拟网卡
本文标签: 报错虚拟机环境pingdestination
版权声明:本文标题:虚拟机ping 其他环境报错:From 172.20.0.1 icmp_seq=118 Destination Host Unreachable 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1729214466a1190257.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论