[ learn ]

What is IPv6?

Updated · 4 min read

Short answer

IPv6 (Internet Protocol version 6) is the successor to IPv4. Its addresses are 128 bits long and written as eight groups of hexadecimal digits separated by colons, such as 2001:db8::1. The space is so large, about 3.4 × 1038 addresses, that every device can have its own public address and every local network gets a /64 subnet.

How IPv6 addresses are written

An IPv6 address is eight groups of 16 bits, each written as up to four hex digits (0–9, a–f):

2001:0db8:0000:0000:0000:0000:0000:0001   full form
2001:db8:0:0:0:0:0:1                      leading zeros dropped
2001:db8::1                               zero run replaced by ::

The rules, standardised in RFC 5952:

  • Leading zeros in a group can be dropped: 0db8 becomes db8.
  • One run of consecutive all-zero groups can be replaced by ::, but only once per address, otherwise it would be ambiguous. Use it for the longest run, and not for a single zero group.
  • Write hex letters in lower case.

In URLs the address goes in square brackets, https://[2001:db8::1]:8443/. On this site you can type it straight after the slash: /2001:4860:4860::8888.

Network prefix and interface ID

A normal IPv6 address splits into two halves. The first 64 bits are the network prefix: the ISP's block, the customer's site and the individual subnet. The last 64 bits are the interface identifier: the device on that subnet. So a LAN is almost always a /64, which holds 264 addresses, and ISPs give homes a /56 or /48 so they can run many subnets. See CIDR notation for the common prefix sizes.

SLAAC and privacy addresses

Devices usually configure themselves with SLAAC (stateless address autoconfiguration, RFC 4862): the router announces the /64 prefix, and each device picks its own last 64 bits. DHCPv6 exists too, but many networks, and Android, rely on SLAAC.

Early SLAAC built the interface ID from the device's MAC address, which let websites recognise the same laptop on any network. Modern systems instead use temporary privacy addresses (RFC 8981) for outgoing connections, which change regularly, often daily, plus a stable but random address per network (RFC 7217). The prefix still shows your ISP and approximate area, so IP geolocation works the same way as for IPv4.

Special IPv6 ranges

RangePurpose
2000::/3Global unicast: the public internet
fe80::/10Link-local: every interface has one, valid only on its own link, never routed
fc00::/7Unique local addresses (ULA, RFC 4193), the private-network equivalent; in practice fd00::/8
::1/128Loopback, like 127.0.0.1
ff00::/8Multicast (IPv6 has no broadcast)
2001:db8::/32Documentation and examples (RFC 3849)
64:ff9b::/96NAT64: IPv4 addresses embedded for IPv6-only networks

How widely IPv6 is used

IPv6 was standardised in the late 1990s (now RFC 8200) and grew slowly at first, then quickly once large mobile and broadband operators switched it on. Google's public measurements show close to half of its users reaching it over IPv6, with big differences between countries and networks. Many mobile networks now run IPv6-only internally and reach IPv4 sites through NAT64. Because IPv4 and IPv6 are separate protocols, most networks run both (dual stack); see IPv4 vs IPv6.

Check if you have IPv6

Open What is my IP?: if the address contains colons, you are connected over IPv6. In a terminal, curl -6 https://ipinfo.dkly.net/json succeeds only if your connection has working IPv6. The API accepts IPv6 addresses in the same ip parameter as IPv4.

[ FAQ ]

Frequently asked questions

Why is an IPv6 subnet always a /64?

The address architecture reserves the last 64 bits for the interface identifier, and SLAAC needs exactly 64 bits to create addresses. Using a smaller subnet breaks automatic configuration and some other features, so a /64 is the standard size for any LAN.

Can I use :: twice in one address?

No. The double colon can appear only once, because with two it would be impossible to know how many zero groups each one stands for. Other zero groups are written as a single 0.

Does IPv6 make me easier to track?

Not much with modern systems. Devices use temporary privacy addresses that change regularly for outgoing connections, so the device part of the address is not a lasting identifier. The network prefix still shows your ISP and approximate area, as an IPv4 address does.

What is an fe80:: address?

It is a link-local address, created automatically on every IPv6 interface. It works only on the local network segment, for things like finding the router, and is never routed to the internet.

Last updated · All articles · API docs