V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chu8129
V2EX  ›  macOS

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

  •  
  •   chu8129 · 2015-12-16 09:48:42 +08:00 · 2046 次点击
    这是一个创建于 3268 天前的主题,其中的信息可能已经有所发展或是发生改变。
    ------------------------------------------
    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
    1 条回复    2015-12-16 11:17:33 +08:00
    novaeye
        1
    novaeye  
       2015-12-16 11:17:33 +08:00
    试试

    sudo route -n add -net 188.5.0.0/16 188.5.63.1
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1046 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 21:03 · PVG 05:03 · LAX 13:03 · JFK 16:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.