In this article we’ll do a short ODR (On Demand Routing) lab. ODR is a simple routing protocol targeted at hub and spoke topologies, it uses CDP to propagate routing updates. This is one of the technologies that might be on the CCIE exams. I will be including my Dynagen/GNS3 .net file at the end of this post. Here is our topology:

ODR Topology

Let’s go through the config:

R1

hostname R1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
 ip address 10.1.0.1 255.255.255.252
!
interface Serial0/1
 ip address 10.1.1.1 255.255.255.252
!
interface Serial0/2
 ip address 10.1.2.1 255.255.255.252
!
router odr

We configure the hostname and our Loppback and Serial interfaces. The important command here is “router odr”, this turns ODR on. This command is ONLY run on the hub.

R2:

hostname R2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
 ip address 10.1.0.2 255.255.255.252

R3:

hostname R3
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
 ip address 10.1.1.2 255.255.255.252

R4:

hostname R4
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Serial0/0
 ip address 10.1.2.2 255.255.255.252

We now have our hostnames and interfaces configured on R1, R2 and R3. Notice we DO NOT use the “router odr” command on the spokes.

Surprisingly, that is all there is to it! Let’s verify our config:

R1#sh ip route
...
Codes:  o - ODR
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
o       2.2.2.2 [160/1] via 10.1.0.2, 00:00:02, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
o       3.3.3.3 [160/1] via 10.1.1.2, 00:00:59, Serial0/1
     4.0.0.0/32 is subnetted, 1 subnets
o       4.4.4.4 [160/1] via 10.1.2.2, 00:00:59, Serial0/2
     10.0.0.0/30 is subnetted, 3 subnets
C       10.1.2.0 is directly connected, Serial0/2
C       10.1.1.0 is directly connected, Serial0/1
C       10.1.0.0 is directly connected, Serial0/0

Notice that we have all the spoke Loopbacks in our routing table with an “o” next to them, which tells us they are ODR routes.

R3#sh ip route
Codes: o - ODR
 
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     10.0.0.0/30 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Serial0/0
o*   0.0.0.0/0 [160/1] via 10.1.1.1, 00:00:00, Serial0/0

As you can see, the spoke routers recieve a default route via ODR (and CDP) from the Hub/R1.

Let’s try pinging R1 and a spoke router:

R3#ping 1.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/12/20 ms
R3#ping 2.2.2.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/28/44 ms

Our pings to R1 and R2′s Loopbacks are successful!

That’s it! ODR is suprisingly simple to configure and could be very useful in a hub and spoke network. As promised:

The Dynagen/GNS3 .net file
(you will need to change the paths to make it work)

Colby

Colby Glass has been in IT since 2002. He is currently a Systems Engineer (presales) with a Cisco Gold partner and holds the CCNP R/S, CCNP DC, CCDP, CCIP, JNCIA-ER.

More Posts