Detailed Explanation of ARP Protocol and Packet Delivery Process

1. Introduction to ARP protocol

The full name of the ARP protocol is Address Resolution Protocol (Address Resolution Protocol), which is a protocol used to realize the mapping from IP address to MAC address, that is, to query the MAC address corresponding to the target IP. The ARP protocol is extremely important in IPv4.

ARP is a protocol that solves the address problem. It uses the IP address as a clue to locate the MAC address of the next host that should receive data packets. If the destination host is not on the same link, the MAC address of the next-hop router is looked up.

In short, the ARP protocol is to find the MAC address based on the IP address.

Other functions: RARP reverse ARP (find IP based on MAC), gratuitous ARP/innocent ARP (after interface configuration/obtaining IP address, ARP request is automatically generated and broadcast to the outside, the purpose is to check whether the address is already occupied).

Note: ARP is only used in the IPv4 protocol, and the IPv6 protocol uses the Neighbor Discovery Protocol, translated as the Neighbor Discovery Protocol, which is included in ICMPv6.

2. ARP message

ARP packet encapsulation Ethernet2:

ARP message format:

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/130919144