Octet

What is NDP and what are its message types?

Show the answer

Say this first

Neighbor Discovery Protocol (RFC 4861) does the jobs ARP, ICMP router discovery and ICMP redirect did in IPv4. It runs inside ICMPv6 with five messages: Router Solicitation (133), Router Advertisement (134), Neighbor Solicitation (135), Neighbor Advertisement (136) and Redirect (137). It handles address resolution, router and prefix discovery, duplicate address detection and neighbor reachability.

Go deeper

The five messages

TypeMessageSent byUsually toJob
133Router Solicitation (RS)hostff02::2ask routers for an RA now
134Router Advertisement (RA)routerff02::1, or the host that askedprefixes, flags, default router, MTU, hop limit
135Neighbor Solicitation (NS)any nodesolicited-node group, or unicastresolve a MAC, DAD, check reachability
136Neighbor Advertisement (NA)any nodethe asker, or ff02::1 if unsolicitedgive a MAC, announce a change
137Redirectrouterhosta better first hop, or "this destination is on-link"

Useful details

  • Hop limit 255. Every NDP message is sent with hop limit 255 and receivers drop any with less. A packet that crossed a router would have 254 or lower, so this proves the sender is on the link.
  • NA flags. R says the sender is a router, S says the NA answers a solicitation, O says "override your cached MAC for me".
  • Options. Source and target link-layer address, Prefix Information, MTU, Route Information, and RDNSS for DNS servers (RFC 8106).

Why this matters for filtering

NDP is ICMPv6. An ACL or firewall that drops all ICMPv6 drops address resolution with it and the link stops working. Cisco IPv6 ACLs carry implicit permits for NS and NA for this reason.

Traps

  • Saying NDP runs over UDP or directly over Ethernet. It is ICMPv6, IP next header 58.
  • Forgetting Redirect, the fifth message.
How did you do?Book 4.2 IP Version 6Book 3.3 Internet (IP)