ARP protocol

Address Resolution Protocol (English: AddressR strong>esolution Protocol, abbreviation: ARP) is a network transmission protocol that resolves the network layer address to find the data link layer address .

It is stipulated in the Ethernet protocol that if a host in the same LAN communicates directly with another host, the MAC of the target host must be known address. In the TCP/IP protocol, the network layer and the transport layer only care about the IP address of the target host. This results in that when the IP protocol is used in the Ethernet, the Ethernet protocol of the data link layer is connected to the data provided by the upper IP protocol, and only contains the IP address of the destination host. Therefore, a method is needed to obtain the MAC address of the destination host based on its IP address. This is what the ARP protocol does. The so-called address resolution is the process by which the host converts the target IP address into the target MAC address before sending the frame.

There is an ARP cache table in every computer or router with TCP/IP protocol installed. The IP address in the table corresponds to the MAC address, as shown in the following table.

share picture

Use host A (192.168.38.10 ) Send data to host B (192.168.38.11) as an example.
1. When sending data, host A will look for the target IP address in its ARP cache table. If you find it, you know that the target MAC address is (00-BB-00-62-C2-02), and you can directly write the target MAC address into the frame and send it.
2. 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 to send such a query to all hosts in the same network segment: “What is the MAC address of 192.168.38.11?”

3. Other hosts on the network do not respond to ARP queries, only host B Upon receiving this frame, it will respond to host A (ARP response): “The MAC address of 192.168.38.11 is 00-BB-00-62-C2-02”, and this response is in unicast mode. In this way, host A knows the MAC address of host B, and it can send information to host B. At the same time, it also updates its own ARP cache, and next time it sends information to host B, it can directly look it up in the ARP cache table.

The ARP cache table uses an aging mechanism. If a row in the table is not used for a period of time, it will be deleted, which can reduce the length of the cache table and speed up the query.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 306 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.