The Multi-LAN Address Resolution Protocol
THE MULTI-LAN ADDRESS RESOLUTION PROTOCOL
The plan is to use ARP just as it is. The new element is the "magic box" ("ARP-based bridge") that relays the ARP request into neighboring LANs and acts as an agent for relaying datagrams to hosts on other LANs.
The Details
Hosts continue to behave exactly as they do with the basic ARP.
The LANs are connected together by BOXes (computers that are attached to two or more LANs exactly as hosts are attached to LANs). The BOXes implement the following procedure.
Each BOX keeps a table for each LAN it is connected to (or for each LAN interface). Entries in these tables time out, so these tables are caches of recent information. The entries in these caches are the IA:HA address pairs for that LAN.
When an ARP query is broadcast by any host the BOX reads it (as do all the hosts on that LAN). In addition to checking to see if it is the host sought (and replying if it is), the BOX checks its cache of IA:HA address mappings in the table it keeps for each LAN it is attached to.
Case 1: If the mapping for the host is found in the cache for the LAN that the query came from, the BOX does not respond (letting the sought host respond for itself). The time out on this entry is not reinitialized.
Case 2: If the mapping for the host is found in the cache for a different LAN than the query came from, the BOX sends a reply giving its own HA on the LAN the query came from. The time out on this entry is not reinitialized.
In this case the BOX is indicating that it will act as an agent for the destination host. When an IP datagram arrives at the BOX, the BOX must attempt to forward it using the information in its address mapping caches.
Case 3: If the mapping is not found in any of the caches, then the BOX must try to find out the the address, and then respond as in case 1 or 2. In this case, the BOX has to do some magic.
The BOX keeps a search list of sought (but not yet found) hosts. Each entry includes the IA of the host sought, the interface the ARP was received on, and the source addresses of the original request.
When case 3 occurs, the search list is checked. If the sought host is already listed the search is terminated, if not the search is propagated.
To propagate the search, an entry is first made on the search list, then the BOX composes and sends an ARP packet on each of its interfaces. These ARP requests contain the IA and HA of the BOX and the IA of the sought host, and request the HA of the sought host. If a reply is received to the ARP request, the information is entered into the appropriate cache, the entry is deleted from the search list and a response to the search instigating ARP requests is made as in case 1 or 2 above. If no reply is received, give up and do nothing -- no response is sent to the instigating host (the entry stays on the search list).
Note that the BOX must make a reasonable effort with its ARP requests, if it is normal for ordinary hosts to retry ARP requests five times, then a BOX must also retry it's ARP requests five times.
To terminate the search, give up and do nothing -- no response is sent to the instigating host (the entry stays on the search list).
There is no negative feedback from an ARP request, so there is no way to decide that a search was unsuccessful except by means of a time out.
For every ARP request that is received, the BOX must also put the sending hosts IA:HA address mapping into the cache for the LAN it was received on.
The entries in the caches and the search list must time out.
The search list must be kept and the termination rule followed to avoid an infinite relaying of an ARP request for a host that does not respond. Once a host is listed in the search list, ARP requests will not be relayed. If a host that is down (or otherwise not responding to ARP requests), comes up (or otherwise begins responding to ARP requests) it will still not become available to hosts in other LANs until the search list entry times out.
There are two approaches to this problem: first, to have a relatively short time out on the search list entries; or second, to have the BOX periodically send ARPs for each entry on the search list.
There are several time outs involved in this scheme.
First, the hosts try to get the address resolved using ARP. They may actually make several attempts before giving up if a host is not responding. One must have an good estimate of the length of time that a host may keep trying. Call this time T1.
Second, there is the time that an entry stays on the search list, or the time between BOX generated ARPs to resolve these addresses. Call this time T2.
Note that this time (T2) must be greater than the sum of the T1s for the longest loop of LANs.
Third, there is the time that entries stay in the cache for each LAN. Call this time T3.
The relationship must be T1 < T2 < T3.
One suggestion is that T1 be less than one minute, T2 be ten minutes, and T3 be one hour.
If the environment is very stable, making T3 longer will result in fewer searches (less overhead in ARP traffic). If the environment is very dynamic making T3 shorter will result in more rapid adaptation to the changes.
Another possibility is to restart the timer on the cache entries each time they are referenced, and have a small value for T3. This would result in entries that are frequently used staying in the cache, but infrequently used information being discarded quickly. Unfortunately there is no necessary relationship between frequency of use and correctness. This method could result in an out-of-date entry persisting in a cache for a very long time if ARP requests for that address mapping were received at just less than the time out period.
When handling regular datagrams, the BOXes must decrement the IP datagram Time-To-Live field (TTL) and update the IP header check sum. If the TTL becomes zero the datagram is discarded (not forwarded).
ARP, as currently defined, will take the most recent information as the best and most up-to-date. In a complicated multi-LAN environment where there are loops in the connectivity it is likely that one will get two (or more) responses to an ARP request for a host on some other LAN. It is probable that the first response will be from the BOX that is the most efficient path.
The one change to the host implementation of ARP that is suggested here is to prevent later responses from replacing the mapping recorded from the first response.