English · Ελληνικά
The fundamentals posts say “the router advertises a prefix and hosts configure themselves.” That sentence hides six packets, four flags, two lifetimes and a timer that decides whether your rollback takes ten seconds or a month. This is what actually happens on the wire, and where each piece bites in production.
In IPv4, address configuration (DHCP) and neighbor resolution (ARP) are separate protocols that you can mostly ignore once they work. In IPv6 both are folded into Neighbor Discovery: five ICMPv6 message types that also carry router discovery, prefix information, MTU, DNS and duplicate detection. The behaviour you get is set by fields most people never look at: the RA flags, the prefix lifetimes, the interface-ID scheme the host picked.
None of it is hard. It is just invisible until it breaks: Android phones with no address, a rollback that won't roll back, NDP that fails every few minutes on one switch. So we'll look at the packets.
01
NDP is just ICMPv6 types 133–137. Learn them by number, because that's how filters and captures name them.
| Type | Message | Typical src → dst | Job |
|---|---|---|---|
| 133 | Router Solicitation (RS) | fe80::host → ff02::2 | “Any routers here? Advertise now, don't make me wait.” |
| 134 | Router Advertisement (RA) | fe80::rtr → ff02::1 | Default router, prefixes, flags, MTU, DNS. The whole config in one packet. |
| 135 | Neighbor Solicitation (NS) | host → solicited-node group | ARP request equivalent, reachability probe, and DAD (sent from ::). |
| 136 | Neighbor Advertisement (NA) | target → asker (or ff02::1) | ARP reply equivalent. Flags: R (I'm a router), S (solicited), O (override cache). |
| 137 | Redirect | router → host | “Use that other router for this destination.” Often disabled. |
One field ties them together: every NDP message is sent with hop limit 255, and a receiver must drop any that arrives with less (RFC 4861). A router decrements the hop limit, so 255 on arrival proves the packet was never routed. That is NDP's only built-in defence: it keeps off-link attackers out, and does nothing about a device on the same link. That gap is why RA guard exists, and why it gets its own section in the firewall post.
02
From cable-in to a usable global address: six steps, all multicast, nearly all of them invisible in a normal capture filter.
A few details the diagram encodes, each of which matters later:
fe80::1, so that is the next hop. That's why renumbering the global prefix never breaks the gateway, and why a v6 routing table full of fe80:: next hops is normal.::. The host doesn't own an address yet, so it can't use one. Firewalls that drop source :: as "bogus" break DAD.ff02::1:ff plus the last 24 bits of the address. Link-local and global share the interface ID, so they share the group.ARP broadcasts every request to every host. NDP sends an NS to the target's solicited-node group instead, and that maps onto an Ethernet multicast MAC: 33:33 plus the low 32 bits of the IPv6 group.
address 2001:db8:acad:10:21a:2bff:fe3c:4d5e
last 24 bits 3c:4d5e
solicited-node ff02::1:ff3c:4d5e
Ethernet dst 33:33:ff:3c:4d:5e # NIC filters it in hardware;
# every other host's NIC drops itThe NIC filter is the first win. The second comes on switches with MLD snooping, which forward the group only to ports that joined it (step 1). That second win is also a trap. See the gotcha below.
03
Four bits and a lifetime tell every host whether to SLAAC, whether to ask DHCPv6, and whether this router is a gateway at all.
| Field | Where | Meaning |
|---|---|---|
| M (managed) | RA header | “Addresses are available from DHCPv6.” A hint, not a command. Clients decide. |
| O (other) | RA header | “DNS and other options are available from DHCPv6.” Stateless DHCPv6. |
| Router lifetime | RA header | Seconds this router is a valid default gateway. 0 = not a default router, but prefixes and options still apply. |
| Prf | RA header | Default-router preference high / medium / low (RFC 4191). Picks a primary between two routers. |
| A (autonomous) | per prefix (PIO) | Hosts may build a SLAAC address from this prefix. Only works when the prefix is a /64. |
| L (on-link) | per prefix (PIO) | Hosts in this prefix are reachable directly, without the router. |
| Valid / preferred | per prefix (PIO) | How long the address lives, and how long it's used for new connections. See section 04. |
Android has never implemented stateful DHCPv6 address assignment. On an M=1, A=0 network (“we want to control addresses with DHCPv6”), Windows and macOS get leases and every Android phone and tablet ends up with link-local only. That breaks IPv6 for half a guest network. It fails quietly, because happy-eyeballs pushes those devices back to IPv4. If the network has phones on it, keep A=1. Use DHCPv6 for options (O=1) or for the hosts you manage, never as the only way to get an address. The same rule makes RDNSS in the RA (RFC 8106) mandatory: it is the only DNS source that every client reads.
# SLAAC + DNS in the RA, no DHCPv6 needed (the default ND entry already does most of this) /ipv6 nd set [find interface=vlan10] managed-address-configuration=no \ other-configuration=no advertise-dns=yes ra-lifetime=30m # prefix lifetimes for every from-pool/advertised prefix /ipv6 nd prefix default set valid-lifetime=1d preferred-lifetime=4h /ipv6 nd print detail /ipv6 nd prefix print detail
R1(config)# interface Vlan10 R1(config-if)# ipv6 nd prefix 2001:db8:acad:10::/64 86400 14400 # valid, preferred (s) R1(config-if)# ipv6 nd ra lifetime 1800 R1(config-if)# ipv6 nd router-preference High R1(config-if)# ipv6 nd ra dns server 2001:db8:acad:10::1 # RDNSS; recent IOS-XE only R1(config-if)# no ipv6 nd managed-config-flag R1# show ipv6 interface Vlan10 | include ND
04
Every SLAAC address carries two clocks. Most rollback and renumbering pain comes from not knowing which one you're actually able to change.
Defaults are long: RouterOS advertises valid 4w2d / preferred 1w, and IOS 30 days / 7 days. Long lifetimes are harmless while the prefix never changes. They hurt in two situations:
Pick lifetimes before you need them. RFC 9096 recommends that CE routers advertise at most 2700 s preferred / 5400 s valid. With those, a stale prefix ages out in 90 minutes without anyone touching it, and an RA re-sent every few minutes keeps a live prefix fresh. For an emergency withdraw, send preferred lifetime 0 for the dead prefix (it is deprecated immediately, so new connections move to the new prefix). If the whole router should stop being a v6 gateway, send router lifetime 0. Hosts drop that default route immediately; the two-hour rule doesn't apply to it.
05
One interface, four or five IPv6 addresses, and the one in your firewall rule probably isn't the one in your logs.
| Interface-ID scheme | Built from | Consequence |
|---|---|---|
| Modified EUI-64 | MAC, with ff:fe in the middle and the U/L bit flipped | Same IID on every network: trackable, and it leaks the vendor. Mostly routers and older embedded devices now. |
| Stable-opaque (RFC 7217) | hash(prefix, interface, network ID, secret) | Stable on this network, different on every other one. Good for servers and for ACLs that name a host. |
| Temporary (RFC 8981) | random, rotated (Linux default ~1 day preferred, up to 7 days valid, never longer than the prefix's own lifetimes) | Preferred as source for outbound connections. That is the address in logs and in remote access lists. |
$ ip -6 addr show dev eth0
inet6 2001:db8:acad:10:9c4e:51a2:7d10:3b6f/64 scope global temporary dynamic
valid_lft 79811sec preferred_lft 13811sec # outbound connections use this
inet6 2001:db8:acad:10:4a1f:c2e9:b77:51d0/64 scope global dynamic mngtmpaddr
valid_lft 86321sec preferred_lft 14321sec # stable; DNS/ACLs should use this
inet6 fe80::8d3:61ff:a20e:1c47/64 scope link
valid_lft forever preferred_lft foreverThe operational rule follows from the table. A rule that permits “host X's IPv6 address” inbound should name the stable address. A rule about what host X does outbound can't name any address, because the temporary one changes every day. Where you need per-host identity on egress (a printer, a POS terminal, a server) either turn temporary addresses off on that host or give it a DHCPv6 reservation and filter on that. For the rest, filter per subnet: that is what /64-per-VLAN is for.
06
Three tools cover nearly every NDP question: ask for an RA, capture ND, and read the neighbor cache.
$ rdisc6 -m eth0
Soliciting ff02::2 (ff02::2) on eth0...
Hop limit : 64 ( 0x40)
Stateful address conf. : No
Stateful other conf. : No
Router preference : high
Router lifetime : 1800 (0x00000708) seconds
Prefix : 2001:db8:acad:10::/64
On-link : Yes
Autonomous address conf.: Yes
Valid time : 86400 (0x00015180) seconds
Pref. time : 14400 (0x00003840) seconds
Recursive DNS server : 2001:db8:acad:10::1
MTU : 1500 bytes (valid)
from fe80::1
# -m waits for every router. Two "from" blocks means two routers advertising: find out why first.$ sudo tcpdump -ni eth0 -vv 'icmp6 and ip6[40] >= 133 and ip6[40] <= 137'
# ip6[40] = first byte after the 40-byte IPv6 header = ICMPv6 type$ ip -6 neigh show dev eth0 # Linux: REACHABLE / STALE / DELAY / PROBE / FAILED [admin@edge] > /ipv6 neighbor print # RouterOS R1# show ipv6 neighbors # IOS (debug ipv6 nd for live events, carefully)
A switch with MLD snooping forwards each solicited-node group only to ports that joined it. Joins expire, and hosts only refresh them when a querier (usually the router) asks. Enable snooping on a VLAN with no querier and the table ages out after a few minutes. From then on, NS packets for some hosts are silently dropped. You get v6 reachability that works after a reboot and dies a few minutes later, for some hosts only, while ping to the router stays fine. The fix: make sure every VLAN with snooping has a querier (on RouterOS, multicast-querier=yes on the bridge; on IOS, ipv6 mld snooping querier), or turn MLD snooping off on that VLAN.
Takeaways
That pattern almost always comes from the RA flags, the lifetimes or multicast handling on the switches. I trace it from packet captures and fix it at the source, on MikroTik and Cisco.
Book a Discovery Call →