OSPF Configuration Example: NSSA Stub Normal
Configuration Example
The configurations of an OSPF NSSA and a stub area are shown in Fig. 5-4. Switch D will obtain the routes of networks 10.10.1.0/24, 10.10.3.0/24, and 10.10.9.0/24 according to the LSAs received from its neighbors. Switch C will obtain the routes of networks 10.10.1.0/24, 10.10.2.0/24, and10.10.8.0/24 according to the LSAs received from its neighbors. The figure below does not include RIP or BGP configurations.
Figure 5-4. OSPF NSSA, stub area configurations.
Configuring Switch A
For switch A, configure 2 VLAN interfaces for networks 10.10.1.1/24 and 10.10.2.1/24. Also configure area 0.0.0.0, which includes network 10.10.1.1/24 and area 0.0.0.1, which includes network 10.10.2.1/24.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 10.10.1.1 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 10.10.2.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols ospf4 router-id 1.1.1.1 admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan-2 vif vlan-2 address 10.10.1.1 admin@XorPlus# set protocols ospf4 area 0.0.0.1 interface vlan-3 vif vlan-3 address 10.10.2.1 admin@XorPlus# set protocols ospf4 area 0.0.0.1 area-type nssa admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configuring Switch B
Configure 2 VLAN interfaces for networks 10.10.1.2/24 and 10.10.3.1/24. Then, configure area 0.0.0.0, which includes network 10.10.1.2/24 and stub area 0.0.0.3, which includes network 10.10.3.1/24.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 10.10.1.2 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 10.10.3.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols ospf4 router-id 2.2.2.2 admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan-2 vif vlan-2 address 10.10.1.2 admin@XorPlus# set protocols ospf4 area 0.0.0.2 interface vlan-3 vif vlan-3 address 10.10.3.1 admin@XorPlus# set protocols ospf4 area 0.0.0.2 area-type stub admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configuring Switch C
Configure just one OSPF interface in area 0.0.0.2.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 10.10.3.2 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 10.10.9.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols ospf4 router-id 3.3.3.3 admin@XorPlus# set protocols ospf4 area 0.0.0.2 interface vlan-2 vif vlan-2 address 10.10.3.2 admin@XorPlus# set protocols ospf4 area 0.0.0.2 area-type stub admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configuring Switch D
Configure just one OSPF interface in area 0.0.0.1. Switch D should import the RIP or BGP route from the RIB and distribute it to other areas.
admin@XorPlus# set vlans vlan-id 2 admin@XorPlus# set vlans vlan-id 3 admin@XorPlus# set interface gigabit-ethernet ge-1/1/1 family ethernet-switching native-vlan-id 2 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 3 admin@XorPlus# set vlans vlan-id 2 l3-interface vlan-2 admin@XorPlus# set vlans vlan-id 3 l3-interface vlan-3 admin@XorPlus# set vlan-interface interface vlan-2 vif vlan-2 address 10.10.2.2 prefix-length 24 admin@XorPlus# set vlan-interface interface vlan-3 vif vlan-3 address 10.10.8.1 prefix-length 24 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set policy policy-statement rip-ospf term rip from protocol rip admin@XorPlus# set policy policy-statement rip-ospf term rip then external-type 2 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus# set protocols ospf4 router-id 4.4.4.4 admin@XorPlus# set protocols ospf4 area 0.0.0.1 interface vlan-2 vif vlan-2 address 10.10.2.2 admin@XorPlus# set protocols ospf4 area 0.0.0.1 area-type nssa admin@XorPlus# set protocols ospf4 export rip-ospf admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Copyright © 2025 Pica8 Inc. All Rights Reserved.