I have a Linux box with two NICs; one for my LAN and the other
for the external world. The latter is in the 192.168.2 network (IP
address 192.168.2.2) directly connected by a cable to another device in
the same network (IP address 192.168.2.1.) In turn, this device also has
two NICs, and via its second NIC (IP address 192.168.3.2) it is directly
connected to a gateway in network 192.168.3 (IP address 192.168.3.1).
My question is, would it possible to define the default gateway
for my Linux box to be 192.168.3.1? I would have thought that this is not
possible, for not only they are different in networks but, in addition,
both devices are not directly connected. My gut feeling is that the
default gateway in the Linux must be 192.168.2.1, and the default gateway
in the second device must be 192.168.3.1. Is this the only way to reach
the 192.168.3.1 device from the Linux box?
Comments from savvy contributors would be welcome.