Thursday, June 20, 2013

Cisco OSPF Summarization Tips and Tricks

The topic of summarization typically comes up as a concern with folks when discussing SPF based protocols.  For some reason, area boundaries and summarization get coupled together in people’s heads. The good ol’ summarization discussion, usually as a knock on OSPF and ISIS, typically ends with the admission that “we actually don’t summarize in our network with our existing IGP either”.  So is summarization important or required?  It could be, but today’s routers have enough memory to handle the massive load of less than 1,000 routes in your IGP.  So what’s the trick to summarizing routes in OSPF?

Area-range

The area-range command is used to provide a summary at the area border router (ABR).  If your router has more than one OSPF area, feel free to use the area range command to summarize on the area boundaries.  The key to understanding how this works is direction. You will summarize the routes FROM one area to all other areas configured on that ABR.

Cisco Example (first):

Let’s look at the area range range command on the Cisco2621 to see the effect of the configuration on the routing table.
2621-R9#sh run | b router ospf
router ospf 1
log-adjacency-changes
area 0 range 10.0.0.0 255.255.252.0
network 172.16.101.0 0.0.0.255 area 0
network 172.16.201.0 0.0.0.255 area 1
!
In this example, I’m summarizing routes in the 10.0.0.0/22 range FROM area 0 to area 1.  Looking at the route table on the Cisco 2621, which is the ABR between area’s 0 & 1, we see that we are learning 5 routes from the upstream J2350-1 as intra-area OSPF routes – “O”. Those routes are highlighted below as well as documented in the drawing above.
2621-R9#sh ip rou
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.16.0.0/24 is subnetted, 2 subnets
C       172.16.201.0 is directly connected, FastEthernet0/0.410
C       172.16.101.0 is directly connected, FastEthernet0/0.400
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O       10.0.2.0/24 [110/2] via 172.16.101.2, 00:32:16, FastEthernet0/0.400
O       10.0.3.0/24 [110/2] via 172.16.101.2, 00:32:16, FastEthernet0/0.400
O       10.0.0.0/24 [110/2] via 172.16.101.2, 00:32:16, FastEthernet0/0.400
C       10.1.0.0/30 is directly connected, FastEthernet0/0
O       10.0.1.0/24 [110/2] via 172.16.101.2, 00:32:16, FastEthernet0/0.400
O       10.0.4.0/24 [110/2] via 172.16.101.2, 00:32:16, FastEthernet0/0.400
C    192.168.255.0/24 is directly connected, FastEthernet0/1.300
2621-R9#
Looking at the route table on the J2350-2, we should see the effects of the area-range command.
jparks@J2350-2-R4> show route
inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.0/22 *[OSPF/10] 00:00:54, metric 3
> to 172.16.201.1 via ge-0/0/3.410
10.0.4.0/24 *[OSPF/10] 00:40:29, metric 3
> to 172.16.201.1 via ge-0/0/3.410
172.16.88.2/32     *[Direct/0] 00:43:45
> via lo0.0
172.16.101.0/24    *[OSPF/10] 00:40:24, metric 2
> to 172.16.201.1 via ge-0/0/3.410
172.16.201.0/24    *[Direct/0] 00:41:24
> via ge-0/0/3.410
172.16.201.2/32    *[Local/0] 00:43:22
Local via ge-0/0/3.410
192.168.255.0/24   *[Direct/0] 00:41:28
> via ge-0/0/0.300
192.168.255.80/32  *[Local/0] 00:43:22
Local via ge-0/0/0.300
224.0.0.5/32       *[OSPF/10] 00:43:46, metric 1
MultiRecv
The first four of the five 10.0.X.0 routes were properly summarized by the area-range command.  The 10.0.4.0/24 address I simply added to show that the OSPF area-range command summarizes what you tell it to and leaves the rest unchanged.

Ad Inside Post

Comments system

Disqus Shortname