I'm using 4 Ubuntu desktop machines. 2 of the machines are a gateway and a router.
The gateway has two interfaces:
ens33 with address 192.168.1.1/24
ens38 with address 172.20.208.1/24
the router has two interfaces:
ens33 with address 172.20.208.2/24
ens38 with address 10.0.0.1/16
the third machine is a client with a single interface:
ens33 with address 192.168.1.2/24
The forth machine is an httpd server with a single interface:
ens33 with address 10.0.0.2/16
There are 3 LANs as you can see, I've tested with a ping inside each LAN for validity as well as outside the LAN. My problem is, for example if I want to ping from 172.20.208.2 to 192.168.1.2 that are from different LANs; I get a destination host unreachable eventhough I enabled ip forwarding and set a route to the gw 172.20.208.1 for packets of destination 192.168.1.0 with the following command:
route add -net 192.168.1.0/24 gw 172.20.208.1
pinging 192.168.1.1 from 172.20.208.2 and vice versa works fine.
What route(s) should I actually make so I can ping all the LANs?