Configuring OSPF areas on the router

Import information from other areas to learn their OSPF relationships. Perform this procedure to create normal, stubby, or not-so-stubby areas (NSSA).

Before you begin

  • Ensure that the VLAN exists if you configure OSPF on a VLAN.

  • You configure OSPF on a VRF instance the same way you configure the GlobalRouter, except that you must use VRF Router Configuration mode and the prefix ip ospf. The VRF must have an RP Trigger of OSPF. Not all parameters are configurable on non0 VRFs.

About this task

Place stubby or NSSAs at the edge of an OSPF routing domain. Ensure that you configure all routers in a stubby or NSSA as stubby or NSSA, respectively.

Procedure

  1. Enter OSPF Router Configuration mode:

    enable

    configure terminal

    router ospf

  2. Create an OSPF area:

    area {A.B.C.D}

  3. Specify the area type:

    area {A.B.C.D} import <external|noexternal|nssa>

  4. Configure other OSPF area parameters as required.
  5. Ensure that the configuration is correct:

    show ip ospf area [vrf WORD<1-16>] [vrfids WORD<0-255>]

Example

Create the OSPF area 192.0.2.10, and specify the area type as NSSA. Configure the area support to import summary advertisements into a stub area and configure the import external option for this area as stub. Ensure the configuration is correct.

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#router ospf
Switch:1(config-ospf)#area 192.0.2.10
Switch:1(config-ospf)#area 192.0.2.10 import nssa
Switch:1(config-ospf)#area 192.0.2.10 import stub
Switch:1(config-ospf)#area 192.0.2.10 import-summaries enable
Switch:1(config-ospf)#show ip ospf area
============================================================================================================================================
                                                          OSPF Area - GlobalRouter
============================================================================================================================================
AREA_ID         STUB_AREA  NSSA          IMPORT_SUM ACTIVE_IFCNT    NSSA TRANSLATOR    NSSA TRANSLATOR    NSSA TRANSLATOR    NSSA TRANSLATOR
                                                                       ROLE              STATE           STABILITY INTERVAL       EVENTS
--------------------------------------------------------------------------------------------------------------------------------------------
0.0.0.0         false      false         true       0               candidate           disabled                  40                0

STUB_COST INTRA_AREA_SPF_RUNS  BDR_RTR_CNT ASBDR_RTR_CNT LSA_CNT   LSACK_SUM
--------------------------------------------------------------------------------------------------------------------------------------------
0         0                    0           0             0         0

Variable Definitions

The following table defines parameters for the area {A.B.C.D} command.

Variable

Value

default-cost <0-16777215>

Specifies the stub area default metric for this stub area, which is the cost from 0–16777215. This metric value applies at the indicated type of service.

import <external|noexternal|nssa>

Specifies the type of area:

  • external—stub and NSSA are both false

  • noexternal—configures the area as stub area.

  • nssa—configures the area as NSSA.

import-summaries enable

Configures the area support to import summary advertisements into a stub area. Use this variable only if the area is a stub area.

stub

Configures the import external option for this area as stub. A stub area has only one exit point (router interface) from the area.

The following table defines parameters for the show ip ospf area command.

Variable

Value

vrf WORD<1-16>

Specifies a VRF.

vrfids WORD<0-512>

Specifies a range of VRF IDs.