How to Configure OSPFv3

Figure 1 shows the reference topology to Configure OSPFv3. Figure 2 shows the commands for configuring OSPFv3 for IPv6 unicast and link-local addresses on the interfaces of Router1. As identified in the referenced topology, assume that Router2, Router3, and Router4 interfaces have already been configured with the global IPv6 and link-local addresses.

None of the routers have been configured with dual stacking in this topology. A network with router interfaces configured with IPv4 and IPv6 addresses is called a dual-stacked router. A dual-stacked network can enable OSPFv2 and OSPFv3 simultaneously. The following are the important steps to configure OSPFv3 on the router.

  1. Configure global unicast address using.
  2. Configure link-local addresses. The link-local address is optional.
  3. Enable IPv6 unicast routing using the “ipv6 unicast-routing” command in global configuration mode.
  4. Using the ” router-id rid ” command, you can configure a 32-bit router ID during OSPFv3 configuration in the router configuration mode.
  5. Adjusting the reference bandwidth is optional.
  6. Configure OSPFv3 interface-specific settings. For example, adjust the interface bandwidth.
  7. Enable IPv6 routing using the “ipv6 ospf area” command.
Network Topology Diagram with IPv6 Addresses and Router IDs
Image containing router configuration interface showing IPv6 address assignments to various interfaces

Enable IPv6 unicast-routing

Cisco routers do not have IPv6 routing enabled by default. The IPv6 routing configuration requires unicast routing to be enabled on Cisco routers. So, to enable IPv6 unicast routing, use the following command in global configuration mode.

Router(config)# ipv6 unicast-routing

How to configure OSPFv3 Router ID

We can configure OSPFv3 router ID using the command “ipv6 router ospf process-id” in IPv6 router configuration mode. The prompt for IPv6 router configuration mode is different from that for IPv4 router configuration mode. Use the IPv6 router configuration mode to configure global OSPFv3 parameters, such as assigning a 32-bit OSPF router ID and reference bandwidth.

IPv6 routing protocols are enabled in an interface mode, not in router configuration mode, like IPv4. The network command also does not exist in IPv6 routing. The process ID value is a decimal number from 1 to 65535, like OSPFv2. Which is only locally important and does not have to match other OSPF routers to establish adjacencies with those neighbors?

OSPFv3 requires a 32-bit router ID before enabling OSPF on an interface. An explicitly configured router ID is preferred. If none are configured, the router uses the highest IPv4 address configured for a loopback interface. If the loopback interface is not configured on the router, the router uses the highest configured IPv4 address of an active interface.

If there are no sources of IPv4 addresses on a router, it shows a console message asking you to configure the router ID manually. Figure 3 illustrates the process of assigning a router ID and adjusting the interface bandwidth.

A screenshot of a router configuration command line interface showing the setup of IPv6 unicast routing and OSPFv3 with specific commands and messages

Before entering the IPv6 router process, enable IPv6 unicast-routing, otherwise, it will give an error message “IPv6 routing not enabled “. The first command in figure3 enables IPv6 routing on the router. Then “ipv6 router ospf 10” enters the router OSPFv3 configuration mode.

Notice the prompt; it is different from IPv4 routing. Also, notice the informational console message that appeared when the OSPFv3 configuration mode was accessed. It asked about the process ID, which is not configured yet.

Now assigns routing ID using the “router-id” command. In the figure, we have assigned the ID 10.10.1.1 to the router. Finally, I adjust the reference bandwidth using the “auto-cost reference-bandwidth 10000” command. Now, we can verify the OSPFv3 configuration using the “show ipv6 protocols” command.

Modifying an OSPFv3 Router ID

We can change the router IDs, such as if we establish a new router ID identification scheme. When an OSPFv3 router establishes a router ID, that router ID cannot change until the router reloads or the OSPF process has cleared. The best practice is to clear the OSPF process. Using the commands shown in Figure 4, we can modify and change the IPv6 router ID.

A screenshot of a router configuration terminal showing commands and outputs related to configuring and resetting an IPv6 OSPF process The image shows a series of commands entered into a routers configuration terminal The commands are used to configure an IPv6 OSPF Open Shortest Path First process and reset it The sequence includes entering configuration mode setting the router ID and exiting configuration mode An error is shown when an incorrect command is entered followed by the correct command to reset the OSPF process

You can see in the Figure that the OSPF routing process has cleared using the “clear ipv6 ospf process”, the privileged EXEC mode command. Doing this forces OSPF on Router1 to renegotiate neighbor adjacencies using the new router ID. We can again verify the modification using “show ipv6 protocols” command that the router ID has changed.

Enabling OSPFv3 on Interfaces

The method to enable OSPFv3 on the router is different. Instead of enabling OSPFv3 on an interface using the “network” command on the router configuration mode command, OSPFv3 is configured directly on the particular interface. Enters into interface configuration mode and uses the command  “ipv6 ospf process-id area area-id”. The process-id value identifies the specific routing process.

The ID must be the same as the process ID used to create the routing process in the “ipv6 router ospf process-id” command. We can select any area for the area ID. We have selected area 0 is the backbone area to which all other areas must attach, as shown in the figure5. Area0 helps in migration to multi-area OSPF if it is needed. We can verify the OSPFv3 configuration using privileged mode command “ show ipv6 ospf interface brief” command.

Verify and troubleshoot OSPFv3

OSPFv3 routing protocol is more complicated than OSPFv2 routing protocols, so verifying OSPFv3 and troubleshooting is not easy. There are several commands we can use to verify and troubleshoot an OSPF configuration and operation:-

Verify OSPFv3 Neighbors

We can use the “show ipv6 ospf neighbor” command to verify that the router is in adjacency with its neighboring routers. If the neighboring router’s router ID is not listed, or if the state of FULL is not showing, the two routers have not formed an OSPFv3 adjacency.

So, if the two routers’ adjacency is not established, link-state information is not exchanged, and Incomplete LSDBs can affect SPF trees and routing tables. Routes to destination networks may not be found. The output parameters of this command are shown below:-

  • Neighbor ID– The unique ID of the neighboring router.
  • Pri– The OSPF priority of the interface. This value is used in the DR and BDR elections.
  • State– This is OSPF state of the interfaces. FULL state means that the router and its neighbor have identical OSPF LSDBs. The dash indicates that no DR or BDR is required because of the network type. On multi-access networks, such as Ethernet, two adjacent routers may have their states displayed as 2WAY. The DR show the adjacent router connected to this interface is DR.
  • Dead Time– The remaining time to receive an OSPF Hello packet from the neighbor before declaring the neighbor down. The value rested when the interface received a Hello packet.
  • Interface ID– The Interface ID or the link ID.
  • Interface– The interface on which this router has formed neighbor adjacency.

Verify OSPFv3 Protocol Settings

We can verify the OSPF protocol settings using the “show ipv6 protocols” command to verify important OSPF configuration information. The command displays the OSPF process ID, the router ID, and the enabled interface for OSPFv3. Figure 2 illustrates the output of the “show ipv6 protocols” command. Use the command on other routers to verify the above information.

Verify OSPFv3 Interfaces

We can easily verify the OSPF interface settings using the “show ipv6 ospf interface” command. This command provides a detailed list for every OSPF-enabled interface. We can also display a summary of the interfaces using the command “ show ipv6 ospf interface brief.”

Verify the IPv6 Routing Table

We can also check and verify the routing table for IPv6 using the command “show ipv6 route ospf”. The command output provides specifics about OSPF routes in the routing table.