On Demand Routing (ODR)

On Demand Routing (ODR)

ODR, or On Demand Routing, is a very simple way to share routes in a basic hub and spoke network.

A topology like this will have a hub router, which may also run a dynamic routing protocol. There will also be one or more spokes, which must not run a dynamic routing protocol.

The spoke routers are assumed to be stub routers, meaning that there are no other routers connected to them. However, they may have several connected networks.

The spokes are directly connected to the hub. This may be a literal connection, or a tunnel.

 

Why Use ODR?

For one, it’s simpler than using static routes everywhere. Less overhead, and it’s still dynamic.

However, it’s also simpler than configuring a full dynamic routing protocol. To do this, you would need to consider summarization, and may need additional resources on the router. This makes it suitable for low-spec routers.

 

How Does it Work?

ODR relies on CDP. When a hub router discovers a spoke router with CDP, CDP will share the locally connected networks.

Please be aware that this will only work if the spoke router is not running any other routing protocols. This will also only work for IP prefixes (not additional address families like BGP can do).

The hub router will install the learned routes into its local routing table. The hub will only send a default route to the spokes, as you would expect.

On the hub, routes learned by ODR may be redistributed into other routing protocols.

 

Configuration

Configuration of ODR is extremely simple. You should first be sure that CDP is enabled. It is on by default.

On the hub, simply configure the ODR routing process like any other routing protocol.

router odr

 

And that’s all there is to it! Now, we start learning the routes from the spokes. The spokes in turn would learn a default route from the hub.

Hub#show ip route odr
o 10.1.0.0/24 [160/1] via 192.168.1.2, 00:00:49, GigabitEthernet0/1
o 10.2.0.0/24 [160/1] via 192.168.2.2, 00:00:06, GigabitEthernet0/2
o 10.3.0.0/24 [160/1] via 192.168.3.2, 00:00:40, GigabitEthernet0/3

 

There are two approaches we could use if we want to filter routes. Both of these are on the hub router.

The first option is simple, and that is to disable CDP on selected interfaces. This will prevent ODR running between the hub and selected routers.

If this is not the solution you need, you could be a bit more selective. Start by defining an access-list containing the routes you want to receive:

access-list 10 deny   10.3.0.0 0.0.0.255
access-list 10 permit 10.0.0.0 0.255.255.255

 

Next, under the ODR routing process, configure a distribute list, to use the ACL to restrict incoming routes:

router odr
 distribute-list 10 in

 

I have noticed that it takes quite a while for these changes to take effect.  Changing CDP timers (default is 60s) may help improve this, but mostly I think it’s a trade-off for simplicity.

 

References

Cisco – Configuring On-Demand Routing

 

Leave a Reply