So, guys, going forward now, we will going to discuss the ARP protocol in detail.
It is important that we understand the functioning of ARP protocol because our protocol is the foundation
of the rest of the networking in this course.
If you do not understand ARP protocol clearly, then you won't be able to understand L3 routing and
followed by Vlan routing.
So we will going to discuss our protocol step by step.
So let us start with the ARP goal.
So what exactly is the goal of ARP protocol?
So our protocol allows the sending machine to know the receiver's Mac address.
Given that that the sending machine already knows the recipient IP address because the recipient IP
address is something which is user input.
So for example, in this topology, suppose the sending machine is a host machine D and the receiving
machine is a host machine E.
So the host machine D wants to send data or frame to host machine E In this topology you can see that
the Mac address of the host machine D is MD and the Mac address of the host machine E is M.
Remember, the Mac address is a property of an interface and not machines.
So here means the Mac address of interface IFD of machine D and M is the Mac address of interface F
of machine E.
Now D will be in a position to send a frame to machine.
E only when D knows is Mac address.
Which is me.
If only D knows the ease Mac address, which is me.
Then only D will be in a position to send the L2 frame to host machine e successfully.
So it is our protocol which allows the host machine d which is the sending machine to know the recipient
Mac address.
In this case the Mac address of host machine E right.
Similarly, the host machine should know the host machine F and L3 Router's Mac address, which is MF
and Ms. respectively.
So the so the Mac address of the host machine F is MF and the Mac address of the L3 router is Mr..
So the host machine D should know the host machine F and l3 Router's Mac address which is MF and Mr.
respectively, in order to exchange frames with them.
So using ARP protocol D maintains IP address to Mac address mapping of all other machines in the subnet
it is communicating with.
And this mapping is stored in a table called ARP table.
So remember every host machine in the topology as well as L3 router has a table called ARP table.
And what is stored in this ARP table.
The IP address to Mac address mapping.
We will see in the next slide that how does this table look like?
So the overall goal of our protocol is that it helps the sender to populate its ARP table.
Right?
So guys going forward, three routers and host machines maintains a table called ARP table.
This ARP table is populated by a protocol called our protocol.
So this is the L3 router and this L3 router maintains a table called ARP table.
Similarly, all the host machines, which is present in the same subnet, maintains a table called ARP
table.
Right.
ARP table contains the mapping of IP address to Mac address of direct neighbors.
Now note the term direct neighbors.
So in this topology, what is the direct neighbors of host machine D?
Simply the direct neighbors of a host machine D is all other machines which is present in the same subnet.
So the direct neighbors of host machine D is this L3 router.
The host machine E and the host machine F.
Similarly, the direct neighbors of host machine F is the host machine e.
The host machine D and the L3 router.
Right.
So example of ARP, table of machine E and D would be the following.
So this is the fully populated ARP table of host machine E, and this is the fully populated ARP table
of host machine D.
So you can see that the ARP table of host machine E contains IP address to Mac address mapping of all
direct neighbors.
So for host machine E, consider the machine F, which is a direct neighbor.
It has an IP address.
12 .1.1.1.
Right.
And the Mac address is MF.
Right.
And the host machine E is reachable to host machine F via local outgoing interface.
If e.
Right.
Similarly, in the second row of this table, there is an IP address to Mac address mapping for host
machine D.
So the IP address of the host machine D is 12 .1.1.2.
Right.
And the Mac address is MD.
And again the host machine e is reachable to host machine D via local outgoing interface.
If.
Right.
So this is how we should read the contents of our table.
Similarly, you can verify the correctness of the ARP table as listed on the right hand side of host
machine D.
Right now.
Suppose E has its ARP table fully populated and now e wants to send data packet to host machine D,
So this is the host machine E and it wants to send a data packet to host machine D, so E must know
that D is IP address and this IP address is supplied by the user.
Right.
So 12 .1.1.2 is the destination IP address.
So host machine e will check its ARP table and will check for the IP address to Mac address mapping
for IP address.
12 .1.1.2 as a key.
So e would know that MD is the Mac address that it should use in order to send a frame to the destination
host machine.
D Right.
And this ARP table also says that he should send out the frame to the host machine D out of local interface
if.
So the source machine e will use MD as a destination Mac address in the Ethernet header of the frame
which it will send out and assigned for the host machine D.