Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- OSPF Overview
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
Example: Configuring Multiple Address Families for OSPFv3
Understanding Multiple Address Families for OSPFv3
By default, OSPFv3 supports only unicast IPv6 routes. In Junos OS Release 9.2 and later, you can configure OSPFv3 to support multiple address families, including IPv4 unicast, IPv4 multicast, and IPv6 multicast. This mutliple address family support allows OSPFv3 to support both IPv6 and IPv4 nodes. Junos OS maps each address family to a separate realm as defined in Internet draft draft-ietf-ospf-af-alt-06.txt, Support for Address Families in OSPFv3. Each realm maintains a separate set of neighbors and link-state database.
When you configure multiple address families for OSPFv3, there is a new instance ID field that allows multiple OSPFv3 protocol instances per link. This allows a single link to belong to multiple areas.
You configure each realm independently. We recommend that you configure an area and at least one interface for each realm.
These are the default import and export routing tables for each of the four address families:
- IPv6 unicast: inet6.0
- IPv6 multicast: inet6.2
- IPv4 unicast: inet.0
- IPv4 multicast: inet.2
With the exception of virtual links, all configurations supported for the default IPv6 unicast family are supported for the address families that have to be configured as realms.
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.
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- OSPF Overview
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
Published: 2013-02-01
Supported Platforms
Related Documentation
- ACX, J, M, MX, QFX, SRX, T Series
- OSPF Overview
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview