Now let us take an example of Vlan based routing.
Right.
So let us see an end to end example here.
In this example, the host machine C wants to communicate with host machine D and network is supported
by two layer two switches.
Now note here.
Now note here that Host Machine C and Host Machine D both are present in the same subnet that is, the
network ID of this subnet is 12 .1.1.0 slash 24.
So you can see that the IP address configured on machine C and machine D are such that both IP address
derive the same network ID, right?
So we are discussing the case where source and destination communicating machines are present in the
same subnet.
Also note that the interfaces or ports of L2 switches are configured with Vlan IDs.
For example, Port P8 of L2 switch one is configured with Vlan ID ten and because it is a thin line,
so the port P8 is configured to operate in access mode.
Similarly, Port P5 is configured with Vlan 12 and is configured to operate in access mode.
Similarly, Port P7 is configured to operate in Vlan 11 and is configured to operate in access mode.
Port P6 P1 are configured to operate in Vlan ten and 11 and you can see that it is a thick line.
So Port P6 and P1 are configured to operate in trunk mode.
Likewise, you can also see that the port P4 is configured to operate in Vlan 11 and port P3 and port
P2 are configured to operate in Vlan ten and 12 respectively.
So you can see that the communicating machines that is Machine C and Machine D are present in the same
subnet because they are configured with an IP address which derive the same network ID.
In addition to this, you can see that machine C is present in Vlan ten because it is connected to an
L2 switch through a port P8 which is configured to operate in Vlan ten.
Similarly, Machine D is also present in Vlan ten.
So the thing to note here is that that we are discussing an example of communication between the host
machines which are present in same Vlan and same subnet tables used.
So ARP table for devices.
So you can see that against each host machine there is an empty boxes and these empty boxes denotes
the ARP table, right?
And for L2 switches we have mac table.
So for L2 switch one we have Mac table one and for L2 switch two, we have Mac table two.
So initially, let us assume that all the tables are empty.
Also, notice that IP address assigned to host devices are in compliance to subnet scheme.
That is all devices in the same subnet.
That is same Vlan should derive the same network ID from their IP addresses.
So this we have already discussed.
For example, let us take a device a that is host a which is present in Vlan 12.
Similarly, host F is present in Vlan 12.
So we can see that the IP address configured to host F and host A will derive the same network ID,
which is 13 .1.1.0 slash 24.
Right.
So note that the host machines, which are present in the same Vlan must derive the same network ID.
If it is not so, then it is a wrong network configuration.
So I assume you have already gone through the detailed study of L2 switches in L2 routing module of
this course.
Now we will study how L2 switch makes the Vlan based routing possible.