1

By searching on internet I got information that Address Resolution Protocol (ARP) is Link Layer (L2) protocol. As per ARP functionality it broadcasts to entire network to check to whom this specific IP belongs to get its MAC address.. but as ARP is L2 protocol, how does it knows destination IP address as IP's are encapsulated in L3 and L2 protocol can't read it

user207421
  • 305,947
  • 44
  • 307
  • 483
Khayam Gondal
  • 2,366
  • 2
  • 28
  • 40

3 Answers3

2

Layer 3 and above are located in the "Payload" part of an ethernet header.

As you can see here the ARP packet also contains IP addresses from its sender and receiver:

Bully WiiPlaza
  • 462
  • 1
  • 6
  • 16
2

ARP packet contain source HW address and src IP address as well as destination HW address and destination IP also . when ARP resolution happens, means when ARP send request and get response from same destination,ARP update the destination IP in arp_entry .

0

I would like to elaborate on the previous questions.

  • first, here it is the case where you can't really apply the model. ARP is sometimes layer 2 and sometimes layer 3 (the similar functionality in IPv6 is done with neighbor discovery protocol, which is carried in ICMP packets)
  • ARP packets do not carry IP payload. They only carry ARP packets. See other answers for the format
  • ARP is executed by two end-hosts, which both have to implement both layer 2 and layer 3
    • ARP is initiated by layer 3, when layer 3 tries to send packet to an IP address on the local network.
    • ARP is processed by a host, which implements both layer 2 and layer 3. A host without layer 3 cannot have an IP address.
    • Intermediate layer 2 systems generally cannot process ARP requests, past forwarding ethernet packets with broadcast destination MAC
Effie
  • 758
  • 5
  • 15