OSPFv3 for IPv6
Configure single-area OSPFv3 for IPv6 on Cisco IOS XE: router ID, per-interface enablement, DR/BDR election, passive interfaces and the show commands.
- OSPFv3 is OSPF rebuilt for IPv6. Same link-state logic, same SPF, same neighbor states, same DR/BDR rules as OSPFv2.
- You enable it per interface (
ipv6 ospf 1 area 0), neighbors talk over link-local fe80:: addresses, and routes point to link-local next hops. - The router ID is still a 32-bit dotted value. On a router with no IPv4 address, set
router-idby hand or the process never starts.
Mental model
OSPFv2 only carries IPv4. When IPv6 arrived, the IETF did not bolt IPv6 onto OSPFv2. It built a new version, OSPFv3, that keeps the same brain and changes the plumbing.
The brain is identical. Every router floods LSAs, builds the same link-state database for the area, and runs SPF on its own copy. Neighbors walk through Down, Init, 2-Way, ExStart, Exchange, Loading and Full. Ethernet segments elect a DR and a BDR. If you understand OSPF single-area, you already understand most of this page.
The plumbing is what changes. OSPFv3 runs directly over IPv6, talks to neighbors using link-local addresses, and gets turned on interface by interface instead of with network statements.
OSPFv3 vs OSPFv2
| Item | OSPFv2 (IPv4) | OSPFv3 (IPv6) |
|---|---|---|
| Carries | IPv4 prefixes | IPv6 prefixes (IPv4 too, with address families) |
| How interfaces join | network statement or ip ospf 1 area 0 | Interface command only: ipv6 ospf 1 area 0 |
| Hello source address | Interface IPv4 address | Interface link-local address (fe80::) |
| Route next hop | Neighbor’s IPv4 address | Neighbor’s link-local address |
| Multicast groups | 224.0.0.5 and 224.0.0.6 | ff02::5 and ff02::6 |
| Router ID | 32-bit dotted value | Still a 32-bit dotted value |
| Neighbor list shows | Neighbor’s interface IP address | Neighbor’s Interface ID |
| Prefixes in LSAs | Inside Router and Network LSAs | Moved to a new Intra-Area-Prefix LSA (Type 9) |
| New LSA | None | Link LSA (Type 8), local to one link |
| Authentication | Built into the OSPF header | Removed from the header, uses IPsec instead |
| Timers, cost, DR/BDR, states | Same | Same |
The LSA change sounds scary but the idea is simple. In OSPFv3, Router and Network LSAs describe only the topology (who connects to whom). The actual IPv6 prefixes ride in separate LSAs. A Link LSA tells the other routers on a link your link-local address. For CCNA, knowing those two new LSA names is enough.
One more difference: all IPv6 prefixes on an interface go into OSPFv3 together. You cannot pick some prefixes on an interface and leave others out.
Configuration (IOS XE)
Lab topology: R1 and R2 connected on Gi0/0/0 (a point-to-point Ethernet link, 2001:db8:12::/64). Each router has a loopback and a user LAN on Gi0/0/1. Both routers are IPv6 only.
Step 1: turn on IPv6 routing
R1(config)# ipv6 unicast-routing
Without this the router behaves like an IPv6 host. It will have addresses, but it will not forward IPv6 packets or run IPv6 routing protocols in a useful way.
Step 2: create the process and set the router ID
R1(config)# ipv6 router ospf 1
R1(config-rtr)# router-id 1.1.1.1
R1(config-rtr)# passive-interface GigabitEthernet0/0/1
R1(config-rtr)# exit
The 1 is the process ID. Like OSPFv2, it only matters locally. The router ID must be unique in the OSPF domain.
Step 3: enable OSPFv3 on each interface
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# ipv6 address 2001:db8:12::1/64
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# ipv6 ospf network point-to-point
R1(config-if)# exit
R1(config)# interface GigabitEthernet0/0/1
R1(config-if)# ipv6 address 2001:db8:10::1/64
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# exit
R1(config)# interface Loopback0
R1(config-if)# ipv6 address 2001:db8:1::1/128
R1(config-if)# ipv6 ospf 1 area 0
Mirror this on R2 with router-id 2.2.2.2 and its own addresses. On IOS, entering ipv6 ospf 1 area 0 on an interface creates the process if it does not exist yet, but set the router ID first so there are no surprises.
The address-family style (newer syntax)
Cisco’s newer IOS XE configuration guides use router ospfv3 instead of ipv6 router ospf. The newer form uses address families so one process can carry IPv6 and, if you want, IPv4 too. Same protocol, different commands:
R1(config)# router ospfv3 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# address-family ipv6 unicast
R1(config-router-af)# passive-interface GigabitEthernet0/0/1
R1(config-router-af)# exit-address-family
R1(config-router)# exit
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# ospfv3 1 ipv6 area 0
R1(config-if)# ospfv3 network point-to-point
Quick map: ipv6 router ospf plus ipv6 ospf ... interface commands is the classic style. router ospfv3 plus ospfv3 ... interface commands is the address-family style. Pick one per router and stay consistent. CCNA questions mostly use the classic style.
DR and BDR on broadcast links
Ethernet interfaces default to the broadcast network type, so OSPFv3 elects a DR and BDR per segment, exactly like OSPFv2:
- Highest interface priority wins. The default is 1, the range is 0 to 255.
- On a tie, the highest router ID wins.
- Priority 0 means the router never becomes DR or BDR.
- No preemption. A better router that joins later does not take over until the current DR goes away or OSPF restarts on the segment.
R3(config)# interface GigabitEthernet0/0/0
R3(config-if)# ipv6 ospf priority 100
In the address-family style the command is ospfv3 priority 100.
On a link with only two routers, an election adds nothing but delay and an extra Type 2 LSA. Set both ends to ipv6 ospf network point-to-point: no DR, no BDR, and the neighbor shows FULL/ -. The network type must match on both ends.
Routers that are neither DR nor BDR stay in 2-WAY with each other. That is normal, not a fault.
Verification
Neighbors
R1# show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/ - 00:00:35 6 GigabitEthernet0/0/0
Neighbor ID is R2’s router ID. The dash after FULL means point-to-point, so there is no DR role. Notice there is no IPv6 address column: OSPFv3 shows the neighbor’s Interface ID instead.
In the address-family style:
R1# show ospfv3 neighbor
OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/ - 00:00:35 6 GigabitEthernet0/0/0
Interfaces
R1# show ipv6 ospf interface brief
Interface PID Area Intf ID Cost State Nbrs F/C
Lo0 1 0 11 1 LOOP 0/0
Gi0/0/1 1 0 7 1 DR 0/0
Gi0/0/0 1 0 6 1 P2P 1/1
Check the area, the state (P2P, DR, BDR, DROTHER, LOOP) and the full neighbor count. The passive LAN has zero neighbors, as it should. Use show ipv6 ospf interface Gi0/0/0 for the full detail, including link-local address, network type, timers and priority.
Routes
R1# show ipv6 route ospf
! codes legend trimmed
O 2001:db8:2::2/128 [110/1]
via FE80::2, GigabitEthernet0/0/0
O 2001:db8:20::/64 [110/2]
via FE80::2, GigabitEthernet0/0/0
The next hop is R2’s link-local address, not 2001:db8:12::2. That is expected. The link-local address plus the exit interface is enough to forward. (This lab set R2’s link-local to fe80::2 by hand with ipv6 address fe80::2 link-local to keep the output readable.)
Common mistakes
Forgetting
ipv6 unicast-routing. This is the number one mistake. Addresses are up and pings to the neighbor work, yet no routes appear. Put it at the top of every IPv6 router config.No router ID on an IPv6-only router. OSPFv3 borrows the IPv4 rules to pick a router ID. With no IPv4 address anywhere on the box, it cannot pick one, so the process does not start and IOS logs a message asking you to configure a router ID. Always set
router-idmanually.Looking for a
networkcommand. There is none in the classic style. Each interface needsipv6 ospf 1 area 0.Changing the router ID and expecting it to apply. On a running process it takes effect after
clear ipv6 ospf processor a reload.Network type mismatch. Point-to-point on one end and broadcast on the other gives odd results. Set both ends the same.
Making the wrong interface passive.
passive-interfacestops hellos, so a passive transit link never forms a neighbor. Make user LANs passive, never the links between routers.
Lab to try tonight
- Build R1 and R2 as above, IPv6 only, no IPv4 addresses anywhere.
- Configure
ipv6 router ospf 1without a router ID. Watch the console message, then addrouter-id. - Enable OSPFv3 on each interface. Verify FULL with
show ipv6 ospf neighbor. - Check
show ipv6 route ospfand confirm the next hop is fe80::. - Remove
ipv6 unicast-routingon R2. Watch what happens to routes. Put it back. - Change Gi0/0/0 back to the default broadcast type on both routers. Note the DR/BDR roles, then use
ipv6 ospf priorityto flip them andclear ipv6 ospf processto rerun the election. - Bonus: rebuild R2 with
router ospfv3 1and compareshow ospfv3 neighbor.
Cheat strip
| Concept | Plain English |
|---|---|
ipv6 unicast-routing | Turns the router into an IPv6 router. Required. |
ipv6 router ospf 1 | Classic OSPFv3 process, prompt config-rtr |
router ospfv3 1 | Address-family style, prompt config-router |
ipv6 ospf 1 area 0 | Enable on an interface (classic) |
ospfv3 1 ipv6 area 0 | Enable on an interface (address-family style) |
| Router ID | 32-bit dotted value. Set it by hand on IPv6-only routers. |
| Neighbor addresses | Link-local fe80:: |
| Multicast | ff02::5 all OSPF routers, ff02::6 DR and BDR |
| Priority | Default 1, 0 to 255, 0 means never DR |
| New LSAs | Type 8 Link, Type 9 Intra-Area-Prefix |
| AD | 110, same as OSPFv2 |
Frequently asked questions
Q: Do I still need a router ID if the network is IPv6 only? A: Yes. OSPFv3 uses the same 32-bit router ID as OSPFv2, written like an IPv4 address. It does not need to match any real address, but it must be unique. With no IPv4 address on the router, you must configure it or the process will not start.
Q: Why are OSPFv3 next hops link-local addresses? A: OSPFv3 neighbors talk over link-local addresses, so that is the address a router learns for its neighbor. A link-local next hop plus the outgoing interface is all the router needs to forward the packet.
Q: Can OSPFv2 and OSPFv3 run on the same router? A: Yes, and on dual-stack networks they usually do. They are separate processes with separate neighbors and databases. One builds the IPv4 table, the other builds the IPv6 table.
Q: Which syntax should I use, ipv6 router ospf or router ospfv3? A: Both configure OSPFv3. router ospfv3 is the newer address-family style that Cisco recommends and that can also carry IPv4. For the CCNA exam, know the classic ipv6 router ospf and ipv6 ospf 1 area 0 commands and recognize the newer form.
Q: Does DR/BDR election work differently in OSPFv3? A: No. Highest priority wins, highest router ID breaks a tie, priority 0 opts out, and there is no preemption. Only the command name changes to ipv6 ospf priority.
Practice: quick check
Every question in the bank, once. No repeats. Missed ones cycle back at the end.
OSPF Single-Area
CCNA OSPF guide: link-state model, seven neighbor states, LSA types, DR/BDR election, cost tuning, authentication, summarization and 8 worked scenarios.
EIGRP
EIGRP, Cisco's hybrid routing protocol: DUAL, successor vs feasible successor, the metric formula, and why EIGRP recovers from failures in milliseconds.
Want this drilled into reflex?
1:1 weekly sessions, live feedback on your labs, and US interview prep: built around the CCNA® exam blueprint. Free first session. No card on file until you decide.
Related topics
IPv6 Address Types: Unicast, Anycast, Multicast, and EUI-64
The three IPv6 delivery modes: unicast (one-to-one), anycast (one-to-nearest) and multicast (one-to-many), plus how EUI-64 builds a host ID from a MAC.
Network FundamentalsIPv6 Basics
128-bit addresses, hex notation, the :: shortcut, address types (global, link-local, multicast), SLAAC, and why IPv6 is finally happening 25 years after it was supposed to.
IP ConnectivityIPv6 Routing: Static & OSPFv3
How routing works in an IPv6-only or dual-stack network. Covers IPv6 static routes, OSPFv3 (OSPF for IPv6), default routes, and the differences from IPv4 routing you need to know.
Get the free CCNA 12-week roadmap
You're already reading up on OSPFv3 for IPv6. The roadmap is the order I recommend studying every CCNA topic in: with what to lab each week and where OSPFv3 for IPv6 fits. A written personal reply, not an autoresponder. Expect it within one business day.
Personal reply from a senior network engineer. No third-party tracking. Unsubscribe any time.
