Skip to content

IPv6 - Communication

In IPv4, a host typically obtains an IP address via DHCP or manual configuration to communicate. Layer 3 communication requires knowing the destination IP address. At Layer 2, MAC addresses are used. IPv4 uses the Address Resolution Protocol (ARP) to resolve a known IP address to an unknown MAC address by broadcasting an ARP request.

IPv6 significantly changes this model. Broadcasts as used by ARP are replaced with multicast. IPv6 hosts can configure their IP addresses in several ways, including manual configuration, stateful DHCPv6, or stateless address autoconfiguration (SLAAC). SLAAC allows a host to generate its own unique link-local address and potentially global addresses without a DHCP server.

ARP functionality is replaced by the Neighbor Discovery Protocol (NDP), which operates using ICMPv6 messages. NDP handles address resolution, router discovery, duplicate address detection, and more.

NDP (RFC 4861) is a fundamental part of IPv6. When an IPv6 host initializes on a network, it performs several NDP-related actions:

  • Link-Local Address Generation: The host first generates a link-local address (typically in the fe80::/10 prefix, forming an fe80::/64 address). This address is necessary for communication on the local link, including further NDP processes.
  • Duplicate Address Detection (DAD): Before using any unicast IPv6 address (link-local or global), the host must verify its uniqueness on the link. It sends a Neighbor Solicitation (NS) message with the tentative address as the target. The NS is sent to the solicited-node multicast address derived from the tentative address. If another host is already using this address, it will respond with a Neighbor Advertisement (NA), and the new host must not use the address.
  • Neighbor Solicitation (NS): After DAD confirms an address is unique, or to resolve an address, a host sends an NS message to the solicited-node multicast address of the target IPv6 address. If the target is on-link, it replies with a Neighbor Advertisement.
  • Neighbor Advertisement (NA): This message is sent in response to an NS message, or unsolicited to announce a change in link-layer address. It contains the sender’s IPv6 address and its link-layer (MAC) address.
  • Router Solicitation (RS): To find routers on the link and obtain network configuration information for autoconfiguration, a host sends an RS message to the all-routers multicast address (FF02::2).
  • Router Advertisement (RA): Routers on the link respond to RS messages (or send periodically) with RA messages. RAs contain information like network prefixes for SLAAC, default gateway lifetime, and other parameters (e.g., MTU, DNS server addresses via RDNSS option).
  • Redirect: If a router receives a packet for a destination that should be reached via a different on-link router, it can send an ICMPv6 Redirect message to the source host, informing it of a better next-hop for that specific destination.

Through these NDP messages, hosts can automatically configure their addresses (SLAAC), resolve neighbors’ link-layer addresses, find routers, and maintain reachability information for on-link neighbors. This makes IPv6 network setup more dynamic and less reliant on manual or DHCP-based configuration for basic connectivity.