As now I will going to demonstrate in the lab that how you can set up L3 routing on this topology.
I have already explained the description of this topology.
So let's straight away go to the Cisco Modeling Labs.
So you can see here in this diagram I have already set up the topology.
I have not done any configuration on any device whatsoever.
I have simply built up the topology.
So you are required to build up the same topology on your CML.
And you can see that I have used the router CSR 1000 V and as an end host I have used Alpine Linux.
Right.
So on both the sides you have Alpine Linux boxes which serves as an and host.
So let's straight away go to the configuration.
So first of all I will going to configure the routers.
Outdoors.
So I will go in to configure the first router, which is router R1, which has a loopback address 122
.1.1.1.
So let me go to its console.
So this is the router R1.
So let's configure the loopback address.
Let's call it loopback zero and configure the IP address over this loopback address.
Loopback addresses always have mask value as 32.
Now let's configure its interfaces.
interface.
Gigabit Ethernet one no shut IP address is ten .1.2 and the mask value would be 24.
No shirt.
Similarly, go to the gigabit two.
And IP address is mentioned in this slide.
So IP address of this interface is 11 .1.1.2 slash 24.
So with this we have done with the configuration of the router R1.
Similarly I would do the configuration on router R2 and R3.
So I will go to the console of the router R2.
Right now I am on router R3.
And we are done with the router R3 as one.
Now let me configure on end host.
So password and username is Cisco only.
So the name of the interfaces have disappeared.
Yeah.
Now they are back.
So alpine is a Linux system on on Linux system.
How do you configure an IP address on an interface.
You do so using an ifconfig command.
So ifconfig shows that it has an interface Ethernet zero which is nothing but this e zero which is shown
in the topology.
So I will configure it zero and I will assign an IP address 10.1.1.1 Netmask
(255) 255-2550.
It says operation not permitted, so you have to run it as sudo command.
All right then just cross check.
It says IP address is configured.
Can you ping the other end.
That is 20.1.1.2.
And you should be able to ping.
Similarly I will go to the another host.
Can I configure a hostname on the alpine box?
I don't think so.
It says operation not permitted.
Yeah you can configure.
So now I will go to the host H2.
And what is the IP address 13 112 slash 24.
Can I ping the other end.
No.
Oh yeah.
So ping is working right.
So with this we are done with configuration of IP addresses on all the interfaces of all the devices
in the topology.
But from alpine zero that is from the host H1 that is this router.
Can you bring the host H2 which is just at the other end?
The answer is simply no.
The reason is simply no because host H1 doesn't know how to send packet to the host S2.
It doesn't know L3 routing.
It will know L3 routing only when I configure routes.
Similarly, even if the packet from host H1, which is destined to the host H2, reaches these intermediate
routers, these intermediate routers does not know how to forward the packet which is destined to the
host H2.
In the topology.
Okay, in this topology I have renamed it as host H5, but it is host H2.
Just mind that.
So the thing is that that we need to install routes everywhere on all the intermediate routers of the
topology.
In this case we have to install routes on router R1, R2 and R3.
All right.
And routes.
Routes to where which routes?
The route to the loopback IP addresses of end host.
All right.
So going to the router R1 I will install the route which will tell router R1 that how to forward the
packet which is destined to the host H2.
All right.
So it means that I have to install the route for 122 .1.1.5, which is the loopback address of the host
H2.
All right.
So on router R1 what I will do I will go to the configure mode.
Then IP route I have to install the route to the IP address 122 .1.1.5.
And for loopback addresses the netmask is always 32.
All right.
And I also have to say.
The next hop address.
So next hop address will be the IP address of Gigabit Ethernet.
One interface of the router R2.
That would be the next hop.
So next hop IP will be 11 .1.1.1.
And the root installation is successful.
Similarly, on this router I also have to configure the root to the host h1.
So in order to route the packet to the host H1, whose destination IP address is 122 .1.1.4.
Forward the packet to the next hop, which is ten .1.1.1.
That is, this is the next hope for this destination IP address for the root which is installed on the
router R1.
All right.
So now router R1 knows how to forward the packet which is destined to the host H5 and which is destined
to the host H1.
Similarly we have to do the same exercise on the router R2 and R3.
On every intermediate routers we have to install two routes.
So I'm on the router R2.
And then and the next hop address will be interface Gigabit Ethernet one interface of the router R2
sorry of the router R3.
So router R3 is IP address would be 12 .1.1.2.
Similarly install the route to the host h1.
And from the router R2 perspective, the next hop will be Gigabit Ethernet two interface address of
the router R1.
Which is 11 .1.1.2.
Then coming to the router R3.
And we are done.
So we have successfully installed the router or intermediate routers.
But the story doesn't end here.
If we go to the host h1, try to ping host h2 and it won't say it just says network unreachable.
The answer is very simple.
If you check the routing table of the host H1, it doesn't say how to forward the packet, which is
destined to the route 122 .1.1.5.
You can see there is no route in the routing table of the host H1, which which says so that how the
route which is just trying to host H2 should be forwarded.
In fact, the routing table of the host H1 is simply empty, except that it contains only one route
which does tie in to the local subnet.
Now, usually on host H1, we install the default route.
So on end host we usually install the default route.
Route add default gateway.
Gateway is the next hop IP address and outgoing interface.
Is Ethernet zero operation not permitted.
So you have to do run this command using sudo.
And now if you check the routing table again you you can see that the default route is added.
So what is the meaning of the default route?
The meaning of the default route is that that if this box tries to forward the traffic to any destination,
it will going to use this default route.
That is, it will going to use this gateway 10.1.1.2 as a next hop.
And the outgoing interface would be Ethernet zero for any traffic which is assigned to any IP address.
So default route is like a wildcard entry.
All right.
So from alpine zero box that is host H1.
If I ping any machine in the world alpine zero will going to push that packet out of its local interface.
Ethernet zero towards the gateway 10.1 .1.2 because it has a default route.
Similarly, I will going to install the default route on the host H2.
And we are done.
Now let's see from the host h1.
Can I ping the host h2?
So 122 .1.1.5
and I am not able to ping, so there must be something wrong.
Okay, guys, I debugged the issue and the problem is that that we forgot to add loopback addresses
or loopback interfaces on the end host machines.
All right.
So the statement or the command to add loopback addresses on on the Linux machine is as follows.
Ifconfig loopback zero.
Write it like this.
Then.
Then what is the IP address that you want to assign to this loopback zero address.
Then netmask.
And just type up and you have to run this command as sudo.
Yeah.
So loopback address is added.
So you can see that the loopback zero interface has been added.
And it has been assigned an IP address 122 .1.1.4 with the following mask value.
So similarly we have to add an address on the host H two as well.
And I've added now go to the host H one.
So from the host H one you have to use the issue the ping command to ping the host h two and to do so
you have to write ping hyphen capital.
I specify the source address, which is the address of the self loopback address, and the destination
address which you want to ping.
And you can see that the ping works all right.
But if you issue the normal ping command then this ping doesn't work.
So it's a homework for you to determine that why the second ping doesn't work.
Whereas the first ping works.
I give you a hint that when you issue the first ping, command the source address in the IP header was
122 .1.1.4, and the destination address in the IP header of the packet, which leaves the host H1 is
122 .1.1.5.
All right.
Whereas in the second ping command, which is a normal command, that is this command, the source address
is the address of the interface out of which the packet is leaving from the host H1.
All right.
So source address will be ten .1.1.1 which is the address of Ethernet zero.
And the destination address is still the same.
All right.
So that's the only difference.
So why why does the second ping doesn't work.
Whereas the first ping in which you explicitly specify the source address works.
So that's a homework for you.
So with this we have closed on the lab of L3 routing.
Let's see what we have ahead.