ODR is not a routing protocol but an enhancement to CDP as it can propogate prefixes and only add 5 bytes into CDP. ODR must only be enabled on stub router. ODR will not work if other routing protocols are running. CDP should be running on all routers. We need to run ODR on hub router and all other spokes send their connected interfaces information to Hub via ODR (CDP update). Please note that we cannot redistribute static or dynamic routes to ODR but can redistribute ODR routes to dunamic protocols.

You can also load balance via ODR if you have multiple Hubs.

Picture
Requirement:
  • In this topology R3 is a spoke and R2 is a Hub. We will  running EIGRP between R1 and R2.
  • R3 should send its loop-back (connected interfaces) information to the whole network without using static routing or dynamic routing protocols.
  • R3 should learn EIGRP routes



! R1 Configuration
interface FastEthernet0/0
ip address 1.1.1.1 255.0.0.0
no shut

router eigrp 10
network 1.0.0.0


! R2 Configuration

router odr



interface FastEthernet0/0
ip address 1.1.1.2 255.0.0.0
no shutdown

interface Serial0/0
ip address 2.2.2.1 255.0.0.0
no shutdown

router eigrp 10
network 1.0.0.0
redistribute odr metric 10 10 10 10 10


! R3 Configuration

interface Loopback0
ip address 40.1.1.1 255.255.255.255

interface Loopback1
ip address 40.1.1.2 255.255.255.255

interface Serial0/0
ip address 2.2.2.2 255.0.0.0
no shutdown
Configuration Explanation










This command is letting R2 to send itself as a default route to all spoke routers i.e. R1 and will get connected information update from neighbors CDP update










Redistributing ODR routes to EIGRP




Connected loopback interface


Connected loopback interface





Verification

R3#show ip route odr
o*   0.0.0.0/0 [160/1] via 2.2.2.1, 00:00:45, Serial0/0

R3#show ip route
Gateway of last resort is 2.2.2.1 to network 0.0.0.0

C    2.0.0.0/8 is directly connected, Serial0/0
     40.0.0.0/32 is subnetted, 2 subnets
C       40.1.1.1 is directly connected, Loopback0
C       40.1.1.2 is directly connected, Loopback1
o*   0.0.0.0/0 [160/1] via 2.2.2.1, 00:00:13, Serial0/0

This output shows that by configuring R2 as ODR; R1 (spoke) gets default route toward hub (R2)


R2#show ip route

C    1.0.0.0/8 is directly connected, FastEthernet0/0
C    2.0.0.0/8 is directly connected, Serial0/0
     40.0.0.0/32 is subnetted, 2 subnets
o       40.1.1.1 [160/1] via 2.2.2.2, 00:00:30, Serial0/0
o       40.1.1.2 [160/1] via 2.2.2.2, 00:00:30, Serial0/0

R2 has learnt both ODR routes from CDP update

R1#show ip route
C    1.0.0.0/8 is directly connected, FastEthernet0/0
     40.0.0.0/32 is subnetted, 2 subnets
D EX    40.1.1.1 [170/256028160] via 1.1.1.2, 00:00:37, FastEthernet0/0
D EX    40.1.1.2 [170/256028160] via 1.1.1.2, 00:00:37, FastEthernet0/0


Redistributed ODR routes to EIGRP