How is OSPFv3 different from OSPFv2?
Show the answer
Say this first
Same SPF engine, areas, LSA flooding and neighbor states. The differences: OSPFv3 runs per link rather than
per subnet, uses link-local addresses for hellos and next hops, and sends to ff02::5 and ff02::6. The
router ID is still a 32-bit number and must be set by hand on a router with no IPv4 address. Authentication
is no longer in the protocol: it uses IPsec or the authentication trailer. Prefixes moved out of the router
and network LSAs into new Link and Intra-Area-Prefix LSAs. Address families let it carry IPv4 too.
Go deeper
Side by side
| OSPFv2 | OSPFv3 | |
|---|---|---|
| Carries | IPv4 | IPv6, and IPv4 with address families (RFC 5838) |
| Runs on | a subnet | a link; several instances per link with Instance ID |
| Neighbor source address | interface IPv4 | link-local |
| Multicast | 224.0.0.5, 224.0.0.6 | ff02::5, ff02::6 |
| Router ID | 32-bit, can be taken from an IPv4 address | 32-bit, set by hand if no IPv4 exists |
| Authentication | in the packet header | IPsec AH or ESP (RFC 4552), or authentication trailer (RFC 7166) |
| Prefixes carried in | router (1) and network (2) LSAs | Intra-Area-Prefix LSA |
| Must match on the link | subnet and mask, area, timers, auth | area, timers, Instance ID; no subnet check |
New LSAs
| LSA | Function code | Role |
|---|---|---|
| Router | 0x2001 | topology only |
| Network | 0x2002 | topology only |
| Inter-Area-Prefix | 0x2003 | replaces type 3 |
| Inter-Area-Router | 0x2004 | replaces type 4 |
| AS-External | 0x4005 | type 5 |
| NSSA | 0x2007 | type 7 |
| Link | 0x0008 | link-local scope: the router's link-local address and prefixes on the link |
| Intra-Area-Prefix | 0x2009 | prefixes of routers and transit links |
Separating topology from prefixes means a prefix change does not force a full SPF run.
Config on IOS-XE
ipv6 unicast-routing
!
router ospfv3 1
router-id 1.1.1.1
address-family ipv6 unicast
passive-interface GigabitEthernet0/0/0
exit-address-family
!
interface GigabitEthernet0/0/1
ospfv3 1 ipv6 area 0The older form ipv6 router ospf 1 with ipv6 ospf 1 area 0 on the interface still works.
They will ask next
Two routers on a link have different global prefixes. Will OSPFv3 form an adjacency?
Yes. OSPFv3 hellos carry no prefix or mask and neighbors talk over link-local addresses. That is a difference from OSPFv2, which refuses a subnet mismatch on broadcast links.
Why do OSPFv3 routes show FE80 next hops?
The next hop is the neighbor's link-local address, learned from its Link LSA and hellos. That is normal and stays stable if global prefixes change.
Traps
- Saying OSPFv3 router IDs are 128-bit.
- Forgetting to set a router ID on an IPv6-only router. The process will not start.