OSPF NSSA area configuration example

Network requirements

Figure 26: Network diagram

Configuration procedure

  1. Configure IP addresses for interfaces.

  2. Enable OSPF (see "Basic OSPF configuration example").

  3. Configure Area 1 as an NSSA area:

    # Configure Switch A.

    <SwitchA> system-view
    [SwitchA] ospf
    [SwitchA-ospf-1] area 1
    [SwitchA-ospf-1-area-0.0.0.1] nssa default-route-advertise no-summary
    [SwitchA-ospf-1-area-0.0.0.1] quit
    [SwitchA-ospf-1] quit
    

    # Configure Switch C.

    <SwitchC> system-view
    [SwitchC] ospf
    [SwitchC-ospf-1] area 1
    [SwitchC-ospf-1-area-0.0.0.1] nssa
    [SwitchC-ospf-1-area-0.0.0.1] quit
    [SwitchC-ospf-1] quit
    

    # Display OSPF routing information on Switch C.

    [SwitchC] display ospf routing
    
              OSPF Process 1 with Router ID 10.4.1.1
                       Routing Tables
    
     Routing for Network
     Destination        Cost     Type    NextHop         AdvRouter       Area
     0.0.0.0/0          65536    Inter   10.2.1.1        10.2.1.1        0.0.0.1
     10.2.1.0/24        65535    Transit 10.2.1.2        10.4.1.1        0.0.0.1
     10.4.1.0/24        3        Stub    10.4.1.1        10.4.1.1        0.0.0.1
    
     Total Nets: 3
     Intra Area: 2  Inter Area: 1  ASE: 0  NSSA: 0
    

[NOTE: ]

NOTE:

  • To allow Switch C in the NSSA area to reach other areas within the AS, you must provide the keyword default-route-advertise for the nssa command issued on Switch A (the ABR) so that Switch C can obtain a default route.

  • Configuring the nssa command with the keyword no-summary on Switch A can reduce the routing table size on NSSA Switches. On other NSSA Switches, you only need to configure the nssa command.


    1. Configure route redistribution:

      # Configure Switch C to redistribute static routes.

      [SwitchC] ip route-static 3.1.3.1 24 10.4.1.2
      [SwitchC] ospf
      [SwitchC-ospf-1] import-route static
      [SwitchC-ospf-1] quit
      

      # Display OSPF routing information on Switch D.

      <SwitchD> display ospf routing
      
                OSPF Process 1 with Router ID 10.5.1.1
                         Routing Tables
      
       Routing for Network
       Destination        Cost     Type    NextHop         AdvRouter       Area
       10.2.1.0/24        22       Inter   10.3.1.1        10.3.1.1        0.0.0.2
       10.3.1.0/24        10       Transit 10.3.1.2        10.3.1.1        0.0.0.2
       10.4.1.0/24        25       Inter   10.3.1.1        10.3.1.1        0.0.0.2
       10.5.1.0/24        10       Stub    10.5.1.1        10.5.1.1        0.0.0.2
       10.1.1.0/24        12       Inter   10.3.1.1        10.3.1.1        0.0.0.2
      
       Routing for ASEs
       Destination        Cost     Type    Tag         NextHop         AdvRouter
       3.1.3.0/24         1        Type2   1           10.3.1.1        10.2.1.1
      
       Total Nets: 6
       Intra Area: 2  Inter Area: 3  ASE: 1  NSSA: 0
      

      The output shows an external route imported from the NSSA area exists on Switch D.