Guides · IP & network · Updated

IPv4 vs IPv6: the differences that matter

IPv4 and IPv6 are two versions of the Internet Protocol. IPv4 uses 32-bit addresses and has run out of them. IPv6 uses 128-bit addresses, enough that every device can have its own. Most networks now run both side by side.

The short version

IPv4IPv6
Address length32 bits128 bits
Number of addressesAbout 4.3 billionAbout 3.4 × 1038
Example203.0.113.422001:db8:85a3::8a2e:370:7334
Written asFour decimal numbers, 0 to 255Eight groups of four hex digits
Sharing addresses (NAT)Needed almost everywhereNot needed
Automatic setupDHCPSLAAC or DHCPv6
Header20 to 60 bytesFixed 40 bytes
BroadcastYesNo (uses multicast)

See which of the two your connection uses right now:

Show my IPv4 and IPv6 address

Why IPv6 exists

IPv4 was designed in the early 1980s, when 4.3 billion addresses looked like plenty. The central pool ran out in 2011, and most regional registries have since handed out their last free blocks. Today new IPv4 addresses are bought and sold, and providers stretch them by putting many customers behind one shared address (carrier-grade NAT).

IPv6 fixes the shortage for good. A typical home connection gets a /56 or /64 block: billions of addresses for one household.

Reading an IPv6 address

An IPv6 address is eight groups of 16 bits, written in hexadecimal and separated by colons. Two rules make them shorter:

  • Leading zeros in a group can be dropped: 0db8 becomes db8.
  • One run of all-zero groups can be replaced with ::, once per address.
2001:0db8:0000:0000:0000:ff00:0042:8329   full form
2001:db8::ff00:42:8329                     same address, shortened

A few prefixes are worth recognising:

  • 2000::/3 (addresses starting with 2 or 3): global, reachable from the internet.
  • fe80::/10: link-local. Works only on the local network segment.
  • fc00::/7 (usually fd..): unique local, the IPv6 version of private ranges.
  • ::1: loopback, the IPv6 version of 127.0.0.1.
  • 2001:db8::/32: reserved for documentation, like the examples on this page.

No more NAT

With IPv4, your router has one public address and translates traffic for every device behind it. That's why you need port forwarding to reach a device at home.

With IPv6, every device gets its own public address, so there is nothing to translate. That doesn't mean every device is exposed: your router's firewall should still block unsolicited inbound traffic, and you allow specific ports per device instead of forwarding them.

Setup and day-to-day differences

  • Addresses configure themselves. Devices build their own IPv6 address from the prefix the router announces (SLAAC). Many also rotate temporary addresses for privacy.
  • Several addresses per device is normal. A computer typically has a link-local address, one or more global addresses and possibly a unique local one.
  • ICMP matters more. IPv6 relies on ICMPv6 for neighbour discovery and path MTU. Blocking all ICMPv6 at a firewall breaks things.
  • DNS has a separate record. A names point to IPv4 addresses, AAAA names point to IPv6 addresses. A site needs both to be reachable over both. Check with the domain to IP lookup.

Is IPv6 faster?

Not by design. The protocol itself isn't quicker, but IPv6 traffic sometimes takes a more direct route because it skips carrier-grade NAT, and some large networks report slightly lower latency over IPv6. Browsers use a method called Happy Eyeballs: they try both protocols at once and use whichever connects first, so you get the faster path without choosing.

Do you need to do anything?

For most people, no. If your provider supports IPv6, your router and devices pick it up automatically and keep using IPv4 for sites that don't support IPv6 yet. If you run servers, publish both A and AAAA records and make sure your firewall rules cover both protocols. To find out where you stand, run the IPv6 test, and see how to test IPv6 if it fails.

Frequently asked questions

Is IPv6 faster than IPv4?

Not inherently. Speed depends on the route your traffic takes. Browsers try both protocols at once and use whichever connects first, so you rarely notice a difference.

Can IPv4 and IPv6 talk to each other directly?

No. They are separate protocols. Most networks run both side by side (dual stack), and translation services such as NAT64 bridge IPv6-only networks to IPv4 sites.

Should I turn off IPv6?

Usually not. Turning it off rarely fixes problems and can slow some connections. If an IPv6 issue appears, fix the router or firewall setting instead.

How many IPv6 addresses are there?

About 3.4 × 10^38, because addresses are 128 bits long. IPv4 has about 4.3 billion, because its addresses are 32 bits.