Octet

How do you configure a static IPv6 route to a link-local next hop, and why do you need the interface?

Show the answer

Say this first

ipv6 route 2001:db8:acad:20::/64 GigabitEthernet0/0/1 fe80::2. You must give the exit interface because every link has the fe80::/10 prefix, so fe80::2 alone does not say which link it is on. IOS rejects a link-local next hop without an interface. Link-local next hops are a good habit: they survive renumbering of the global prefix and match what routing protocols do.

Go deeper

The three forms

Cisco IOS
! fully specified, link-local next hop
ipv6 route 2001:db8:acad:20::/64 GigabitEthernet0/0/1 fe80::2
! recursive, global next hop
ipv6 route 2001:db8:acad:20::/64 2001:db8:acad:ff::2
! interface only
ipv6 route 2001:db8:acad:20::/64 GigabitEthernet0/0/1

The interface-only trap

On Ethernet, an interface-only route makes the router treat every destination as on-link and send a Neighbor Solicitation for each one. The next router does not answer for addresses that are not its own, so the route fails. IPv4 often hides this mistake with proxy ARP; IPv6 does not. Use interface-only routes only on point-to-point interfaces like tunnels.

Floating static

Cisco IOS
ipv6 route ::/0 GigabitEthernet0/0/1 fe80::2
ipv6 route ::/0 GigabitEthernet0/0/2 fe80::3 200

The second route has administrative distance 200 and only installs when the first goes away.

Make next hops readable

Set link-local addresses by hand on router links (ipv6 address fe80::1 link-local, fe80::2 on the other end) so routes and neighbor tables are easy to read and do not change when a line card is swapped.

Other platforms

Junos
set routing-options rib inet6.0 static route 2001:db8:acad:20::/64 qualified-next-hop fe80::2 interface ge-0/0/1.0
Shell
ip -6 route add 2001:db8:acad:20::/64 via fe80::2 dev eth1

Traps

  • Leaving out the interface with a link-local next hop.
  • Using interface-only static routes on Ethernet and expecting proxy ARP behaviour.
How did you do?Book 4.2 IP Version 6