ARP
The ARP is intended to solve the problem derived from the fact that the Internet is a virtual network working on physical networks [8]. When a datagram must travel from one machine to another (to the destination host or to a gateway) located in the same physical network, the physical layer that exists below the Internet encapsulates the datagram with the frame of the network itself, which must include the physical address of the machine. The problem consists in that this physical address can be unknown and must be obtained from the known IP address. There are two basic methods to obtain the physical address. • Direct mapping. Direct mapping, the most trivial way, allows the physical address to be found from the IP address. Direct mapping can be used when the physical address fulfils one of the following two conditions: either it can be chosen freely or it is sufficiently small. In the first case, it is enough to assign each machine a physical address that coincides with the part of the IP address that identifies the host. In this case, the determination of the physical address is trivial. In the second case, it is enough to have a simple function that maps each IP address to a physical address. • Dynamic mapping. Dynamic mapping requires a specific protocol such as the ARP to find out the physical address. When the physical address is fixed, or when it is made up of a large number of bits, direct mapping is unviable. This is the case of Ethernet networks, in which the address of a machine is made up of 48 bits fixed by each manufacturer and cannot be modified. A simple solution is to have a table with the correspondences among addresses, but it must be modified every time a new machine is added to the network. The ARP protocol provides a mechanism to resolve this problem in a dynamic way with the only condition that the network has the capacity of broadcasting The ARP basically works by sending all of the machines in the physical network a datagram with a special format including the IP address. All of the machines will receive the message, but only the one whose IP address coincides will send a reply with its physical address. From this moment on, the physical address of the host is known. This initial method can have some improvements. The first consists of maintaining a cache memory with the last physical addresses obtained. Thus, when a physical address is needed, the cache memory is consulted first, sending the ARP message only if there is no correspondence. Another improvement is based on the fact that if a machine A needs the physical address of B, it is likely that B will need the address of A in the near future. It is enough for A to include its physical address in its request message to B. Furthermore, as all of the machines in the network receive this request, they can take advantage by storing the physical address of A in their corresponding caches for future communications.
473 times read
|
|
|
|