So, guys, going forward now, we will try to understand that what exactly routing table is.
Why do we need routing table and how does routing table helps in layer three routing?
So we will try to understand the concept of routing table with the help of a simple example.
So let us take the example of our own topology, which contains 3L3 routers.
So on the right hand side you can see that we have a very simple topology in which there are three routers
called v, m, v, M1 and M2.
You can see that there is a direct link between the router v, m and router v m1.
Right.
So the network id of this point to point link is 192.168.4.0 slash 24.
So let us call this point to point subnet as subnet one.
Similarly, there is a point to point link between the router one and router two and the point to point
link between the router M1 and M2 is configured under subnet.
192.168.1.0 slash 24 and let us call this point to point subnet as subnet two.
Right?
So now we have already discussed that.
What are local subnet and remote subnets?
So now I ask you one question, right?
What are the local subnet for router VM?
The answer is simple.
The local subnet for router VM is subnet one.
Right.
Similarly, if I ask you question that what are the local subnet with respect to router VM two?
The answer is simple.
The local subnet with respect to router two is subnet two.
Right.
Now again, I ask you question that what are the local subnet with respect to router VM one?
So just apply the basic definitions that we have already discussed the local subnets with respect to
the router, VM one is both subnet one and subnet two, right?
The reason being that the router M1 has an interface Ethernet two, which is configured with an IP address
which falls in subnet one.
Therefore, subnet one is a local subnet for router one.
Right?
And similarly subnet two is a local subnet with respect to router one because router one has a local
interface Ethernet three which is configured with an IP address which is a member of subnet two.
Right.
So nothing new.
Just apply the basics regarding how to find a subnet as local subnet or remote subnet with respect to
a given router.
Right.
So now going forward.
Are you able to ping from router VM to IP address?
192.168.4.1.
So you are on router VM.
If you open a terminal on router VM and if you try a ping command that is ping and just specify the
IP address.
So are you able to ping the IP address?
192.168.4.1, which is actually the IP address of the other side of this point to point link, the answer
is yes.
You will always be able to ping your neighbor.
So now what is the answer?
Why are you able to ping the IP address?
192.168.4.1 from the router VM.
The answer is that that from router VM you are trying to ping an IP address which falls in the subnet
subnet one and subnet one is a local subnet with respect to router VM.
So basically you are trying to ping a machine which is in the same subnet as your source machine.
So this is the case where both the communicating machines are present in the same subnet and therefore
layer three routing is not required at all.
Similarly, are you able to ping from router VM one to IP address?
192.168.1.2.
That is this IP address.
So from router VM one can you ping the IP address?
192.168.1.2.
The answer is yes, and the same logic applies from router VM one.
You are trying to ping an IP address which falls in the subnet.
Subnet two and subnet two is also a local subnet for router VM one.
So this is also the case where you are trying to ping a machine which falls in the local subnet as your
source machine.
So this is the case where you are trying to ping a destination machine and that destination machine
is in the same local subnet as the source machine.
So only L2 routing is required to ping a neighbor which is present in the same subnet as a source machine.
Right.
So layer3 routing is not required whenever you need to ping a neighbor.
The ARP protocol alone is sufficient to ping a destination machine which is present in the same local
subnet as the source machine.
Right.
So now going forward.
Now, if you try to ping an IP address.
192.168.1.2.
That is this IP address or IP address.
192.168.1.1 from router VM.
That is from this router.
Can you try ping this IP address or this IP address?
The answer is no.
You cannot ping.
Why?
You cannot ping Because layer three routing is required in this case, because the IP address that you
are trying to ping from router VM falls in the subnet two and subnet two is a remote subnet with respect
to the router VM.
So in order to ping any IP address which falls in the remote subnet with respect to the source router,
you always need a layer three routing information.
Similarly from router VM to you cannot ping an IP address.
192.168.4.1 and neither you can ping an IP address.
192.168.4.2 without configuring l3 routing.
Right, because both these IP addresses are the member of subnet one and subnet one is the remote subnet
with respect to router two.
So going forward, directly connected peer interfaces can always be pinged, and to do so, only our
protocol is required.
Right.
The virtual machine VM that is this virtual machine do not know how to reach remote subnet.
192.168.1.0 slash 24, which is subnet two.
Right.
And the same applies for VM two.
Also, vm2 doesn't know how to reach subnet one.
Right.
So vm2 do not know how to reach subnet.
That is subnet one.
So if you do not recall what is remote subnet, just apply the definition of this remote subnet.
A subnet s is said to be a remote subnet with respect to a router A if none of the local interfaces
of router A has an IP address which is a member of subnet s.
If this condition is satisfied, then the subnet S is a remote subnet for the router.
A.
We have already discussed this concept of remote subnet and local subnet.
Now let us try to understand the importance of Layer three routing information with the help of another
example.
So you can see in this topology we have five routers, right?
And the router on which we are trying to issue the ping command is router VM.
Right.
So if VM needs to send data to the router VM for that is this router VM do not know where to send the
packet that is, should it send the packet towards the router VM one or should it sends the packet towards
the router?
VM three right.
So if router VM wants to send a data to router VM four, we need to tell the router VM that in order
to send data to router VM four, you should send the data towards router VM three and not towards router
VM one.
It is our responsibility to feed this intelligence in the router, and this intelligence is called layer
three routing information.
So this intelligence is borne by layer three routing tables.
So next we will learn how to configure routing tables on a router so that router can send data packet
to other remote routers in the topology.