------------------------------------------
windows 中的配置: route.bat ,直接执行可以用;
route delete 0.0.0.0 188.5.63.1
route add 188.5.0.0 mask 255.255.0.0 188.5.63.1
pause
------------------------------------------
OS X 中试过配置,用不了,各位大神平常是怎么处理的?
设置了之后可以 ssh 188.5.6.118 ,但是 ping 百度却 ping 不通
qwDeMacBook-Air:~ qw$ sudo route delete 0.0.0.0 188.5.63.1
Password:
delete net 0.0.0.0: gateway 188.5.63.1
qwDeMacBook-Air:~ qw$ sudo route add 188.5.0.0 188.5.63.1
add net 188.5.0.0: gateway 188.5.63.1
qwDeMacBook-Air:~ qw$ ping 188.5.6.118
PING 188.5.6.118 (188.5.6.118): 56 data bytes
64 bytes from 188.5.6.118: icmp_seq=0 ttl=59 time=1.195 ms
64 bytes from 188.5.6.118: icmp_seq=1 ttl=59 time=1.158 ms
64 bytes from 188.5.6.118: icmp_seq=2 ttl=59 time=1.212 ms
64 bytes from 188.5.6.118: icmp_seq=3 ttl=59 time=1.208 ms
^C
--- 188.5.6.118 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.158/1.193/1.212/0.021 ms
qwDeMacBook-Air:~ qw$ ping
www.baidu.com
^C
qwDeMacBook-Air:~ qw$ ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
Request timeout for icmp_seq 0
^C
--- 114.114.114.114 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
qwDeMacBook-Air:~ qw$ netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.100.10 UGScI 4 0 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 2 148 lo0
169.254 link#9 UCS 0 0 en3
169.254 link#4 UCSI 0 0 en0
188.5 188.5.63.1 UGSc 0 4 en3
188.5.63/26 link#9 UCS 1 0 en3
188.5.63.1/32 link#9 UCS 1 0 en3