Skip to main content

4. Use of Directed ARP by Routing

The exchange and use of routing information is constrained by available address resolution procedures. A host or router can not use a next-hop IP address learned via dynamic routing procedures if it is unable to resolve the next-hop IP address to the associated link level address. Without compatible dynamic address resolution procedures, a router may not advertise a next-hop address that is not on the same IP network as the host or router receiving the advertisement. Directed ARP is a procedure that enables a router that advertises routing information to make the routing information useful by also providing assistance in resolving the associated next-hop IP addresses.

The following subsections describe the use of Directed ARP to expand the scope of ICMP Redirects [6], distance-vector routing protocols (e.g., BGP [3]), and link-state routing protocols (e.g., OSPF [4]).

4.1. ICMP Redirect​

If a router forwards a packet to a next-hop address that is on the same link level network as the host that originated the packet, the router may send an ICMP Redirect to the host. But a host can not use a next-hop address advertised via an ICMP Redirect unless the host has a procedure to resolve the advertised next-hop address to its associated link level address. Directed ARP is a procedure that a host could use to resolve an advertised next-hop address, even if the host does not have an address on the same IP network as the advertised next-hop address.

A host that implements Directed ARP procedures includes an ARP Helper Address with each routing table entry. The ARP Helper Address associated with an entry learned via an ICMP Redirect is NULL if the associated next-hop address matches a routing table entry with a NULL next-hop and a NULL ARP Helper Address (i.e., the host already knows how to resolve the next-hop address). Otherwise, the ARP Helper Address is the IP address of the router that sent the ICMP Redirect. Note that the router that sent the ICMP Redirect is the current next-hop to the advertised destination [5]. Therefore, the host should have an entry in its address resolution table for the new ARP Helper Address. If the host is unable to resolve the next-hop IP address advertised in the ICMP Redirect (e.g., because the associated ARP Helper Address is on a foreign IP network; i.e., was learned via an old ICMP Redirect, and the address resolution table entry for that ARP Helper Address timed out), the host must flush the associated routing table entry. Directed ARP procedures do not recursively use Directed ARP to resolve an ARP Helper Address.

A router that performs Directed ARP procedures might advertise a foreign next-hop to a host that does not perform Directed ARP. Following existing procedures, the host would silently discard the ICMP Redirect. A router that does not implement Directed ARP should not advertise a next-hop on a foreign IP network, as specified by existing procedures. If it did, and the ICMP Redirect was received by a host that implemented Directed ARP procedures, the host would send an ARP Request for the foreign IP address to the advertising router, which would silently discard the ARP Request. When address resolution fails, the host should flush the associated entry from its routing table.

For various reasons a host may ignore an ICMP Redirect and may continue to forward packets to the same router that sent the ICMP Redirect. For example, a host that does not implement Directed ARP procedures would silently discard an ICMP Redirect advertising a next-hop address on a foreign IP network. Routers should implement constraints to control the number of ICMP Redirects sent to hosts. For example, a router might limit the number of repeated ICMP Redirects sent to a host to no more than N ICMP Redirects per T minutes, where N and T are administered values.

4.2. Distance Vector Routing Protocol​

A distance-vector routing protocol provides procedures for a router to advertise a destination address (e.g., an IP network), an associated next-hop address, and other information (e.g., associated metric). But a router can not use an advertised route unless the router has a procedure to resolve the advertised next-hop address to its associated link level address. Directed ARP is a procedure that a router could use to resolve an advertised next-hop address, even if the router does not have an address on the same IP network as the advertised next-hop address.

The following procedures assume a router only accepts routing updates if it knows the IP address of the sender of the update, can resolve the IP address of the sender to its associated link level address, and has an interface on the same link level network as the sender.

A router that implements Directed ARP procedures includes an ARP Helper Address with each routing table entry. The ARP Helper Address associated with an entry learned via a routing protocol update is NULL if the associated next-hop address matches a routing table entry with a NULL next-hop and NULL ARP Helper Address (i.e., the router already knows how to resolve the next-hop address). Otherwise, the ARP Helper Address is the IP address of the router that sent the routing update.

Some distance-vector routing protocols (e.g., BGP [3]) provide syntax that would permit a router to advertise an address on a foreign IP network as a next-hop. If a router that implements Directed ARP procedures advertises a foreign next-hop IP address to a second router that does not implement Directed ARP procedures, the second router can not use the advertised foreign next-hop. Depending on the details of the routing protocol implementation, it might be appropriate for the first router to also advertise a next-hop that is not on a foreign IP network (e.g., itself), perhaps at a higher cost. Or, if the routing relationship is an administered connection (e.g., BGP relationships are administered TCP/IP connections), the administrative procedure could determine whether foreign next-hop IP addresses should be advertised.

A distance-vector routing protocol could advertise that a destination is directly reachable by specifying that the router receiving the advertisement is, itself, the next-hop to the destination. In addition, the advertised metric for the route might be zero. If the router did not already have a routing table entry that specified the advertised destination was local (i.e., NULL next-hop address), the router could add the new route with NULL next-hop, and the IP address of the router that sent the update as ARP Helper Address.

A link-state routing protocol provides procedures for routers to identify links to other entities (e.g., other routers and networks), determine the state or cost of those links, reliably distribute link-state information to other routers in the routing domain, and calculate routes based on link-state information received from other routers. A router with an interface to two (or more) IP networks via the same link level interface is connected to those IP networks via a single link, as described above. If a router could advertise that it used the same link to connect to two (or more) IP networks, and would perform Directed ARP procedures, routers on either of the IP networks could forward packets directly to hosts and routers on both IP networks, using Directed ARP procedures to resolve addresses on the foreign IP network. With Directed ARP, the cost of the direct path to the foreign IP network would be less than the cost of the path through the router with addresses on both IP networks.

To benefit from Directed ARP procedures, the link-state routing protocol must include procedures for a router to advertise connectivity to multiple IP networks via the same link, and the routing table calculation process must include procedures to calculate ARP Helper Addresses and procedures to accurately calculate the reduced cost of the path to a foreign IP network reached directly via Directed ARP procedures.

The Shortest Path First algorithm for calculating least cost routes is based on work by Dijkstra [7], and was first used in a routing protocol by the ARPANET, as described by McQuillan [8]. A router constructs its routing table by building a shortest path tree, with itself as root. The process is iterative, starting with no entries on the shortest path tree, and the router, itself, as the only entry in a list of candidate vertices. The router then loops on the following two steps.

    1.  Remove the entry from the candidate list that is closest to
root, and add it to the shortest path tree.

2. Examine the link state advertisement from the entry added to
the shortest path tree in step 1. For each neighbor (i.e.,
router or IP network to which a link connects)

- If the neighbor is already on the shortest path tree, do
nothing.

- If the neighbor is on the candidate list, recalculate the
distance from root to the neighbor. Also recalculate the
next-hop(s) to the neighbor.

- If the neighbor is not on the candidate list, calculate
the distance from root to the neighbor and the next-hop(s)
from root to the neighbor, and add the neighbor to the
candidate list.

The process terminates when there are no entries on the candidate list.

To take advantage of Directed ARP procedures, the link-state protocol must provide procedures to advertise that a router accesses two or more IP networks via the same link. In addition, the Shortest Path First calculation is modified to calculate ARP Helper Addresses and recognize path cost reductions achieved via Directed ARP.

    1.  If a neighbor under consideration is an IP network, and its
parent (i.e., the entry added to the shortest path tree in step
1, above) has advertised that the neighbor is reached via the
same link as a network that is already on the shortest path
tree, the distance from root and next-hop(s) from root to the
neighbor are the same as the distance and next-hop(s)
associated with the network already on the shortest path tree.
If the ARP Helper Address associated with the network that is
already on the shortest path tree is not NULL, the neighbor
also inherits the ARP Helper Address from the network that is
already on the shortest path tree.

2. If the calculated next-hop to the neighbor is not NULL, the
neighbor inherits the ARP Helper Address from its parent.
Otherwise, except as described in item 1, the ARP Helper
Address is the IP address of the next-hop to the neighbor's
parent. Note that the next-hop to root is NULL.

For each router or IP network on the shortest path tree, the Shortest Path First algorithm described above must calculate one or more next-hops that can be used to access the router or IP network. A router that advertises a link to an IP network must include an IP address that can be used by other routers on the IP network when using the router as a next-hop. A router might advertise that it was connected to two IP networks via the same link by advertising the same next-hop IP address for access from both IP networks. To accommodate the address resolution constraints of routers on both IP networks the router might advertise two IP addresses (one from each IP network) as next-hop IP addresses for access from both IP networks.