Saturday, August 24, 2013

Resolve routing overhead with ODR

Implement On-Demand routing - cost reducing


Static routes in an enterprise or service provider design setups have a main drawback that they have to manually configured and updated by an network engineer if a topology has changed. The other option are dynamic routing protocols. The RIP, OSPF, IS-IS and EIGRP consume a lot of network bandwith and machine resources. In this blog I will present a small and simple hub-and-spoke Cisco equipment scenario, where typically a network engineer would use dynamic or static routing.
In this scenario I will use a third option that is called On-Demand routing or simply ODR. This technology relies on the Cisco discovery protocol as sending routing updates. CDP is used to carry network and prefix information from the spokes and the hub router. ODR can be used to provide STUB networks with routing information with minimal overhead, thus reducing the costs of equipment. When compared to a dynamic routing protocol resources in packet sending is minimal. We can see later on how can we tune the routing updates using shorter update interval of CDP information.
ODR technology can be used in a hub and spoke enviroment only. In this topology every spoke router is adjacent with the hub router. Behind the stub router can be some LANs that clients are using. The hub router needs to know about every routing prefix from the spoke routers, but the spoke routers need only the default route from the hub router. The hub router send only the default route to the spoke routers that is pointing to himself as the next-hop. 
Now let's get some configuring done. ODR is implemented in global config with a simple command: router odr. First let see the configured interface on the spoke routers.

R2
interface FastEthernet0/0
 ip address 10.1.1.2 255.255.255.252
 duplex auto
 speed auto
interface FastEthernet0/1
 ip address 172.16.1.1 255.255.255.0
 duplex auto
 speed auto
cdp timer 15

R3 
interface FastEthernet0/0
 ip address 10.2.1.2 255.255.255.252
 duplex auto
 speed auto
interface FastEthernet0/1
 ip address 172.17.1.1 255.255.255.0
 duplex auto
 speed auto
cdp timer 15

We can see that no routing is configured on the stub routers.

R3#sh running-config | include route
R3#
R3#sh ip protocols
R3#

And the HUB router has directly connected WAN links towards the spoke with the global config ODR turned on.

R1
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.252
 duplex auto
 speed auto
interface FastEthernet0/1
 ip address 10.2.1.1 255.255.255.252
 duplex auto
 speed auto
router odr
ip classless
cdp timer 15

I have tuned the CDP timers with 15 second update on all of the routers in sending the CDP updates. Now let us look at the routing table on one of the Hub and Spoke routers.

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.17.0.0/24 is subnetted, 1 subnets
o       172.17.1.0 [160/1] via 10.2.1.2, 00:00:07, FastEthernet0/1
     172.16.0.0/24 is subnetted, 1 subnets
o       172.16.1.0 [160/1] via 10.1.1.2, 00:00:00, FastEthernet0/0
     10.0.0.0/30 is subnetted, 2 subnets
C       10.2.1.0 is directly connected, FastEthernet0/1
C       10.1.1.0 is directly connected, FastEthernet0/0
     192.168.1.0/32 is subnetted, 1 subnets
C       192.168.1.1 is directly connected, Loopback0


And the routing table of the spoke router.

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.1.1 to network 0.0.0.0

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/1
     10.0.0.0/30 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/0
o*   0.0.0.0/0 [160/1] via 10.1.1.1, 00:00:13, FastEthernet0/0

We should not be confused with the o letter in front of the route as the OSPF update. This is and ODR update of the prefix information. As we can see the HUB router knows via ODR the LAN links from the spokes, and the spoke routers have a default static route towards the HUB router. All of this with a one simple command. 
Now we can test this with a simple ping from a R3 router LAN interface toward the R2 router LAN interface to see if we have end to end connectivity.

R3#ping 172.16.1.1 source 172.17.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
Packet sent with a source address of 172.17.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/49/80 ms

This works perfectly!
We can tune the ODR route propagation with many features that dynamic protocol are using, similar to distribution lists with ACL combination.

Thanks and feel free to comment.

No comments:

Post a Comment