1. Address Resolution Protocol ARP: Know the IP address of a machine, need to find its corresponding hardware address; The purpose of the ARP protocol is to resolve the hardware address used at the link layer from the IP address used by the network layer;
2. Because the IP protocol uses the ARP protocol, the ARP protocol is usually classified as the network layer;
3. The IP address used by the network layer, but when the data frame is transferred on the link of the actual network, the hardware address of the network must be used eventually;
4. Address Resolution Protocol ARP resolves the mapping problem of IP address and hardware address:
* * In the host ARP cache area should be stored in a map from the IP address to the hardware address of the mapping table;
* * When a host to send an IP datagram to a host B on the local area network, the IP address of Host B is first viewed in its ARP cache, and if so, the corresponding hardware address is detected in the ARP cache, and the hardware address is written to the Mac frame. Then the Mac frame is sent to this hardware address through the LAN;
* * When the A host cache is empty, or the Host B to access the network, in this case, a host will automatically run ARP, follow the steps below to find the hardware address of Host B:
The ①ARP process broadcasts a group of ARP requests on the local area network: My IP address is ..., the hardware address is ..., I want to know the IP address ..... The hardware address of the host;
② the ARP process that is running on all hosts on the local area network receives this ARP request packet;
The IP address of ③ Host B is consistent with the IP address to be queried in the ARP Request packet, the ARP request protocol is received, and the ARP response packet is sent to host a, and the response packet is written to its own hardware address, although the ARP request grouping is broadcast, but the ARP response grouping is normal unicast. That is, from a source address sent to a destination address;
④ Host A receives the ARP response from Host B, it writes the IP address and the hardware address mapping of Host B in its ARP cache;
The 5.ARP cache is very useful. If the ARP cache is not used, then any host must send the ARP Request packet on the network as long as there is one communication, which makes the traffic on the network increase greatly;
6.ARP sets the lifetime of each mapped address item that is stored in the cache, and removes it from the cache whenever it exceeds the time to live; In order to avoid hardware changes after the device hardware change, but not to communicate properly '
7.ARP is to solve the problem of mapping the IP address of the host or router on the same LAN or the P address and hardware address of the router; if the host and source host are not located on the same LAN, the hardware address of the host cannot be resolved;
8. The resolution from the IP address to the hardware address is automatic, the user of the host is not aware of this address resolution process, as long as the host or router to communicate with another known IP address on the network host or router, the ARP protocol will automatically resolve the IP address to the link layer required hardware address;
9. Why not use the hardware address directly to communicate, but to use the abstract IP address and call ARP to addressing:
* * Because of the existence of a wide range of networks around the world, they use different hardware addresses, to make these heterogeneous network communication must be very complex, hardware address translation work, so the user or host to complete this work is almost impossible, unified IP address to solve the problem;
2016.7.8 review points of the computer network fourth Chapter Address Resolution Protocol ARP