呵呵 一点儿小技巧 不懂原理的可以私聊本人。
ping www.baidu.com
ping: unknown host www.baidu.com
vim /etc/resolv.conf
nameserver 8.8.8.8
ping 8.8.8.8
* 网络不可达
ifconfig eth0 192.168.1.235 up
ping 8.8.8.8
ifconfig eth0 192.168.1.235 netmask 255.255.255.0 up
ping 8.8.8.8
route add default gw 192.168.1.1
ping 8.8.8.8
ping baidu.com
PING www.a.shifen.com (61.135.169.121) 56(84) bytes of data.
64 bytes from 61.135.169.121: icmp_seq=1 ttl=56 time=3.90 ms
64 bytes from 61.135.169.121: icmp_seq=2 ttl=56 time=3.05 ms
64 bytes from 61.135.169.121: icmp_seq=3 ttl=56 time=3.93 ms
64 bytes from 61.135.169.121: icmp_seq=4 ttl=56 time=48.4 ms
64 bytes from 61.135.169.121: icmp_seq=5 ttl=56 time=19.5 ms
64 bytes from 61.135.169.121: icmp_seq=6 ttl=56 time=5.08 ms
64 bytes from 61.135.169.121: icmp_seq=7 ttl=56 time=5.55 ms
64 bytes from 61.135.169.121: icmp_seq=8 ttl=56 time=6.04 ms
64 bytes from 61.135.169.121: icmp_seq=9 ttl=56 time=2.42 ms
64 bytes from 61.135.169.121: icmp_seq=10 ttl=56 time=2.12 ms