Back to blog

English  ·  Ελληνικά

IPv6 in Depth  ·  Part 4 · November 2026

IPv6 in Depth
OSPFv3, /127 Links and BGP

Routing v6 looks like routing v4 with longer numbers, right up until a router-ID won't come up, a prefix change triggers no SPF, or your BGP session goes Established and the ISP drops every prefix you send. This is the part that's actually different, configured on RouterOS 7 and IOS-XE side by side.

IPv6 OSPFv3 BGP RFC 6164 Multihoming RouterOS Cisco IOS

Most of what you know about OSPF and BGP carries over. The differences cluster in three places. OSPFv3 separates topology from addressing. Point-to-point links get their own addressing rules. And IPv6 multihoming has an aggregation problem that IPv4 papered over with NAT. Each of them produces a classic “it's configured, why isn't it working” afternoon.

Before this

01

What OSPFv3 Actually Changed

Same SPF, same areas, same adjacency states. The LSAs were rebuilt so that topology and prefixes travel separately.

OSPFv2 (IPv4) Router LSA (type 1) links + neighbors (topology) + the IPv4 prefixes on each link change a prefix → new Router LSA → full SPF OSPFv3 (IPv6) Router LSA (0x2001) · Network LSA (0x2002) topology only, no addresses at all Link LSA (0x0008) link-local next hop + prefixes, one link only Intra-Area-Prefix (0x2009) prefixes for the area change a prefix → only 0x2009 refloods → no full SPF Runs over IPv6 itself: protocol 89, sourced from link-local, to ff02::5 / ff02::6

The practical consequences:

RouterOS 7 — OSPFv3 on a point-to-point uplink
/routing ospf instance add name=v3 version=3 router-id=10.255.0.1 \
    redistribute=connected
/routing ospf area add name=bb-v3 area-id=0.0.0.0 instance=v3
/routing ospf interface-template add area=bb-v3 interfaces=ether2 type=ptp
/routing ospf interface-template add area=bb-v3 interfaces=loopback passive
# "loopback" = an empty bridge carrying the router's /128
/routing ospf neighbor print        # state=Full, address=fe80::...
/routing ospf lsa print where instance=v3
IOS-XE — OSPFv3 in address-family mode
R2(config)# router ospfv3 1
R2(config-router)# router-id 10.255.0.2
R2(config-router)# address-family ipv6 unicast
R2(config-router-af)# passive-interface Loopback0
R2(config-router-af)# exit-address-family
R2(config)# interface GigabitEthernet0/0/0
R2(config-if)# ospfv3 1 ipv6 area 0
R2(config-if)# ospfv3 network point-to-point
R2# show ospfv3 neighbor
R2# show ospfv3 database link     # type 8: each neighbor's link-local + prefixes
R2# show ospfv3 database prefix   # type 9: what the area routes to

The same router ospfv3 process can also carry IPv4 (address-family ipv4 unicast, RFC 5838). Each address family uses its own instance-ID range on the wire: 0–31 for IPv6 unicast, 64–95 for IPv4 unicast. Two routers with the same area and a mismatched instance ID won't form an adjacency, and nothing in the logs says why. Check the instance ID first when mixing AF-mode and legacy OSPFv3 configs.

02

Point-to-Point Links: /127, Not /64

“Every subnet is a /64” is right for LANs and wrong for router-to-router links. RFC 6164 explains why.

A /64 on a link with exactly two routers leaves 264 addresses that don't exist. When a packet arrives for one of them, the router runs neighbor resolution and holds an incomplete neighbor entry while it waits. Enough of those, from a misbehaving host or deliberate traffic, can fill the neighbor cache and crowd out real entries. On a LAN you limit that with cache caps. On a p2p link you remove it by using a prefix with no empty addresses:

Address plan: reserve a /64 per link, configure the /127
reserved   2001:db8:acad:ff01::/64     # keeps the plan nibble-aligned and leaves room to change
configured 2001:db8:acad:ff01::a/127   # R1
           2001:db8:acad:ff01::b/127   # R2  (a and b differ only in the last bit)

# RouterOS 7
/ipv6 address add interface=ether2 address=2001:db8:acad:ff01::a/127 advertise=no
# IOS-XE
R2(config-if)# ipv6 address 2001:db8:acad:ff01::b/127

Note advertise=no on RouterOS: SLAAC needs a /64, so RAs on a /127 make no sense, and you don't want a router link announcing itself as a default gateway.

💡 Cap the Neighbor Cache on LANs Too

LANs have to stay /64, so the defence there is a ceiling. RouterOS: /ipv6 settings set max-neighbor-entries=8192 (size it to the segment). IOS: ipv6 nd cache interface-limit 2000 per interface. Pair it with the inbound default-deny from Part 3: unsolicited traffic from the internet to random addresses inside your /64s is dropped before the router ever starts neighbor resolution for it.

The other option: link-local only (RFC 7404)

OSPFv3 and BGP can both run on links that have no global address at all, because the adjacency and the next hop are already link-local. You save address space and the links can't be targeted from outside. You pay in troubleshooting: you can't ping an interface from a remote network, and traceroute hops show whatever global address the router picks to source the ICMP error, usually a loopback. For a small network with a handful of links, /127 is easier to operate. Link-local only pays off in large fabrics.

03

Static Routes Use Link-Local Too

A link-local next hop is only meaningful together with its interface, so the interface is part of the route.

Default route to the ISP via its link-local address
# RouterOS 7 — %interface scopes the link-local address
/ipv6 route add dst-address=::/0 gateway=fe80::1%pppoe-out1

# IOS-XE — interface + link-local; a global next hop alone also works
R1(config)# ipv6 route ::/0 GigabitEthernet0/0/0 FE80::1

Every interface has an fe80::/64, so fe80::1 on its own is ambiguous. Without the interface the route either fails to install or resolves on the wrong link. The upside is that the route survives any renumbering of the global prefixes.

04

Multihoming and BGP: the Aggregation Problem

With IPv4 you NATed behind two ISPs and moved on. With IPv6 you have to decide where your addresses come from.

ApproachHow it worksCatch
PI /48 + BGPYour own provider-independent /48 from the RIR (RIPE NCC here), announced to both ISPsNeeds an AS number, an RIR membership or sponsoring LIR, and ISPs that take BGP from you. The real answer, if you qualify.
Two PA prefixes on the LANBoth ISPs delegate; the router advertises both in RAs; hosts get two addressesThe host picks the source address and the router picks the exit. Traffic sourced from ISP A's prefix and sent out via ISP B gets dropped by B's anti-spoofing filters. You need source-based routing on the router.
NPTv6 (RFC 6296)Hosts use one internal prefix; the router does a stateless 1:1 prefix swap per exitExperimental RFC, breaks protocols that carry addresses, and gives you no security. A workable compromise only when neither of the above fits.

The size rule is the one to remember: the global table generally accepts nothing longer than a /48 for IPv6. A /56 from your ISP isn't yours to announce elsewhere. A /48 PI is. Create a ROA for it before the first announcement, because upstreams that validate RPKI will drop an announcement with no matching ROA.

IOS-XE — announce a PI /48, take only a default
ipv6 route 2001:db8:5000::/48 Null0           ! anchor so the network statement matches
ipv6 prefix-list V6-OUT seq 5 permit 2001:db8:5000::/48
ipv6 prefix-list V6-IN  seq 5 permit ::/0
!
router bgp 65010
 bgp router-id 10.255.0.2
 no bgp default ipv4-unicast
 neighbor 2001:db8:b::1 remote-as 64501
 address-family ipv6 unicast
  network 2001:db8:5000::/48
  neighbor 2001:db8:b::1 activate
  neighbor 2001:db8:b::1 prefix-list V6-OUT out
  neighbor 2001:db8:b::1 prefix-list V6-IN in
 exit-address-family
RouterOS 7 — the same session
/ipv6 route add dst-address=2001:db8:5000::/48 blackhole
/ipv6 firewall address-list add list=bgp-out address=2001:db8:5000::/48
/routing filter rule add chain=isp-in rule="if (dst == ::/0) { accept } else { reject }"
/routing bgp connection add name=isp-b as=65010 router-id=10.255.0.1 \
    remote.address=2001:db8:b::1 remote.as=64501 local.role=ebgp \
    address-families=ipv6 output.network=bgp-out input.filter=isp-in
/routing bgp session print
⚠ Gotcha — IPv6 Routes Over an IPv4 Session

BGP can carry IPv6 prefixes over a session between IPv4 addresses (MP-BGP), and many people set it up that way to reuse an existing peering. The next hop then gets encoded as an IPv4-mapped address (::ffff:192.0.2.1), which isn't reachable in the v6 table. The session comes up and the prefixes arrive, but they're unusable or get filtered. Either peer over IPv6 addresses for the IPv6 family (cleanest) or set a v6 next hop with an outbound route-map. On IOS, also check no bgp default ipv4-unicast plus an explicit activate under each address family. Without them, IOS activates the neighbor for IPv4 by default, and the IPv6 family stays silent.

Takeaways

  1. OSPFv3 splits topology from prefixes. Router/Network LSAs carry no addresses. Link (type 8) and Intra-Area-Prefix (type 9) LSAs carry them, so prefix changes don't trigger a full SPF.
  2. Adjacencies form over link-local, per link. Subnet mismatches don't block them. Instance-ID mismatches do.
  3. Set the 32-bit router-ID explicitly. A v6-only router has no IPv4 address to borrow it from.
  4. /127 on router-to-router links (RFC 6164), carved from a reserved /64, with RAs off. Keep LANs at /64 and cap the neighbor cache.
  5. Link-local next hops need their interface: fe80::1%pppoe-out1 or Gi0/0/0 FE80::1.
  6. IPv6 multihoming means PI /48 + BGP, or source-aware routing across two PA prefixes. A delegated /56 can't be announced to a second ISP. Publish a ROA before you announce.
  7. Peer v6 over v6. v6 NLRI over a v4 session gets an IPv4-mapped next hop.

Planning dual-ISP or a routed IPv6 core?

I design and build IPv6 routing on MikroTik and Cisco: address plans that survive growth, OSPFv3 that interoperates across vendors, and BGP multihoming with the filters and RPKI to go with it.

Book a Discovery Call →