0

I have run into a curious situation where I have a network with two routers, a Pi, and a PC. I can ping from my PC to the Pi, but I cannot ping from my Pi to the PC. The setup is as follows:

                                 WAN
                                  ^
                                  |
                              20.19.155.44
     PI          <---------     Router 1
192.168.1.134                 192.168.1.1    
                                  ^
                                  |
                                  v
     PC                      192.168.1.201
192.168.0.201   <-----------    Router 2
                              192.168.0.1

I set up a static route on Router 1:

DstIp/mask: 192.168.0.0/24
Intf:       LAN/br0
GatewayIp:  192.168.1.201.  

From there, the PC can ping all addresses (192.168.0.1, 192.168.1.201, 192.168.1.134). The Pi can only ping Router1: (192.168.1.1). It times out if I try to ping router2, or anything connected to it: 192.168.1.201, 192.168.0.1, etc.

pi@raspberrypi:~ $ ping -c 1 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.85 ms

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.847/2.847/2.847/0.000 ms
pi@raspberrypi:~ $ ping -c 1 192.168.1.201
PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data.

--- 192.168.1.201 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

pi@raspberrypi:~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         Broadcom.Home   0.0.0.0         UG    302    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     302    0        0 wlan0

I'm really not sure what I'm missing. Any ideas what to try would be welcome.

2
  • Have you checked that router's firewall settings? Sep 18, 2021 at 18:18
  • You need to provide the routing tables from both router 1 and router 2. And what models are the routers?
    – MatsK
    Sep 21, 2021 at 13:57

1 Answer 1

0

Remove/disable any static route in router 1 If posible show all the routing table of router 1.

After that try to ping 192.168.1.201 from the PI

It should work independently of having static routes.

Now I notice that the PI connection is wireless. In some routers there are options to keep wireless clients isolated, specially in guest networks. It may be your case. Try connecting a cellphone to router 1, get the ip address and try to ping it.

The PI should be able to ping everything in the 192.168.1 network. Only after you can ping router 2 at 192.168.1.201 you should set the static route to be able to reach the other network (192.168.0)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .