Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)

《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
打开虚拟机编辑,选择虚拟网络编辑器。
《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
选择更改设置
《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
如果之前没有VMnet网络,点击添加网络,选择桥接模式,确定。
《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
左击”虚拟机“选择“网络适配器”。
《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
选择桥接模式。
《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
点击联网。

手动配置网络

ifconfig ens33 192.168.xxx.xxx(自己使用的网段)

重启网络:

/etc/init.d/networking restart

这时候应该可以ping通同网段ip
可能ping不同外网

sudo vi /etc/resolv.conf 

《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》
添加后面两端

sudo /sbin/dhclient

再重启网络

/etc/init.d/networking restart

《Ubuntu16.04网络配置(ping不通baidu.com与Ping网关Destination Host Unreachable错误)》

Ping网关Destination Host Unreachable错误

检查网络配置(ifconfig),防火墙是否关闭(sudo iptables -F)
没有问题,考虑是与主机的虚拟网卡冲突,禁用主机虚拟网卡

    原文作者:蛙仔
    原文地址: https://blog.csdn.net/weixin_43108793/article/details/107428027
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞