Skip to main content
PacketMentor logo
Open menu
← All topics
IP Connectivity Intermediate

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.

Quick summary
  • 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-id by 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

ItemOSPFv2 (IPv4)OSPFv3 (IPv6)
CarriesIPv4 prefixesIPv6 prefixes (IPv4 too, with address families)
How interfaces joinnetwork statement or ip ospf 1 area 0Interface command only: ipv6 ospf 1 area 0
Hello source addressInterface IPv4 addressInterface link-local address (fe80::)
Route next hopNeighbor’s IPv4 addressNeighbor’s link-local address
Multicast groups224.0.0.5 and 224.0.0.6ff02::5 and ff02::6
Router ID32-bit dotted valueStill a 32-bit dotted value
Neighbor list showsNeighbor’s interface IP addressNeighbor’s Interface ID
Prefixes in LSAsInside Router and Network LSAsMoved to a new Intra-Area-Prefix LSA (Type 9)
New LSANoneLink LSA (Type 8), local to one link
AuthenticationBuilt into the OSPF headerRemoved from the header, uses IPsec instead
Timers, cost, DR/BDR, statesSameSame

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.

Ethernet interfaces default to the broadcast network type, so OSPFv3 elects a DR and BDR per segment, exactly like OSPFv2:

  1. Highest interface priority wins. The default is 1, the range is 0 to 255.
  2. On a tie, the highest router ID wins.
  3. Priority 0 means the router never becomes DR or BDR.
  4. 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

  1. 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.

  2. 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-id manually.

  3. Looking for a network command. There is none in the classic style. Each interface needs ipv6 ospf 1 area 0.

  4. Changing the router ID and expecting it to apply. On a running process it takes effect after clear ipv6 ospf process or a reload.

  5. Network type mismatch. Point-to-point on one end and broadcast on the other gives odd results. Set both ends the same.

  6. Making the wrong interface passive. passive-interface stops hellos, so a passive transit link never forms a neighbor. Make user LANs passive, never the links between routers.

Lab to try tonight

  1. Build R1 and R2 as above, IPv6 only, no IPv4 addresses anywhere.
  2. Configure ipv6 router ospf 1 without a router ID. Watch the console message, then add router-id.
  3. Enable OSPFv3 on each interface. Verify FULL with show ipv6 ospf neighbor.
  4. Check show ipv6 route ospf and confirm the next hop is fe80::.
  5. Remove ipv6 unicast-routing on R2. Watch what happens to routes. Put it back.
  6. Change Gi0/0/0 back to the default broadcast type on both routers. Note the DR/BDR roles, then use ipv6 ospf priority to flip them and clear ipv6 ospf process to rerun the election.
  7. Bonus: rebuild R2 with router ospfv3 1 and compare show ospfv3 neighbor.

Cheat strip

ConceptPlain English
ipv6 unicast-routingTurns the router into an IPv6 router. Required.
ipv6 router ospf 1Classic OSPFv3 process, prompt config-rtr
router ospfv3 1Address-family style, prompt config-router
ipv6 ospf 1 area 0Enable on an interface (classic)
ospfv3 1 ipv6 area 0Enable on an interface (address-family style)
Router ID32-bit dotted value. Set it by hand on IPv6-only routers.
Neighbor addressesLink-local fe80::
Multicastff02::5 all OSPF routers, ff02::6 DR and BDR
PriorityDefault 1, 0 to 255, 0 means never DR
New LSAsType 8 Link, Type 9 Intra-Area-Prefix
AD110, 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.

Master this on a real network

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.

Claim my free session →

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.