← Interview Prep

IPv6 — Theory

IPv6 end to end: address types & notation (GUA/ULA/link-local/multicast), EUI-64 & privacy addresses, the 40-byte header & extension headers, ICMPv6/NDP (no ARP), SLAAC vs DHCPv6, /64 subnetting, dual-stack & NAT64, and first-hop security.

IPv6 isn't "IPv4 with longer addresses" — it changes address types, drops ARP and broadcast, autoconfigures hosts, and moves options into extension headers. This is the theory to explain end to end: addressing, how a host gets an address (SLAAC/DHCPv6), how neighbors are resolved (NDP), and how you run dual-stack.

The four things that trip people up: there is no broadcast (it's all multicast), no ARP (NDP over ICMPv6), no in-network fragmentation (host-only), and a LAN is almost always a /64 (SLAAC needs it).

Addressing & notation

128 bits, written as eight 16-bit hex groups. Rules: drop leading zeros in a group, and replace one run of all-zero groups with :: (once). 2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1.

PrefixTypeNotes
2000::/3Global unicast (GUA)Routable Internet space.
fc00::/7 (in practice fd00::/8)Unique Local (ULA)Private, like RFC 1918; not routed on the Internet.
fe80::/10Link-localAuto-configured on every interface; never routed; used by NDP/routing protocols. Needs a zone (fe80::1%eth0).
ff00::/8MulticastReplaces broadcast. ff02::1 all-nodes, ff02::2 all-routers, solicited-node ff02::1:ffXX:XXXX.
::1 / ::Loopback / unspecifiedLike 127.0.0.1 / 0.0.0.0.
::/0Default route

There is also anycast (same address on many nodes; nearest wins) — but no broadcast. A host has many addresses at once: a link-local, one or more GUAs, the loopback, and several multicast groups it has joined.

Interface identifiers

The header (why it's simpler)

Fixed 40 bytes, no header checksum, no in-network fragmentation, options moved to extension headers. Full field walk in Protocol Headers.

ICMPv6 & NDP (there is no ARP)

ICMPv6 (Next Header 58) does far more than in v4 — it carries Neighbor Discovery, MLD, and PMTUD, so you must not blanket-filter it.

NDP messageTypeJob
Router Solicitation / Advertisement133 / 134Host finds routers & prefixes (RA drives SLAAC).
Neighbor Solicitation / Advertisement135 / 136Resolve IPv6→MAC (ARP's job) and check reachability.
Redirect137Better first-hop.

Address autoconfiguration

How a host gets its GUA is driven by flags in the Router Advertisement:

MethodTriggerGives
SLAACRA with A flag + prefix (/64)Host builds its own address (EUI-64 or privacy). No server, no per-host state.
Stateless DHCPv6RA O flagSLAAC address + DHCPv6 only for DNS/NTP etc.
Stateful DHCPv6RA M flagDHCPv6 assigns the address (tracked leases, like v4).

Subnetting & prefix planning

PrefixUse
/64Every LAN — required for SLAAC/EUI-64. Don't go longer on a host subnet.
/127Router-to-router point-to-point links (RFC 6164) — avoids a NS scan attack.
/128Loopbacks.
/56, /48Per-site allocations (a /48 = 65 536 /64s).

Dual-stack & transition

Routing IPv6

OSPFv3, IS-IS (single topology or multi-topology), and MP-BGP (AFI 2 / IPv6-unicast). Note RFC 5549: advertise IPv4 routes with an IPv6 next-hop — the basis of unnumbered BGP fabrics. See DC IPv6 Architecture.

Security & a few extras

IPv6 vs IPv4

IPv4IPv6
Address32-bit128-bit
Header20–60 B, checksum40 B fixed, no checksum
BroadcastYesNo — multicast/anycast
L2 resolutionARPNDP (ICMPv6)
AutoconfigDHCPSLAAC and/or DHCPv6
FragmentationHost or routerHost only
IPsecOptionalDesigned-in (AH/ESP ext. headers)

Likely interview questions

Related: Protocol Headers · DC IPv6 Architecture · OSI Model.