OSPFv3
Explain how OSPFv3 differs from OSPFv2: per-link operation, link-local adjacencies and the new LSA types. Configure a two-area OSPFv3 network with summarisation on FRR, VyOS or MikroTik RouterOS. Protect OSPFv3 with the Authentication Trailer (RFC 7166) and explain the IPsec alternative. Read the OSPFv3 database and troubleshoot adjacencies.
Take the quiz · pass mark 70% · 9 questions
Explanation
OSPFv3 (RFC 5340) is OSPF for IPv6. The link-state machinery is the same as OSPFv2: Hellos, adjacencies, a link-state database (LSDB) flooded within an area, and SPF. What changed is how addresses are carried.
What is different from OSPFv2
- OSPFv3 runs per link, not per subnet. Two routers on the same link become neighbours even if they have no global prefix in common. Several prefixes can exist on one link.
- Adjacencies use link-local addresses. Packets are sent from the link-local address, and the next hops in the routing table are link-local addresses with an interface.
- Multicast groups:
ff02::5(AllSPFRouters) andff02::6(AllDRouters), IPv6 next header 89. - The Router ID is still a 32-bit number, written like an IPv4 address. A router with no IPv4 address cannot pick one automatically, so set it by hand on every router (for example
192.0.2.11). Duplicate Router IDs cause strange flapping, so plan them. - Addresses are removed from router and network LSAs. They now describe only topology. Prefixes move into new LSAs, so a new prefix does not trigger a full SPF.
- The header has an Instance ID, so several OSPFv3 instances can share a link. RFC 5838 uses Instance ID ranges for address families: 0–31 IPv6 unicast, 32–63 IPv6 multicast, 64–95 IPv4 unicast, 96–127 IPv4 multicast. That lets OSPFv3 carry IPv4 routes too. Support varies: FRR's
ospf6dcarries IPv6 only, so check your platform before planning a single-protocol design. - Authentication was removed from the protocol header. See below.
LSA types
| LS type | Name | Flooding scope and purpose |
|---|---|---|
| 0x2001 | Router-LSA | Area: the router's links (no prefixes) |
| 0x2002 | Network-LSA | Area: made by the DR for a multi-access link |
| 0x2003 | Inter-Area-Prefix-LSA | Area: prefixes from other areas, made by the ABR (like a type 3 summary) |
| 0x2004 | Inter-Area-Router-LSA | Area: how to reach an ASBR in another area |
| 0x4005 | AS-External-LSA | Whole AS: redistributed routes |
| 0x2007 | NSSA-LSA | NSSA area: external routes inside an NSSA |
| 0x0008 | Link-LSA | Link-local: the router's link-local address and the prefixes on that link |
| 0x2009 | Intra-Area-Prefix-LSA | Area: the prefixes attached to a router or a transit network |
The first hex digit of the LS type encodes the flooding scope (0 = link, 2 = area, 4 = AS).
Configuration
FRR (ospf6d). On recent FRR versions the area is set on the interface:
interface eth1
ipv6 ospf6 area 0.0.0.0
ipv6 ospf6 network point-to-point
ipv6 ospf6 cost 10
!
interface lo
ipv6 ospf6 area 0.0.0.0
ipv6 ospf6 passive
!
router ospf6
ospf6 router-id 192.0.2.11
auto-cost reference-bandwidth 100000
area 0.0.0.1 range 3fff:a00:1000::/45
Older FRR releases used interface eth1 area 0.0.0.0 under router ospf6; check show running-config on your version.
VyOS 1.4/1.5:
set protocols ospfv3 parameters router-id 192.0.2.11
set protocols ospfv3 interface eth1 area 0.0.0.0
set protocols ospfv3 interface eth1 network point-to-point
set protocols ospfv3 area 0.0.0.1 range 3fff:a00:1000::/45
MikroTik RouterOS v7 uses one OSPF implementation for both versions: /routing ospf instance add name=v3 version=3 router-id=192.0.2.11, then /routing ospf area add instance=v3 name=backbone area-id=0.0.0.0 and /routing ospf interface-template add area=backbone interfaces=ether2 type=ptp. Parameter names have changed between v7 releases, so check the manual for your version.
Cost and the reference bandwidth
Interface cost is reference bandwidth ÷ interface bandwidth, never below 1. FRR's default reference is 100 Mbit/s, so every link of 100 Mbit/s or faster gets cost 1: 1G and 100G links look the same. Set auto-cost reference-bandwidth 100000 (Mbit/s, so 100 Gbit/s) consistently on all routers, or set costs by hand. Virtual interfaces (veth, virtio) often report no speed or an arbitrary one, so in labs set ipv6 ospf6 cost explicitly.
Areas and summarisation
An ABR advertises each intra-area prefix of a non-backbone area into area 0 as an Inter-Area-Prefix-LSA. area 0.0.0.1 range PREFIX replaces all the prefixes inside the range with one summary, which hides flaps inside the area from the backbone. The ABR needs a discard route for the range (L4.01). Some implementations install one automatically; check show ipv6 route on the ABR and add a static discard route if yours does not. range ... not-advertise hides the prefixes completely.
NSSA areas (area X nssa) accept externals as NSSA-LSAs, which the ABR translates. Stub area support differs between implementations; check before you design with it.
Authentication
OSPFv3 originally relied on IPsec for authentication (RFC 4552: AH or ESP with manual keys, because the multicast neighbours cannot negotiate with IKE). That works but is hard to operate and depends on the platform.
RFC 7166 added the Authentication Trailer: an HMAC-SHA digest (with a key ID and a 64-bit sequence number for replay protection) appended after the OSPFv3 packet. The AT bit in the Hello and DD options tells neighbours it is in use. FRR:
interface eth1
ipv6 ospf6 authentication key-id 1 hash-algo hmac-sha-256 key ictN-lab-key
FRR builds without OpenSSL support only MD5 and HMAC-SHA-256 here. MD5 is not one of the RFC 7166 algorithms, so use hmac-sha-256 for interoperability. Both ends need the same key ID, algorithm and key, or the adjacency never forms.
ictNetworks scenario
ictNetworks runs OSPFv3 as its IGP inside AS65550. Area 0 contains the core and border routers. The Johannesburg hosting PoP is area 1, and its routers originate the Proxmox cluster /48s (3fff:a00:1001::/48 to 3fff:a00:1006::/48). The ABRs summarise them as one range, and only loopbacks and links are in OSPF. Customer routes are carried in BGP (L4.04), which keeps the IGP small.
Drawing diagram…
Worked examples
Example 1: The summary range
The six cluster prefixes 3fff:a00:1001::/48 to 3fff:a00:1006::/48 differ only in the last three bits of the third group (0001 to 0110). The smallest covering prefix is 3fff:a00:1000::/45, which covers 1000 to 1007. Clusters 1000 and 1007 are unused but inside the range, so the ABR's discard route matters.
Example 2: Costs
With auto-cost reference-bandwidth 100000 a 10 Gbit/s link costs 100000 ÷ 10000 = 10 and a 1 Gbit/s link costs 100. A path over 10G, 1G and 10G costs 10 + 100 + 10 = 120. With FRR's default reference of 100 Mbit/s all three links cost 1 and the path costs 3, the same as three 100 Mbit/s links.
Example 3: Address families
An OSPFv3 router carrying IPv4 unicast per RFC 5838 uses an Instance ID from 64 to 95, normally 64 for the first instance. IPv6 unicast uses 0 to 31, normally 0.
Lab
Goal: Build a two-area OSPFv3 network with summarisation and authentication, and read the database.
You need: containerlab with five FRR nodes as in the diagram (br1, cr1, cr2, pop1, pop2), or VyOS/MikroTik CHR VMs on Proxmox. Use the lab blocks: loopbacks 2001:db8:1000::n/128, links 2001:db8:1000:1LLL::/64 with /127s, and PoP "cluster" prefixes 2001:db8:1011::/48 to 2001:db8:1016::/48 on dummy interfaces.
- Configure Router IDs by hand, point-to-point link types and explicit costs. Bring up area 0 and show the neighbours (
show ipv6 ospf6 neighbor). Show that the neighbour addresses and the route next hops are link-local. - Add area 1 with
pop1andpop2and their cluster prefixes. Onbr1show the six /48s as inter-area routes. Show the LSDB withshow ipv6 ospf6 databaseand identify each LSA type in the table above, including the Link-LSA and Intra-Area-Prefix-LSA. - Compute the smallest range covering the six cluster prefixes and configure it with
area 0.0.0.1 rangeon both ABRs. Show the single summary onbr1, and check whether each ABR installed a discard route (add one if not). Shut a cluster interface and show that the backbone LSDB does not change. - Capture a Hello on a core link and identify the source (link-local), destination
ff02::5, Router ID, Area ID and Instance ID. - Enable the Authentication Trailer with HMAC-SHA-256 on one link at one end only and show the adjacency drop. Configure the other end and show it recover, with
Authentication header presentin the neighbour detail.
What to submit: configurations, neighbour and route tables, the annotated LSDB, the capture, and the authentication test.
Summary
- OSPFv3 runs per link, forms adjacencies on link-local addresses and uses ff02::5 and ff02::6.
- The Router ID is 32 bits and must be set by hand on IPv6-only routers.
- Router and network LSAs describe topology only; Link-LSAs and Intra-Area-Prefix-LSAs carry prefixes.
- RFC 5838 address families use Instance ID ranges; IPv4 unicast starts at 64. Not all implementations support them.
- Set a consistent reference bandwidth; FRR's default of 100 Mbit/s flattens all fast links to cost 1.
- Summarise areas with
range, and use the RFC 7166 Authentication Trailer (HMAC-SHA) or RFC 4552 IPsec. - Next lesson (L4.03): IS-IS for IPv6.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.