centos7系統無法ping通外網

centos7系統無法ping通外網

首先檢查添加dns是否正常,如不存在則添加dns:

[root@cgls]#?vim?/etc/resolv.conf nameserver?114.114.114.114 nameserver?8.8.8.8

?(推薦教程:centos使用教程

如果還是不行,可以嘗試添加路由:(根據自己的網段設置,我的是192.168.11網段的!)

[root@cgls]#?route?add?default?gw?192.168.11.1

一般情況下,這時候就可以ping通了:

[root@cgls]#?ping?www.baidu.com

相關視頻教程推薦:centos使用教程

以上就是

? 版權聲明
THE END
喜歡就支持一下吧
點贊6 分享