Mental model
IPv6 routing works like IPv4 routing. Same decision process (longest prefix match → administrative distance → metric, see Routing Decision Process). Same routing protocols (OSPF, EIGRP, BGP — each has an IPv6 variant). Same forwarding behavior at L3.
Three things to know that differ from IPv4:
- Routing protocols use link-local addresses for peering, not the global ones you configured.
ipv6 unicast-routingmust be enabled globally to forward IPv6.- The default route is
::/0(not0.0.0.0/0).
Everything else is just longer hex addresses.
Enable IPv6 routing
Step zero on every IPv6-routing router:
R1(config)# ipv6 unicast-routing
Without this, the router accepts IPv6 addresses on interfaces but doesn’t actually route IPv6 between them. Easy to forget.
IPv6 static routing
Syntax mirrors IPv4 — different commands, same shape.
! Specific subnet via next-hop
R1(config)# ipv6 route 2001:db8:2::/64 2001:db8:12::2
! Same, with explicit exit interface (point-to-point recommended)
R1(config)# ipv6 route 2001:db8:2::/64 GigabitEthernet0/1
! Default route
R1(config)# ipv6 route ::/0 2001:db8:99::1
! Floating static — higher AD makes it a backup
R1(config)# ipv6 route 2001:db8:2::/64 2001:db8:99::2 200
Verify
R1# show ipv6 route
R1# show ipv6 route static
R1# show ipv6 route 2001:db8:2::1
show ipv6 route 2001:db8:2::1 (with a specific destination) returns the exact route the router would use — same as show ip route X for IPv4.
OSPFv3 — OSPF for IPv6
OSPFv3 is OSPF rewritten for IPv6. Same algorithm (link-state, Dijkstra/SPF), same area concept, same LSA-based propagation. Differences worth knowing:
| OSPFv2 (IPv4) | OSPFv3 (IPv6) | |
|---|---|---|
| Network statement | network X.X.X.X 0.0.0.X area N | ipv6 ospf N area M on the interface |
| Neighbor adjacency | Uses configured IPv4 | Uses link-local (fe80::) |
| Router ID | 32-bit (looks like IPv4) | 32-bit (still looks like IPv4 — even though there’s no IPv4 in OSPFv3) |
| Authentication | MD5, SHA-256 | Uses IPsec |
| LSA types | Same as OSPFv2 conceptually | Renamed (Type 8 Link LSA, Type 9 Intra-Area Prefix LSA) |
Minimal OSPFv3 config
! Enable IPv6 routing globally
R1(config)# ipv6 unicast-routing
! Configure router ID — required in OSPFv3 even if no IPv4 exists
R1(config)# ipv6 router ospf 1
R1(config-rtr)# router-id 1.1.1.1
! Enable OSPFv3 per-interface
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:db8:12::1/64
R1(config-if)# ipv6 ospf 1 area 0
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ipv6 address 2001:db8:13::1/64
R1(config-if)# ipv6 ospf 1 area 0
The big difference: no network statement under the OSPF process. Per-interface enablement only. Cleaner.
Verify OSPFv3
R1# show ipv6 ospf neighbor
R1# show ipv6 ospf interface brief
R1# show ipv6 route ospf
R1# show ipv6 protocols
show ipv6 ospf neighbor confirms the peering. Neighbor addresses shown will be link-local (fe80::…) — not the global addresses you configured. This is expected.
Default route ::/0
The IPv4 default route is 0.0.0.0/0. The IPv6 equivalent:
R1(config)# ipv6 route ::/0 2001:db8:99::1
When OSPFv3 has a default to share:
R1(config)# ipv6 router ospf 1
R1(config-rtr)# default-information originate
(Same command as OSPFv2.)
Dual-stack — running IPv4 and IPv6 together
Most production networks run both IPv4 and IPv6 simultaneously. Each protocol runs independently — separate routing tables, separate routing protocols, separate ACLs.
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# ipv6 address 2001:db8:1::1/64
Both protocols active on the same interface. Hosts decide per-application (or per-connection) which one to use. IPv6 is generally preferred when available (Happy Eyeballs algorithm in modern OSes).
Common mistakes
-
Forgetting
ipv6 unicast-routing. Configured IPv6 addresses look fine but the router won’t route between them. The most common day-1 IPv6 mistake. -
Wondering why OSPFv3 neighbors show fe80:: addresses. That’s correct — OSPFv3 peers via link-local. Not a bug.
-
Trying to use
network ::/0 area 0-style statements. OSPFv3 enables per-interface. Different config style from OSPFv2. -
Not hard-coding router ID. OSPFv3 picks the router ID from an interface IP if you don’t set one — and if there’s no IPv4 anywhere, it refuses to start. Always
router-id X.X.X.X. -
Mixing OSPFv2 and OSPFv3 expectations. They’re separate processes, separate configs, separate tables. Don’t expect
show ip ospfto show OSPFv3 info. Useshow ipv6 ospf. -
Forgetting separate ACLs for IPv6. ACLs are protocol-specific. An IPv4 ACL doesn’t affect IPv6 traffic. Configure both:
ip access-list ...andipv6 access-list ....
Lab to try tonight
- Three routers in a triangle. Each with one loopback (1::1, 2::2, 3::3) and /64 links between them.
- Enable
ipv6 unicast-routingon all three. - Configure OSPFv3 area 0 on all routers, per-interface.
- Set router IDs to 1.1.1.1, 2.2.2.2, 3.3.3.3.
- Verify neighbor relationships form:
show ipv6 ospf neighbor. Note the fe80:: addresses. - Verify routes:
show ipv6 route ospf. Should see loopbacks of other routers. - Break a link. Watch OSPFv3 re-converge.
- Bonus: add a static IPv6 route on one router as a backup with higher AD. Test failover.
Cheat strip
| Concept | Plain English |
|---|---|
ipv6 unicast-routing | Required globally to forward IPv6 |
::/0 | IPv6 default route |
ipv6 route X via Y | Static IPv6 route |
| OSPFv3 | OSPF for IPv6. Per-interface enablement. |
| Link-local peering | OSPFv3 neighbors are at fe80:: addresses |
| Router ID | Hardcode it. Looks like IPv4 (32-bit). |
| Dual stack | IPv4 and IPv6 side-by-side, independent |
| Separate ACLs | ip access-list vs ipv6 access-list — different things |