So guys, now let us discuss the steps that how to host which are present in the same Vlan can communicate
with each other using Vlan based routing.
So in step one, let us suppose that the host C wants to send data to host D.
So C knows these IP address.
That is 12 .1.1.2.
That is this IP address.
So this IP address is a user input, right?
Now in step two from this IP address, C, figure out that D is in its local subnet.
How it can figure out C will apply its own mask value on the D's IP address and it will derive the network
ID if the derived network ID is equal to the network ID of C, it means that the host machine D is present
in the same subnet as host machine C this concept we have already discussed.
So in step two, C will figure out that D is in its local subnet.
So in order to communicate, c will need these mac address.
So c look up its ARP cache for these IP address.
12 .1.1.2.
But c do not have these Mac address because we have assumed that all ARP tables are empty.
Therefore it's a time for C to launch ARP broadcast message out of interface.
If c y out of interface AFC because the IP address configured on this interface is in the same subnet
as the destination machine D.
Right.
So we will launch our broadcast message and the ARP broadcast message contents will look something like
this.
That is source Mac address will be the Mac address of the machine itself.
The destination Mac address in the Ethernet header of the ARP broadcast message will be broadcast address
and the destination IP address will be 12 .1.1.2.
That is for this IP address.
The ARP resolution is being done.
So ARP broadcast message enters the L2, switch one and because the ARP broadcast message enters the
L2 switch one from Port P8, which is operating in Vlan ten and is an access port.
So apply the rule number one.
The ARP broadcast message gets tagged with Vlan ten.
Right now.
Remember, whenever L2 Switch receives any packet which has Ethernet header, the very first thing that
the L2 switches does is to do Mac learning, right?
So the L2 switch inspects the 802.1 q Vlan header and the source Mac address in the ARP broadcast message
using these fields.
L2 switch one inserts the following entry in its mac table that is Vlan id ten source Mac address that
is mac and outgoing port is P8.
Now since it's a broadcast message because destination Mac address is broadcast address l2 switch one
simply broadcasts the message out of all the interfaces which are operating in Vlan ten.
So in this case only the port P6 of the L2 switch one is operating in Vlan ten.
So l2 switch one forwards the broadcast message out of interface P6 only right.
If there are more interface on l2 switch one which were working in Vlan ten then l2 switch one would
have forwarded our broadcast message out of all those interfaces.
But in this example L2 switch one has only one interface P6, which is operating in Vlan ten.
So therefore l2 switch one forwards the broadcast message out of interface P6 only.
L2 switch two Now note that it's a trunk line.
Therefore, our broadcast message, which is tagged in Vlan ten here, will continue to be tagged here
also.
Now L2 Switch two receives this broadcast message on interface P1.
Again.
L2 switch two Does the Mac learning it inspects the 802.1 Vlan header in the packet as well as it inspects
the source mac address field in the packet.
And it does the Mac learning now because it's a broadcast message.
Therefore l2 switch to broadcast the message out of all the interfaces which is tagged with Vlan ten.
Now in this case the only interface of L2 switch two which is tagged with Vlan ten is P3.
Therefore L2 switch to forwards the broadcast message out of interface P3 only.
So our broadcast message is now forwarded out of interface P3 only.
Now when our broadcast message exits the L2 switch to out of interface P3, our broadcast message becomes
untagged.
So here the broadcast message is untagged.
So up to this point, the destination Machine D has received the broadcast message.
Now, because the broadcast message contains the destination IP address, which is equal to the IP address
of machine D, therefore machine D will reply with ARP reply.
Now in the next steps we will see that how ARP reply message traverse back from destination machine
d to the source machine.
See.