Example: Configuring OSPF Stub and Not-So-Stubby Areas

This example shows how to configure OSPF stub and not-so-stubby areas to control the advertisement of external routes into an area.

Requirements

Before you begin:

  1. Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
  2. Configure security filters. See the Junos OS Security Configuration Guide.
  3. Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
  4. Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
  5. Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
  6. Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.

Overview

The backbone area, which is 0 in Figure 1, has a special function and is always assigned the area ID 0.0.0.0. Area IDs are unique numeric identifiers, in dotted decimal notation. Area IDs need only be unique within an AS. All other networks or areas (such as 3, 7, and 9) in the AS must be directly connected to the backbone area by area border routers that have interfaces in more than one area.

In this example, you configure each device in area 7 (area ID 0.0.0.7) as a stub router because this area had no external connections. You configure each device in area 9 (area ID 0.0.0.9) as an NSSA router because this area only has external connections to static routes. See Figure 1.

Figure 20: OSPF Network Topology with Stub Areas and NSSAs

Image g015030.gif

Configuration

Configuring OSPF Stub Areas

Step-by-Step Procedure

To configure OSPF stub areas:

  1. Configure an OSPF stub area.
    [edit]user@host# set protocols ospf area 0.0.0.7 stub
  2. If you are done configuring the device, commit the configuration.
    [edit]user@host# commit

    Note: Repeat Step 1 for every device in the stub area.

Configuring OSPF Not-So-Stubby Areas

Step-by-Step Procedure

To configure OSPF not-so-stubby areas:

  1. Configure an OSPF not-so-stubby area.
    [edit]user@host# set protocols ospf area 0.0.0.9 nssa
  2. If you are done configuring the device, commit the configuration.
    [edit]user@host# commit

    Note: Repeat Step 1 for every device in the NSSA.

Verification

To verify the configuration is working properly, enter the show protocols ospf command.

Related Topics