ARP (Address Resolution Protocol)

The ARP protocol (Address Resolution Protocol), also known as the address resolution protocol. The basic function of the ARP protocol is to find the MAC address of the target device through the IP address of the target device to ensure smooth communication. It is an essential protocol in the IPv4 network layer, but it is no longer applicable in IPv6 and has been replaced by ICMP v6.

In the Ethernet protocol, it is stipulated that one host in the same local area network must know the MAC address of the target host to communicate directly with another host. In the TCP/IP protocol stack, the network layer and transport layer only care about the IP address of the target host. This leads to a situation where when using the IP protocol in Ethernet, the Ethernet protocol at the data link layer receives the data provided by the upper IP protocol, which only contains the IP address of the destination host. Therefore, a method is needed to obtain the MAC address based on the IP address of the destination host. This is what the ARP protocol does. Address resolution is the process by which a host converts the target IP address to the target MAC address before sending a frame.

Additionally, when the sending host and the destination host are not in the same local area network, even if the MAC address of the destination host is known, they cannot communicate directly and must go through routing forwarding. Therefore, at this time, the MAC address obtained by the sending host through the ARP protocol is not the real MAC address of the destination host, but the MAC address of a router that can reach outside the local area network. Thereafter, all frames sent by the sending host to the destination host will be sent to the router, which will forward them. This situation is called ARP Proxy.

Each computer or router installed with the TCP/IP protocol has an ARP cache table, in which the IP address and MAC address correspond to each other. For example, host A (192.168.38.10) sends data to host B (192.168.38.11). When sending data, host A looks for the target IP address in its ARP cache table. If found, it knows that the target MAC address is (00-BB-00-62-C2-02), and it can directly write the target MAC address into the frame and send it; if the corresponding IP address is not found in the ARP cache table, host A will send a broadcast (ARP request) on the network, and the target MAC address is "FF.FF.FF.FF.FF.FF", which means it asks all hosts in the same network segment, "What is the MAC address of 192.168.38.11?" Other hosts on the network do not respond to ARP queries, only host B receives the frame and responds to host A (ARP response), "The MAC address of 192.168.38.11 is (00-BB-00-62-C2-02)". Thus, host A knows the MAC address of host B and can send information to host B. At the same time, it updates its ARP cache table, so next time it sends information to host B, it can directly look it up from the ARP cache table. The ARP cache table uses an aging mechanism; if a certain row in the table is not used for a period of time, it will be deleted, which greatly reduces the length of the ARP cache table and speeds up the query.

  • Content of this article is sourced from Wikipedia

Wi-Fi Network Planning Advice

Answers & Suggestions

15 Tips for Hard Drive Longevity

Answers & Suggestions

10 Things About Image Analysis

Answers & Suggestions

知識學院

蘊藏許多助人的知識與智慧。

關注知識學院