Computer Network (xv) ARP Introduction

1.ARP Summary

ARP is a protocol address to solve the problem.
The target IP address as a clue to locate the next data to be received MAC address corresponding to the sub-network devices.
If the destination host on a link is not at the same time, you can find the MAC address of the next hop router via ARP.
ARP applies only to IPv4, not for IPv6. IPv6 can be used to send Neighbor Discovery ICMPv6 substitute ARP messages.

2.ARP working mechanism

ARP is an ARP request and an ARP response by means of two types of packet to determine the MAC address.
ARP mechanism
1. A host in order to obtain the MAC address of host B, to send a first ARP request packet by broadcasting. This package contains the IP address of the host you want to learn MAC addresses.
2.ARP request packet already contains the IP address of Host B 172. 20. 1.2. May be received by the broadcast packets of all one thousand host or router on the same link, and therefore also the ARP request packet will be all routers and hosts on the same link it parses.
3. If the ARP request packet destination IP address matches the own IP address, then the node will be its own MAC address Cypriot ARP response packet back to the host A.
Note: ARP request packet there is a role that will tell their own MAC address to each other.
MAC address can be obtained from the IP address by ARP, the IP communication to the link. ARP ARP can dynamically
to cause unnecessary network traffic: The usual practice is to get to the MAC address cache for some time.
1. The first through the ARP acquired MAC address as the IP to MAC mapping relationship into a memory in the ARP cache table.
2. The next IP address again without re-transmit the datagram transmitted ARP request, but the use of this MAC address directly to the cache table for transmission among the datagram.
3. Each time ARP, the corresponding cache contents will be cleared. But before clearing you are not required to perform ARP can obtain the MAC address you want.
In general, once a host to send IP datagrams, the possibility continues to send multiple IP datagrams will be higher. The method of receiving a MAC address of the host is also a buffer in efficiency.
Cache MAC address is a certain period. Over this period, the cached content will be removed.
This allows the MAC address and IP address correspondence even change, it is still possible to correctly send the data packet to the destination address.
ARP packet format

3.IP address and MAC address are indispensable

Effect of different MAC address and IP address
Just to have a MAC address, it is impossible to know the location of the machine is located.
And if the device over the world are connected to the MAC address, the bridge transmits the packet to the world have learned before. One can imagine it would cause much network traffic.
Both the IP address and MAC address are indispensable. So there will be these two ARP protocol address associated.

4.RARP

RARP is the ARP, in turn, positioning a protocol IP address from a MAC address.
Usually we can set the IP address of the personal computer, you can also obtain an IP address automatically assigned by DHCP.
You need to set up a RARP server to register the MAC address and IP address of the device on the server.
RARP

5. Proxy ARP

Typically router ARP packet will be isolated, but using proxy ARP router ARP request may be forwarded to an adjacent segment.
Two communicating like to be in the same network segment between the access node segment.
In the current TCP / IP network which, under normal circumstances with a plurality of routers connected to the network, define in each subnet on each segment so as to perform routing control.
For those who do not support setting the subnet mask of old devices, without the use of proxy ARP, sometimes you can not make better use of the network.

Guess you like

Origin blog.csdn.net/NEUChords/article/details/91376071