What is IPv6?

IPv6 is the current version of the Internet Protocol, designed to replace IPv4 and its exhausted address pool. Learning to read its addresses and prefixes is most of what a server owner needs.

What does an IPv6 address look like?

Eight groups of four hexadecimal digits separated by colons, 128 bits in all, for example 2001:0db8:0a10:0000:0000:0000:0000:0042. Two rules make addresses shorter. Leading zeros in a group can be dropped, so 0db8 becomes db8. One run of consecutive all-zero groups can be replaced with a double colon, used only once per address. The example therefore shortens to 2001:db8:a10::42. When an address appears in a URL, it goes in square brackets, such as https://[2001:db8:a10::42]:8443/.

What does a prefix such as /64 mean?

The number after the slash says how many leading bits identify the network; the rest identify hosts within it. A /64 leaves 64 bits for hosts, which is 18 quintillion addresses on one network. A /56 contains 256 /64 networks, and a /48 contains 65,536. The /64 is the standard size of a single network segment, because address autoconfiguration expects 64 bits for the interface part.

PrefixContainsTypical use
/128One addressA single service or loopback
/64One network segmentA server interface, a bridge for guests
/56256 segmentsA site or a set of networks
/4865,536 segmentsAn organisation

The IPv6 block included with each of our machines is shown in the console, with the gateway to use. Its size and the exact gateway address are what you need to configure the interface, as described in Configure IPv6.

Which address types will I see?

Global unicast addresses, usually starting with 2 or 3, are public and routable on the internet; these are the ones you publish in DNS. Link-local addresses start with fe80 and exist on every interface automatically; they are used for neighbour discovery and routing on the local link and never leave it. Unique local addresses start with fd and are meant for private networks, much like 10.0.0.0/8 in IPv4, which makes them a good choice for WireGuard tunnels between your servers. The loopback address is ::1, and multicast addresses start with ff.

ip -6 addr show
ip -6 neigh show
ping -6 -c 3 2001:db8:a10::1

How do I use many addresses on one server?

Add them to the interface or route them to virtual machines. With a large block, you can give each website, mail service or container its own address, which helps with separate reverse DNS, firewall rules or reputation. Under Proxmox VE, guests on a bridge can take addresses from the block. This is often the neatest answer to needing more addresses, since we do not sell extra IPv4 addresses.

ip -6 addr add 2001:db8:a10::443/64 dev enp1s0f0
ip -6 addr add 2001:db8:a10::25/64 dev enp1s0f0

Make these permanent in netplan on Ubuntu, in /etc/network/interfaces or systemd-networkd on Debian, or with nmcli on the EL family.

How do I check that IPv6 works from outside?

Test from another machine with IPv6, not from the server itself. Check that DNS returns the AAAA record, that the port answers over IPv6, and that path MTU discovery works by fetching a large page. Remember that the firewall must allow essential ICMPv6 messages, or connections will stall.

dig +short AAAA www.example.org
curl -6 -so /dev/null -w '%{http_code} via %{remote_ip}\n' https://www.example.org/
tracepath -6 www.example.org

How does an address get chosen for outgoing connections?

By source address selection rules in the kernel, which normally prefer the most specific matching global address on the outgoing interface. If you add many addresses and need mail or API calls to leave from one particular address, set it explicitly in the application, for example with Postfix's smtp_bind_address6, or mark the others as deprecated so the kernel avoids them for new connections.

Do applications need changes?

Most current software supports IPv6 out of the box. Check that services listen on [::] or on specific IPv6 addresses, that configuration files and allow lists include IPv6 ranges, and that code storing client addresses has room for the longer format. Logs, rate limiters and analytics should treat a /64 as roughly one client, since a single user may rotate through many addresses inside it. For a side-by-side comparison with the older protocol, read IPv6 compared with IPv4; for naming addresses, IPv6 and reverse DNS on your server.

Related pages

IPv6 compared with IPv4

How the two internet protocols differ in address size, headers, configuration and security, and why a modern server should answer on both.

Read more

Configure IPv6

Bring up an address from your IPv6 block on Debian, Ubuntu or Enterprise Linux, add more addresses, test reachability and serve web traffic on both protocols.

Read more

IPv6 and reverse DNS on your server

Configuring the IPv6 block that comes with every machine and setting the reverse DNS name of its IPv4 address from the console.

Read more

Proxmox VE servers

Turn one rented machine into a private virtualisation host with Proxmox VE 9: VMs and containers, ZFS, networking with one IPv4, backups and sizing.

Read more

Questions and answers

How do I shorten an IPv6 address?

Drop leading zeros in each group and replace one run of all-zero groups with a double colon, used only once per address.

What does /64 mean in IPv6?

The first 64 bits identify the network and the last 64 identify hosts. It is the standard size of one network segment.

What is an fe80 address?

A link-local address that every IPv6 interface has automatically. It works only on the local link and is never routed.

Can I give each website its own IPv6 address?

Yes. Add addresses from your server's IPv6 block to the interface and bind each service or site to one of them.

How do I write an IPv6 address in a URL?

Put it in square brackets, for example https://[2001:db8::42]:8443/, so the colons are not read as a port separator.