root@latelee:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0 100.100.100.0 * 255.255.255.0 U 0 0 0 eth0 default 100.100.100.44 0.0.0.0 UG 0 0 0 eth0
下面是ping测试:
1 2 3 4 5
root@latelee:~# ping 172.18.44.144 PING 172.18.44.144 (172.18.44.144): 56 data bytes 64 bytes from 172.18.44.144: seq=0 ttl=63 time=1.011 ms 64 bytes from 172.18.44.144: seq=1 ttl=63 time=1.467 ms 64 bytes from 172.18.44.144: seq=2 ttl=63 time=0.764 ms
下面是telnet测试:
1 2 3 4 5 6 7
root@latelee:~# telnet 172.18.44.144
Entering character mode Escape character is '^]'.
Linux 3.13.0-32-generic (localhost) (pts/28)
2、内网PC访问互联网
内网PC中正确设置DNS(同上),然后可以ping域名了,测试如下:
1 2 3 4 5
root@latelee:~# ping www.latelee.org PING www.latelee.org (183.60.158.197): 56 data bytes 64 bytes from 183.60.158.197: seq=0 ttl=48 time=20.246 ms 64 bytes from 183.60.158.197: seq=1 ttl=48 time=19.551 ms 64 bytes from 183.60.158.197: seq=2 ttl=48 time=19.207 ms
再跟踪一下路由:
1 2 3 4 5 6 7 8 9 10 11
root@latelee:~# traceroute www.latelee.org traceroute to www.latelee.org.sudu-n7cd.com (183.60.18.107), 30 hops max, 38 byte packets 1 100.100.100.44 (100.100.100.44) 0.556 ms 0.193 ms 0.182 ms 2 172.18.18.18 (172.18.18.18) 0.652 ms 0.736 ms 0.768 ms 3 * * * 4 10.137.64.19 (10.137.64.19) 2.818 ms 2.475 ms 2.281 ms 5 10.137.41.210 (10.137.41.210) 16.211 ms 16.298 ms 15.815 ms 6 10.137.128.10 (10.137.128.10) 15.920 ms 15.668 ms 15.888 ms 7 10.137.128.13 (10.137.128.13) 37.466 ms 17.123 ms 16.766 ms