Supported Platforms
Related Documentation
- ACX, J, M, MX, SRX, T Series
- Examples: Configuring OSPF Stub and Not-So-Stubby Areas
- ACX, M, MX, PTX, T Series
- Example: Configuring OSPFv3 Not-So-Stubby Areas with Filtering
Example: Configuring OSPFv3 Stub and Totally Stubby Areas
Understanding OSPFv3 Stub and Totally Stubby Areas
Junos OS OSPFv3 configuration for IPv6 networks is identical to OSPFv2 configuration. You configure the protocol with set ospf3 commands instead of set ospf commands and use show ospf3 commands instead of show ospf commands to check the OSPF status. Also, make sure to set IPv6 addresses on the interfaces running OSPFv3.
Stub areas are areas through which or into which OSPF does not flood AS external link-state advertisements (Type 5 LSAs). You might create stub areas when much of the topology database consists of AS external advertisements and you want to minimize the size of the topology databases on the internal routers in the stub area.
The following restrictions apply to stub areas:
- You cannot create a virtual link through a stub area.
- A stub area cannot contain an AS boundary router.
- You cannot configure the backbone as a stub area.
- You cannot configure an area as both a stub area and an not-so-stubby area (NSSA).
Example: Configuring OSPFv3 Stub and Totally Stubby Areas
This example shows how to configure an OSPFv3 stub area and a totally stubby area to control the advertisement of external routes into an area.
Requirements
No special configuration beyond device initialization is required before configuring this example.
Overview
Figure 1 shows the topology used in this example.
Figure 1: OSPFv3 Network Topology with Stub Areas

In this example, you configure each routing device in area 7 (area ID 0.0.0.7) as a stub router and some additional settings on the ABR:
- stub—Specifies that this area become a stub area and not be flooded with Type 5 LSAs. You must include the stub statement on all routing devices that are in area 7 because this area has no external connections.
- default-metric—Configures the ABR to generate a default route with a specified metric into the stub area. This default route enables packet forwarding from the stub area to external destinations. You configure this option only on the ABR. The ABR does not automatically generate a default route when attached to a stub. You must explicitly configure this option to generate a default route.
- no-summaries—(Optional) Prevents the ABR from advertising summary routes into the stub area by converting the stub area into a totally stubby area. If configured in combination with the default-metric statement, a totally stubby area only allows routes internal to the area and advertises the default route into the area. External routes and destinations to other areas are no longer summarized or allowed into a totally stubby area. Only the ABR requires this additional configuration because it is the only routing device within the totally stubby area that creates Type 3 LSAs used to receive and send traffic from outside of the area.
![]() | In Junos OS Release 8.5 and later, the following applies:
|
CLI Quick Configuration shows the configuration for all of the devices in Figure 1. The section Step-by-Step Procedure describes the steps on Device 2, Device 6, Device 7, and Device 8.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
Device 1
Device 2
Device 3
Device 4
Device 5
Device 6
Device 7
Device 8
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Device 2:
- Configure the interfaces.[edit interfaces]user@2# set fe-1/2/0 unit 0 family inet6 address 9009:2::2/64user@2# set fe-1/2/1 unit 0 family inet6 address 9009:4::1/64user@2# set lo0 unit 0 family inet address 2.2.2.2/32
- Enable OSPFv3 on the interfaces that are in area 0.[edit protocols ospf3 area 0.0.0.0]user@2# set interface fe-1/2/0.0user@2# set interface lo0.0 passive
- Enable OSPFv3 on the interface that is in area 7.[edit protocols ospf3 area 0.0.0.7]user@2# set interface fe-1/2/1.0
- Specify area 7 as an OSPFv3 stub area.
The stub statement is required on all routing devices in the area.
[edit protocols ospf3 area 0.0.0.7]user@2# set stub - On the ABR, inject a default route into the area.[edit protocols ospf3 area 0.0.0.7]user@2# set stub default-metric 10
- (Optional) On the ABR, restrict summary LSAs from entering
the area.
This step converts the stub area into a totally stubby area.
[edit protocols ospf3 area 0.0.0.7]user@2# set stub no-summaries
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Device 6:
- Configure the interfaces.[edit interfaces]user@6# set fe-1/2/0 unit 0 family inet6 address 9009:4::2/64user@6# set lo0 unit 0 family inet address 6.6.6.6/32
- Enable OSPFv3 on the interface that is in area 7.[edit protocols ospf3 area 0.0.0.7]user@6# set interface fe-1/2/0.0user@6# set interface lo0.0 passive
- Specify area 7 as an OSPFv3 stub area.
The stub statement is required on all routing devices in the area.
[edit protocols ospf3 area 0.0.0.7]user@6# set stub
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Device 7:
- Configure the interfaces.[edit interfaces]user@7# set fe-1/2/0 unit 0 family inet6 address 9009:5::2/64user@7# set fe-1/2/1 unit 0 family inet6 address 9009:7::1/64user@7# set lo0 unit 0 family inet address 7.7.7.7/32
- Enable OSPFv3 on the interface that is in area 9.[edit protocols ospf3 area 0.0.0.9]user@7# set interface fe-1/2/0.0user@7# set interface lo0.0 passive
- Configure static routes that enable connectivity to the
customer routes. [edit routing-options rib inet6.0 static]user@7# set route 1010::1/128 next-hop 9009:7::2user@7# set route 2020::1/128 next-hop 9009:7::2
- Configure a routing policy to redistribute the static
routes.[edit policy-options policy-statement static-to-ospf term 1]user@7# set from protocol staticuser@7# set then accept
- Apply the routing policy to the OSPFv3 instance.[edit protocols ospf3]user@7# set export static-to-ospf
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure Device 8:
- Configure the interfaces.[edit interfaces]user@8# set fe-1/2/0 unit 0 family inet6 address 9009:7::2/64user@8# set lo0 unit 0 family inet address 8.8.8.8/32
- Configure two loopback interface addresses to simulate
customer routes.[edit interfaces lo0 unit 0 family inet6]user@8# set address 1010::1/128user@8# set address 2020::1/128
Results
From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
Device 2
Device 6
Device 7
Device 8
If you are done configuring the device, enter commit from configuration mode.
Verification
Confirm that the configuration is working properly.
Verifying the Type of OSPFv3 Area
Purpose
Verify that the OSPFv3 area is a stub area. Confirm that the output displays Stub as the Stub type.
Action
From operational mode on Device 2 and on Device 6, enter the show ospf3 overview command.
user@2> show ospf3 overview
Instance: master Router ID: 2.2.2.2 Route table index: 51 Area border router LSA refresh time: 50 minutes Area: 0.0.0.0 Stub type: Not Stub Area border routers: 2, AS boundary routers: 0 Neighbors Up (in full state): 1 Area: 0.0.0.7 Stub type: Stub, Stub cost: 10 Area border routers: 0, AS boundary routers: 0 Neighbors Up (in full state): 1 Topology: default (ID 0) Prefix export count: 0 Full SPF runs: 24 SPF delay: 0.200000 sec, SPF holddown: 5 sec, SPF rapid runs: 3 Backup SPF: Not Needed
user@6> show ospf3 overview
Instance: master Router ID: 6.6.6.6 Route table index: 46 LSA refresh time: 50 minutes Area: 0.0.0.7 Stub type: Stub Area border routers: 1, AS boundary routers: 0 Neighbors Up (in full state): 1 Topology: default (ID 0) Prefix export count: 0 Full SPF runs: 17 SPF delay: 0.200000 sec, SPF holddown: 5 sec, SPF rapid runs: 3 Backup SPF: Not Needed
Meaning
On Device 2, the stub type of area 0 is Not Stub. The stub type of area 7 is Stub. The stub default metric is 10.
On Device 6, the stub type of area 7 is Stub.
Verifying the Routes in the OSPFv3 Stub Area
Purpose
Make sure that the expected routes are present in the routing tables.
Action
From operational mode on Device 6 and Device 2, enter the show route command.
user@6> show route
inet.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 6.6.6.6/32 *[Direct/0] 1d 01:57:12 > via lo0.0 inet6.0: 6 destinations, 7 routes (6 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both ::/0 *[OSPF3/10] 00:10:52, metric 11 > via fe-1/2/0.0 9009:4::/64 *[Direct/0] 1d 01:56:31 > via fe-1/2/0.0 [OSPF3/10] 1d 01:56:31, metric 1 > via fe-1/2/0.0 9009:4::2/128 *[Local/0] 1d 01:56:53 Local via fe-1/2/0.0 fe80::/64 *[Direct/0] 1d 01:56:31 > via fe-1/2/0.0 fe80::2a0:a514:0:a4c/128 *[Local/0] 1d 01:56:53 Local via fe-1/2/0.0 ff02::5/128 *[OSPF3/10] 1d 01:58:22, metric 1 MultiRecv
user@2> show route
inet.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 2.2.2.2/32 *[Direct/0] 1d 02:16:13 > via lo0.0 inet6.0: 14 destinations, 17 routes (14 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1010::1/128 *[OSPF3/150] 00:30:15, metric 0, tag 0 > via fe-1/2/0.0 2020::1/128 *[OSPF3/150] 00:30:15, metric 0, tag 0 > via fe-1/2/0.0 9009:1::/64 *[OSPF3/10] 1d 02:15:54, metric 2 > via fe-1/2/0.0 9009:2::/64 *[Direct/0] 1d 02:15:54 > via fe-1/2/0.0 [OSPF3/10] 1d 02:15:54, metric 1 > via fe-1/2/0.0 9009:2::2/128 *[Local/0] 1d 02:15:54 Local via fe-1/2/0.0 9009:3::/64 *[OSPF3/10] 1d 02:15:54, metric 2 > via fe-1/2/0.0 9009:4::/64 *[Direct/0] 1d 02:15:54 > via fe-1/2/1.0 [OSPF3/10] 05:38:05, metric 1 > via fe-1/2/1.0 9009:4::1/128 *[Local/0] 1d 02:15:54 Local via fe-1/2/1.0 9009:5::/64 *[OSPF3/10] 1d 02:15:54, metric 3 > via fe-1/2/0.0 9009:6::/64 *[OSPF3/10] 1d 01:33:10, metric 3 > via fe-1/2/0.0 fe80::/64 *[Direct/0] 1d 02:15:54 > via fe-1/2/0.0 [Direct/0] 1d 02:15:54 > via fe-1/2/1.0 fe80::2a0:a514:0:64c/128 *[Local/0] 1d 02:15:54 Local via fe-1/2/0.0 fe80::2a0:a514:0:94c/128 *[Local/0] 1d 02:15:54 Local via fe-1/2/1.0 ff02::5/128 *[OSPF3/10] 1d 02:17:45, metric 1 MultiRecv
Meaning
On Device 6, the default route has been learned because of the default-metric statement on the ABR, Device 2. Otherwise, the only OSPFv3 routes in Device 6’s routing table are the network address 9009:4::/64 and the OSPFv3 multicast address ff02::5/128 for all SPF link-state routers, also known as AllSPFRouters.
On Device 2, all of the OSPFv3 routes have been learned, including the external customer routes, 1010::1/128 and 2020::1/128.
Related Documentation
- ACX, J, M, MX, SRX, T Series
- Examples: Configuring OSPF Stub and Not-So-Stubby Areas
- ACX, M, MX, PTX, T Series
- Example: Configuring OSPFv3 Not-So-Stubby Areas with Filtering
Published: 2013-02-01
Supported Platforms
Related Documentation
- ACX, J, M, MX, SRX, T Series
- Examples: Configuring OSPF Stub and Not-So-Stubby Areas
- ACX, M, MX, PTX, T Series
- Example: Configuring OSPFv3 Not-So-Stubby Areas with Filtering