So, guys, going forward now in this slide, let us try to understand that.
What is the semantics of layer three routing information?
That is what information actually is called layer three routing information.
How does layer three routing information looks like?
Right?
So now let us try to first understand that what are three routes?
So L3 routes are nothing, but it is layer three routing information.
Right.
So the layer three route is an entry in the routing table.
So remember that layer three router has a special table called Layer three routing table.
And the entries in this layer three routing table is called an L three route.
Right?
So L3 Root is an entry in the routing table of a layer three router, and this entry tells the router
the next router in the topology to forward the packet to so that the packet eventually reaches the destination
subnet.
Right.
So layer three root is that information in the routing table of the router using which the router knows
the next router to which it should forward the packet so that the packet eventually reaches the destination
subnet.
Right.
If every router in the topology forwards the packet correctly to the next router, then the packet certainly
will reach its destination machine.
Right.
So layer three route is actually made up of three entities.
Now what are these three entities?
So the first entity is actually the destination subnet.
So destination subnet means the network ID of the subnet in which destination machine is present.
Right.
The second entity is the next hop IP address.
This next hop IP address, we also call it as Gateway.
So Gateway is nothing, but it is the peer interface IP address which leads to destination machine subnet.
And the third entity is the outgoing interface.
That is, it is the local outgoing interface to reach the peer interface.
So now let us take an example to understand that what exactly layer three route is.
So let us take an example.
Suppose we want to teach the router VM how to reach remote subnet.
192.168.1.0.
That is subnet two.
So we need to teach or we need to program the router VM that if it receives a packet which is destined
to any machine which falls in subnet two, then what should the router VM do with such a packet?
So in order to feed this intelligence in router VM, we need to install the following layer three route
in the router VM right now.
What does this line say?
You can see that this line has four parts.
The first part is says that you are adding an entry in the routing table of router VM.
Right.
Then the second part is actually the destination subnet, which is actually the first entity of the
layer three route, right?
So you can see that 192.168.1.0 followed by netmask.
255.2552550 is actually can be written as 192.168.1.0 slash 24.
Right.
So this mask that is 255255255.0 can also be written as simply slash 24.
Then the second important entity in this layer three routing information is the gateway IP address.
Right.
So 192.168.4.1 is the IP address of a peer interface.
So remember, it was the second entity of the layer three route.
And the third important entity of the layer three route is the local outgoing interface.
That is, in this case the local outgoing interface is Ethernet two.
So you can see that we have specified a complete layer three routing information using this command.
And once this command is installed in the router VM, then the router VM will know that if it receives
any packet whose destination IP address is a member of this subnet, then the router VM will going to
forward the packet out of local interface Ethernet two towards the gateway IP address.
192.168.4.1.
So simply after feeding this entry in the router VM, the router VM will get the following intelligence.
Right, so from the above entry machine, VM knows that whenever it has to send the packet to a remote
machine whose IP address is of the following type.
That is 192.168.1.0 and the last octet of the IP address could be anything.
Because if you specify any value in the last octet of this IP address, this IP address will always
going to fall in subnet two.
Right.
So the router VM has to send the packet out of interface ethernet two.
That is the local interface towards the peer interface whose IP address is 192.168.4.1.
Right.
So by installing this entry in the router VM, we have actually given the intelligence to the router
VM that how it should treat the packet.
Whose destination IP address is such that that the destination IP address falls in the subnet two.
Right.
So now let us take another example.
Now, in this example, we will teach router VM two how to reach remote subnet.
192.168.4.0 slash 24.
That is subnet one.
So for that you need to again install a layer three routing information in the routing table of router
VM two and for that you can use the following command.
So you can see that you are specifying the remote subnet.
192.168.4.0 slash 24 And in order to reach this remote subnet, the gateway IP address is 192.168.1.1
and the local outgoing interface is ethernet three.
Right.
So from the above entry, the machine VM two knows that whenever it has to send the packet to remote
machine whose IP address is 192.168.4. x where x value can belong to 12212 254.
Then the router VM two has to send the packet out of local interface Ethernet three towards the peer
interface whose IP address is 192.168.1.1.
So now if you install this entry in the router vm2 and if you install the previous entry in the router
VM, then the router VM can ping router VM two and the router VM two can ping router VM.
So now from router VM, if you try to ping an IP address.
192.168.1.1 or IP address.
192.168.1.2.
Then you will be able to ping.
Similarly from the router VM too, if you try to ping an IP address.
192.168.4.1 or an IP address.
192.168.4.2.
You will be able to ping meaning that your router VM now knows how to reach a machine which is present
in the remote subnet Subnet two and the router VM two now knows how to reach a machine which is present
in remote subnet subnet one.
So conclusion is that that the Layer three routing entries are required to reach any non-local subnet
or in other words, layer three routing entries are required to reach a machine which is present in
the remote subnets.
And always remember Layer three routing is all about sending a packet from source machine subnet to
destination machine subnet.
So there is a difference between destination subnet and destination machine.
Right?
Destination machine is present in a destination subnet and in destination subnet there can be many machines.
Right.
So once the packet reaches the destination subnet, then it is the job of L2 routing to take the packet
from destination subnet to the destination machine, which is actually one of the machines in destination
subnet.
We have already discussed this when we were discussing the overview of layer three routing.