Computer Networks

IPv6

128-bit addresses, no NAT-as-crutch, SLAAC, and a simpler header.

Level: intermediate

What is it?

IPv6 is Internet Protocol version 6, with 128-bit addresses and a fixed base header designed to support large address spaces and simpler forwarding. Additional information is carried in extension headers when required.

Why does it matter?

IPv6 addresses the shortage of globally unique IPv4 addresses and supports modern address configuration and routing. Deployment requires dual-stack or transition planning, firewall policy, DNS records, and operational knowledge.

Mental model

IPv6 keeps IP's best-effort packet delivery model but expands address space dramatically. A link-local address supports local-link behavior, while global unicast prefixes support routed reachability when configured and permitted.

How it works

  • IPv6 addresses are 128 bits and written in hexadecimal groups with compression rules for consecutive zero groups.
  • The base header is fixed at 40 bytes; routers do not fragment IPv6 packets in transit, so Path MTU Discovery matters.
  • Neighbor Discovery replaces ARP for IPv6 link-local address resolution and related router discovery tasks.
  • SLAAC and DHCPv6 can both participate in address configuration, depending on the network's flags and policy.
  • IPv6 does not eliminate the need for firewalls, access controls, or secure service configuration.

Steps

  • A host configures a link-local address and discovers local router/prefix information.
  • It generates or receives an address under the network's configuration approach.
  • The host resolves a local next-hop MAC using Neighbor Discovery.
  • Routers forward the IPv6 packet based on destination prefix and decrement the Hop Limit.

Real-world usage

  • Designing dual-stack application and enterprise networks.
  • Diagnosing IPv6 routes, RA behavior, DNS AAAA records, and MTU problems.

Common mistakes

  • Assuming IPv6 traffic is secure by default because NAT is less common.
  • Ignoring IPv6 firewall rules while configuring only IPv4 policy.
  • Assuming every host uses DHCPv6 to receive its address.

Interview questions

Why can IPv6 avoid many address-sharing NAT deployments?

Its 128-bit address space supports abundant globally unique addressing, though firewalls and translation may still be used for policy or compatibility.

What replaces ARP for IPv6 address resolution?

Neighbor Discovery Protocol, which operates using ICMPv6 messages.

Prerequisites

Related concepts

Continue learning

Browse the full computer science library