IP Addresses & Routing

Neighbor Discovery: What Replaced ARP in IPv6

See how IPv6 devices find link-layer addresses, routers and duplicates using Neighbor Discovery, and how to inspect and protect it.

Key takeaways

  • Neighbor Discovery uses five ICMPv6 message types for routers, neighbors and redirects.
  • Address lookups go to a narrow multicast group instead of broadcasting to every device.
  • Hosts track whether each neighbor is still reachable and probe it when in doubt.
  • Duplicate address detection uses the same solicitation message before an address goes into use.
  • Messages are unauthenticated by default, so switch protections matter on shared networks.

In IPv6, a device that needs the hardware address of a neighbor sends a Neighbor Solicitation, and the owner answers with a Neighbor Advertisement. This replaces ARP from IPv4. It is part of a larger set of functions called Neighbor Discovery, defined in RFC 4861, which also finds routers, checks that neighbors are still reachable and helps detect duplicate addresses.

Everything travels as ICMPv6, so one rule follows immediately: if a filter drops all ICMPv6, IPv6 on that network stops working.

The problem it solves

Your computer knows the IPv6 address it wants to reach. To put a frame on Ethernet or Wi-Fi, it also needs the link-layer address (the MAC address) of the next stop, which is either the destination itself, if it is on the same link, or the router.

IPv4 solves this with ARP, which broadcasts "who has this address?" to everyone. IPv6 has no broadcast and folds the job into ICMPv6.

The five messages

ICMPv6 type Message Sent by Purpose
133 Router Solicitation Host Ask routers to announce themselves
134 Router Advertisement Router Offer prefixes, a gateway and settings
135 Neighbor Solicitation Any node Ask for a link-layer address or check use
136 Neighbor Advertisement Any node Answer, or announce a change
137 Redirect Router Point a host to a better first hop

Router messages drive automatic configuration, described in SLAAC and DHCPv6.

Jobs handled by Neighbor Discovery
Neighbor Discovery ICMPv6 messages on the local link. Redirect Suggest a better next hop. Detect duplicates Before using an address. Find routers Solicit and advertise. Resolve addresses IPv6 to hardware address. Check reachability Is the neighbor still there? Neighbor Discovery ICMPv6 messages on the local link. Find routers Solicit and advertise. Resolve addresses IPv6 to hardware address. Check reachability Is the neighbor still there? Detect duplicates Before using an address. Redirect Suggest a better next hop.

Solicited-node multicast

Rather than disturb every device, a solicitation goes to a solicited-node multicast address. It is formed from the fixed prefix ff02::1:ff00:0/104 plus the last 24 bits of the target address.

Say the target is 2001:db8:1:20::ab:cdef. Its last 24 bits are ab:cdef, so the solicitation goes to:

ff02::1:ffab:cdef

On Ethernet, IPv6 multicast maps to a MAC address beginning 33:33, followed by the last 32 bits of the multicast address, here 33:33:ff:ab:cd:ef. Network cards can ignore groups they haven't joined, so most devices never have to process the question. A switch or access point may still flood it, unless it tracks multicast group membership.

Resolving a neighbor's hardware address
Host A Local link Host B Neighbor Solicitation to solicited-node group 1 It names the target IPv6 address and includes A's hardware address. Only members of that group need to process it 2 Neighbor Advertisement with B's hardware address 3 Data frames now go directly to B 4 Host A Local link Host B Neighbor Solicitation to solicited- node group 1 It names the target IPv6 address and includes A's hardware address. Only members of that group need to process it 2 Neighbor Advertisement with B's hardware address 3 Data frames now go directly to B 4

The neighbor cache and its states

Results are stored in the neighbor cache, the counterpart of the ARP table. Unlike a simple timeout, Neighbor Discovery tracks whether each entry still works, a process called neighbor unreachability detection.

State Meaning
Incomplete A solicitation has been sent; no answer yet
Reachable Recently confirmed to work
Stale Not confirmed lately; still usable, check when used
Delay Waiting briefly for upper-layer confirmation
Probe Actively asking the neighbor directly
Failed No answer; the neighbor is considered unreachable

Confirmation can come from a Neighbor Advertisement or from evidence that a connection is making progress. Seeing many "stale" entries is entirely normal.

Duplicate address detection

Before assigning itself an address, a device sends a Neighbor Solicitation for that very address, using the unspecified address :: as its source. If someone answers, or someone else is probing for the same one, the address is in conflict and should not be used. Silence means it's free.

If duplicate detection fails, operating systems flag the address, for example as dadfailed on Linux or "Duplicate" on Windows. Common causes are copied virtual machines with identical identifiers, manual assignment mistakes and network loops that reflect a device's own probe back to it. Optimistic duplicate address detection (RFC 4429) lets some systems begin cautious use before the check completes.

Redirects

If a router sees that a host on the same link could reach a destination through a better neighbor, it can send a Redirect. It is an optimization, and many administrators and operating systems choose to ignore or disable redirects, since a forged one could steer traffic elsewhere.

Looking at the neighbor table

Linux:

ip -6 neigh show

Windows:

netsh interface ipv6 show neighbors
Get-NetNeighbor -AddressFamily IPv6

macOS:

ndp -an

To make an entry appear, ping a neighbor first. You can try the all-nodes group on a lab or home network, naming your interface:

ping -6 ff02::1%eth0

To watch the exchange on your own machine with a packet capture tool, filter on ICMPv6:

sudo tcpdump -i eth0 -n icmp6

Capture only on networks and systems you are authorized to monitor.

Built-in safeguards and their limits

Neighbor Discovery messages must arrive with a hop limit of 255. Routers decrement that value, so a packet that crossed one cannot still show 255. This stops off-link attackers from injecting these messages.

It does nothing against a hostile or misconfigured device already on the link. Much as with ARP, a neighbor can answer for addresses it doesn't own, and a rogue router advertisement can redirect hosts. Defenses include:

  • RA Guard on switches and access points, allowing advertisements only from router ports.
  • Neighbor Discovery inspection or similar features that check messages against known bindings.
  • Separate network segments for guests and untrusted devices.
  • Client isolation on public Wi-Fi.
  • End-to-end encryption such as HTTPS, so that redirected traffic can't be quietly read or altered.

A cryptographic extension called SEND (RFC 3971) exists but has seen little deployment, so don't count on it.

Firewall rules that keep it working

RFC 4890 gives recommendations for filtering ICMPv6. In short, on local links permit router and neighbor solicitation and advertisement. Across the network, permit the error messages that connections need, especially Packet Too Big, discussed in MTU and fragmentation. A good default firewall already does this; hand-written rule sets are where it goes missing.

Symptoms of over-filtering include addresses that never get a default route, pings to the local router that fail while link status looks fine, and connections that work briefly after other traffic and then stop.

Large subnets and the cache

A /64 holds far more addresses than any device can track. If someone sends packets from outside to huge numbers of unused addresses in your prefix, a router may spend its neighbor cache on unanswered lookups. Equipment typically limits pending entries, and operators add rate limits, filters for unused ranges or longer prefixes on router-to-router links, where /127 is an accepted practice (RFC 6164). Home users rarely need to think about it.

Wi-Fi and sleeping devices

Multicast is awkward on wireless networks, because it is usually sent slowly and can drain batteries. Many access points convert it, filter it or answer on a client's behalf, a technique called proxy Neighbor Discovery. When done well it is invisible. When done badly, a sleeping phone or smart device becomes unreachable until it speaks first. If IPv6 fails only on Wi-Fi, check the access point's multicast and proxy settings and update its firmware.

A troubleshooting walk-through

Say two computers on the same network cannot reach each other over IPv6, although both reach the internet. Work through it in order.

  1. Check addresses. Both should have an address in a shared prefix, or you can test with their link-local addresses. Confirm you copied the right one, since temporary addresses change.
  2. Ping, then look at the cache. Run the ping and immediately show the neighbor table. An entry with a hardware address means resolution worked and the problem is further up, most often the target's host firewall.
  3. Entry stuck at incomplete or unreachable. The solicitation is not being answered. Both devices may be on different segments or VLANs even though they share a network name, or the access point may isolate clients.
  4. Capture if you can. On the target, watch ICMPv6. If the solicitation never arrives, suspect multicast handling in a switch or access point. If it arrives and no reply leaves, suspect the target's firewall.
  5. Compare wired and wireless. A fault that disappears on a cable points at the wireless equipment.

To discard a questionable entry on Linux and force a fresh lookup:

sudo ip -6 neigh flush dev eth0

A similar command on Windows, run with administrator rights, is netsh interface ipv6 delete neighbors.

Two other causes are easy to overlook. A duplicated address makes the cache flip between two hardware addresses, so some packets reach one machine and some the other. And a stale static entry, added during some earlier experiment, will override discovery until you remove it. Showing the table a few times, a little apart, reveals both patterns.

When you finish, record what the cause was. Faults in neighbor handling tend to recur after firmware updates or equipment replacement, and a short note saves repeating the whole sequence. Include the interface, the addresses involved and the state the neighbor cache showed, because those three details usually point straight back to the layer that failed.

Common questions

Is ARP still used on dual-stack networks?

Yes. IPv4 traffic keeps using ARP, and IPv6 traffic uses Neighbor Discovery. The two tables are separate.

Why does my router's gateway address start with fe80?

Router advertisements come from the router's link-local address, and hosts use that as the next hop.

Does Neighbor Discovery work across routers?

No. It is confined to one link. Beyond the first router, normal routing takes over.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in IP Addresses & Routing →

Latest news on this topic