Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 2 of 6 · Concept · 20 min · revision 1

Neighbor Discovery replaces ARP: NS/NA, RS/RA and duplicate address detection

Explain how ICMPv6 Neighbor Discovery replaces IPv4 ARP with solicited-node multicast and Hop Limit 255 protection, trace Duplicate Address Detection from ::, compare SLAAC stable/privacy IIDs (RFC 7217 and RFC 8981), and predict host state from RA flags and Router Lifetime.

Contentsand lesson path

What you will learn

  • Explain Neighbor Discovery (NS/NA, RS/RA, duplicate address detection) and configure hosts with SLAAC and DHCPv6, including the flags in router advertisements.

01. Why it matters

Suppose a campus VLAN enables IPv6 and engineers hit two puzzles immediately. First, client machines receive 2001:db8:20::.../64 addresses automatically with no DHCPv6 server deployed, yet none of them can reach off-link subnets because ip -6 route shows zero default via ... entry. Second, security analysts see zero ARP frames on the wire and wonder how switches and hosts learn MAC addresses or prevent IP conflicts.

IPv6 removes broadcast ARP and treats router configuration separately from centralised address leasing. Neighbor Discovery Protocol (NDP, RFC 4861) bundles Layer 2 resolution, conflict detection, router discovery, and prefix flags into ICMPv6—and a single misconfigured flag or timer inside a Router Advertisement silently alters host behaviour.

02. Why IPv6 dropped broadcast ARP for Neighbor Solicitation and DAD

In the IPv4 delivery lab, an IPv4 host resolves a neighbour's MAC by broadcasting an ARP request (ff:ff:ff:ff:ff:ff) that interrupts the CPU of every NIC on the VLAN—even on a 500-device Wi-Fi segment.

NDP keeps Layer 2 broadcast domains quiet by moving link-layer resolution into ICMPv6 and aiming queries at solicited-node multicast (ff02::1:ffXX:XXXX), built from the target address's trailing 24 bits:

  1. Address Resolution (NS Type 135 / NA Type 136): To learn the MAC of 2001:db8:20::1, Host A sends a Neighbor Solicitation (NS) to ff02::1:ff00:1. Hardware NIC multicast filters drop that frame on unrelated machines; only nodes sharing :00:0001 process it, and the owner replies with a Neighbor Advertisement (NA) carrying its MAC address.
  2. Neighbor Unreachability Detection (NUD): Rather than keeping stale cache entries blindly until a timer expires, IPv6 tracks per-neighbour state (REACHABLE, STALE, DELAY, PROBE) and sends unicast NS probes directly from an active address to confirm two-way reachability with an existing peer.
  3. Duplicate Address Detection (DAD, RFC 4862): Before a host may use any newly generated link-local or global address (tentative state), it checks uniqueness by sending an NS for its own candidate address. Because the host does not yet own that address, it transmits from the unspecified source :: to the candidate's solicited-node multicast group. If a peer replies with an NA (or sends a colliding DAD NS), the host marks the address dadfailed and withholds it from traffic.
  4. Hop Limit 255 on-link guard: Every NDP packet (RS, RA, NS, NA, Redirect) must be sent with IPv6 Hop Limit = 255. Because every router decrements Hop Limit by at least 1 when forwarding, any ND message arriving with Hop Limit < 255 cannot have originated on the local link—and RFC 4861 requires receivers to discard it silently, blocking off-link ND spoofing.

Notice how cleanly you can tell DAD apart from address resolution or NUD in tcpdump: source :: querying its own candidate address is DAD; source fe80:: or global IP querying a peer via ff02::1:ff... is address resolution; and a unicast NS from an active IP to an existing peer IP is NUD.

Text · Neighbor Discovery message flows on the local link (all with Hop Limit 255)
DAD (at link up) : Host (src ::)      --NS--> ff02::1:ff00:6010 ("anyone using mine?")
Addr resolution  : Host (src fe80::.) --NS--> ff02::1:ff00:1    ("who has ::1?")
Reply            : Router             --NA--> Host              ("is-at 02:..:60:01")
Router discovery : Host               --RS--> ff02::2           ("any routers?")
Router config    : Router             --RA--> ff02::1 / Host    ("prefix, A/M/O, lft")

03. RS/RA, SLAAC privacy/stable addresses, DHCPv6 flags and Router Lifetime

When an interface comes up, the host sends a Router Solicitation (RS, ICMPv6 Type 133) to ff02::2 (all-routers multicast) asking local routers to announce themselves immediately instead of waiting for periodic updates. Routers reply with Router Advertisements (RA, ICMPv6 Type 134) carrying prefixes, MTU, optional recursive DNS (RDNSS), Router Lifetime, and three control flags:

  • A (Autonomous address-configuration flag inside each Prefix Information Option): When A = 1, hosts build their own /64 address statelessly via SLAAC by combining the advertised 64-bit prefix with a 64-bit Interface ID.
  • M (Managed address configuration flag): When M = 1, the router directs hosts to contact a stateful DHCPv6 server (RFC 8415, UDP port 547 via ff02::1:2) for centrally tracked address leases (IA_NA).
  • O (Other configuration flag): When A = 1, M = 0, O = 1, hosts generate addresses via SLAAC and ask a stateless DHCPv6 server (Information-Request) only for extra parameters such as DNS servers, search domains, or NTP servers.

Stable versus temporary privacy addresses in SLAAC: Early SLAAC stacks embedded the NIC's 48-bit MAC address directly via Modified EUI-64 (inserting ff:fe and flipping the universal/local bit). Because a MAC-derived Interface ID never changes when a laptop roams between home, cafe, and office Wi-Fi, external servers could correlate the same device across networks. Modern OSes solve this with two complementary mechanisms:

  1. Semantically opaque stable IIDs (RFC 7217): Hosts hash (prefix, interface, secret key) so each network yields a distinct, non-MAC-based address that stays stable within that VLAN (helpful for servers, inbound SSH, or DNS AAAA records).
  2. Temporary privacy addresses (RFC 8981): Alongside the stable mngtmpaddr address, clients generate short-lived temporary addresses for outbound connections and rotate them periodically. When a temporary address's preferred_lft expires before its valid_lft, Linux marks it deprecated: existing TCP/QUIC sockets keep working cleanly until valid_lft hits zero, while all new outbound connections pick the fresh preferred temporary address.

Why default routes vanish when Router Lifetime is zero: Hosts learn their IPv6 default gateway only from Router Advertisements, installed via the router's fe80:: source address. DHCPv6 has no default-gateway option. Under RFC 4861, an RA with Router Lifetime = 0 can still advertise on-link SLAAC prefixes (A = 1), but tells hosts not to add that sender as a default router—explaining our opening VLAN puzzle when a storage-only router advertises a prefix without offering off-link transit.

What if you flip A = 1 to A = 0 and set M = 1 on a working SLAAC link without starting a DHCPv6 server? Newly booted hosts still self-assign fe80:: link-local addresses and install the RA default route (assuming Router Lifetime > 0), but acquire zero global unicast addresses because A = 0 stops SLAAC and nothing answers DHCPv6 Solicit messages.

When not to deploy A = 0, M = 1 (DHCPv6-only): Pure stateful DHCPv6 suits managed wired corporate desktops requiring centralised lease databases, but fails on general BYOD or mobile Wi-Fi because Android devices omit stateful DHCPv6 IA_NA client support (see RFC 7934 on multi-address host requirements and Google's DHCPv6-PD announcement) and require SLAAC (A = 1), and Android's non-SLAAC path is per-client DHCPv6 Prefix Delegation (RFC 9663) not IA_NA; Google says its DHCPv6-PD support is rolling out to most devices running Android 11 and above through Google Play system updates.

04. Check your understanding

Practice check · 3 questions

Neighbor Discovery guards, privacy lifetimes and RA failure modes

Predict how IPv6 hosts enforce Hop Limit 255, rotate temporary privacy addresses and react to RA flag changes.

Q1. Why does RFC 4861 require hosts to discard any Router Advertisement or Neighbor Advertisement whose IPv6 Hop Limit field is not `255`?
Q2. On a laptop running SLAAC with RFC 8981 privacy extensions, `ip -6 addr` shows one `mngtmpaddr` stable address and two `temporary` addresses (one `deprecated`). How does the laptop use the `deprecated` address?
Q3. On a working SLAAC VLAN, an engineer sets `A = 0` and `M = 1` in the RA while keeping `Router Lifetime = 1800`, but forgets to start a DHCPv6 server. What do newly booted Linux hosts configure?
Practice only: not graded, not saved, not evidence.

05. Apply it

Suppose a campus deploys a BYOD Wi-Fi VLAN alongside a wired server VLAN. State which RA flags (A, M, O) and IID behaviour (RFC 8981 temporary vs RFC 7217 stable) suit each VLAN and why.

Next, build a real two-namespace network and watch SLAAC, DAD, stateless DHCPv6, and stateful DHCPv6 side by side in the SLAAC and DHCPv6 lab.

06. Review prompt

Explain how solicited-node multicast and Hop Limit 255 protect Neighbor Discovery, distinguish preferred_lft from valid_lft for RFC 8981 privacy addresses, and explain why A = 0, M = 1 breaks Android clients even when a DHCPv6 server is running.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check