Topology:
C1 --192.168.111.0/24 -- R1 -- 172.30.0.0/24 -- Switch -- C6
|-- R2 -- 172.30.10.0/23 -- C5
I am a newbie in networking and I have a question about routing through subnets.
I want to ping computer C5 from computer C1 (see below). If I want to do so, I have to define a static route on R1, because R1 knows only its direct connected subnets and not the other ones. Without a static route on R1, C5 is unreachable from C1.
Static route on R1:
Destination: 172.30.10.0 Subnetmask: 255.255.254.0 Gateway: 172.30.0.2
With this static route I still can't ping computer C5, but I have a timeout, that means that C5 is reachable. Why is this?
When I go further and define a static route on R2.
Static route on R2
Destination: 192.168.111.0 Subnetmask: 255.255.255.0 Gateway: 172.30.0.1
then the ping works.
I think its because: Without static route on R2: The ping goes until C5, but it can't find the way back. With the static route on R2, the way back is defined. Is this explanation right?
But, why does it work, without static routes on R1 and R2, when I ping C6 from C1 (the default gateway on C6 is R2)? How does the ping find the way back, when the default gateway on C6 is R2.
(C6 and R2 are connected to the Switch)
C1
IP: 192.168.111.11/24
default gateway: R1
C5
IP: 172.30.10.15/23
default gateway: R2
C6
IP: 172.30.0.11/24
default gateway: R2
R1
IP int.: 192.168.111.1
IP ext.: 172.30.0.1
R2
IP int.: 172.30.0.2
IP ext.: 172.30.10.2