解决服务器网络不通的问题
背景
今天我的ubuntu服务器,无法访问baidu.com,无法ping 8.8.8.8
| 12
 3
 4
 5
 
 | root@hzjinbing-xxxx:~# ping 8.8.8.8PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
 From 192.168.1.xx icmp_seq=1 Destination Host Unreachable
 From 192.168.1.xx icmp_seq=2 Destination Host Unreachable
 From 192.168.1.xx icmp_seq=3 Destination Host Unreachable
 
 | 
发现FROM的ip来自自己的ip,那怀疑是自己的路由表有问题了。
所以就加了一个默认网关:
| 1
 | route add default gw 192.168.1.1
 | 
然后就能ping 8.8.8.8 和访问baidu了。