Summary

This is an example of configuring OSPF inter-area route summary on a Cisco router. Notice the default cost of the default summary route.

Network diagram

figure Cisco OSPF Route Summary Configuration Example network diagram

Configuration Conditions

  • Enable OSPF based on the network diagram.
  • On R2, make sure that the OSPF route looks like the following.

R2

R2#show ip route ospf
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
O       10.3.1.0/24 [110/20] via 192.168.23.3, 00:00:13, Ethernet0/1
O       10.3.3.0/27 [110/40] via 192.168.23.3, 00:00:13, Ethernet0/1
O       10.3.2.0/25 [110/30] via 192.168.23.3, 00:00:13, Ethernet0/1

  • On R1, make sure that the OSPF route looks like the following.

R1

R1#show ip route ospf
     10.0.0.0/16 is subnetted, 1 subnets
O IA    10.3.0.0 [110/30] via 192.168.12.2, 00:00:41, Ethernet0/0
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:04:44, Ethernet0/0

Initial Configuration

  • hostname
  • IP address

Configuration and Verification

Step1:Enabling OSPF

Enable OSPF on R1/R2/R3 based on the network diagram. On R3, the Loopback interface configures the networks 10.3.1.0/24, 10.3.2.0/25, and 10.3.3.0/27. On R3, ip ospf network point-to-point is required on the Loopback interface.

R1

router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 192.168.12.0 0.0.0.255 area 0

R2

router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.23.0 0.0.0.255 area 1

R3

interface Loopback0
 ip ospf network point-to-point
!
interface Loopback1
 ip ospf network point-to-point
!
interface Loopback2
 ip ospf network point-to-point
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 10.3.0.0 0.0.255.255 area 1
 network 192.168.23.0 0.0.0.255 area 1

Step2:Verifying OSPF

Verify that the OSPF configuration in Step 1 is working correctly. Verify the OSPF neighbor and OSPF route on R2.

R2

R2#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/BDR        00:00:34    192.168.12.1    Ethernet0/0
3.3.3.3           1   FULL/BDR        00:00:35    192.168.23.3    Ethernet0/1
R2#show ip route ospf 
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
O       10.3.1.0/24 [110/11] via 192.168.23.3, 00:01:39, Ethernet0/1
O       10.3.3.0/27 [110/11] via 192.168.23.3, 00:01:39, Ethernet0/1
O       10.3.2.0/25 [110/11] via 192.168.23.3, 00:01:39, Ethernet0/1

We can see that R2 has established a neighbor with R1 and R3 and has correctly received the route beginning with “10.3” .

Step3:Changing OSPF cost

To make the OSPF route appear to be a configuration condition on R2, change the cost of each Loopback interface on R3. the cost of E0/1 on R2 is 10. To make the OSPF route look like the cost of the configuration condition, set the OSPF cost as follows

  • Loopback0 10.3.1.0/24 cost 10
  • Loopback1 10.3.2.0/25 cost 20
  • Loopback2 10.3.3.0/27 cost 30

R3

interface Loopback0
 ip ospf cost 10
!
interface Loopback1
 ip ospf cost 20
!
interface Loopback2
 ip ospf cost 30

Step4:Verifying OSPF costs

Verify the OSPF routes on R2.

R2

R2#show ip route ospf 
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
O       10.3.1.0/24 [110/20] via 192.168.23.3, 00:00:57, Ethernet0/1
O       10.3.3.0/27 [110/40] via 192.168.23.3, 00:00:57, Ethernet0/1
O       10.3.2.0/25 [110/30] via 192.168.23.3, 00:00:57, Ethernet0/1

You can see that the cost of the OSPF route is displayed in the same format as the configuration conditions.

Step5:Configuring Route Summary

In order for OSPF routes to appear as configuration conditions in R1’s routing table, summarize 10.3.1.0/24, 10.3.2.0/25, and 10.3.3.0/27 into 10.3.0.0/16. Since route summary in OSPF is done by ABR, generate summary route in R2.

R2

router ospf 1
 area 1 range 10.3.0.0 255.255.0.0

Step6:Verifying Route Summary

Verify the route summary configuration. On R2, which generates summary route, use the show ip opsf command. Also, there is an LSA type 3 in the LSDB of area 0 that represents the summary route.

R2

R2#show ip ospf 
 Routing Process "ospf 1" with ID 2.2.2.2
-- omitted --
 Number of areas in this router is 2. 2 normal 0 stub 0 nssa
 Number of areas transit capable is 0
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:13:20.256 ago
        SPF algorithm executed 6 times
        Area ranges are
        Number of LSA 5. Checksum Sum 0x0308BA
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 1
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:13:20.268 ago
        SPF algorithm executed 12 times
        Area ranges are
           10.3.0.0/16 Active(20) Advertise 
        Number of LSA 4. Checksum Sum 0x022C3D
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
R2#show ip ospf database summary 

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Summary Net Link States (Area 0)

  LS age: 894
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.3.0.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x6FA4
  Length: 28
  Network Mask: /16
        TOS: 0  Metric: 20 

  LS age: 524
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 192.168.23.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0xFFA9
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 10 


                Summary Net Link States (Area 1)

  LS age: 527
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 192.168.12.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x793B
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 10

By default, the summary route metric is the minimum metric for detailed routes. The minimum metric for a detailed route is 20 for 10.3.1.0/24, so the metric for an summary route is 20.

And in the routing table of R1, we can see the OSPF routes as well as the configuration conditions.

R1

R1#show ip route ospf 
     10.0.0.0/16 is subnetted, 1 subnets
O IA    10.3.0.0 [110/30] via 192.168.12.2, 00:17:08, Ethernet0/0
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:43:58, Ethernet0/0

Figure Route summary behavior
Figure Route summary behavior

Related articles

How the OSPF works