[Xorp-hackers] Adding static routes with unresolved next-hop router

Pavlin Radoslavov pavlin@icir.org
Thu, 12 Aug 2004 16:28:28 -0700


I have a question about the desired behavior of adding static routes
to StaticRoute.

Currently, if a static route is added to StaticRoutes, and if the
next-hop router toward the destination is unresolvable (e.g., the
network interface toward the destination is DOWN, or simply there is
no network interface that connects us to that router), then the
routing entry is saved internally (inside StaticRoutes), and the
"add" operation returns OK. However, StaticRoutes does NOT send that
route to the RIB. If the network interface toward that next-hop
router comes up, then StaticRoutes will send that route to RIB.

The reasoning behind the above behavior is that StaticRoutes can be
configured on startup (or on the fly) with a number of routes, even
though some of them may not be used because some of the network
interfaces are intentionally down. Once a network interface becomes
UP, then the corresponding static routes that use that interface are
automatically installed.
In addition, if we look into StaticRoutes as a simple routing
protocol, then it should be taking into account the network
interface status and should install routes into RIB only if those
routes are valid.


However, if there is an error in the configuration such as a typo in
the IP address of a next-hop router, then such route will be
installed in StaticRoutes (only), and no error will be returned to
the user. Such behavior may be a source of a confusion, hence I'd
like to ask for opinions what the right solution should be.

Below are some suggestions:

a) If the next-hop router toward the destination is not resolvable,
   then always return an error. Note that may not be a practical
   solution, because on startup we may have to wait until StaticRoutes
   receive all network interface information from the FEA before we
   can add any static routes to it.

b) If the next-hop router toward the destination is not resolvable,
   then StaticRoutes should print a warning, but it should still
   return OK (if we don't return OK, then the rtrmgr will fail to
   start StaticRoutes).

c) If the next-hop router toward the destination is not resolvable,
   then the StaticRoutes should still add the route to the RIB, and
   then let the RIB deal with resolving the next-hop router
   whenever the status of the related network interface changes.
   Doing something like this may require changes to the RIB.

d) Don't change the current behavior, but document it.


Comments?
Pavlin