1、检查路由
route -n
如果你缺失第一个路由,是肯定无法ping通外网的。
2、添加dns
# vim /etc/resolv.conf
nameserver 8.8.8.8
3、在/etc/resolv.conf文件添加路由
route add default gw 192.168.0.1
4、重启网卡
service network restart
1、检查路由
route -n
如果你缺失第一个路由,是肯定无法ping通外网的。
2、添加dns
# vim /etc/resolv.conf
nameserver 8.8.8.8
3、在/etc/resolv.conf文件添加路由
route add default gw 192.168.0.1
4、重启网卡
service network restart