Figure 1 shows the reference topology for configuring OSPFv3. You can also see 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.
This topology is IPv6-only; no dual-stack (IPv4+IPv6) to focus on OSPFv3. 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.
Prerequisites for OSPFv3 Configuration
Before diving into OSPFv3, ensure:
- Basic IPv6 addressing knowledge (CCNA level).
- Understanding of OSPFv2 (for comparisons).
- Cisco IOS supporting IPv6 (e.g., 15.x or later).
- Topology: As in Figure 1, with Router1-4 connected via GigabitEthernet/FastEthernet/Serial interfaces.
Key Differences Between OSPFv2 and OSPFv3
- OSPFv2: IPv4-only, uses network command in router mode.
- OSPFv3: IPv6 (and IPv4 via AF), enabled per-interface, no network command.
- Router ID: Still 32-bit, but OSPFv3 requires manual if no IPv4.
- Authentication: OSPFv3 uses IPsec (more secure).
- Hellos: Sent to FF02::5/6 multicast via link-local addresses.
Steps to Configure OSPFv3
- Configure global unicast addresses on interfaces.
- Configure link-local addresses (optional, but recommended for stability as OSPFv3 uses them for neighbor discovery).
- Enable IPv6 unicast routing using the
ipv6 unicast-routing
command in global configuration mode. - Using the
router-id rid
command, you can configure a 32-bit router ID during OSPFv3 configuration in the router configuration mode. - Adjusting the reference bandwidth is optional.
- Configure OSPFv3 interface-specific settings. For example, adjust the interface bandwidth.
- Enable IPv6 routing using the
ipv6 ospf area
command.
Example Interface Configuration
Router(config)#interface fastEthernet 0/0 Router(config-if)#ipv6 address 2001:ADA0:110B::1/64 Router(config)#interface fastEthernet 0/1 Router(config-if)#ipv6 address 2001:ADA0:110B:0004::/64 Router(config)#interface serial 0/3/1 Router(config-if)#ipv6 address 2001:ADA0:110B:0003::/64 Router(config-if)#ipv6 address fe80::1 link-local
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. OSPFv3 requires a 32-bit router ID (dotted decimal, like IPv4) 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.
Before entering the IPv6 router process, enable IPv6 unicast-routing, otherwise, it will give an error message โIPv6 routing not enabledโ. The command ipv6 unicast-routing
enables IPv6 routing on the router. Then ipv6 router ospf 10
enters you to 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 assign router ID using the router-id
command. We have assigned the ID 10.10.1.1 to the router. Finally, 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.
Example Configuration
Router(config)#ipv6 unicast-routing Router(config)#ipv6 router ospf 10 %OSPFv3-4-NORTRID: OSPFv3 process 10 could not pick a router-id, please configure manually Router(config-rtr)#router-id 10.10.1.1 Router(config-rtr)#auto-cost reference-bandwidth 10000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. Router(config-rtr)#
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 below, we can modify and change the IPv6 router ID.
Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ipv6 router ospf 10 Router(config-rtr)#router-id 10.10.1.2 Router(config-rtr)#exit Router(config)#exit Router# %SYS-5-CONFIG_I: Configured from console by console Router#clear ipv6 ospf process ? % Unrecognized command Router#clear ipv6 ospf process Reset ALL OSPF processes? [no]: yes Router#
You can see above 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. Enter into interface configuration mode and use the command ipv6 ospf process-id area area-id
. The process-id value identifies the specific routing process.
The process ID must match across the router’s config, but router ID is unique. We can select any area for the area ID. We have selected area 0 as the backbone area to which all other areas must attach, as shown below. Area 0 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.
Router#config ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ipv6 ospf 10 area 0
Router(config-if)#
Common Mistakes in OSPFv3 Configuration
- Forgetting
ipv6 unicast-routing
โ Results in no routing. - Mismatched process IDs โ Adjacencies fail.
- No router ID โ Error message as shown.
- Incorrect area IDs โ Breaks multi-area designs.
- Not verifying with
show
commands โ Miss adjacencies.
Troubleshooting tip: Use debug ipv6 ospf hello
sparingly in labs.
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 neighbo
rโ 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. Below you can see the show ipv6 protocols
command. Use the command on other routers to verify the above information.
Router#show ipv6 protocols IPv6 Routing Protocol is "connected" IPv6 Routing Protocol is "static" IPv6 Routing Protocol is "ospf 10" Interfaces (Area 0) FastEthernet0/0 Redistribution: None Router#
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.
Real-World Scenario: OSPFv3 in Enterprise IPv6 Migration
In a large enterprise migrating to IPv6, start with area 0 backbone on core routers, then attach stub areas for branches. Use summarization to reduce routing table size. Test in labs like Packet Tracer before production.
Comparison Table: OSPFv2 vs OSPFv3
Feature | OSPFv2 | OSPFv3 |
---|---|---|
IP Version | IPv4 | IPv6 (IPv4 via AF) |
Enabling | Network command in router mode | Per-interface |
Router ID | 32-bit, auto from IPv4 | 32-bit, manual if no IPv4 |
Authentication | MD5/SHA | IPsec |
Multicast Addresses | 224.0.0.5/6 | FF02::5/6 |
FAQs
What are the prerequisites for configuring OSPFv3?
You need CCNA-level IPv6 knowledge, OSPFv2 understanding, Cisco IOS 15.x or later, and a topology like Figure 1 with Router1-4 connected via GigabitEthernet/FastEthernet/Serial interfaces for successful OSPFv3 setup.
How do I configure a router ID for OSPFv3 on a Cisco router?
Enable IPv6 unicast-routing, then use ipv6 router ospf 10
and router-id 10.10.1.1
in config mode. If no IPv4 exists, manual setup is required to avoid errors, ensuring a unique 32-bit ID.
What happens if I forget to enable IPv6 unicast-routing?
Without ipv6 unicast-routing
, OSPFv3 routing won’t work, and you’ll get an error like “IPv6 routing not enabled.” This command is essential to activate IPv6 routing on Cisco routers.
How do I enable OSPFv3 on a specific interface?
Enter interface mode (e.g., interface fastEthernet 0/0
), then use ipv6 ospf 10 area 0
to enable OSPFv3 with a matching process ID and area, unlike OSPFv2’s network command.
Why might OSPFv3 neighbors not form an adjacency?
Mismatched process IDs, no router ID, or incorrect area IDs can prevent adjacency. Use show ipv6 ospf neighbor
to check; troubleshoot with debug ipv6 ospf hello
if needed.