解決方法如下:
1、檢查路由
# route -n
如果你缺失第一個(gè)路由,是肯定無法ping通外網(wǎng)的。
(推薦教程:centos使用教程)
2、添加dns
# vim /etc/resolv.conf nameserver 8.8.8.8
3、添加路由
# route add default gw 192.168.0.1
4、重啟網(wǎng)卡
service network restart
相關(guān)視頻教程推薦:linux視頻教程
解決方法如下:
1、檢查路由
# route -n
如果你缺失第一個(gè)路由,是肯定無法ping通外網(wǎng)的。
(推薦教程:centos使用教程)
2、添加dns
# vim /etc/resolv.conf nameserver 8.8.8.8
3、添加路由
# route add default gw 192.168.0.1
4、重啟網(wǎng)卡
service network restart
相關(guān)視頻教程推薦:linux視頻教程