我需要一个连接:
笔记本电脑(Windows) 192.168.10.102 -> 路由器 192.168.10.10 ->(Int:eth0)RPI 192.168.10.17(Int:docker0)->(Int:eth0)docker 172.17.0.2(Int:tun0)->(Int:tun0)其他设备 192.168.255.10
我在 RPI 上的路由表:
rafal@raspberrypi:~ $ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.10.10 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.255.0 172.17.0.2 255.255.255.0 UG 0 0 0 docker0
我在docker上的路由表:
bash-4.3# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 172.17.0.1 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.254.0 192.168.255.2 255.255.255.0 UG 0 0 0 tun0
192.168.255.0 192.168.255.2 255.255.255.0 UG 0 0 0 tun0
192.168.255.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
笔记本电脑和 RPI 已连接到路由器网关。RPI
ping 172.17.0.2 成功
RPI ping 192.168.255.10 成功
我在路由器上配置了路由,但是笔记本电脑返回超时:
PS C:\Users\Rafał> tracert 192.168.255.10
Tracing route to 192.168.255.10 over a maximum of 30 hops
1 3 ms 2 ms 2 ms 192.168.10.10
2 5 ms 2 ms 2 ms 192.168.10.17
3 * * * Request timed out.
4 * * * Request timed out.
5 * * * Request timed out.
6 * * * Request timed out.
(...)
我认为问题出在 RPI 路由表上。
应如何将路由添加到 RPI 路由表?
出了什么问题?