ARP Protocol (1) what is the ARP protocol

Source: Internet
Author: User

This is the recent review of the "TCP/IP detailed" series of books summed up, and then will be part of other agreements to share.

I try to present it in a simple, easy-to-read and understandable way, however, due to the limited writing and level, some places may be insufficient or cumbersome or missing in the description, please crossing pointed out that I will try to make up and correct.

This series of articles, the first version is published on the public platform, and will be synchronized to CSDN (Http://my.csdn.net/xiongxianhe), Welcome to correct and exchange.


The ARP protocol, which will be divided into the following sequence:

1, what is the ARP protocol

2, the ARP protocol format detailed

3, ARP protocol programming

4. ARP protocol spoofing and attack

5. ARP Security protection


first, what is the ARP protocol1, we first look at the TCP/IP protocol family of four levels, (image from the "TCP/IP Detailed Volume 1")
The main purpose of our computer's access to the Internet is to acquire resources on other people's computers, or for others to access our resources. So how can we get to someone else's computer? Smart humans use addresses to identify every machine on the Internet, the IP address we call everyday. For example, to get the "online compiler" code that I wrote earlier, you can useftp://115.29.235.230/pub/MyProject/CompileOnline/Where 115.29.235.230 is an IP address. But with the IP address is not enough, because the IP address is the network layer (TCP/IP protocol family) used, the computer finally to the physical device (network card, network cable, etc.) on the transmission, so there must also be a physical address of the computer, we call it: MAC address or Physical address (each machine in the factory, The MAC address is determined and unique). Therefore, to enable two machines to communicate, the IP address and MAC address is not few. ftp://115.29.235.230/pub/MyProject/CompileOnline/, I only give the IP address, but no MAC address, but I have access to the browser, this is how to achieve it? At this point our arp comes out:
ARP (address Resolution Protocol), which is the protocol rule that translates IP addresses into MAC addresses.
Q:How does arp convert an IP address to a MAC address? A: the ARP protocol is implemented for each machine core. It is through a cache that maps IP to the corresponding Mac. You can execute command arp-a on your machine, and the IP and Mac mappings that your machine is now caching will appear, such as:
Q:How is this mapping table generated? A:(1) In this table, the lifetime of each record (non-static) is typically 20 minutes, starting from the time it was created and once it expires, it will be deleted in this table. (Manually delete all, you can use the arp-d * command). (2) when a host to send information to B, a first in the ARP cache query B's IP if there is a corresponding MAC address, if there is a B IP corresponding to the MAC address is taken out encapsulated in the packet, and then sent out. (3) If a does not find the Mac corresponding to b IP in the ARP cache, then broadcast or ask the Gateway (route) to the LAN where A is located: who has the Mac of B IP, please tell a. (4) If B and a is the same LAN, B back this message, and put B's MAC address on, A and then the B's IP and Mac write to the ARP cache (generally effective time is 20 minutes). (5) If B and a are not the same LAN, and a gateway that is located knows (or indirectly knows (ask and contract)) B's Mac, then the gateway sends a message to a, and takes the MAC address of B. A when the message is received, the IP and Mac of B are written to the ARP cache (generally valid for 20 minutes). (6) If no one responds, it expires and the other person cannot reach.
Q: The IP address of B, how does a know? A:(guess!) )
the above question and answer form, now understand what ARP is to do it? Yes, that's what you think!
In the following article, we will learn the format of the ARP protocol

Public number



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

ARP Protocol (1) what is the ARP protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.