关于配置有线无线一起用的问题(路由配置)(MBA)

2015-12-16 09:48:42 +08:00
 chu8129
------------------------------------------
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
2025 次点击
所在节点    macOS
1 条回复
novaeye
2015-12-16 11:17:33 +08:00
试试

sudo route -n add -net 188.5.0.0/16 188.5.63.1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/243860

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX