9.3 OSPFv3 for IPv4 and IPv6 Address Families

Key Takeaways

  • OSPFv3 (RFC 5340) runs directly over IPv6, fundamentally decoupling topology structure from addressing by transitioning from per-subnet to per-link processing.
  • OSPFv3 neighbors form adjacencies and compute next-hop forwarding exclusively using IPv6 Link-Local addresses (`fe80::/10`), requiring no global unicast addresses for control plane operation.
  • OSPFv3 protocol packets are transmitted over IPv6 link-local multicast groups `FF02::5` (AllSPF Routers) and `FF02::6` (AllDRouters), utilizing a 32-bit Router ID that must be explicitly assigned if no IPv4 address exists.
  • OSPFv3 re-architects LSA structures by removing prefix information from Type 1 (Router) and Type 2 (Network) LSAs, delegating prefix advertisement to Type 8 (Link LSA) and Type 9 (Intra-Area-Prefix LSA).
  • Address Family (AF) mode (RFC 5838) enables a single unified OSPFv3 process to independently route both IPv4 and IPv6 traffic via dedicated instance IDs and address family hierarchies.
Last updated: August 2026

9.3 OSPFv3 for IPv4 and IPv6 Address Families

OSPF version 3 (OSPFv3, defined in RFC 5340 with Address Family extensions in RFC 5838) redesignates OSPF to support IPv6 and multi-protocol network routing. While OSPFv3 retains the core link-state mechanics of OSPFv2—including the Dijkstra SPF algorithm, two-tier area hierarchy, packet types, and 8-state neighbor state machine—it introduces major architectural enhancements that decouple link topology from network addressing.

+-----------------------------------------------------------------------------------+
|                    ARCHITECTURAL COMPARISON: OSPFv2 VS. OSPFv3                    |
+-----------------------------------------------------------------------------------+
|  FEATURE                 | OSPFv2 (RFC 2328)           | OSPFv3 (RFC 5340 / 5838) |
|  ------------------------+-----------------------------+------------------------- |
|  Routed Protocols        | IPv4 Only                   | IPv6 & IPv4 (via AF)     |
|  Processing Model        | Per-Subnet                  | Per-Link                 |
|  Neighbor Adjacency IP   | IPv4 Interface Subnet IP    | IPv6 Link-Local (fe80::) |
|  Next-Hop in RIB         | IPv4 Interface IP           | IPv6 Link-Local Address  |
|  Multicast Addresses     | 224.0.0.5 / 224.0.0.6       | FF02::5 / FF02::6        |
|  Router ID Format        | 32-bit dotted-decimal       | 32-bit dotted-decimal    |
|  Topology / Prefix LSAs  | Combined in Type 1 & 2 LSAs | Separated (Types 8 & 9)  |
|  Security/Authentication | Fields in OSPF Header       | Native IPsec / Trailer   |
+-----------------------------------------------------------------------------------+

1. Key Protocol Differences Between OSPFv2 and OSPFv3

1. Per-Link vs. Per-Subnet Processing

  • OSPFv2 (Per-Subnet): Neighbors must be configured on the same IPv4 subnet mask to form an adjacency. The network topology is strictly tied to subnet configuration.
  • OSPFv3 (Per-Link): The term "subnet" is replaced with "link". Multiple IP subnets (both IPv4 and IPv6) can reside on the same physical link, and two routers can form an adjacency even if they do not share any common global unicast subnet prefixes.

2. Link-Local Addressing for Adjacencies and Next-Hops

  • OSPFv3 packets (Hellos, DBDs, LSRs, LSUs, LSAcks) are sourced exclusively from the interface's IPv6 Link-Local Address (fe80::/10).
  • When OSPFv3 installs routes into the routing table (RIB/FIB), the next-hop IP is always the neighbor's link-local address, accompanied by the outgoing interface identifier.
  • Routers can establish adjacencies and route traffic across links that have no Global Unicast Addresses (GUAs) configured.

3. Multicast Transport Addresses

OSPFv3 utilizes link-local IPv6 multicast scopes:

  • FF02::5 (AllSPF Routers): Replaces 224.0.0.5. Listened to by all OSPFv3 routers on the link.
  • FF02::6 (AllDRouters): Replaces 224.0.0.6. Listened to exclusively by the DR and BDR.
  • Mapped at Layer 2 to Ethernet multicast MAC addresses 33:33:00:00:00:05 and 33:33:00:00:00:06.

4. Router ID Configuration Requirements

  • OSPFv3 retains a 32-bit dotted-decimal integer (e.g., 1.1.1.1) for its Router ID.
  • Unlike OSPFv2, an IPv6-only router running OSPFv3 has no IPv4 interfaces to automatically derive an RID. If no IPv4 address exists on the router, OSPFv3 will fail to initialize until a Router ID is manually configured (router-id x.x.x.x).

5. Authentication Architecture

  • OSPFv2 included dedicated authentication fields in the OSPF common packet header.
  • OSPFv3 removed authentication fields from the protocol header, delegating cryptographic security to native IPv6 IPsec (Authentication Header [AH] / Encapsulating Security Payload [ESP]) or the standardized OSPFv3 Cryptographic Authentication Trailer (RFC 7166).
Loading diagram...
OSPFv3 Link-Local Adjacency and LSA Decoupling

2. Redesigned OSPFv3 LSA Types & Scoping Mechanics

In OSPFv2, Type 1 and Type 2 LSAs contained both topological information (neighbor connections) and prefix addressing. Consequently, whenever an IP address or subnet was added, modified, or flapped, every router in the area was forced to execute a full Dijkstra SPF calculation.

OSPFv3 fundamentally redesigns LSAs by stripping prefix information from Type 1 and Type 2 LSAs. They now carry only topological router IDs and interface links. Network prefixes are advertised separately in new Type 8 and Type 9 LSAs. As a result, subnet changes only trigger a lightweight Partial Route Calculation (PRC) rather than an expensive full SPF tree rebuild.

+-----------------------------------------------------------------------------------+
|                         OSPFv3 LSA SCOPING ENCODING                               |
+-----------------------------------------------------------------------------------+
|  16-bit LSA Type Field:  [ U | S2 | S1 | 13-bit LSA Function Code ]               |
|                                                                                   |
|  Flooding Scope Bits (S2 / S1):                                                   |
|  - 0 0 : Link-Local Scope (0x0000) -> Flooded only on the local link (e.g., LSA 8)|
|  - 0 1 : Area Scope       (0x2000) -> Flooded throughout the area (e.g., LSA 1,2,9)|
|  - 1 0 : AS Scope         (0x4000) -> Flooded domain-wide (e.g., LSA 5)           |
+-----------------------------------------------------------------------------------+

Comprehensive OSPFv3 LSA Type Catalog

  1. Type 1: Router LSA (0x2001, Area Scope):
    • Describes the router's topological connections and interface costs. Contains zero IPv6/IPv4 prefix information.
  2. Type 2: Network LSA (0x2002, Area Scope):
    • Generated by the DR on a transit link; lists adjacent Router IDs. Contains zero prefix information.
  3. Type 3: Inter-Area-Prefix LSA (0x2003, Area Scope):
    • Replaces OSPFv2 Type 3 Summary LSA; advertises inter-area IPv6/IPv4 prefixes originated from other areas.
  4. Type 4: Inter-Area-Router LSA (0x2004, Area Scope):
    • Replaces OSPFv2 Type 4 ASBR Summary LSA; advertises reachability to an ASBR in another area.
  5. Type 5: AS-External LSA (0x4005, AS Scope):
    • Redistributed external routes from foreign autonomous systems.
  6. Type 7: NSSA LSA (0x2007, Area Scope):
    • External routes originated within an NSSA.
  7. Type 8: Link LSA (0x0008, Link-Local Scope):
    • Generated by each router for each attached link and never flooded beyond that local link.
    • Advertises the router's IPv6 Link-Local address (fe80::) to direct neighbors and lists all IPv6 Global Unicast prefixes configured on that interface.
  8. Type 9: Intra-Area-Prefix LSA (0x2009, Area Scope):
    • Advertises IPv6/IPv4 prefixes associated with the router itself (stub links, loopbacks) or associated with a Type 2 transit network (referencing the DR's Network LSA).

OSPFv2 vs. OSPFv3 LSA Comparison Matrix

LSA PurposeOSPFv2 LSAOSPFv3 LSAOSPFv3 CodeFlooding Scope
Router TopologyType 1 Router LSAType 1 Router LSA0x2001Area Scope
Transit NetworkType 2 Network LSAType 2 Network LSA0x2002Area Scope
Inter-Area PrefixesType 3 Summary LSAType 3 Inter-Area-Prefix0x2003Area Scope
ASBR ReachabilityType 4 ASBR SummaryType 4 Inter-Area-Router0x2004Area Scope
External RoutesType 5 AS-ExternalType 5 AS-External0x4005AS Scope
NSSA ExternalType 7 NSSA ExternalType 7 NSSA LSA0x2007Area Scope
Link-Local / PrefixesNoneType 8 Link LSA0x0008Link-Local Scope
Intra-Area PrefixesEmbedded in Type 1/2Type 9 Intra-Area-Prefix0x2009Area Scope

3. OSPFv3 Address Families (RFC 5838)

Traditionally, running both IPv4 and IPv6 required managing two separate routing processes: OSPFv2 for IPv4 and classic OSPFv3 for IPv6. This doubled protocol overhead, memory footprint, and administrative configuration.

RFC 5838 extends OSPFv3 with Address Family (AF) support, enabling a single OSPFv3 routing process to concurrently route both IPv4 Unicast and IPv6 Unicast traffic.

+-----------------------------------------------------------------------------------+
|                     OSPFv3 UNIFIED ADDRESS FAMILY ARCHITECTURE                    |
+-----------------------------------------------------------------------------------+
|                                                                                   |
|                         +----------------------------+                            |
|                         |     OSPFv3 Process 100     |                            |
|                         |   (Router ID: 1.1.1.1)     |                            |
|                         +----------------------------+                            |
|                                  /          \                                     |
|                                 /            \                                    |
|        +---------------------------+      +---------------------------+           |
|        | address-family ipv4 uni   |      | address-family ipv6 uni   |           |
|        | - Instance ID: 64-95      |      | - Instance ID: 0-31       |           |
|        | - IPv4 Topology / LSDB    |      | - IPv6 Topology / LSDB    |           |
|        | - Routes IPv4 Prefixes    |      | - Routes IPv6 Prefixes    |           |
|        +---------------------------+      +---------------------------+           |
|                       \                         /                                 |
|                        v                       v                                  |
|                      [ Single Routed Physical Link / Interface ]                  |
|                      - Uses IPv6 Link-Local (fe80::) for Transport                |
+-----------------------------------------------------------------------------------+

Instance ID & Topology Separation

  • OSPFv3 includes an 8-bit Instance ID in the packet header to separate different logical routing topologies on the same physical link.
  • Standard Address Family assignments:
    • IPv6 Unicast: Instance IDs 0 through 31 (Default: 0)
    • IPv4 Unicast: Instance IDs 64 through 95 (Default: 64)
  • Even when routing IPv4 traffic, OSPFv3 AF mode continues to use IPv6 Link-Local addresses for transport and neighbor discovery across the shared interface.

4. Cisco IOS-XE Configuration: Classic vs. Address Family Mode

Cisco IOS-XE supports both legacy "Classic" OSPFv3 interface mode and the modern, recommended Address Family (AF) configuration mode.

1. Classic OSPFv3 Configuration (IPv6 Only)

! Enable IPv6 routing globally
Router(config)# ipv6 unicast-routing

! Configure the classic OSPFv3 process
Router(config)# ipv6 router ospf 10
Router(config-rtr)# router-id 1.1.1.1
Router(config-rtr)# auto-cost reference-bandwidth 100000

! Enable OSPFv3 directly on physical interfaces
Router(config)# interface GigabitEthernet0/0/1
Router(config-if)# ipv6 address 2001:db8:acad:1::1/64
Router(config-if)# ospfv3 10 ipv6 area 0

2. Unified OSPFv3 Address Family Mode (Dual-Stack IPv4 & IPv6)

! Enable unicast routing for both address families
Router(config)# ip routing
Router(config)# ipv6 unicast-routing

! Enter unified OSPFv3 router configuration mode
Router(config)# router ospfv3 100
Router(config-router)# router-id 1.1.1.1

! Configure IPv4 Unicast Address Family
Router(config-router)# address-family ipv4 unicast
Router(config-router-af)# auto-cost reference-bandwidth 100000
Router(config-router-af)# exit-address-family

! Configure IPv6 Unicast Address Family
Router(config-router)# address-family ipv6 unicast
Router(config-router-af)# auto-cost reference-bandwidth 100000
Router(config-router-af)# exit-address-family

! Enable both address families under the interface
Router(config)# interface GigabitEthernet0/0/1
Router(config-if)# ip address 10.1.1.1 255.255.255.0
Router(config-if)# ipv6 address 2001:db8:acad:1::1/64
Router(config-if)# ospfv3 100 ipv4 area 0
Router(config-if)# ospfv3 100 ipv6 area 0

3. Verification Commands & Output

! Verify OSPFv3 neighbors for IPv4 and IPv6 address families
Router# show ospfv3 neighbor

          OSPFv3 100 address-family ipv4 (router-id 1.1.1.1)
Neighbor ID     Pri   State           Dead Time   Interface         Instance ID
2.2.2.2           1   FULL/BDR        00:00:34    GigabitEthernet0/0/1 64

          OSPFv3 100 address-family ipv6 (router-id 1.1.1.1)
Neighbor ID     Pri   State           Dead Time   Interface         Instance ID
2.2.2.2           1   FULL/BDR        00:00:36    GigabitEthernet0/0/1 0

! Inspect Link LSA (Type 8) and Intra-Area-Prefix LSA (Type 9) in LSDB
Router# show ospfv3 ipv6 database

            OSPFv3 100 address-family ipv6 (router-id 1.1.1.1)

                Router Link States (Area 0)
ADV Router      Age         Seq#        Fragment ID  Link count Bits
1.1.1.1         324         0x80000002  0            1          None
2.2.2.2         340         0x80000002  0            1          None

                Intra Area Prefix Link States (Area 0)
ADV Router      Age         Seq#        Link ID    Ref-lstype Ref-LSID
1.1.1.1         324         0x80000001  1          0x2001     0

                Link (Type-8) Link States (Interface GigabitEthernet0/0/1)
ADV Router      Age         Seq#        Link ID    Interface
1.1.1.1         328         0x80000001  2          Gi0/0/1
2.2.2.2         342         0x80000001  2          Gi0/0/1
Test Your Knowledge

In OSPFv3, how did the protocol designers optimize Dijkstra SPF calculations when an engineer adds a new IPv6 prefix to an existing interface or when a subnet address flaps?

A
B
C
D
Test Your Knowledge

A network engineer deploys an isolated, IPv6-only data center fabric using Cisco IOS-XE switches running OSPFv3. The switches have no IPv4 addresses configured on any physical or logical interface. When the engineer enables OSPFv3 on the interfaces, neighbor adjacencies fail to form and the console outputs an OSPFv3 initialization error. What is the cause of this issue?

A
B
C
D
Test Your Knowledge

Which statement accurately describes the characteristics and flooding behavior of an OSPFv3 Link LSA (Type 8)?

A
B
C
D
Test Your Knowledge

An enterprise network implements OSPFv3 Address Family (AF) mode to route both IPv4 and IPv6 traffic under a single OSPFv3 process (Process ID 100). How does OSPFv3 maintain separate topologies and databases for IPv4 and IPv6 traffic over the same physical links?

A
B
C
D