OSPF IPv4 - Summarization

Summarization

OSPF (Open Shortest Path First) for IPv4 summarization is a technique used to condense routing information within an OSPF Autonomous System (AS) by representing a range of contiguous IP addresses with a single summary address. Summarization helps reduce the size of the OSPF routing tables and enhances network scalability. This process is typically performed at the Area Border Router (ABR) or Autonomous System Border Router (ASBR), where external routes or inter-area routes are summarized into a single, more concise route advertisement. By aggregating multiple subnets into a summary address, OSPF summarization helps streamline the OSPF database and reduces the number of LSAs (Link State Advertisements) exchanged throughout the network. This results in more efficient routing operations and contributes to a more manageable and optimized OSPF routing infrastructure. Careful consideration is required during summarization to ensure that the summarized address accurately represents the range of subnets while avoiding aggregation of non-contiguous addresses that could impact routing accuracy.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an Dzas isdz basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Task 1: Configure IPv4 OSPF Summarization

Step 1: In the configuration mode of router configure 4 loopbacks with network address in sequence

R1:
interface loopback 0
ip address 11.0.0.1 255.255.255.0
exit
interface loopback 1 
ip address 11.0.1.1 255.255.255.0
exit
interface loopback 2 
ip address 11.0.2.1 255.255.255.0
exit
interface loopback 3 
ip address 11.0.3.1 255.255.255.0
exit

Step 2: verify routes on neighbor router routing table

R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - OSPF, EX - OSPF 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      11.0.0.0/32 is subnetted, 3 subnets
O        11.0.1.1 [110/65] via 12.0.0.1, 00:20:07, Serial2/0
O        11.0.2.1 [110/65] via 12.0.0.1, 00:20:07, Serial2/0
O        11.0.3.1 [110/65] via 12.0.0.1, 00:20:07, Serial2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.0.0.0/24 is directly connected, Serial2/0
L        12.0.0.2/32 is directly connected, Serial2/0
      22.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C        22.0.1.0/24 is directly connected, Loopback1
L        22.0.1.2/32 is directly connected, Loopback1
C        22.0.2.0/24 is directly connected, Loopback2
L        22.0.2.2/32 is directly connected, Loopback2
C        22.0.3.0/24 is directly connected, Loopback3
L        22.0.3.2/32 is directly connected, Loopback3
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.0.0.0/24 is directly connected, Ethernet0/0
L        23.0.0.2/32 is directly connected, Ethernet0/0
      33.0.0.0/32 is subnetted, 3 subnets
O        33.0.1.3 [110/11] via 23.0.0.3, 00:20:17, Ethernet0/0
O        33.0.2.3 [110/11] via 23.0.0.3, 00:20:17, Ethernet0/0
O        33.0.3.3 [110/11] via 23.0.0.3, 00:20:17, Ethernet0/0
      34.0.0.0/24 is subnetted, 1 subnets
O IA     34.0.0.0 [110/74] via 23.0.0.3, 00:20:17, Ethernet0/0
      44.0.0.0/32 is subnetted, 3 subnets
O IA     44.0.1.4 [110/75] via 23.0.0.3, 00:19:32, Ethernet0/0
O IA     44.0.2.4 [110/75] via 23.0.0.3, 00:19:21, Ethernet0/0
O IA     44.0.3.4 [110/75] via 23.0.0.3, 00:19:11, Ethernet0/0

Step 3: Summarize OSPF routes on ABR router

In OSPF Summary is always done on Area Border Router (ABR)

R1:
telnet 12.0.0.2
password: cisco
R2>enable
password: cisco
R2#show ip ospf database
OSPF Router with ID (22.0.3.2) (Process ID 2)
                                    Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#            Checksum    Link count
22.0.3.2        22.0.3.2        1335        0x80000008      0x00B482        4
33.0.3.3        33.0.3.3        1022        0x8000000D      0x009163        4

R2(config)#router ospf 2
R2(config)#area 1 range 11.0.0.0  255.255.252.0 
R2(config)#exit
R2#exit
[Connection to 12.0.0.2 closed by foreign host]

R2:
router ospf 2
area 0 range 22.0.0.0 255.255.252.0
exit

telnet 23.0.0.3
password: cisco
R3>enable
password: cisco
R3# show ip ospf database
OSPF Router with ID (33.0.3.3) (Process ID 3)
                Router Link States (Area 0)

Link ID         ADV Router      Age                Seq#            Checksum   Link count
22.0.3.2        22.0.3.2        1941               0x80000008      0x00B482       4
33.0.3.3        33.0.3.3        1627               0x8000000D      0x009163       4

R3(config)#router ospf 3
R3(config)#area 0 range 22.0.0.0 255.255.252.0
R3(config)#exit

R3#exit
[Connection to 23.0.0.3 closed by foreign host]

Task 2: Verification:

Step 1: Verify receipt of summary route in neighbor routing table & verify creation of null interface in routing table by following command:

R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - OSPF, EX - OSPF 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

Gateway of last resort is not set

      11.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O        11.0.0.0/22 is a summary, 00:10:01, Null0
O        11.0.1.1/32 [110/65] via 12.0.0.1, 00:10:01, Serial2/0
O        11.0.2.1/32 [110/65] via 12.0.0.1, 00:10:01, Serial2/0
O        11.0.3.1/32 [110/65] via 12.0.0.1, 00:10:01, Serial2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.0.0.0/24 is directly connected, Serial2/0
L        12.0.0.2/32 is directly connected, Serial2/0
      22.0.0.0/8 is variably subnetted, 7 subnets, 3 masks
O        22.0.0.0/22 is a summary, 00:10:01, Null0
C        22.0.1.0/24 is directly connected, Loopback1
L        22.0.1.2/32 is directly connected, Loopback1
C        22.0.2.0/24 is directly connected, Loopback2
L        22.0.2.2/32 is directly connected, Loopback2
C        22.0.3.0/24 is directly connected, Loopback3
L        22.0.3.2/32 is directly connected, Loopback3
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.0.0.0/24 is directly connected, Ethernet0/0
L        23.0.0.2/32 is directly connected, Ethernet0/0
      33.0.0.0/32 is subnetted, 3 subnets
O        33.0.1.3 [110/11] via 23.0.0.3, 00:10:01, Ethernet0/0
O        33.0.2.3 [110/11] via 23.0.0.3, 00:10:01, Ethernet0/0
O        33.0.3.3 [110/11] via 23.0.0.3, 00:10:01, Ethernet0/0
      34.0.0.0/24 is subnetted, 1 subnets
O IA     34.0.0.0 [110/74] via 23.0.0.3, 00:10:01, Ethernet0/0
      44.0.0.0/32 is subnetted, 3 subnets
O IA     44.0.1.4 [110/75] via 23.0.0.3, 00:10:01, Ethernet0/0
O IA     44.0.2.4 [110/75] via 23.0.0.3, 00:10:01, Ethernet0/0
O IA     44.0.3.4 [110/75] via 23.0.0.3, 00:10:01, Ethernet0/0

ABR Router will send summary routes from one area to other areas. When summarization is configured on a router, same router immediately created a routing point to Null 0 for loop prevention. Hence Null 0 will be created only on ABR routers in OSPF

R4#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP                                                                         
       D - OSPF, EX - OSPF external, O - OSPF, IA - OSPF inter ar                                                                  
       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, H - NHRP, l - LISP        
       + - replicated route, % - next hop override

Gateway of last resort is not set

      11.0.0.0/22 is subnetted, 1 subnets
O IA     11.0.0.0 [110/139] via 34.0.0.3, 01:31:00, Serial2/0
      12.0.0.0/24 is subnetted, 1 subnets
O IA     12.0.0.0 [110/138] via 34.0.0.3, 01:44:50, Serial2/0
      22.0.0.0/22 is subnetted, 1 subnets
O IA     22.0.0.0 [110/75] via 34.0.0.3, 00:04:28, Serial2/0
      23.0.0.0/24 is subnetted, 1 subnets
O IA     23.0.0.0 [110/74] via 34.0.0.3, 02:42:59, Serial2/0
      33.0.0.0/32 is subnetted, 3 subnets
O IA     33.0.1.3 [110/65] via 34.0.0.3, 02:42:59, Serial2/0
O IA     33.0.2.3 [110/65] via 34.0.0.3, 02:42:59, Serial2/0
O IA     33.0.3.3 [110/65] via 34.0.0.3, 02:42:59, Serial2/0
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.0.0.0/24 is directly connected, Serial2/0
L        34.0.0.4/32 is directly connected, Serial2/0
      44.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C        44.0.1.0/24 is directly connected, Loopback1
L        44.0.1.4/32 is directly connected, Loopback1
C        44.0.2.0/24 is directly connected, Loopback2
L        44.0.2.4/32 is directly connected, Loopback2
C        44.0.3.0/24 is directly connected, Loopback3
L        44.0.3.4/32 is directly connected, Loopback3

Summarized routes are received from inter-area