#

Friday, October 16, 2015

Longer Match Method of OSPF Traffic Engineering in Stub Areas for External & Inter Area Routes

If a router in a stub area has 2 paths to area 0 and if you want to route traffic in 2 different paths (one path for external routes & another path for other inter area routes) here is the best way to do it.


You can download initial configuration files of the above topology from here.

Quick summary of the topology:
Area 1 is a stub area & area 2 is a regular area. 
R5 has a loopback 0 which is not advertised in the OSPF process directly but redistributed into the OSPF process. It will be the only external route.

IP address:
R1 e0/0: 1.1.12.1     e0/1: 1.1.15.1                            R2 e0/0: 1.1.12.2     e0/1: 1.1.24.2
R3 e0/0: 1.1.35.3     e0/1: 1.1.34.3                            R4 e0/2: 1.1.24.4     e0/3: 1.1.34.4
R5 e0/0: 1.1.15.5     e0/1: 1.1.35.5                            e0/2: 192.168.1.1     loopback0: 5.5.5.5
R6 e0/0: 192.168.1.2

2 ABRs in the area 1. Because area 1 is a stub area, LSA type 4 & 5 will be filtered. In R4, we will be able to see an inter-area default route to both the ABRs in routing table.


















So CEF will load balance the traffic because R4 can see both the paths as equal cost paths. But in the real diagram you can see that it is wrong. R4,R3, R5 path is much shorter than R4,R2,R1,R5. But R4 will not recognize it. This is where the traffic engineering comes in.

So in this lab I am setting up the routing paths to external routes to go through R2 and to all other inter area routes to go through R3 from area 1.

Method

Make the area 1 a totally stubby area in R2
Change the summary default cost to 0 in R2

What happens now is LSA types 3,4,5 are not advertised from R2 while LSA type 3 is advertised from R3. So the inter area routes will choose the path through R3 because inter area routes are advertised only form R3 and it will be the longer match for the inter area prefixes (not the default route). For the external routes, R4 will choose the low cost path only because there is no match for external prefixes (default route will be used) & OSPF does not support unequal cost load balancing.


You can enter CEF commands to determine the exact route easily. Because this is Ethernet environment, If I entered the default-cost to be 1, R4 will start load balancing again. If entered any number higher than 1, R4 will choose R3 as the low cost path to even for the external routes.

No comments:

Post a Comment