Sunday, November 20, 2011

On-Demand Routing

On-Demand Routing (ODR) requires minimal manual configuration and management overhead than static routing and provides IP routing information with minimal resource usage (eg: network bandwidth and router resources) compared to dynamic routing protocols.

ODR is only applicable to hub-and-spoke topology, where each spoke (or stub) router is adjacent only to the hub router. The stub router typically has some LAN networks connected to it and a WAN connection to the hub router. The hub router needs to know the networks behind each spoke router, but the spoke routers only require a default route points back to the hub router.

ODR utilizes Cisco Discovery Protocol (CDP) to carry network information between the spoke (or stub) and hub routers. Spoke routers use CDP to send IP prefixes information to the hub router; whereas the hub router sends a default route which points back to it to the spoke routers. ODR supports VLSM as ODR routing updates carry subnet mask information.

ODR is not a routing protocol, as the information exchanged is limited to IP prefixes and default routes only. ODR does not report metric information – the hub router uses a hop count of 1 as the metric for all routes reported by ODR. However, ODR is able to dynamically obtain the routing information for stub networks without the overhead of a dynamic routing protocol, and default routes can be provided to the spoke routers without any manual configuration.

The hub router inserts the stub networks learnt via ODR along with next-hop addresses to the spoke routers (based on the IP addresses learnt via CDP) into its routing table.

If information about a stub network needs to be propagated to other parts of the network, the hub router can be configured to redistribute it into a dynamic routing protocol.

The router odr global configuration command is used to enable ODR on the hub router; and no IP routing protocol configuration is required on the spoke routers.

The distribute-list {acl-num | acl-name} in | out [intf-type intf-num] router subcommand can be used to limit the network prefixes that are permit to be learned via ODR in the hub router. The timers basic {update-interval invalid holddown flush} [sleep-time] router subcommand can be used to change the interval at which ODR routes are expired / flushed and being removed from the routing table.
Note: Sleep timer is the interval (in ms) for postponing triggered (or flash) updates. Its value should be less than the update interval, or else the routing tables will become unsynchronized.

ODR relies on CDP, hence CDP must be enabled. CDP is enabled by default on most interfaces, eg: Ethernet, Point-to-Point Serial, Frame Relay, etc.

CDP updates are sent as Ethernet multicasts – 0100.0CCC.CCCC. On WAN links that require mapping statements, eg: ISDN dialer links and Frame Relay, the broadcast keyword is required in the mapping statements to allow broadcasts and multicasts to be propagated across the links.

CDP updates are sent every 60 seconds by default, which may not be frequent enough to response to network topology changes. The cdp timer {sec} global configuration command can be used to change the CDP update interval. The show cdp and show cdp interface EXEC commands can be used to verify CDP configuration.

Sample ODR Network

ODR configuration on RT1 and the routing table of RT2:
RT1#debug ip routing
IP routing debugging is on
RT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT1(config)#router odr
00:10:11: RT: add via, odr metric [160/1]
00:10:11: RT: NET-RED
00:10:25: RT: add via, odr metric [160/1]
00:10:25: RT: NET-RED
00:10:36: RT: add via, odr metric [160/1]
00:10:36: RT: NET-RED
RT1#sh ip route

Gateway of last resort is not set is subnetted, 3 subnets
C is directly connected, FastEthernet1/0
o [160/1] via, 00:00:29, Serial0/0
o [160/1] via, 00:00:15, Serial0/1
o [160/1] via, 00:00:04, Serial0/2 is subnetted, 2 subnets
C is directly connected, Serial0/0
C is directly connected, Serial0/1
C is directly connected, Serial0/2
RT2#sh ip route

Gateway of last resort is to network is subnetted, 1 subnets
C is directly connected, FastEthernet1/0 is subnetted, 1 subnets
C is directly connected, Serial0/0
o* [160/1] via, 00:00:22, Serial0/0

As soon as ODR is configured and running, routes from the stub routers will be shown in the routing table of the hub router. ODR routes are identified with the o character and not to be confused with the O character for OSPF routes.
Note: Metric and administrative distance for ODR are 1 and 160 respectively.

ODR routes are refreshed every 60 seconds due to the default CDP advertisement interval.

No comments:

Post a Comment