Sunday, October 21, 2012

OSPF Area-Based Route Summarization


Area 0 can't  be a stub area so if you need to reduce the routing table there is also route summarization. Looking at R3 I can see the OSPF table is bit lengthy, so I will summarize both IA and E1 routes. E2 is the default OSPF external route type but I changed it with the metric-type command when I redistributed them into OSPF. There are two different ways to summarize routes depending on the type of routes you want summarize. First I will redistribute inter-area routes using the area range command. I will summarize 8.0.0.0,9.0.0.0 and 10.0.0.0. The binary results gives me a 8.0.0.0 248.0.0.0 summary address. The area is the area in which the routes originated from not where they are going for the area range command.



R3#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 00:07:11, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 172.12.123.2, 00:07:11, Serial0/0
     5.0.0.0/32 is subnetted, 1 subnets
O E1    5.1.1.1 [110/84] via 172.12.123.1, 00:03:54, Serial0/0
     6.0.0.0/32 is subnetted, 1 subnets
O E1    6.1.1.1 [110/84] via 172.12.123.1, 00:03:54, Serial0/0
     7.0.0.0/32 is subnetted, 1 subnets
O E1    7.1.1.1 [110/84] via 172.12.123.1, 00:03:54, Serial0/0
     8.0.0.0/32 is subnetted, 1 subnets
O IA    8.1.1.1 [110/65] via 172.12.123.1, 00:00:02, Serial0/0
     9.0.0.0/32 is subnetted, 1 subnets
O IA    9.1.1.1 [110/65] via 172.12.123.1, 00:00:02, Serial0/0
     10.0.0.0/32 is subnetted, 1 subnets
O IA    10.1.1.1 [110/65] via 172.12.123.1, 00:00:02, Serial0/0
     15.0.0.0/24 is subnetted, 1 subnets
O E1    15.1.1.0 [110/84] via 172.12.123.1, 00:03:54, Serial0/0





R1(config)#router ospf 1
R1(config-router)#area 1 range 8.0.0.0 248.0.0.0 


I can see that the routes are not summarize into OIA 8.0.0.0/5, the route is smaller but now I will summarize the external routes.



R3#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 00:06:35, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 172.12.123.2, 00:06:35, Serial0/0
     5.0.0.0/32 is subnetted, 1 subnets
O E1    5.1.1.1 [110/84] via 172.12.123.1, 00:03:18, Serial0/0
     6.0.0.0/32 is subnetted, 1 subnets
O E1    6.1.1.1 [110/84] via 172.12.123.1, 00:03:18, Serial0/0
     7.0.0.0/32 is subnetted, 1 subnets
O E1    7.1.1.1 [110/84] via 172.12.123.1, 00:03:18, Serial0/0
     15.0.0.0/24 is subnetted, 1 subnets
O E1    15.1.1.0 [110/84] via 172.12.123.1, 00:03:18, Serial0/0
O IA 8.0.0.0/5 [110/65] via 172.12.123.1, 00:03:23, Serial0/0


To summarize external routes I use the command summary-address, the routes are 5.1.1.1,6.1.1.1.1,7.1.1.1 that I want summarize. The binary result gives me 4.0.0.0 with a mask of 252.0.0.0.

R1(config)#router ospf 1
R1(config-router)#summary-address 4.0.0.0 252.0.0.0

I can now see the summary address of O E1 4.0.0.0, the summary address takes the type of the routes being summarize. The ip routing table is now much smaller. Connectivity is still working.

R3#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 00:13:43, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 172.12.123.2, 00:13:43, Serial0/0
     15.0.0.0/24 is subnetted, 1 subnets
O E1    15.1.1.0 [110/84] via 172.12.123.1, 00:06:13, Serial0/0
O E1 4.0.0.0/6 [110/84] via 172.12.123.1, 00:00:01, Serial0/0
O IA 8.0.0.0/5 [110/65] via 172.12.123.1, 00:06:18, Serial0/0

R3#ping 5.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/49/88 ms
R3#



No comments:

Post a Comment