IPv6

10 min read Last updated Fri Jun 05 2026 23:03:30 GMT+0000 (Coordinated Universal Time)

Uses 128-bit addresses. Consists of 8 groups of 4 hexadecimal digits separated by colons.

Introduced in 1994. Still not fully adopted.

Design Goals

  • More address space
    IPv4 was limited to ~4.3 billion addresses.
  • Simpler header
  • Better QoS
  • Built-in encryption, authentication, and multicast
  • Auto-configuration
  • Remove unused IPv4 features

Shorthand Rules

  1. Leading zeros in any group can be dropped.
  2. One contiguous run of all-zero groups can be replaced with ::.

Types of IPv6 Addresses

Each interface is assumed to have multiple IPv6 addresses of different types. Source address selection is defined by the IPv6 spec.

Unicast

Identifies a single interface.

Unspecified

:: — used when the address is not yet known.

Loopback

::1 — equivalent to 127.0.0.1 in IPv4. Sends packets to the same host.

Identifies devices on the same link. Prefix fe80::/10; next 54 bits are zero; last 64 bits are EUI-64. Routers do not forward link-local packets.

Site-local

Intended for use within an organization. Prefix fec0::/10.

Deprecated in 2004. Deprecated because site was never formally defined (RFC 3879).

  • Ambiguous scope
    Routers had no clear rule for where to stop forwarding. Implementations drew the boundary differently.
  • Non-unique addresses
    Two organizations can use the same fec0::/10 space internally. Conflicts arise on interconnection.

Replaced by Unique Local Addresses.

Unique Local Address

Aka. ULA. For private networks. Not routable on the public internet. Prefix fd00::/8.

Global Unicast

Public, routable, internet-facing. Prefix 2000::/3. Provides 2612^{61} networks on the public internet.

IPv4-compatible

Deprecated. a.b.c.d in IPv4 was represented as ::ab:cd in IPv6.

IPv4-mapped

Maps IPv4 to IPv6 for dual-stack interoperability. a.b.c.d maps to ::FFFF:ab:cd.

Multicast

Identifies a group of interfaces. Prefix FF00::/8.

  • FF02::1 refers to all hosts on the local network.
  • FF02::2 refers to all routers on the local network.

Replaces IPv4 broadcast. Broadcast forces every device on the network to interrupt and process the packet, even when irrelevant. Multicast is selective: only interfaces that have joined the multicast group process the packet. No addresses are wasted on network or broadcast addresses.

Anycast

A unicast address assigned to multiple interfaces. Traffic is routed to the topologically nearest one.

Network and Host Parts

Typically, network part is 64 bits and host part is 64 bits. Uses /prefix-length notation.

Example: 2001:db8:85a3::/48.

SLAAC

Short for Stateless Address AutoConfiguration. Devices configure their own address without DHCP.

Steps:

  1. Host creates a link-local address using prefix FE80::/10 and EUI-64.
  2. Host joins the FF02::1 multicast group.
  3. Host sends a Router Solicitation (ICMPv6 Type 133) to FF02::2, including its MAC address.
  4. Router replies with a Router Advertisement (ICMPv6 Type 134) containing the network prefix.
  5. Host combines the prefix with its EUI-64 interface ID to form a global unicast address.
  6. Host retains its link-local address for local communication.

SLAAC does not provide:

  • DNS name servers
  • NTP time servers
  • WINS servers

EUI-64

Converts a 48-bit MAC address to a 64-bit interface ID. Default in SLAAC.

  1. Take MAC address: a4:c3:f0:12:34:56
  2. Split in the middle and insert ff:fe: a4:c3:f0:ff:fe:12:34:56
  3. Flip the 7th bit (universal/local bit): a6:c3:f0:ff:fe:12:34:56

Hardcoded to produce 64-bit IDs. SLAAC with EUI-64 cannot use prefixes longer than /64.

Privacy Address

EUI-64 exposes device identity, enabling cross-network tracking. Privacy addresses replace the EUI-64 interface ID with a random number, regenerated per network.

Uniqueness is verified via Duplicate Address Detection before the address is used:

  1. Host sends a Neighbor Solicitation (ICMPv6 Type 135) to the solicited-node multicast address of the candidate address.
  2. If a Neighbor Advertisement is received, the address is already in use. A new random ID is generated and the process repeats.
  3. If no reply arrives within a timeout, the address is unique and assigned.

DHCPv6

Stateful alternative to SLAAC. Requires a server. Supports DNS. Best for servers and fixed devices.

Most DHCPv6 implementations assume a /64 network prefix. Using a longer prefix may cause issues.

A direct connection between exactly two devices. No network part is needed; the entire address space is used for hosts.

  • /127: modern recommendation per RFC 6164.
  • /126: mimics IPv4’s /30, which reserved network and broadcast addresses.

SLAAC and EUI-64 are not required. Addresses are typically configured manually.

Address Hierarchy

Structured hierarchy enables route aggregation and reduces routing table size.

  • Global Prefix: first 48 bits
  • Subnet ID: 16 bits
  • Interface ID: last 64 bits

IANA controls the full address space. Blocks of /12 to /23 are assigned to the 5 RIRs.

RIRRegionPrefix
ARINNorth America2600::/12
RIPE NCCEurope, Middle East, Central Asia2a00::/12
APNICAsia-Pacific2400::/12
LACNICLatin America & Caribbean2800::/12
AFRINICAfrica2c00::/12

RIRs assign /32 prefixes to ISPs (2322^{32} subnets of /64 each). ISPs delegate /48 to organizations (2162^{16} subnets). Residential customers typically receive /56 or /64.

Special Address Ranges

PrefixPurpose
::1/128Loopback
fe80::/10Link-local (auto-assigned, not routable)
fc00::/7Unique-local (private, like RFC 1918)
ff00::/8Multicast
2000::/3Global unicast (public internet)
2001:db8::/32Documentation and examples only

IPv6 header is fixed at 40 bytes.

0

4

8

16

24

Version

Traffic Class

Flow Label

Payload Length

Next Header

Hop Limit

Source Address (128 bits)

Destination Address (128 bits)

Header fields:

  • Version (4 bits)
    Set to 6.
  • Traffic Class (8 bits)
    QoS marking. Equivalent to IPv4’s ToS field.
  • Flow Label (20 bits)
    Identifies packets belonging to the same flow (e.g. a video stream). Allows per-flow handling without inspecting inner layers. Set by the source.
  • Payload Length (16 bits)
    Size of data following the header in bytes. Does not include the header itself.
  • Next Header (8 bits)
    Identifies what follows: a transport protocol (TCP = 6, UDP = 17) or an extension header. Replaces IPv4’s Protocol and Options fields.
  • Hop Limit (8 bits)
    Decremented by each router. Packet dropped at 0. Equivalent to IPv4’s TTL.
  • Source Address (128 bits)
  • Destination Address (128 bits)

Header checksum is removed. Error detection is delegated to other layers.

Extension Header

Inserted between the base header and the payload. Optional. Each starts with its own Next Header field and length in 8-byte units.

0

4

8

16

24

Next Header

Hdr Ext Len

Options / Type-specific

Options / Type-specific data (variable)

  • Next Header (8 bits)
    Identifies the next extension header or transport protocol.
  • Hdr Ext Len (8 bits)
    Length in 8-byte units, not counting the first 8 bytes. Zero means 8 bytes total.

The Fragmentation extension header has a fixed structure:

0

4

8

16

24

Next Header

Reserved

Fragment Offset

Res

M

Identification (32 bits)

  • Fragment Offset (13 bits)
    Byte offset of this fragment within the original payload, in units of 8 bytes.

  • M flag (1 bit)
    1 if more fragments follow. 0 on the last fragment.

  • Identification (32 bits)
    Shared by all fragments of the same original packet.

  • Hop-by-Hop Options
    Must be first if present. Processed by every router.

  • Routing
    Specifies intermediate nodes the packet must pass through. Deprecated due to security issues.

  • Fragmentation
    Carries fragment data when the source fragments a packet.

  • Destination Options
    Information processed only by the destination.

  • Authentication
    Hash of all immutable fields. Does not work with NAT.

  • Encrypted Security Payload
    Provides encryption, integrity, and authentication.

Packet Fragmentation

Only the source host may fragment packets. Uses the Fragmentation extension header.

If a router receives an oversized packet, it drops it and sends an ICMPv6 Packet Too Big message to the source.

Path MTU Discovery

Source probes the path with ICMPv6 packets of decreasing size until transmission succeeds. IPv6 mandates a minimum MTU of 1280 bytes on all links.

Tunnel

Encapsulates IPv6 packets inside IPv4 (or vice versa) to cross networks that only support the other version.

Issues:

  • IPv4 does not honor IPv6 options.
  • Encapsulation overhead may exceed the MTU.
  • Application Layer Gateway required if payloads contain IP addresses.

ICMPv6

Replaces ICMPv4. Required for packet fragmentation and Path MTU Discovery. Cannot be blocked; rate limiting is mandated by the IPv6 spec to prevent abuse.

Transition Issues

IPv4 and IPv6 are not natively interoperable. Solutions: dual-stack all infrastructure, or use Application Layer Gateways.

Root Servers

DNS root servers had to be upgraded to support both protocol versions.

Nameservers

New DNS record types were introduced:

  • A records
    Map hostnames to IPv4 addresses.
  • AAAA records
    Map hostnames to IPv6 addresses.

MX Records

MX records point to a hostname. If that hostname only has an A or AAAA record, senders using the other protocol cannot deliver mail.

Layer 3 Device Upgrades

Routers and multilayer switches must be updated to support IPv6 routing, neighbor discovery, and related protocols.

Hardware Accelerator Changes

Hardware in L2/L3 devices is often programmed for IPv4’s packet structure. IPv6 may require reprogramming or physical replacement. L2 switches are also affected if they perform IP-aware processing.

Firewalls

  • Software must inspect IPv6 traffic.
  • Rulesets must be rewritten or mirrored for IPv6.
Was this helpful?