This chapter describes how to configure On-Demand Routing (ODR). For a complete description of the ODR commands in this chapter, refer to the "On-Demand Routing Commands" chapter of the Network Protocols Command Reference, Part 1. To locate documentation of other commands in this chapter, use the command reference master index or search online.
ODR is a feature that provides IP routing for stub sites, with minimum overhead. The overhead of a general, dynamic routing protocol is avoided without incurring the configuration and management overhead of static routing.
A stub router can be thought of as a spoke router in a hub-and-spoke network topology, where the only router to which the spoke is adjacent is the hub router. In such a network topology, the IP routing information required to represent this topology is fairly simple. These stub routers commonly have a WAN connection to the hub router, and a small number of LAN network segments (stub networks) are directly connected to the stub router.
These stub networks might consist only of end systems and the stub router, and thus do not require the stub router to learn any dynamic IP routing information. The stub routers can then be configured with a default route that directs IP traffic to the hub router.
To provide full connectivity, the hub router can be statically configured to know that a particular stub network is reachable via a particular stub router. However, if there are multiple hub routers, many stub networks, or asynchronous connections between hubs and spokes, statically configuring the stub networks on the hub routers becomes a problem.
Of the following tasks, the first three are required to configure On-Demand Routing and the remaining tasks are optional:
On-Demand Routing (ODR) allows you to easily install IP stub networks where the hubs dynamically maintain routes to the stub networks. This is accomplished without requiring the configuration of an IP routing protocol on the stubs.
On stub routers that support the ODR feature, the stub router advertises IP prefixes corresponding to the IP networks configured on all directly connected interfaces. If the interface has multiple logical IP networks configured (via the ip secondary command), only the primary IP network is advertised through ODR. Because ODR advertises IP prefixes and not simply IP network numbers, ODR is able to carry Variable Length Subnet Mask (VSLM) information.
To enable ODR, use the following command in global configuration mode:
router odr process-id
Enable ODR on the hub router.
Once ODR is enabled on a hub router, the hub router begins installing stub network routes in the IP forwarding table. The hub router can additionally be configured to redistribute these routes into any configured dynamic IP routing protocols.
On the stub router, no IP routing protocol must be configured. In fact, from the standpoint of ODR, a router is automatically considered to be a stub when no IP routing protocols have been configured.
The routing information that ODR generates is propagated between routers using Cisco's CDP protocol. This means that the operation of ODR is partially controlled by the configuration of CDP.
Using the global configuration command no cdp run disables the propagation of ODR stub routing information entirely. Using the interface configuration command no cdp enable disables the propagation of ODR information on a particular interface.
The hub router will attempt to populate the IP routing table with ODR routes, as they are learned dynamically from stub routers. The IP next hop for these routes is the IP address of the neighboring router, as advertised through CDP.
Use IP filtering to limit the network prefixes that the hub router will permit to be learned dynamically through ODR.
To filter ODR information, use the following command in router configuration mode:
For example, the following configuration causes the hub router to only accept advertisements for IP prefixes about (or subnets of) the class C network 22.214.171.124:
Although no IP routing protocol must be configured on the stub router, it is still necessary to configure the default route for IP traffic. You can optionally cause traffic for unknown subsets to follow the default route.
To configure the default route for IP traffic, use the following commands in global configuration mode:
ip route 0.0.0.0 0.0.0.0 interface-name
Configure the default route on the stub router.
Cause traffic for unknown subnets of directly connected networks to also follow the default route.
This task may be performed by using the redistribute router configuration command. The exact syntax depends upon the routing protocol into which ODR is being redistributed.
See the "Redistribute Routing Information" section in the "Configuring IP Routing Protocol-Independent Features" chapter.
By default, Cisco Discovery Protocol (CDP) sends updates every 60 seconds. This update interval may not be frequent enough to provide speedy reconvergence of IP routes on the hub router side of the network. A faster reconvergence rate may be necessary if the stub connects to one of several hub routers via asynchronous interfaces (such as modem lines).
ODR expects to receive periodic CDP updates containing IP prefix information. When ODR fails to receive such updates for routes that it has installed in the routing table, these ODR routes are first marked invalid, and eventually removed from the routing table. (By default, ODR routes are marked invalid after 180 seconds, and are removed from the routing table after 240 seconds.) These defaults are based on the default CDP update interval. Configuration changes made to either the CDP or ODR timers should be reflected through changes made to both.
To configure CDP/ODR timers, use the following commands beginning in global configuration mode:
Change the rate at which CDP updates are sent.
Change the rate at which ODR routes are expired from the routing table.
Other CDP features are described in the Configuration Fundamentals Configuration Guide, in the "Monitoring the Router and Network" chapter.
For interfaces that specify dialer mappings, CDP packets will make use of dialer map configuration statements that pertain to the IP protocol. Because CDP packets are always broadcast packets, these dialer map statements must handle broadcast packets, typically through use of the dialer map broadcast keyword. The dialer string interface configuration command may also be used.
On DDR interfaces, certain kinds of packets can be classified as interesting. These interesting packets can cause a DDR connection to be made or cause the idle timer of a DDR interface to be reset. For the purposes of DDR classification, CDP packets are considered uninteresting. This is true even while CDP is making use of dialer-map statements for IP, where IP packets are classified as interesting.