IPv4 vs IPv6 — What's the Difference?

IPv4 uses 32-bit addresses (like 192.168.1.1), providing about 4.3 billion unique addresses; IPv6 uses 128-bit addresses (like 2001:0db8::1), providing a vastly larger address space designed to outlast IPv4's exhaustion.

Published October 4, 2026

IPv4 uses 32-bit addresses (about 4.3 billion, written like 192.168.1.1) and has run out; IPv6 uses 128-bit addresses (written in hex like 2001:db8::1) giving a practically unlimited supply.

The concept

IPv4 relies on NAT to let many devices share one public address. IPv6 gives every device a globally routable address, removing the need for NAT.

IPv6 also simplifies headers and builds in autoconfiguration. Most networks run both (dual stack).

Address formats

IPv4: 203.0.113.42 (4 × 8 bits)
IPv6: 2001:0db8:0000:0000:0000:0000:0000:0001
2001:db8::1 (compressed)

Practical examples

Test both

ping -4 example.com
ping -6 example.com

DNS records

A     example.com → 203.0.113.42
AAAA  example.com → 2001:db8::1

Bind a server to IPv6

server.listen(3000, '::')  // dual-stack on most systems

IPv6 in URLs

http://[2001:db8::1]:8080/

Common mistakes

  • Storing IPs in a VARCHAR(15) column (IPv6 needs up to 45).
  • Forgetting square brackets around IPv6 in URLs.
  • Skipping the AAAA record.

Key takeaways

  • 32-bit vs 128-bit.
  • A vs AAAA records.
  • Support both.

FAQ

Is IPv6 faster?

Not inherently, though removing NAT can simplify paths.

Will IPv4 disappear?

Not soon; both will coexist for years.

More General articles