Configuring a stub or NSSA area

Syntax:


area ospf-area-id stub 0-16777215 [no-summary] area ospf-area-id nssa 0-16777215 [no-summary] [metric-type [type1 | type2]] No area ospf-area-id

After using router ospf to globally enable OSPF and enter the global OSPF context, execute this command to assign the routing switch to a stub area or NSSA. (Does not apply to backbone and normal OSPF area ABRs.)

The no form of the command removes the routing switch from the specified area.

Default: No areas; Range: 1 to 16 areas (of all types)

ospf-area-id

Same area ID as in Configuring an OSPF backbone or normal area, except you cannot assign a backbone area number ( 0 or 0.0.0.0) to a stub or NSSA area.

[stub | nssa]

Designates the area identified by ospf-area-id as a stub area or NSSA.

0-16777215

If the routing switch is used as an ABR for the designated area, assigns the cost of the default route (to the backbone) that is injected into the area.

NOTE:

If the routing switch is not an ABR for the stub area or NSSA, the above cost setting is still required by the CLI, but is not used.

In the default configuration, a routing switch acting as an ABR for a stub area or NSSA injects type-3 summary routes into the area. For an NSSA, the routing switch also injects a type-7 default route into the area.

[no-summary]

Where the routing switch is an ABR for a stub area or an NSSA, this option reduces the amount of link-state advertisement (LSA) traffic entering the area from the backbone by replacing the injection of type-3 summary routes with injection of a type-3 default summary route.

For NSSAs, this command also disables injection of the type-7 default external route from the backbone into the area (included in the metric-type operation described below.)

Default: Disabled

For more information, see Not-so-stubby-area (NSSA), Stub area, and Replacing type-3summary LSAs and type-7 default external LSAs with a type-3 default route LSA.

[metric-type [type1 | type2]]

Used in NSSA ABRs only.

Enables injection of the type-7 default external route and type-3 summary routes into the area instead of a type 3 default route. Also specifies the type of internal cost metric to include in type-7 LSAs advertised for redistribution of external routes in the NSSA. (The redistribution—or external—cost metric is a global setting on the routing switch set by the default-metric command.)

The metric-type command specifies whether to include the redistribution cost in the cost metric calculation for a type-7 default LSA injected into the area.
type1

Calculate external route cost for a type-7 default LSA as the sum of (1) the external route cost assigned by the ASBR plus (2) the internal cost from the router with traffic for the external route to the ASBR advertising the route.

type2

Calculate external route cost for a type-7 default LSA as being only the cost from the router with traffic for the external route to the ASBR advertising the route.

If metric-type is not specified, the default (type2) will be used.

Using the area ospf-area-id nssa 0-16777215 without entering either no-summary or metric-type resets the routing switch to the state where injection of type-3 summary routes and the type-7 default external routes is enabled with metric-type set to type2.

Default: Enabled with metric-type type2

NOTE:

Different routers in the NSSA can be configured with different metric-type values.

Examples

The following examples of configuring a stub area and an NSSA on a routing switch use an (arbitrary) cost of "10".

Figure 35: Creating stub area and NSSA assignments