Back to blog

English  ·  Ελληνικά

IPv6 in Depth  ·  Part 1 · November 2026

IPv6 in Depth
NDP and SLAAC Under the Hood

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.

IPv6 NDP SLAAC ICMPv6 DAD RouterOS Cisco IOS

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.

Before this

01

Five Messages Do Everything

NDP is just ICMPv6 types 133–137. Learn them by number, because that's how filters and captures name them.

TypeMessageTypical src → dstJob
133Router Solicitation (RS)fe80::host → ff02::2“Any routers here? Advertise now, don't make me wait.”
134Router Advertisement (RA)fe80::rtr → ff02::1Default router, prefixes, flags, MTU, DNS. The whole config in one packet.
135Neighbor Solicitation (NS)host → solicited-node groupARP request equivalent, reachability probe, and DAD (sent from ::).
136Neighbor Advertisement (NA)target → asker (or ff02::1)ARP reply equivalent. Flags: R (I'm a router), S (solicited), O (override cache).
137Redirectrouter → 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

A Host Joins the Link

From cable-in to a usable global address: six steps, all multicast, nearly all of them invisible in a normal capture filter.

HOSTMAC 00:1a:2b:3c:4d:5e ROUTERfe80::1 1 · MLDv2 report :: → ff02::16 join ff02::1:ff3c:4d5e before probing for it 2 · DAD NS :: → ff02::1:ff3c:4d5e target fe80::21a:2bff:fe3c:4d5e (tentative) ~1 s, no NA back → link-local becomes preferred 3 · RS fe80::21a:2bff:fe3c:4d5e → ff02::2 4 · RA fe80::1 → ff02::1 PIO 2001:db8:acad:10::/64 L=1 A=1 router-lifetime 1800 RDNSS MTU 1500 5 · DAD NS :: → ff02::1:ff3c:4d5e target 2001:db8:acad:10:21a:2bff:fe3c:4d5e 6 · GUA preferred · default route ::/0 via fe80::1 · DNS from RDNSS

A few details the diagram encodes, each of which matters later:

Solicited-node multicast: why NS doesn't wake everyone

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.

Worked example
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 it

The 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

The RA Flags Decide Everything

Four bits and a lifetime tell every host whether to SLAAC, whether to ask DHCPv6, and whether this router is a gateway at all.

FieldWhereMeaning
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 lifetimeRA headerSeconds this router is a valid default gateway. 0 = not a default router, but prefixes and options still apply.
PrfRA headerDefault-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 / preferredper prefix (PIO)How long the address lives, and how long it's used for new connections. See section 04.
⚠ Gotcha — Android Does Not Speak Stateful DHCPv6

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.

RouterOS 7 — the same knobs, per interface
# 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
Cisco IOS / IOS-XE — equivalent
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

Preferred, Valid, and the Two-Hour Rule

Every SLAAC address carries two clocks. Most rollback and renumbering pain comes from not knowing which one you're actually able to change.

TENTATIVEDAD ~1 s PREFERREDused as source for new connections DEPRECATEDexisting sessions only INVALIDremoved preferred lifetime valid lifetime (an RA can't cut this below 2 h) Each RA for the prefix resets both clocks

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:

  1. The prefix disappears: ISP renumbering, a pilot rollback, a failed router replaced by a box with a different PD. Hosts keep the dead address as preferred for up to a week and source new connections from it. That is the “IPv6 broke after the outage” ticket. Part 2 covers the full renumbering case.
  2. You try to fix it with a short-lifetime RA. RFC 4862 §5.5.3(e), the two-hour rule: if an unauthenticated RA advertises a valid lifetime shorter than what the host has left, the host only lowers the remaining time to 2 hours, never lower. Preferred lifetime 0 takes effect at once, so the address goes deprecated straight away. It still lingers as valid for two more hours.
💡 What Actually Works

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

Which Address Is the Host Actually Using?

One interface, four or five IPv6 addresses, and the one in your firewall rule probably isn't the one in your logs.

Interface-ID schemeBuilt fromConsequence
Modified EUI-64MAC, with ff:fe in the middle and the U/L bit flippedSame 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.
Linux — one NIC, three live addresses
$ 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 forever

The 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

Seeing It Yourself Read-only

Three tools cover nearly every NDP question: ask for an RA, capture ND, and read the neighbor cache.

Linux — ask the routers what they advertise (ndisc6 package)
$ 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.
Capture only NDP (types 133–137), no extension headers
$ 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
The neighbor cache on each platform
$ 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)
⚠ Gotcha — MLD Snooping Without a Querier

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

  1. NDP is ICMPv6 133–137, always with hop limit 255. That keeps off-link attackers out and does nothing about the same link.
  2. The default route only ever comes from the RA, and its next hop is the router's link-local address. DHCPv6 can't give you a gateway.
  3. Keep A=1 wherever phones live. Android ignores stateful DHCPv6. Put DNS in the RA (RDNSS) for the same reason.
  4. Lifetimes are your rollback budget. The two-hour rule caps how fast an RA can kill an address. Advertise short lifetimes (RFC 9096: 2700/5400 s), and use router lifetime 0 to withdraw a gateway at once.
  5. Hosts source traffic from rotating temporary addresses. Name stable addresses in inbound rules and filter outbound by subnet.
  6. MLD snooping needs a querier, or NDP fails for some hosts a few minutes after they join.

IPv6 that works on some devices and not others?

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 →