TTR Networks

Intermediate · OSPF on VyOS: costs and OSPFv3 · section 3 of 5

OSPFv3 for IPv6

✓ Lab-tested 17 October 2026 on VyOS 2026.10.16-0024-rolling

OSPFv2 only carries IPv4. For IPv6 you run OSPFv3 alongside it, as a separate process with its own neighbors and database. VyOS's set protocols ospfv3 tree mirrors the v2 one almost exactly.

The surprising part is what it doesn't need: global IPv6 addresses on the links. OSPFv3 runs over link-local addresses, which every IPv6 interface has automatically. So the only IPv6 addresses added here are one /128 per loopback (2001:db8:100::1–3). The links have no global IPv6 at all.

  • Neighbors form over link-local addresses, using the same router IDs as OSPFv2 (OSPFv3 router IDs are still 32-bit numbers).
  • Routes to the other loopbacks have link-local next hops (via fe80::…), the same as you've seen with Router Advertisements and BGP over IPv6.
  • Loopback-to-loopback IPv6 works, with no addressing on the links at all.

The database is organised differently from v2. Router LSAs (Rtr) now describe only topology (who connects to whom), with no addresses in them. Prefixes travel separately in intra-area-prefix LSAs (INP), and each interface has its own link LSA (Lnk) announcing its link-local address. That split is why OSPFv3 can carry prefixes without a global address on every link.

If you add an IPv6 input firewall, accept OSPF there as well. OSPFv3 uses the same protocol number (89), and a filter that drops it takes the IPv6 IGP down exactly as the Edge and core lesson showed for IPv4.

core1: an IPv6 loopback and OSPFv3
set interfaces loopback lo address '2001:db8:100::1/128'
set protocols ospfv3 parameters router-id '198.51.100.241'
set protocols ospfv3 interface lo area '0'
set protocols ospfv3 interface lo passive
set protocols ospfv3 interface eth0 area '0'
set protocols ospfv3 interface eth0 network 'point-to-point'
set protocols ospfv3 interface eth1 area '0'
set protocols ospfv3 interface eth1 network 'point-to-point'
  • Line 1: The only global IPv6 address on the router.
  • Line 2: Same router ID as OSPFv2.
  • Lines 3–8: The same shape as the v2 config.
Neighbors, routes and a ping (real output)
vyos@core1:~$ show ipv6 ospfv3 neighbor
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
198.51.100.242    1    00:00:36     Full/PointToPoint    00:00:33 eth0[PointToPoint]
198.51.100.243    1    00:00:30     Full/PointToPoint    00:00:09 eth1[PointToPoint]
vyos@core1:~$ show ipv6 route ospfv3
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv6 unicast VRF default:
O>* 2001:db8:100::2/128 [110/1] via fe80::5054:ff:fe01:101, eth0, weight 1, 00:00:29
O>* 2001:db8:100::3/128 [110/1] via fe80::5054:ff:fe02:101, eth1, weight 1, 00:00:05
vyos@core1:~$ ping 2001:db8:100::2 source-address 2001:db8:100::1 count 2
PING 2001:db8:100::2(2001:db8:100::2) from 2001:db8:100::1 : 56 data bytes
64 bytes from 2001:db8:100::2: icmp_seq=1 ttl=64 time=4.01 ms
64 bytes from 2001:db8:100::2: icmp_seq=2 ttl=64 time=3.50 ms

--- 2001:db8:100::2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 3.503/3.755/4.007/0.252 ms
  • Lines 3–4: Full over link-local addresses.
  • Lines 14–15: Loopbacks learnt with link-local next hops.
  • Lines 16–19: Loopback to loopback over IPv6.
The OSPFv3 database (real output)
vyos@core1:~$ show ipv6 ospfv3 database

        Area Scoped Link State Database (Area 0)

Type LSId           AdvRouter       Age   SeqNum                        Payload
Rtr  0.0.0.0        198.51.100.241   20 80000003         198.51.100.242/0.0.0.3
Rtr  0.0.0.0        198.51.100.241   20 80000003         198.51.100.243/0.0.0.3
Rtr  0.0.0.0        198.51.100.242   21 80000003         198.51.100.241/0.0.0.2
Rtr  0.0.0.0        198.51.100.242   21 80000003         198.51.100.243/0.0.0.4
Rtr  0.0.0.0        198.51.100.243   21 80000002         198.51.100.241/0.0.0.3
Rtr  0.0.0.0        198.51.100.243   21 80000002         198.51.100.242/0.0.0.4
INP  0.0.0.0        198.51.100.241   20 80000003            2001:db8:100::1/128
INP  0.0.0.0        198.51.100.242   21 80000003            2001:db8:100::2/128
INP  0.0.0.0        198.51.100.243   21 80000002            2001:db8:100::3/128

        I/F Scoped Link State Database (I/F eth0 in Area 0)

Type LSId           AdvRouter       Age   SeqNum                        Payload
Lnk  0.0.0.2        198.51.100.241   77 80000001           fe80::5054:ff:fe03:1
Lnk  0.0.0.3        198.51.100.242   55 80000001         fe80::5054:ff:fe01:101

        I/F Scoped Link State Database (I/F eth1 in Area 0)

Type LSId           AdvRouter       Age   SeqNum                        Payload
Lnk  0.0.0.3        198.51.100.241   77 80000001         fe80::5054:ff:fe03:101
Lnk  0.0.0.3        198.51.100.243   31 80000001         fe80::5054:ff:fe02:101

        I/F Scoped Link State Database (I/F lo in Area 0)

Type LSId           AdvRouter       Age   SeqNum                        Payload
Lnk  0.0.0.1        198.51.100.241   77 80000001            fe80::200:ff:fe00:0

        AS Scoped Link State Database

Type LSId           AdvRouter       Age   SeqNum                        Payload
  • Lines 6–11: Router LSAs: topology only (which router connects to which), no addresses.
  • Lines 12–14: Intra-area-prefix LSAs carry the loopback prefixes.
  • Lines 19–20: Link LSAs: each router's link-local address on this link.

Check your understanding

Why don't the links between the routers need global IPv6 addresses for OSPFv3?

  • OSPFv3 forms adjacencies and next hops over link-local addresses
  • OSPFv3 uses the IPv4 addresses
  • They do; the lab cheated
  • Because the links are point-to-point