cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2184
Views
0
Helpful
3
Replies

ARP entries learnt from ARP Request?

mjoannic1
Level 1
Level 1

Hi everyone,

 

Quick question: when a host received an ARP request for itself (ARP Target IP address = local IP) will the host install an ARP entry using the Sender MAC address / Sender IP address in the ARP message?

 

I have seen some OS learning ARP entries this way and my question is: what is the correct behavior?

 

RFC says:

....

?Am I the target protocol address?
Yes:
If Merge_flag is false, add the triplet <protocol type,
sender protocol address, sender hardware address> to
the translation table.

...

 

I think this means it should install an ARP entry upon receive of an ARP request where Target IP address = local IP 

 

Any comments on this are much appreciated.

 

Regards,

Matthieu

 

 

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Matthieu,

Quick question: when a host received an ARP request for itself (ARP Target IP address = local IP) will the host install an ARP entry using the Sender MAC address / Sender IP address in the ARP message?

Yes, definitely it should. The point is simple: It allows both hosts to learn about their IP/MAC bindings in a single ARP transaction. Otherwise, two independent ARP transactions would need to take place.

I think this means it should install an ARP entry upon receive of an ARP request where Target IP address = local IP 

That is correct. However, the complete algorithm in RFC 826 actually updates the receiving host's ARP cache in two cases:

  • If the receiving host already has the ARP entry for the Sender IP installed, it will update its ARP entry even if the Target IP address is different. This is simply because the presence of the ARP entry for the Sender IP means that the host already needed to talk to that IP in the past, and so it makes sense to keep that entry up-to-date.
  • If the receiving host does not yet have the ARP entry for the Sender IP, but its own IP matches the Target IP address, it will create a new ARP entry with the Sender IP/Sender MAC mapping, as it is likely that the Sender IP will want to communicate with the host and get a response back.

Would this help a little? Feel welcome to ask further!

Best regards,
Peter

View solution in original post

3 Replies 3

Peter Paluch
Cisco Employee
Cisco Employee

Hi Matthieu,

Quick question: when a host received an ARP request for itself (ARP Target IP address = local IP) will the host install an ARP entry using the Sender MAC address / Sender IP address in the ARP message?

Yes, definitely it should. The point is simple: It allows both hosts to learn about their IP/MAC bindings in a single ARP transaction. Otherwise, two independent ARP transactions would need to take place.

I think this means it should install an ARP entry upon receive of an ARP request where Target IP address = local IP 

That is correct. However, the complete algorithm in RFC 826 actually updates the receiving host's ARP cache in two cases:

  • If the receiving host already has the ARP entry for the Sender IP installed, it will update its ARP entry even if the Target IP address is different. This is simply because the presence of the ARP entry for the Sender IP means that the host already needed to talk to that IP in the past, and so it makes sense to keep that entry up-to-date.
  • If the receiving host does not yet have the ARP entry for the Sender IP, but its own IP matches the Target IP address, it will create a new ARP entry with the Sender IP/Sender MAC mapping, as it is likely that the Sender IP will want to communicate with the host and get a response back.

Would this help a little? Feel welcome to ask further!

Best regards,
Peter

thanks Peter that answers my question perfectly!

 

Regards,

Matthieu

Didn't check the RFC, but in general. 

In Peter, we trust.

-BenBen