本地服务器无法通过以太网路由

本地服务器无法通过以太网路由

我无法192.168.0.155通过以太网访问家庭网络上的本地 Raspberry Pi 服务器 ( ),但我可以通过 wifi 完美地 ssh 到它。

我通过两个接口都可以正常连接互联网,并且在另一台 Macbook 上也出现相同的行为(可以通过 wifi 到达服务器,但不能通过以太网)。

所有以太网电缆都直接连接到我的家庭路由器(运行 DD-WRT),该路由器也充当无线接入点。

以下是我netstat -rn在 Macbook Pro ( ) 上使用以太网(通过 Thunderbolt 坞站)时的输出192.168.0.176

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.1        UGSc           89        0     en6
127                127.0.0.1          UCS             1        0     lo0
127.0.0.1          127.0.0.1          UH              3      397     lo0
169.254            link#4             UCS             1        0     en6
192.168.0          link#4             UCS             4        0     en6
192.168.0.1/32     link#4             UCS             2        0     en6
192.168.0.1        c4:6e:1f:7f:1a:3e  UHLWIir        90     9350     en6   1199
192.168.0.131      94:53:30:47:2:c9   UHLWIi          1        0     en6    470
192.168.0.155      link#4             UHLWIi          1        7     en6
192.168.0.176/32   link#4             UCS             1        0     en6
192.168.0.255      link#4             UHLWbI          1       72     en6
224.0.0            link#4             UmCS            2        0     en6
224.0.0.251        1:0:5e:0:0:fb      UHmLWI          1        0     en6
255.255.255.255/32 link#4             UCS             2        0     en6
255.255.255.255    link#4             UHLWbI          1       28     en6

当连接到 wifi 时:

Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.1        UGSc           27        0     en0
127                127.0.0.1          UCS             1        0     lo0
127.0.0.1          127.0.0.1          UH              2      397     lo0
169.254            link#5             UCS             1        0     en0
192.168.0          link#5             UCS             3        0     en0
192.168.0.1/32     link#5             UCS             2        0     en0
192.168.0.1        c4:6e:1f:7f:1a:3e  UHLWIir        29      119     en0   1198
192.168.0.150/32   link#5             UCS             1        0     en0
192.168.0.155      b8:27:eb:b6:4c:34  UHLWIi          1        0     en0   1143
192.168.0.255      link#5             UHLWbI          1       26     en0
224.0.0            link#5             UmCS            2        0     en0
224.0.0.251        1:0:5e:0:0:fb      UHmLWI          1        0     en0
255.255.255.255/32 link#5             UCS             2        0     en0
255.255.255.255    link#5             UHLWbI          1        2     en0

ifconfig输出:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 ::1 prefixlen 128 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en6: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
    ether 00:0c:6c:07:66:ba 
    nd6 options=1<PERFORMNUD>
    media: autoselect (<unknown type>)
    status: inactive
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 80:e6:50:0a:78:ea 
    inet 192.168.0.150 netmask 0xffffff00 broadcast 192.168.0.255
    media: autoselect
    status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 72:00:04:b0:66:30 
    media: autoselect <full-duplex>
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 72:00:04:b0:66:31 
    media: autoselect <full-duplex>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 02:e6:50:0a:78:ea 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether da:51:ce:04:6b:fd 
    inet6 fe80::d851:ceff:fe04:6bfd%awdl0 prefixlen 64 scopeid 0x9 
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
bridge0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 02:0c:6c:70:dc:00 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    media: <unknown type>
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
    inet6 fe80::818d:c5f0:c295:5130%utun0 prefixlen 64 scopeid 0xb 
    inet6 fd1b:90c8:de38:d6b:818d:c5f0:c295:5130 prefixlen 64 
    nd6 options=1<PERFORMNUD>

我已经多次重置路由,重新启动笔记本电脑和路由器,并更改 Pi 服务器上的 IP,但问题仍然存在。

相关内容