Supported Platforms
Example: Configuring Multiple Address Families for OSPFv3
This example shows how to configure multiple address families for OSPFv3.
Requirements
Before you begin:
- Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
- Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
- Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
By default, OSPFv3 supports unicast IPv6 routes, but you can configure OSPFv3 to support multiple address families. To support an address family other than unicast IPv6, you configure a realm that allows OSPFv3 to advertise IPv4 unicast, IPv4 multicast, or IPv6 multicast routes. Junos OS then maps each address family that you configure to a separate realm with its own set of neighbors and link-state database.
![]() | Note: By default, LDP synchronization is only supported for OSPFv2. If you configure an IPv4 unicast or IPv4 multicast realm, you can also configure LDP synchronization. Since LDP synchronization is only supported for IPv4, this support is only available for OSPFv3 if you configure an IPv4 realm. |
When configuring OSPFv3 to support multiple address families, consider the following:
- You configure each realm independently. We recommend that you configure an area and at least one interface for each realm.
- OSPFv3 uses IPv6 link-local addresses as the source of hello packets and next hop calculations. As such, you must enable IPv6 on the link regardless of the additional realm you configure.
Figure 1 shows a connection between Routers R0 and R1. In this example, you configure interface fe-0/1/0 on Router R0 in area 0 to advertise IPv4 unicast routes, in addition to the default unicast IPv6 routes in area 1, by including the realm ipv4-unicast statement. Depending on your network requirements, you can also advertise IPv4 multicast routes by including the realm-ipv4-multicast statement, and you can advertise IPv6 multicast routes by including the realm-ipv6-multicast statement.
Figure 1: IPv4 Unicast Realm

Configuration
CLI Quick Configuration
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Modifying the Junos OS Configuration in CLI User Guide.
To quickly configure multiple address families for OSPFv3, copy the following commands and paste them into the CLI.
Step-by-Step Procedure
To configure multiple address families for OSPFv3:
- Configure the device interface participating in OSPFv3.[edit]user@host# set interfaces fe-0/1/0 unit 0 family inet address 11.1.2.1/24user@host# set interfaces fe-0/1/0 unit 0 family inet6
- Enter OSPFv3 configuration mode.[edit ]user@host# edit protocols ospf3
- Add the interface you configured to the OSPFv3 area.[edit protocols ospf3 ]user@host# set area 0.0.0.0 interface fe-0/1/0
- Configure an IPv4 unicast realm. This allows OSPFv3 to
support both IPv4 unicast and IPv6 unicast routes. [edit protocols ospf3 ]user@host# set realm ipv4-unicast area 0.0.0.0 interface fe-0/1/0
- If you are done configuring the device, commit the configuration.[edit protocols ospf3 ]user@host# commit
Note: Repeat this entire configuration on the neighboring device that is part of the realm.
Results
Confirm your configuration by entering the show interfaces and the show protocols ospf commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
Verification
Confirm that the configuration is working properly.
- Verifying the Link-State Database
- Verifying the Status of OSPFv3 Interfaces with Multiple Address Families
Verifying the Link-State Database
Purpose
Verify the status of the link-state database for the configured realm, or address family.
Action
From operational mode, enter the show ospf3 database realm ipv4-unicast command.
Verifying the Status of OSPFv3 Interfaces with Multiple Address Families
Purpose
Verify the status of the interface for the specified OSPFv3 realm, or address family.
Action
From operational mode, enter the show ospf3 interface realm ipv4-unicast command.