OSPFv3 is OSPF rebuilt for IPv6, and on Cisco IOS it takes about four lines per router once IPv6 routing is on. The parts that trip people are not the commands. They are the 32-bit router ID that an IPv6-only router cannot pick for itself, the link-local next hops in every route, and a DR election that behaves exactly like OSPFv2’s, including the cases where the “wrong” router wins.
This OSPFv3 configuration guide sets up single-area OSPFv3 on four Cisco routers: three with the classic ipv6 router ospf commands and one with the newer address-family syntax, a shared LAN that elects a DR and BDR, and a router-to-router link switched to point-to-point. It then breaks the setup on purpose and shows the exact log lines. Every command and output below was run on Cisco 7200 routers with IOS 15.2(4)S3 in a GNS3 lab in November 2026.
How OSPFv3 differs from OSPFv2
OSPFv3 keeps the OSPFv2 machinery you already know (areas, hellos, the DR and BDR, SPF and costs) and changes how it rides on the network. If you can configure single-area OSPFv2, the table below is most of what is new.
| Item | OSPFv2 | OSPFv3 |
|---|---|---|
| Routes it carries | IPv4 | IPv6 (and IPv4 with address families) |
| Enabled with | network statement or ip ospf 1 area 0 | ipv6 ospf 1 area 0 on the interface only |
| Router ID | 32-bit, from an IPv4 address if not set | Still 32-bit dotted decimal, from an IPv4 address if not set |
| Packets sent from | Interface IPv4 address | Interface link-local address |
| Next hop in routes | Neighbor’s IPv4 address | Neighbor’s link-local FE80:: address |
| Multicast groups | 224.0.0.5 and 224.0.0.6 | FF02::5 and FF02::6 |
| Show commands | show ip ospf ... | show ipv6 ospf ... or show ospfv3 ... |
The router ID row is the one that causes outages. OSPFv3 still identifies every router with a 32-bit number written like an IPv4 address, so on a router with no IPv4 address at all, OSPFv3 cannot start until you give it one. R4 in this lab hits exactly that.
The OSPFv3 lab topology
Four routers share one LAN, 2001:db8:0:123::/64, through a switch, so the segment elects a designated router. R1 and R2 also have a direct link, 2001:db8:0:12::/64, which starts as a normal broadcast link and later becomes point-to-point. Each router has a /128 loopback in 2001:db8:ff::, and R2 originates the IPv6 default route.

The router IDs are chosen to show three different cases. R1 and R2 set theirs by hand, R3 takes 10.255.0.3 from an IPv4 loopback because it has no router-id line, and R4 is IPv6 only with no router ID at first. We built the same lab in GNS3:

Any IOS or IOS XE router that supports IPv6 runs this lab. Cisco Modeling Labs Free ships IOL rather than IOSv, and IOL names its ports Ethernet0/0 and up, so swap the interface names for your platform (Gi1/0 here becomes Ethernet0/1 on IOL). The OSPFv3 commands themselves don’t change.
Enable IPv6 routing and OSPFv3 on R1
IPv6 forwarding is off by default on IOS, and OSPFv3 refuses to start without it. Turn it on, give each interface an address, and enable OSPFv3 per interface. There is no network statement in OSPFv3: the interface command is the only way to put a link into the process.
configure terminal
ipv6 unicast-routing
interface Loopback0
ipv6 address 2001:db8:ff::1/128
ipv6 ospf 1 area 0
interface GigabitEthernet0/0
ipv6 address 2001:db8:0:123::1/64
ipv6 ospf 1 area 0
no shutdown
interface GigabitEthernet1/0
ipv6 address 2001:db8:0:12::1/64
ipv6 ospf 1 area 0
no shutdown
ipv6 router ospf 1
router-id 1.1.1.1
The 1 in ipv6 ospf 1 area 0 is the local process ID, as in OSPFv2, so it does not have to match between neighbors. The area does. R2 gets the same block with its own addresses and router-id 2.2.2.2, plus two lines that make it the source of the default route.
ipv6 route ::/0 Null0
ipv6 router ospf 1
default-information originate
In a real network the static default would point at the provider rather than Null0. The command only advertises a default that the router already has, unless you add always.
Set the router ID on an IPv6-only router
R4 got only a loopback and its LAN interface, enabled for OSPFv3 the same way as R1’s but with no router-id line, and it has no IPv4 address anywhere. OSPFv3 never starts, and the log buffer holds the reason.
show logging | include OSPF
The message names the process and tells you exactly what to do.
*Nov 30 13:08:51.371: %OSPFv3-4-NORTRID: Process OSPFv3-1-IPv6 could not pick a router-id, please configure manually
Every OSPFv3 show command on R4 answers the same way until it’s fixed, which is a quick way to spot the problem on a box you didn’t build.
%OSPFv3 1 address-family ipv6 not running, please configure a router-id
Set a router ID under the process.
configure terminal
ipv6 router ospf 1
router-id 4.4.4.4
end
Seventy seconds later R4 had found all three neighbors on the LAN. Use a router ID scheme you would use for OSPFv2 (loopback-style numbers that are unique in the domain), because two routers with the same ID will not form an adjacency in either version.

R3 shows the other side of the same rule. It has no router-id line but owns an IPv4 loopback, 10.255.0.3, so OSPFv3 quietly took that address as its ID. That’s fine until someone renumbers the loopback, so set the ID by hand on every router you care about.
Configure OSPFv3 with the address-family syntax
Newer IOS and IOS XE releases also accept router ospfv3, which can carry IPv4 and IPv6 in one process through address families. R3 runs it, and it forms adjacencies with the classic routers without any special handling, because both styles speak the same OSPFv3 protocol on the wire. This is R3’s full configuration, including the IPv4 loopback that later decides the DR election.
configure terminal
ipv6 unicast-routing
interface Loopback0
ip address 10.255.0.3 255.255.255.255
ipv6 address 2001:db8:ff::3/128
ospfv3 1 ipv6 area 0
interface GigabitEthernet0/0
ipv6 address 2001:db8:0:123::3/64
ospfv3 1 ipv6 area 0
no shutdown
router ospfv3 1
address-family ipv6 unicast
exit-address-family
On the interfaces, ospfv3 1 ipv6 area 0 replaces ipv6 ospf 1 area 0, and per-interface settings follow the same pattern (ospfv3 hello-interval 5 instead of ipv6 ospf hello-interval 5). Pick one style per router, because mixing both on one box makes the configuration hard to read. The classic style is what most study material and older configs use.
Verify OSPFv3 neighbors and the DR election
Check the adjacencies from R1, the router we configured first.
show ipv6 ospf neighbor
Before R4 joined, R1 listed three adjacencies, two of them on the LAN. Read the State column as the neighbor state followed by the neighbor’s role on that link.
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:37 4 GigabitEthernet1/0
2.2.2.2 1 FULL/BDR 00:00:34 3 GigabitEthernet0/0
10.255.0.3 1 FULL/DR 00:00:31 3 GigabitEthernet0/0
R3 is the DR on the LAN and R2 the BDR, while R1 is a DROTHER. With every priority at the default of 1 and the routers starting together, the highest router ID wins, and 10.255.0.3 is a larger number than 2.2.2.2 or 1.1.1.1. That is the “wrong router wins” case from the intro: R3 got the role because of an IPv4 loopback nobody chose with the election in mind. If you want a particular router as DR, raise its priority with ipv6 ospf priority 100 (or ospfv3 priority 100) instead of relying on IDs. A new priority only counts at the next election, so plan a clear ipv6 ospf process (clear ospfv3 process on an address-family router) in a maintenance window to apply it, because that drops every adjacency on the router. The Interface ID column is new in OSPFv3: it’s the neighbor’s own interface number, which OSPFv3 uses where OSPFv2 used the interface’s IP address.
R4’s late arrival shows that the election is not preemptive. After it got its router ID, R4 became a DROTHER even though 4.4.4.4 beats R2’s 2.2.2.2 for BDR.
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:37 4 GigabitEthernet1/0
2.2.2.2 1 FULL/BDR 00:00:38 3 GigabitEthernet0/0
4.4.4.4 1 2WAY/DROTHER 00:00:30 3 GigabitEthernet0/0
10.255.0.3 1 FULL/DR 00:00:34 3 GigabitEthernet0/0
R1 and R4 stop at 2WAY, and that’s correct. Two DROTHERs on a broadcast segment only become fully adjacent with the DR and BDR, so 2WAY/DROTHER between them is the healthy state, not a stuck one. R3, the DR, showed the same roles from its side before R4 joined.
show ospfv3 neighbor
An address-family router prints the process and family in the header, and the rest reads the same.
OSPFv3 1 address-family ipv6 (router-id 10.255.0.3)
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/DROTHER 00:00:37 3 GigabitEthernet0/0
2.2.2.2 1 FULL/BDR 00:00:35 3 GigabitEthernet0/0
show ipv6 ospf interface brief gives the same picture per interface, with the cost and the neighbor count. On R1 the LAN reads DROTH 2/2, two neighbors and both full, which matches the table above.

Make the R1 to R2 link point-to-point
A link with exactly two routers on it gains nothing from a DR election, yet an Ethernet interface runs as a broadcast network by default, and R1’s Gi1/0 is no exception.
show ipv6 ospf interface GigabitEthernet1/0 | include Network Type|State
You get broadcast, with R1 elected BDR on a two-router link.
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Change the network type on both ends. A mismatch here does not stop the adjacency from coming up, because hellos don’t check the network type, but routes across the link then go missing. It’s hard to spot, so always set it on both routers in the same change.
interface GigabitEthernet1/0
ipv6 ospf network point-to-point
After the change R2 lists R1 on that link with a dash where the role used to be, and no wait for an election.
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 0 FULL/ - 00:00:36 4 GigabitEthernet1/0
1.1.1.1 1 FULL/DROTHER 00:00:39 3 GigabitEthernet0/0
4.4.4.4 1 FULL/DROTHER 00:00:31 3 GigabitEthernet0/0
10.255.0.3 1 FULL/DR 00:00:33 3 GigabitEthernet0/0
The interface now reads Network Type POINT_TO_POINT and State POINT_TO_POINT. FULL with a dash is the healthy state on a point-to-point link, so don’t go looking for a missing DR.
Read the OSPFv3 routes
On R3 the routing table, captured before R4 joined, shows what OSPFv3 learned (R4’s loopback, 2001:DB8:FF::4/128, appears once R4 is up).
show ipv6 route ospf
Every next hop is a link-local FE80:: address, never a global one (we trimmed the code legend).
OE2 ::/0 [110/1], tag 1
via FE80::C802:5FF:FE96:8, GigabitEthernet0/0
O 2001:DB8:0:12::/64 [110/2]
via FE80::C802:5FF:FE96:8, GigabitEthernet0/0
via FE80::C801:5FF:FE7A:8, GigabitEthernet0/0
O 2001:DB8:FF::1/128 [110/1]
via FE80::C801:5FF:FE7A:8, GigabitEthernet0/0
O 2001:DB8:FF::2/128 [110/1]
via FE80::C802:5FF:FE96:8, GigabitEthernet0/0
Three things to read from this table:
- OE2 ::/0 is R2’s default, an external type 2 route
- O routes are intra-area, here the loopbacks and the R1 to R2 link
- 2001:db8:0:12::/64 has two equal-cost paths, through R1 and R2
To match a link-local next hop to a router, compare it with the “local address” lines in show ipv6 ospf interface: FE80::C802:5FF:FE96:8 is R2’s LAN interface. A ping from R3’s loopback to R1’s proves the routes carry traffic:
ping 2001:db8:ff::1 source Loopback0
All five echoes come back, sourced from R3’s loopback address.
Sending 5, 100-byte ICMP Echos to 2001:DB8:FF::1, timeout is 2 seconds:
Packet sent with a source address of 2001:DB8:FF::3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/19/20 ms
Traceroute, unlike the routing table, shows global addresses. From R3 to R2’s loopback, IOS showed the single hop as R2’s LAN address, 2001:DB8:0:123::2, rather than the loopback address the probe was aimed at.
Troubleshoot OSPFv3 adjacencies
The OSPFv2 failure modes all apply, with the same log lines under an OSPFv3 prefix. When a neighbor is missing, check these on both ends before anything else:
ipv6 unicast-routingis on- a router ID is set or an IPv4 address exists
- area, hello and dead timers match
- the network type matches
- both routers sit on the same link
Two of the faults are worth seeing on real output because they behave in ways people don’t expect.
%OSPFv3-4-NORTRID: could not pick a router-id
The process has no router ID and no IPv4 address to take one from. Nothing else is wrong, so don’t touch the interfaces: set router-id under the process, as on R4 above.
Neighbor Down: Dead timer expired after a hello change
To test it, R3’s LAN interface got ospfv3 hello-interval 5, which also drops its dead interval to 20. Fifty seconds later R3 had no neighbors at all, and you can see why in R1’s log.
*Nov 30 13:15:44.143: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.255.0.3 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
*Nov 30 13:15:47.767: %OSPFv3-5-ADJCHG: Process 1, Nbr 4.4.4.4 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
Hello and dead intervals must match exactly between neighbors, and the timers line of show ipv6 ospf interface on both ends finds the mismatch in seconds (Hello 5, Dead 20 on R3 against Hello 10, Dead 40 on R1). The LAN re-elected around the gap: R1’s neighbor table at that point showed R2 as DR and R4 as BDR, and the second log line is R4 going FULL with R1 now that R4 is BDR.
Removing the hello change on R3 restored the adjacencies, and then R3 took the DR role back from R2, which surprises most people who have learned that the election never preempts. When we checked a few minutes later, R1 showed R3 as DR again and R2 as a DROTHER.
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 0 FULL/ - 00:00:36 4 GigabitEthernet1/0
2.2.2.2 1 2WAY/DROTHER 00:00:34 3 GigabitEthernet0/0
4.4.4.4 1 FULL/BDR 00:00:36 3 GigabitEthernet0/0
10.255.0.3 1 FULL/DR 00:00:39 3 GigabitEthernet0/0
The reason is that R3 never stopped being DR in its own view. Alone on its timers, it kept announcing itself as DR in every hello, and when the timers matched again the segment had two routers each declaring themselves DR. The election rules settle that by priority and then router ID among the declared DRs, and 10.255.0.3 beat 2.2.2.2. The lesson for production: a timer fix on the old DR can move the DR role, so make that change in a maintenance window, or set priorities so the outcome is decided in advance.
Practice OSPF for IPv4 and IPv6
These questions come from our CCNA routing bank, which covers OSPFv2 and OSPFv3 together.
CCNA practice: Domain 3: IP Routing
10 questions drawn fresh from 129 in the bank, with the answer and explanation after each one.
Start 10 questionsFor the IPv4 side of the same protocol, the single-area OSPFv2 configuration guide builds a three-router lab with passive interfaces and cost tuning, and OSPF concepts explained covers the LSDB and the DR/BDR election in depth. If IPv6 addressing itself is still shaky, start with IPv6 addressing and EUI-64 and IPv6 static routes. OSPFv3 is part of the IP routing domain in the CCNA 200-301 v2.0 topics, and the Domain 3 practice test drills it with the rest of routing.
OSPFv2 and OSPFv3 command map
Keep this next to your lab. Each row is the OSPFv2 command, the classic OSPFv3 form and the address-family form used on R3.
| Task | OSPFv2 | OSPFv3 classic | OSPFv3 address family |
|---|---|---|---|
| Start the process | router ospf 1 | ipv6 router ospf 1 | router ospfv3 1 + address-family ipv6 unicast |
| Enable on an interface | ip ospf 1 area 0 | ipv6 ospf 1 area 0 | ospfv3 1 ipv6 area 0 |
| Point-to-point link | ip ospf network point-to-point | ipv6 ospf network point-to-point | ospfv3 network point-to-point |
| DR priority | ip ospf priority 100 | ipv6 ospf priority 100 | ospfv3 priority 100 |
| Hello interval | ip ospf hello-interval 5 | ipv6 ospf hello-interval 5 | ospfv3 hello-interval 5 |
| Neighbors | show ip ospf neighbor | show ipv6 ospf neighbor | show ospfv3 neighbor |
| Routes | show ip route ospf | show ipv6 route ospf | show ipv6 route ospf |
The router ID, area and passive-interface commands go under the process in all three, with the same syntax. In the address-family style, default-information originate goes under address-family ipv6 unicast rather than the process itself. When in doubt on a router you didn’t configure, show running-config | section ospf tells you which style it uses before you type anything.