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#
RT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT1(config)#router odr
RT1(config-router)#end
RT1#
00:10:11: RT: add 172.16.2.0/24 via 10.10.1.2, odr metric [160/1]
00:10:11: RT: NET-RED 172.16.2.0/24
00:10:25: RT: add 172.16.3.0/24 via 10.10.2.2, odr metric [160/1]
00:10:25: RT: NET-RED 172.16.3.0/24
00:10:36: RT: add 172.16.4.0/24 via 10.10.3.2, odr metric [160/1]
00:10:36: RT: NET-RED 172.16.4.0/24
RT1#sh ip route

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 3 subnets
C       172.16.1.0 is directly connected, FastEthernet1/0
o       172.16.2.0 [160/1] via 10.10.1.2, 00:00:29, Serial0/0
o       172.16.3.0 [160/1] via 10.10.2.2, 00:00:15, Serial0/1
o       172.16.4.0 [160/1] via 10.10.3.2, 00:00:04, Serial0/2
     10.0.0.0/30 is subnetted, 2 subnets
C       10.10.1.0 is directly connected, Serial0/0
C       10.10.2.0 is directly connected, Serial0/1
C       10.10.3.0 is directly connected, Serial0/2
RT1#
======================================================================
RT2#sh ip route

Gateway of last resort is 10.10.1.1 to network 0.0.0.0

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.2.0 is directly connected, FastEthernet1/0
     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.1.0 is directly connected, Serial0/0
o*   0.0.0.0/0 [160/1] via 10.10.1.1, 00:00:22, Serial0/0
RT2#

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