TodayTools

Internet Protocol version 6

How IPv6 works

Enough addresses for every device

Donate
L3NetworkLink
What brings you here?

Watch it happen

How much detail

A laptop joins the network and builds its own global address from a router advertisement, with no DHCP server.

Your laptop
Home switch
Printer
Home router
Internet
CableInternetLookupSetup

5 steps, 6 packets

First up: Link-local address. Press Play to watch it happen, one step at a time.

0 of 50/5

What is IPv6?

IPv6 is the newer version of the Internet Protocol. Its addresses are 128 bits long, written in hex like 2001:db8:1:1::20, which gives so many that every device can have its own public address again, with no NAT.

It also cleans up the design: a fixed 40-byte header, no fragmentation by routers, multicast instead of broadcast, and devices that set up their own addresses from a router advertisement. A large share of traffic to big sites already uses IPv6, often without users noticing.

Think of it like this. If IPv4 is a street with house numbers that ran out, IPv6 gives every street a huge range of numbers. The router announces the street name (the prefix), and each house picks its own number on that street, then shouts once to check nobody else has it.

Step by step

Normal

5 steps

A laptop joins the network and builds its own global address from a router advertisement, with no DHCP server.

  1. 1

    Link-local address

    fe80:: and a duplicate check

    As soon as the cable connects, the laptop makes a link-local address starting with fe80::. Before using it, it asks: does anyone already have this? No answer means it is free.

  2. 2

    Router solicitation

    Any routers here?

    The laptop sends a Router Solicitation to ff02::2, the group every router joins. It does not want to wait for the next regular advertisement.

  3. 3

    Router advertisement

    Prefix 2001:db8:1:1::/64

    The router answers to all nodes with the network prefix, its own MAC address, the link MTU and a DNS server. The A flag means: build your own address from this prefix (SLAAC).

  4. 4

    Global address

    Prefix plus interface ID

    The laptop joins the /64 prefix with a 64-bit interface ID it picked itself. Modern systems use a stable random-looking ID, not the MAC address, for privacy. It checks the new address for duplicates too.

  5. 5

    Neighbour discovery

    IPv6 has no ARP

    To print, the laptop needs the printer's MAC address. It sends a Neighbor Solicitation to the printer's solicited-node group, and the printer answers with a Neighbor Advertisement. This replaces ARP and uses multicast instead of broadcast.

Duplicate address

3 steps

Someone types an address that the printer already uses. Duplicate address detection catches it before any harm.

  1. 1

    Address typed by hand

    2001:db8:1:1::20 again

    Daniel sets up a new file server and types a fixed address. By mistake it is the printer's address.

  2. 2

    Check first

    Neighbor Solicitation from ::

    Before using any address, even a typed one, an IPv6 device sends a Neighbor Solicitation for it from the unspecified address ::.

  3. 3

    The printer objects

    That address is mine

    The printer answers with a Neighbor Advertisement to all nodes. The file server marks the address as duplicate and does not use it. Nobody's traffic goes to the wrong place.

Packet too big

3 steps

IPv6 routers never split packets. A smaller link sends back Packet Too Big, and the sender shrinks its packets.

  1. 1

    Full-size packet

    1500 bytes from the server

    The server sends a full 1500-byte packet. On the way is a tunnel whose extra header leaves room for only 1480 bytes.

  2. 2

    Packet Too Big

    ICMPv6 type 2, MTU 1480

    An IPv6 router never fragments. It drops the packet and tells the sender the size that fits. Only the original sender may split packets in IPv6.

  3. 3

    Smaller packets

    Sent again at 1480

    The server remembers the smaller path MTU and resends. This is why blocking ICMPv6 breaks IPv6: big packets would vanish with no explanation.

Myths and mix-ups

  • IPv6 does not need NAT to be safe; a stateful firewall blocks unwanted inbound traffic just as well.
  • IPv6 addresses are not always built from the MAC address; modern systems use random-looking or stable private IDs.
  • IPv6 has no ARP; neighbour discovery over ICMPv6 does that job.
  • You cannot safely block all ICMPv6; neighbour discovery and Packet Too Big depend on it.
  • IPv6 is not a faster IPv4; speed depends on the path, not the version.

Try it yourself

Run these on your own computer to see IPv6 at work.

  • See your IPv6 addresses (Windows)

    ipconfig

    Look for IPv6 Address, Temporary IPv6 Address and Link-local IPv6 Address (fe80::).

  • See your IPv6 addresses (macOS)

    ifconfig en0 inet6

    Lines with autoconf come from SLAAC; secured and temporary mark privacy addresses.

  • See your IPv6 addresses (Linux)

    ip -6 addr

    scope global is reachable from the internet; scope link is fe80:: and stays on your network.

  • See your IPv6 neighbours

    ip -6 neigh

    Linux. On Windows use netsh interface ipv6 show neighbors; on macOS use ndp -an.

  • Ping over IPv6

    ping -6 example.com

    Windows and Linux. On macOS use ping6 example.com. No reply may mean your network has no IPv6.

IPv6 at a glance

Layer
Network (3)
Address size
128 bits
Header size
40 bytes fixed, plus optional extension headers
Ethernet type
0x86DD
Minimum link MTU
1280 bytes
Address setup
SLAAC from router advertisements, or DHCPv6
Defined in
RFC 8200 (first in 1995)

Defined inRFC 8200RFC 4291RFC 4861RFC 4862RFC 4443RFC 8981

Header fields

What IPv6 puts in its messages, with example values from the stories above.

IPv6

Version
6
Traffic class
0x00
Flow label
0x00000
Payload length
24 bytesOnly what follows the header. The header itself is always 40 bytes.
Next header
58 (ICMPv6)What comes next: 58 is ICMPv6, 6 is TCP, 17 is UDP.
Hop limit
255255 proves the message came from this link: a router would have lowered it.
Source
::The unspecified address: the device has no address it may use yet.
Destination
ff02::1:ff0e:9d17The solicited-node group. Only devices whose address ends the same way listen.

ICMPv6

Type
135 (Neighbor Solicitation)
Code
0
Checksum
verified
Target address
fe80::8f3a:21c4:6b0e:9d17The address being checked. If anyone already has it, they will answer.
Source link-layer address
a4:91:b1:00:00:01The router's MAC, so the laptop does not need to ask for it.
Cur hop limit
64
Flags
M=0, O=0M=0 means no DHCPv6 needed for addresses. O=0 means no extra DHCPv6 settings.
Router lifetime
1800 secondsHow long to use this router as default gateway without a new advertisement.
Prefix information
2001:db8:1:1::/64, A=1, L=1, valid 86400 s, preferred 14400 sA=1 is the SLAAC switch: devices may build their own addresses from this prefix.
MTU
1480The largest packet the next link can carry.

Test yourself

Question 1 of 5Score 0

How long is an IPv6 address?

Questions people ask

What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses and is nearly out of them. IPv6 uses 128-bit addresses, has a simpler fixed header, lets devices set up their own addresses, and replaces ARP and broadcast with neighbour discovery and multicast.

What is SLAAC?

Stateless address autoconfiguration. The router advertises a /64 prefix, and each device builds its own address from that prefix plus an interface ID, then checks it is not already in use. No DHCP server needed.

What is an fe80 address?

A link-local IPv6 address. Every IPv6 interface has one. It works only on the local network and is used for neighbour discovery and talking to the router.

Does IPv6 need NAT?

No. There are enough addresses for every device to have a public one. Your router's firewall still blocks unwanted connections from outside.

How do I know if I have IPv6?

Run ipconfig, ifconfig or ip -6 addr and look for an address that does not start with fe80. If you have one, try ping -6 example.com.

Donate