So guys let's implement this topology that you can see on the screen.
We will going to implement layer two routing first.
So you can see that in this topology we have a Vlan ten.
And we have Vlan 20 right.
So I will going to implement the Vlan ten topology.
That is the topology on the left hand side.
And the topology on the right hand side is exactly the mirror image of the topology of the left hand
side.
So it will be your homework to implement Vlan 20.
So what I will do I will going to take an L2 switch.
And to this L2 switch I will going to connect the two host H1 and H2 on two interface of the L2 switch.
All right.
And I will going to configure the IP addresses.
As you can see the end result is that that I should be able to ping h2 from H1 and I should be able
to bring h1 from h2.
This will be pure L2 routing, because the only device that is responsible to send the packets from
one host to another is the layer two switch that you can see in the middle.
The router that you can see here is out of the context here.
We will use this router when we were going to implement L3 routing.
Currently we will restrict our discussion only to L2 routing.
That is how a host can ping another host within the same subnet.
Here the subnet is Vlan ten and another subnet is Vlan 20.
So host that is the same host within the same subnet can communicate with each other due to L2 routing.
All right.
To make the host communicate across VLANs we would need L3 routing.
So that's the topic of discussion that we were going to discuss later when we will be implementing L3
routing.
All right.
So the end result of this lab is that H1 should be able to ping S2.
S2 should be able to ping h1.
And H4 should be able to ping S3.
But S3 and S3 should be able to ping S4.
But you cannot ping from H1 to H4.
That is, no two hosts in different VLANs can communicate with each other.
All right.
For that we need L3 routing.
So going forward I will go into deploy only host h1 host H2 and layer two switch S5.
All right.
And it will be your homework to deploy host S4 and S3.
All right.
So let's go back to the lab.
So guys what I need is that I need a layer two switch.
So to begin with you can see that this iOS v L2 this is the Cisco Layer two switch which you can use.
So I will simply drag it and put it here.
This is my layer two switch.
Can I increase the size of this L2 switch?
Is it possible?
I think you can zoom the entire topology, but you cannot increase the size of this layer switch.
Anyways, now I will check how many interfaces this L2 switch has.
So it has Ethernet, zero by zero, one zero by one, zero by two and zero by three.
So it has four interfaces.
Let me add four and other interfaces.
So the total it has eight interfaces.
Now.
Now I have to add host H1 and host H2.
Now which device should I pick up in order to represent as host.
Um, let's say ideally you should pick up, uh, Alpine Linux.
That is this device because it is Linux or Windows host machine switch because it is Linux or Windows
machines, which usually acts as an ant host in the real world topology.
All right.
But instead of going with the with Alpine Linux, I will take a Cisco CSR router.
So since it is a router, I will not going to use any of its routing capabilities.
I will simply going to use it as an end host.
The reason is that that if you reboot the Cisco devices, they can recover and comes back with the same
configuration they had before.
Alpine Linux do not have this capability.
So every time I reboot the device, I don't want to do the configuration again and again.
Otherwise, you can choose Alpine Linux as an end host as well.
So these are my two end host.
Can I rename it.
Mhm.
Okay.
This lab has very few configuration options.
So we cannot rename the devices as per our wish.
So let me rename this lab as L2 switching.
All right, now let me connect the links.
And you can see that the two links have been connected.
Um, so that's all we have, the very simple topology.
It's up to you to connect two more devices on the right hand side and place them in Vlan 20.
Now I will going to place these two and host in Vlan ten.
So we so the construction of our topology is complete.
Now let me start the devices.
So let me wait for a few minutes to let the devices start.
Let me go to the console of our switch.
And you can see it is still booting up.
So let it boot up.
Let's let's wait.
You can rename these devices as follows.
This is my host H one.
This is my whole stretch two.
So we will going to configure the IP addresses as per this slide.
So here the IP address is ten zero ten one slash 24.
And it is ten zero ten two slash 24.
And it is connected to the Ethernet zero and Ethernet one of the L2 switch.
So name of these links can vary.
That doesn't matter.
So let's go to the L2 switch and see what's going on okay.
I will go to the configuration terminal.
Let me rename it as L2 switch.
Now I have to create Vlan ten.
Million ten is created.
Do no shut on this Valentine.
So Valentine is created on L two switch.
Now you have to put the port gig zero by zero and will end ten and gig zero by one inch Vlan ten.
So for that I will go to the configure mode again.
Go to the port zero by zero say switch port.
Say switch port mode access.
Say switch port access Vlan ten.
Using this configuration, you have added gigabit zero by zero interface in Vlan ten.
Similarly, I will do the same thing for the other port.
So come out, go to the terminal mode again.
Interface gigabit Ethernet zero by one.
So remember I am doing the configuration of an L2 switch.
No shut switch port switch port mode access Switchport access Vlan ten.
And we are done.
All right.
Now coming to the end host we have to configure the IP addresses.
So now I'm on the end host H one.
Let me configure it as H one.
I will go to its interface interface Gigabit Ethernet one.
Now shut configure IP addresses as per the slide.
It is ten zero ten one slash 24.
Now slash 24.
You have to represent slash 24 and a dot b dot c dot d format.
And we are done.
Similarly I will go to the host H two console.
Enable.
Conf t hostname h two.
I will go to interface gig one.
No qat source switch.
Sorry not not switch port, but IP address and the IP address is ten .0.1.2.
And mask.
Right.
If you want to see the configuration you can see the configuration on an interface show running config
interface Gigabit Ethernet one.
It will show you the configuration that is the IP address that you have configured.
Other configuration you can ignore.
Now you can copy the configuration of the device using the command copy Rs.
If it doesn't work, then type out the full command copy running config to startup config.
This this.
Copying the configuration from running to start means if you reboot this device, then the device will
come up with the same configuration as you have configured.
Now then the next thing you need to do is write memory.
Write memory means that if you can shut down this lab, you can come back tomorrow.
And when you run the lab again, then the device will come with the same configuration.
Similarly, I will go to the host stage one.
And I will do copy running to startup.
Right.
Memory.
Sorry.
You just have to press enter here when it asks you the destination file name and you are done.
And the same thing you can do on the switch.
Also, I leave it to you now from host H1.
Can you ping the host h2?
What is S2's IP address?
Ten zero dot.
Ten two.
So you can see that the packets are being transmitted out of five packets, four packets have been successfully
transmitted to the host H2 from host H1.
Now in the first ping it's always that 80% or 60% success rate is 80 or 60%.
But in subsequent ping it will be always 100%.
Similarly, from device H2, you can ping the device H1.
Right.
You can see the ARP table on the device H2.
So this is the ARP table.
Similarly on the device h1 you can check the ARP table.
So it is learning ARP.
And on the switch.
Can you check the Mac table address table and it is doing the Mac learning also.
Right.
So this is the Mac address table of the L2 switch.
Now coming to the packet capture let's say on this link.
I want to do the packet capture.
So you click this link go to the packet capture tab.
Now here the packet will be appearing if any packet is transmitted on this link.
So let me start the capture by clicking the start button.
Now let me do something so that packet travels on this link.
So from the host h1 let me ping the host h2.
As simple as that.
Now let me see what is the state of the packet capture?
The packet capture tool is not working very nicely as soon as the page loads, the packet capture output
gets erased.
Okay, so once you are here and once the packet capture is completed, you can download the packet capture
file.
And once the file is downloaded, you can open this file in the Wireshark.
So Wireshark is another tool that you should implement.
You should install on your system.
So Wireshark is a tool which is used to see various to decode the packets and see what is there actually
inside the packet.
So you can see that these are the ICMP ping which traverse the link on which we are capturing the packet.
If you double click it it will show you what are the various headers, what are the various fields in
those headers.
And you can just expand these headers and see the actual content of each packet.
All right.
So you can see that this protocol value is ICMP.
It means it was ICMP packet and it was ICMP request packet.
All right.
And then you can see that in this ICMP request packet the source address was ten zero ten one which
is the address of the host H one.
And the destination address is ten zero ten two, which is the address of the host H two.
All right.
So I leave it to you to explore more.
And you can go through this packet headers and understand what are the meaning of various fields here.
At least you should be aware the fields which are there in the Ethernet header, because so far we have
covered only the layer two routing and layer.
And as long as layer two routing is concerned, you should focus on the Ethernet header.
Because layer two routing is done by the layer two switch.
And layer two switch does the switching using the destination Mac address.
So you can see here this is the destination Mac address.
So this is it.
We are done with this lab.