Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Need clarity on ARP operation

Hi,

I just wanna know whether i'm properly understandin ARP or not.

As per the OSI model if we take the communication between any two devices, the sender host will go through the

Application,Presentation,Session,Transport,Network,Datalink,Physical and the receiving host will go through the reverse process that

is from physical to application.

So if PC-A wants to speak to PC-B it is not possible for them to communicate only with the IP address (Network layer address), PC-A also

needs the MAC (Datalink layer address) of the PC-B because the information that PC-A sending has to travel through the physical layer and then

it should be validated with the MAC address of PC-B at the datalink layer then after it reaches the Network layer and there again PC-B checks that

that packet is destined for it and then PC-B acknowledges PC-A.

Please correct me if i'm worng somewhere.

And i read that ARP uses local broadcast 255.255.255.255 at layer3 and FF:FF:FF:FF:FF:FF at layer2. I understood that since it doesn't have the MAC

of the destined PC it will use the layer2 broadcast but what is the purpose of using a layer3 broadcast when the sender PC know the IP address of the

destination PC.

Regards,

Chandu

Regards, Chandu
Everyone's tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Silver

Re: Need clarity on ARP operation

ARP is a Layer 2 packet so it's only a frame. The source IP and destination IP is included in the ARP payload though.

http://icourse.cuc.edu.cn/networkprogramming/lectures/Unit2_ARP.pdf

Daniel Dib

CCIE #37149

Daniel Dib CCIE #37149 Please rate helpful posts.

Re: Need clarity on ARP operation

Yes you are correct Chandra.

But briefly to go over ARP, in words.....

To understand the neccesity of ARP, we firstly need to understand how packets are routed on the local network.

Most networks in this day and age largely utilizing ethernet. Several computers are connected to a switch, the switch in turn is connected to some kind of router that has got the capabilities to route packets to other networks.

Then how are packets on a ethernet routed?

Every network card has got a MAC address. This address is global unique and is burnt in to the card BIA (burned in address). In ethernet every packet has got a source-mac and a destination-mac. The switches, (purely layer 2) don't look at the IP addresses, they only use the MAC-adresses to find the right destination for a packet - normally based on some sort of table (CAM table).

The MAC-adresses are only used to find the destinations for packets in a local network MAC is on Layer 2 in the ISO/OSI Model, IP is on Layer 3

So why do we need ARP?

Let's assume that you have got two computers, 10.0.0.1 and 10.0.0.2 that are connected to a switch. 10.0.0.1 wants to send a packet to 10.0.0.2.

I've explained that ethernet only uses MAC adresses. So 10.0.0.1 has got to stick the MAC address of 10.0.0.2 in front of the IP packet so that it can be sent into the network - how will it get there in the first place?

But 10.0.0.1 does not know that address right? ARP comes to the rescue. 10.0.0.1 sends an ARP packet into the network that asks every computer "have you got the address 10.0.0.1? If you have please send your mac address to me, my MAC-address is xxxxx". This packet is broadcast to the whole network and does not need an destination MAC.

10.0.0.2 now answers and sends it's own MAC-address to 10.0.0.1 who in turn can stick the MAC address of 10.0.0.2 in front of the IP packet which now can be sent to the network.

Try using a packet capturing tool to see this arp process.

Take a look below

A host 10.1.1.1 is trying to see where its default gateway is which is 10.1.1.254. It doesn't know the mac address. What does it do?

1) From the host which is 10.1.1.1 - the arp destination is broadcast, asking who has 10.1.1.254 - tell me, I am 10.1.1.1

1a) At this point the destination is unknown, what would a switch do if its destination is broadcast? If the switch had the MAC address in its CAM table it would have forwarded direcly to the correct port, if it does not, then it will forward out of every forwarding interface in the layer 2 domain.

2) Note that the Mac address is the source of this frame, this is how the gateway learns of the hosts mac address too

3) Next the gateway responds saying 10.1.1.254 is at (MAC address) directly to host.

With layer 3 its different, application/protocols - it may be intended or not, to send to all hosts in the network for various reasons. Example of this being used would be DHCP.

As seen below:

Hope this helps.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
4 REPLIES
Silver

Re: Need clarity on ARP operation

ARP is a Layer 2 packet so it's only a frame. The source IP and destination IP is included in the ARP payload though.

http://icourse.cuc.edu.cn/networkprogramming/lectures/Unit2_ARP.pdf

Daniel Dib

CCIE #37149

Daniel Dib CCIE #37149 Please rate helpful posts.
New Member

Need clarity on ARP operation

Thanks Daniel,

It was a great pdf from you that solved many of my questions,

Regards,

Chandu

Regards, Chandu

Re: Need clarity on ARP operation

Yes you are correct Chandra.

But briefly to go over ARP, in words.....

To understand the neccesity of ARP, we firstly need to understand how packets are routed on the local network.

Most networks in this day and age largely utilizing ethernet. Several computers are connected to a switch, the switch in turn is connected to some kind of router that has got the capabilities to route packets to other networks.

Then how are packets on a ethernet routed?

Every network card has got a MAC address. This address is global unique and is burnt in to the card BIA (burned in address). In ethernet every packet has got a source-mac and a destination-mac. The switches, (purely layer 2) don't look at the IP addresses, they only use the MAC-adresses to find the right destination for a packet - normally based on some sort of table (CAM table).

The MAC-adresses are only used to find the destinations for packets in a local network MAC is on Layer 2 in the ISO/OSI Model, IP is on Layer 3

So why do we need ARP?

Let's assume that you have got two computers, 10.0.0.1 and 10.0.0.2 that are connected to a switch. 10.0.0.1 wants to send a packet to 10.0.0.2.

I've explained that ethernet only uses MAC adresses. So 10.0.0.1 has got to stick the MAC address of 10.0.0.2 in front of the IP packet so that it can be sent into the network - how will it get there in the first place?

But 10.0.0.1 does not know that address right? ARP comes to the rescue. 10.0.0.1 sends an ARP packet into the network that asks every computer "have you got the address 10.0.0.1? If you have please send your mac address to me, my MAC-address is xxxxx". This packet is broadcast to the whole network and does not need an destination MAC.

10.0.0.2 now answers and sends it's own MAC-address to 10.0.0.1 who in turn can stick the MAC address of 10.0.0.2 in front of the IP packet which now can be sent to the network.

Try using a packet capturing tool to see this arp process.

Take a look below

A host 10.1.1.1 is trying to see where its default gateway is which is 10.1.1.254. It doesn't know the mac address. What does it do?

1) From the host which is 10.1.1.1 - the arp destination is broadcast, asking who has 10.1.1.254 - tell me, I am 10.1.1.1

1a) At this point the destination is unknown, what would a switch do if its destination is broadcast? If the switch had the MAC address in its CAM table it would have forwarded direcly to the correct port, if it does not, then it will forward out of every forwarding interface in the layer 2 domain.

2) Note that the Mac address is the source of this frame, this is how the gateway learns of the hosts mac address too

3) Next the gateway responds saying 10.1.1.254 is at (MAC address) directly to host.

With layer 3 its different, application/protocols - it may be intended or not, to send to all hosts in the network for various reasons. Example of this being used would be DHCP.

As seen below:

Hope this helps.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
New Member

Need clarity on ARP operation

It was a great explanatin from you.

Actually i was reading the Richard deals CCNA study guide so at some point he mentioned that ARP uses 255.255.255.255 at layer3 broadcast that was the thing confusing me...

But now i understood that ARP uses only layer2 broadcast address:FF:FF:FF:FF:FF:FF to get the MAC of the destination.

Great info from you, thanks again.

Regards,

Chandu

Regards, Chandu
494
Views
0
Helpful
4
Replies