OSPF Area Types

Another way to reduce the route information advertised is to create a stub area. Configuring a stub area forces its ABR to drop all external (type 5) routes and replaces them with a default route. To limit routing information even more, an area can be made Totally Stubby using the no-summary keyword on the ABR only. In that case, all interarea and external routes are dropped by the ABR and replaced by a default route. The default route starts with a cost of 1; to change it, use the area default-cost command.

OSPF stubby areas are identified by the area flag in the OSPF hello packet. Every router within an OSPF stubby area needs to be configured as a stub so that the routers can establish/maintain OSPF adjacencies.

  • Stub Area
  • Totally Stubby Area
  • NSSA
  • Totally NSSA

Stub Area

  • Prohibit Type 5 LSAs (external routes) and Type 4 LSAs (ASBR summary LSA) from entering the area at the ABR.
  • When a Type 5 LSA reaches an ABR of a stub area, ABR generates a default route for the stub via a Type 3 LSA.
  • All routers in the stub area must be configured as stubs, or an adjacency cannot form because the area type flags in the hello packets do not match.
				
					R3-ABR
router ospf 1
 area 34 stub
				
			
				
					R4
router ospf 1
 area 34 stub
				
			

Default routes are Type 3 summary LSAs (interarea summaries) because stub areas do not allow Type 5 LSAs within them. A benefit to using a Type 3 LSA is that it cannot be advertised from a non-backbone area into a backbone area.

R3# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O IA     10.12.1.0/24 [110/2] via 10.23.1.2, 00:03:10, GigabitEthernet0/1
     172.16.0.0/24 is subnetted, 1 subnets
O E1     172.16.1.0 [110/22] via 10.23.1.2, 00:03:10, GigabitEthernet0/1
O IA     192.168.1.1 [110/3] via 10.23.1.2, 00:03:10, GigabitEthernet0/1
O        192.168.2.2 [110/2] via 10.23.1.2, 00:03:10, GigabitEthernet0/1
O        192.168.4.4 [110/2] via 10.34.1.4, 00:01:57, GigabitEthernet0/0
R4# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is 10.34.1.3 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 10.34.1.3, 00:02:45, GigabitEthernet0/0
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA     10.12.1.0/24 [110/3] via 10.34.1.3, 00:02:45, GigabitEthernet0/0
O IA     10.23.1.0/24 [110/2] via 10.34.1.3, 00:02:45, GigabitEthernet0/0
O IA     192.168.1.1 [110/4] via 10.34.1.3, 00:02:45, GigabitEthernet0/0
O IA     192.168.2.2 [110/3] via 10.34.1.3, 00:02:45, GigabitEthernet0/0
O IA     192.168.3.3 [110/2] via 10.34.1.3, 00:02:45, GigabitEthernet0/0

Totally Stubby Area

  • Prohibit Type 3, Type 4 and Type 5 LSAs from entering the area at the ABR.
  • ABR generates a default route.
  • Only intra-area (O) and default route should exist within a totally stubby area.
  • Member routers (non-ABRs) of a totally stubby area are configured the same as those in a stub area.
  • ABRs of a totally stubby area have no-summary appended to the configuration.
    • The command no-summary does exactly what it states: It blocks all Type 3 (summary) LSAs going into the stub area, making it a totally stubby area.
				
					R3-ABR
router ospf 1
 area 34 stub no-summary
				
			
				
					R4
router ospf 1
 area 34 stub
				
			
R3# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O IA     10.12.1.0/24 [110/2] via 10.23.1.2, 00:02:34, GigabitEthernet0/1
      172.16.0.0/24 is subnetted, 1 subnets
O E1     172.16.1.0 [110/22] via 10.23.1.2, 00:02:34, GigabitEthernet0/1
O IA     192.168.1.1 [110/3] via 10.23.1.2, 00:02:34, GigabitEthernet0/1
O        192.168.2.2 [110/2] via 10.23.1.2, 00:02:34, GigabitEthernet0/1
O        192.168.4.4 [110/2] via 10.34.1.4, 00:03:23, GigabitEthernet0/0
R4# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is 10.34.1.3 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 10.34.1.3, 00:02:24, GigabitEthernet0/0

Not-So-Stubby Area

  • OSPF stub areas prohibit Type 5 and Type 4 LSAs from entering the area at the ABR, and they prohibit redistribution of external routes into the stub area, too.
  • The NSSA prohibits Type 5 LSAs from entering at the ABR but allows for redistribution of external routes into the NSSA.
  • As the ASBR redistributes the network into OSPF in the NSSA, the ASBR advertises the network with a Type 7 LSA instead of a Type 5 LSA.
    • When the Type 7 LSA reaches the ABR, the ABR converts the Type 7 LSA to a Type 5 LSA.
  • The ABR does not automatically advertise a default route when a Type 5 or Type 7 LSA is blocked. During configuration, an option exists to advertise a default route to provide connectivity to the blocked LSAs; in addition, other techniques can be used to ensure bidirectional connectivity.
  • The command areaarea-id nssa [default-information-originate] is placed under the OSPF process on the ABR. All routers in an NSSA must be configured with the nssa option, or they do not become adjacent because the area type flags must match in the OSPF hello packet in order to become adjacent.
    • A default route is not injected on the ABRs automatically for NSSAs, but the optional command default-information-originate can be appended to the configuration if a default route is needed in the NSSA.
				
					R3-ABR
router ospf 1
 area 34 nssa default-information-originate
				
			
				
					R4
router ospf 1
 area 34 nssa
				
			
  • On R4, R1’s external route is no longer present.
  • R3 is configured to advertise a default route, which appears as an OSPF external NSSA Type 2 (O N2) route.
  • The OSPF external routes are representative of a Type 7 LSA, which exists only in an NSSA.
R3# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O IA     10.12.1.0/24 [110/2] via 10.23.1.2, 00:04:13, GigabitEthernet0/1
      172.16.0.0/24 is subnetted, 1 subnets
O E1     172.16.1.0 [110/22] via 10.23.1.2, 00:04:13, GigabitEthernet0/1
      172.31.0.0/24 is subnetted, 1 subnets
O N1     172.31.4.0 [110/22] via 10.34.1.4, 00:03:53, GigabitEthernet0/0
O IA     192.168.1.1 [110/3] via 10.23.1.2, 00:04:13, GigabitEthernet0/1
O        192.168.2.2 [110/2] via 10.23.1.2, 00:04:13, GigabitEthernet0/1
O        192.168.4.4 [110/2] via 10.34.1.4, 00:03:53, GigabitEthernet0/0
R4# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is 10.34.1.3 to network 0.0.0.0

O*N2  0.0.0.0/0 [110/1] via 10.34.1.3, 00:03:13, GigabitEthernet0/0
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA     10.12.1.0/24 [110/3] via 10.34.1.3, 00:03:23, GigabitEthernet0/0
O IA     10.23.1.0/24 [110/2] via 10.34.1.3, 00:03:23, GigabitEthernet0/0
      192.168.1.0/32 is subnetted, 1 subnets
O IA     192.168.1.1 [110/4] via 10.34.1.3, 00:03:23, GigabitEthernet0/0
      192.168.2.0/32 is subnetted, 1 subnets
O IA     192.168.2.2 [110/3] via 10.34.1.3, 00:03:23, GigabitEthernet0/0
      192.168.3.0/32 is subnetted, 1 subnets
O IA     192.168.3.3 [110/2] via 10.34.1.3, 00:03:23, GigabitEthernet0/0

Totally NSSA Area

  • Totally stubby areas prohibit Type 3, Type 4, and Type 5 LSAs from entering the area at the ABR, and they prohibit routes from being redistributed within that area.
  • OSPF areas that need to block Type 3 and Type 5 LSAs and still provide the capability of redistributing external networks into OSPF should use the totally NSSA.
  • When the ASBR redistributes the network into OSPF, the ASBR advertises the network with a Type 7 LSA.
    • As the Type 7 LSA reaches the ABR, the ABR converts the Type 7 LSA to a Type 5 LSA.
    • When an ABR for a totally NSSA receives a Type 3 LSA from the backbone, the ABR generates a default route for the totally NSSA.
  • Member routers of a totally NSSA use the same configuration as members of an NSSA. ABRs of a totally NSSA area have no-summary appended to the configuration.
				
					R3-ABR
router ospf 1
 area 34 nssa no-summary
				
			
				
					R4
router ospf 1
 area 34 nssa
				
			
R3# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O IA     10.12.1.0/24 [110/2] via 10.23.1.2, 00:02:14, GigabitEthernet0/1
      172.16.0.0/24 is subnetted, 1 subnets
O E1     172.16.1.0 [110/22] via 10.23.1.2, 00:02:14, GigabitEthernet0/1
      172.31.0.0/24 is subnetted, 1 subnets
O N1     172.31.4.0 [110/22] via 10.34.1.4, 00:02:04, GigabitEthernet0/0
O IA     192.168.1.1 [110/3] via 10.23.1.2, 00:02:14, GigabitEthernet0/1
O        192.168.2.2 [110/2] via 10.23.1.2, 00:02:14, GigabitEthernet0/1
O        192.168.4.4 [110/2] via 10.34.1.4, 00:02:04, GigabitEthernet0/0
R4# show ip route ospf | begin Gateway
! Output omitted for brevity
Gateway of last resort is 10.34.1.3 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 10.34.1.3, 00:04:21, GigabitEthernet0/0

Filtering in NSSA

There are situations where there is no need to inject external routes into the NSSA as type 7. This situation usually occurs when an ASBR is also an NSSA ABR. When redistribution takes place in this scenario, the router generates type 5 as well as type 7 LSAs. You can prevent the router from creating type 7 LSAs for NSSA with this command: area x nssa no-redistribution

Example:

Area 1 is configured with the no-redistribution option. This means that all IGRP routes are redistributed into area 0, but no type 7 LSAs are generated for Area 1. Only configure this command on an NSSA ASBR that is also an ABR.

Summary

How OSPF Stub Areas Work

  • Filtering is enforced at common transit point of the OSPF topology
    • At the ABR
  • ABRs control which LSAs enter the area
    • Type 3, 4 and/or 5 are filtered depending on stub type
  • Reachability information removed is then replaced with the default route
  • All routers in the area must agree on the stub flag
    • Part of adjacency negotiation

OSPF Stub Area Types

  • Stub Area
    • Filters external routes
  • Totally Stubby Area
    • Filters inter-area and external routes
  • NSSA
    • Filters external routes but allows local redistribution
  • Totally NSSA
    • Filters inter-area and external routes but allows local redistribution

Topology vs NLRI Summarization

  • Topology summarization achieved via OSPF Areas
    • Hide the details of how the graph looks in other areas
    • Only run SPF for intra-area destinations
    • Areas don’t hide reachability information
  • NLRI summarization reduces the number of routes
    • Take multiple longer match prefixes and combine them into smaller shorter matches

NLRI Summarization

  • Implemented in two ways:
    • Per-Prefix summarization
      • two routes 10.0.0.0/16 and 10.1.0.0/16 into one route 10.0.0.0/15
    • Per-LSA summarization
      • remove all inter-area routes and replace them with the shortest match possible, a default route
      • This is what stub areas do

Stub Area

  • Logic
    • I know how to reach to my ABR
    • My ABR knows how to get to the ASBRs
    • The ASBRs know how to reach to the external routes
    • If I default to the ABR, I don’t need the specific external routes
  • Result
    • ABR removes LSAs type 4 and 5
    • ABR originates default route

Totally Stubby Area

  • Logic
    • I know how to reach my ABR
    • My ABR knows how to get to other areas and to the ASBRs
    • The ASBRs know how to get to external routes
    • If I default to the ABR, I don’t need the specific inter-area or external routes
  • Result
    • ABR removes LSAs type 3, 4 and 5
    • ABR originate default route

NSSA

  • Logic
    • Stub areas block external routes, but what if I need to redistribute into the stub area?
    • Filter like a stub area, but make an exception for local redistribution
  • Result
    • ASBR generates NSSA External type 7 LSA
    • ABR translate type 7 LSA into type 5 External into area 0
    • ABR removes LSAs type 4 and 5
    • ABR does not automatically generate a default route

Totally NSSA

  • Logic
    • Totally Stubby areas block inter-area and external routes, but what if I need to redistribute into the totally stubby area?
    • Combine Totally Stubby and NSSA behaviors
  • Result
    • ASBR generates NSSA External type 7 LSA
    • ABR translates NSSA External into type 5 External into area 0
    • ABR removes LSAs type 3, 4 and 5
    • ABR originates default route

Leave a Reply

Related Post

OSPF LSA TypesOSPF LSA Types

Link-State Announcements When OSPF neighbors become adjacent, the LSDBs synchronize between the OSPF routers. As an OSPF router adds or removes a directly connected network link to or from its