Configuring OSPF NSSAs
Applicable Environment
An excessive number of entries in a routing table wastes network resources and causes high CPU usage. To reduce entries in a routing table, you can configure a non-backbone area on the border of an AS as a stub area or an NSSA. For details about how to configure an OSPF stub area, see Configuring OSPF Stub Areas.
An NSSA is a special type of OSPF area. Neither an NSSA nor a stub area transmits routes learned from other areas in the AS where it resides. Different from a stub area, an NSSA allows AS external routes to be imported and advertised in the entire AS.
An OSPF stub area can save system resources but cannot import external routes. An NSSA can be applied to the scenario where AS external routes need to be imported without consuming excessive system resources.
Type 7 LSAs are used to carry imported AS external routing information in an NSSA. Type 7 LSAs are generated by an ASBR in an NSSA and flooded only in the NSSA where the ASBR resides. The ABR in an NSSA selectively translates received Type 7 LSAs into Type 5 LSAs to advertise AS external routes to other areas over the OSPF network.
- A Type 7 LSA is a new type of LSA that has been introduced to support NSSAs and describe imported external routes.
- Type 7 LSAs can be used to carry default route information to guide traffic to other ASs.
Pre-configuration Tasks
Before configuring an NSSA, complete the following tasks:
- Configuring IP addresses for interfaces to ensure that neighboring switches are reachable at the network layer
- Configuring basic OSPF functions
Procedure
- Run system-view
The system view is displayed.
- Run ospf [ process-id ]
The OSPF process view is displayed.
- Run area area-id
The OSPF area view is displayed.
- Run nssa [ default-route-advertise [ backbone-peer-ignore ] | no-import-route | no-summary | set-n-bit | suppress-forwarding-address | translator-always | translator-interval interval-value | zero-address-forwarding ] *
The area is configured as an NSSA.
- To configure an area as an NSSA, you need to run the nssa command on all devices in the area.
- Configuring or deleting NSSA attributes may update the routing information in the area and interrupt neighbor relationships. NSSA attributes can be reconfigured or deleted only after the routing update is complete.
Parameters in the nssa command are described as follows:The default-route-advertise parameter is used to configure the ASBR to generate a Type 7 LSA carrying a default route and advertise it to the NSSA.
An ABR generates a Type 7 LSA carrying a default route regardless of whether a default route exists in the routing table on the ABR. However, an ASBR generates a Type 7 LSA carrying a default route only when a default route exists in the routing table.
- If an ASBR also functions as an ABR, the no-import-route parameter can be configured to prevent external routes imported using the import-route command from being advertised to the NSSA.
- The no-summary parameter is used to disable an ABR from transmitting summary LSAs (Type 3 LSAs) to the NSSA.
- If the set-n-bit parameter is specified, the N-bit is set in DD packets during synchronization between the switch and neighboring switches.
- If the suppress-forwarding-address parameter is specified, the forwarding address (FA) of a Type 5 LSA translated from a Type 7 LSA by the NSSA ABR is set to 0.0.0.0.
- If multiple ABRs are deployed in the NSSA, the system automatically selects an ABR (generally the switch with the largest router ID) as the translator to convert Type 7 LSAs into Type 5 LSAs. You can specify the translator-always parameter on an ABR to specify the ABR as an all-the-time translator. To implement load balancing on two ABRs, you can specify the translator-always parameter on two ABRs to specify them both as all-the-time translators. You can use this command to pre-configure a fixed translator to prevent LSA flooding caused by translator role changes.
- The translator-interval parameter is used to ensure uninterrupted services when translator roles change. The value of interval-value must be greater than the flooding period.
- If the zero-address-forwarding parameter is specified, the FAs of generated NSSA LSAs are set to 0.0.0.0 when external routes are imported to the ABR in an NSSA.
- (Optional) Run default-cost cost
The cost of a Type 3 default route that the ABR sends to the NSSA is set.
To ensure the reachability of AS external routes, the ABR in an NSSA generates a default route and advertises this route to other switches in the NSSA. You can change the cost of the default route sent to an NSSA to adjust default route selection.
By default, the cost of the default route that an ABR sends to the NSSA is 1.
- Run commit
The configuration is committed.
Verifying the Configuration
Run either of the following commands to check OSPF LSDB information:
-
display ospf [ process-id ] lsdb [ brief ]
-
display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router [ advertising-router-id ] | hostname hostname | self-originate ] } ] [ age { min-value min-age-value | max-value max-age-value } * ]
-
display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router [ advertising-router-id ] | self-originate ] } ] [ age { min-value min-age-value | max-value max-age-value } * ] [ resolve-hostname ]
Run either of the following commands to check OSPF routing table information:
-
display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ]
-
display ospf [ process-id ] routing router-id [ router-id ]
Run the display ospf [ process-id ] interface [ all | interface-type interface-number ] [ verbose ] command to check OSPF interface information.