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

求助同一 ip/wifi 下 windows 可以, mac 无法连接内网服务器?

  •  
  •   WYCTSTF · 153 天前 · 1070 次点击
    这是一个创建于 153 天前的主题,其中的信息可能已经有所发展或是发生改变。

    连的校内 wifi ,登陆校内服务器(本地 ip 172.24.xxx ) windows 可以 ssh 上去,也 ping 的到,以前 mac 也可以,但不知道从什么时候开始就不行了,windows 连 wifi 开热点之后 mac 上 ip138.com 显示是同一个 ip 。不管 mac 是连 windows 开的热点还是单独连校内 Wi-Fi 都无法 ping 到校内服务器。

    个人不怎么懂网络方面的知识,希望有大佬指点一下。

    14 条回复    2023-11-27 09:41:31 +08:00
    PolarBears
        1
    PolarBears  
       153 天前
    traceroute <IP> 看看路由正常不正常
    WYCTSTF
        2
    WYCTSTF  
    OP
       152 天前
    @PolarBears

    (base) WYCTSTF:~ syh$ traceroute 172.24.141.233
    traceroute to 172.24.141.233 (172.24.141.233), 64 hops max, 52 byte packets
    1 * * *
    2 * *traceroute: sendto: No route to host
    traceroute: wrote 172.24.141.233 52 chars, ret=-1
    *
    traceroute: sendto: Host is down
    3 traceroute: wrote 172.24.141.233 52 chars, ret=-1
    *traceroute: sendto: Host is down
    traceroute: wrote 172.24.141.233 52 chars, ret=-1
    *traceroute: sendto: Host is down
    traceroute: wrote 172.24.141.233 52 chars, ret=-1

    之前问了下学校的学长,路由器的话同一片地方应该就一个。(不知道是不是有用的信息)
    PolarBears
        3
    PolarBears  
       152 天前
    @WYCTSTF 那再 route get <IP>看看
    WYCTSTF
        4
    WYCTSTF  
    OP
       152 天前
    (base) WYCTSTF:~ syh$ route get 172.24.141.233
    route to: 172.24.141.233
    destination: 172.24.0.0
    mask: 255.255.0.0
    interface: feth4866
    flags: <UP,DONE,CLONING>
    recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
    0 0 0 0 0 0 2800 -17260
    @PolarBears
    PolarBears
        5
    PolarBears  
       152 天前
    @WYCTSTF 看起来服务器和本地 IP 是同一个子网里,尝试 ping 了以后用 arp -an 看看有没有对应服务器 IP 的 arp 信息吧。
    Jat001
        6
    Jat001  
       152 天前
    你 mac 上装什么网络相关的软件了吗?翻墙 docker vpn 之类的?
    WYCTSTF
        7
    WYCTSTF  
    OP
       152 天前
    @PolarBears (base)

    WYCTSTF:~ syh$ arp -an
    ? (10.198.0.1) at 0:74:9c:7d:fd:d3 on en0 ifscope [ethernet]
    ? (10.198.20.143) at a6:9e:4a:83:59:30 on en0 ifscope [ethernet]
    ? (10.198.60.104) at 6e:ed:43:b5:d5:ba on en0 ifscope [ethernet]
    ? (10.198.63.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
    ? (172.24.104.251) at 3e:57:59:b9:e0:2e on feth4866 ifscope permanent [ethernet]
    ? (172.24.141.233) at (incomplete) on feth4866 ifscope [ethernet]
    ? (172.24.255.255) at ff:ff:ff:ff:ff:ff on feth4866 ifscope [ethernet]
    ? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]
    ? (239.255.255.250) at 1:0:5e:7f:ff:fa on en0 ifscope permanent [ethernet]

    看起来好像有
    WYCTSTF
        8
    WYCTSTF  
    OP
       152 天前
    @Jat001 代理的因素我试过了,clash 系统代理和 tun 测过没影响,都是不行。。

    之前 hosts 文件不知道为什么被清空过一次,不知道有没有影响
    WYCTSTF
        9
    WYCTSTF  
    OP
       152 天前
    @Jat001 docker 的话有一个 orbstack ,不知道对网络有什么影响?
    ihwbunny
        10
    ihwbunny  
       152 天前
    ifconfig en0
    networksetup -listallhardwareports
    networksetup -listallnetworkservices

    运行结果呢?
    WYCTSTF
        11
    WYCTSTF  
    OP
       152 天前
    @ihwbunny

    (base) WYCTSTF:~ syh$ ifconfig en0
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
    ether d4:57:63:c6:99:61
    inet6 fe80::c18:dc68:2851:436%en0 prefixlen 64 secured scopeid 0xb
    inet 10.198.8.43 netmask 0xffffc000 broadcast 10.198.63.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
    (base) WYCTSTF:~ syh$ networksetup -listallhardwareports

    Hardware Port: Ethernet Adapter (en3)
    Device: en3
    Ethernet Address: 66:98:6c:77:a9:cd

    Hardware Port: Ethernet Adapter (en4)
    Device: en4
    Ethernet Address: 66:98:6c:77:a9:ce

    Hardware Port: Thunderbolt Bridge
    Device: bridge0
    Ethernet Address: 36:c3:eb:e0:4e:40

    Hardware Port: Wi-Fi
    Device: en0
    Ethernet Address: d4:57:63:c6:99:61

    Hardware Port: Thunderbolt 1
    Device: en1
    Ethernet Address: 36:c3:eb:e0:4e:40

    Hardware Port: Thunderbolt 2
    Device: en2
    Ethernet Address: 36:c3:eb:e0:4e:44

    VLAN Configurations
    ===================
    (base) WYCTSTF:~ syh$ networksetup -listallnetworkservices
    An asterisk (*) denotes that a network service is disabled.
    Wi-Fi
    Thunderbolt Bridge
    PolarBears
        12
    PolarBears  
       152 天前
    @WYCTSTF #11 feth4866 是什么接口,如果单纯使用 WIFI 上网的话应该 route get <IP>里的 interface 应该是 en0 才对.
    WYCTSTF
        13
    WYCTSTF  
    OP
       152 天前
    @PolarBears 呃呃,感谢大佬,破案了,这是 zerotier 的,应该是我之前设了自启的服务忘记关了。退掉之后借口就对了

    感谢各位大佬的帮助!
    WYCTSTF
        14
    WYCTSTF  
    OP
       152 天前
    主要我 windows 上也一直挂着 zerotier ,但是没加那个影响的内网,就没碰到问题,往那方面怀疑(
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2990 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:10 · PVG 22:10 · LAX 07:10 · JFK 10:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.