IPv4 vs IPv6: What's the Difference?
Back to Articles
Networking

IPv4 vs IPv6: What's the Difference?

A clear comparison of IPv4 and IPv6. Learn the differences in format, capacity, security, and why the internet is transitioning to IPv6.

TraceThatIP Team January 28, 2026 5 min read 990 words

The Address Crisis

The internet is running on a system designed in 1981. IPv4, the addressing protocol that powers most of the internet today, supports roughly 4.3 billion addresses. That seemed like plenty when personal computers were rare. Today, with 15+ billion connected devices worldwide, we ran out.

IPv6 was designed to solve this problem permanently. It supports approximately 340 undecillion addresses (that is a number with 38 zeros). The transition from IPv4 to IPv6 is the largest infrastructure upgrade in internet history, and it is happening right now.

If you are new to IP addresses, start with our beginner's guide.

IPv4 Explained

Format

IPv4 addresses are written as four decimal numbers separated by dots, called dotted-decimal notation:

TEXT
Format:  xxx.xxx.xxx.xxx
Example: 192.168.1.1
Range:   0.0.0.0 to 255.255.255.255

Each number represents 8 bits (one octet), for a total of 32 bits. This gives us 2^32 = 4,294,967,296 possible addresses.

IPv4 address structure

Every IPv4 address has two parts:

  • Network portion - identifies the network
  • Host portion - identifies the specific device

The division between network and host is determined by the subnet mask:

TEXT
IP Address:   192.168.1.105
Subnet Mask:  255.255.255.0  (/24)
Network:      192.168.1.0
Host:         .105

IPv4 address classes (historical)

The original IPv4 design used five classes:

ClassRangeDefault MaskNetworksHosts/Network
A1.0.0.0 - 126.255.255.255/812616,777,214
B128.0.0.0 - 191.255.255.255/1616,38465,534
C192.0.0.0 - 223.255.255.255/242,097,152254
D224.0.0.0 - 239.255.255.255-Multicast-
E240.0.0.0 - 255.255.255.255-Reserved-

Modern networking uses CIDR (Classless Inter-Domain Routing) instead of classes, allowing more flexible allocation.

IPv4 exhaustion timeline

  • 1981: IPv4 introduced (RFC 791)
  • 1993: CIDR introduced to slow exhaustion
  • 1996: NAT widely adopted (see public vs private IPs)
  • 2011: IANA exhausted its free IPv4 pool
  • 2015-2019: All regional registries exhausted
  • Today: New IPv4 blocks only available through transfers (market price: $30-50 per address)

IPv6 Explained

Format

IPv6 addresses are written as eight groups of four hexadecimal digits, separated by colons:

TEXT
Full format:    2001:0db8:85a3:0000:0000:8a2e:0370:7334
Shortened:      2001:db8:85a3::8a2e:370:7334

Shortening rules:

  1. Leading zeros in each group can be dropped: 0db8 becomes db8
  2. Consecutive groups of all zeros can be replaced with :: (only once per address)
TEXT
Full:       2001:0db8:0000:0000:0000:0000:0000:0001
Shortened:  2001:db8::1

IPv6 address capacity

IPv6 uses 128 bits, providing 2^128 addresses:

TEXT
IPv4: 4,294,967,296 addresses
      (4.3 billion)

IPv6: 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses
      (340 undecillion)

To put this in perspective: IPv6 could assign 100 addresses to every atom on the surface of the Earth and still have addresses left over.

IPv6 address types

TypePrefixPurpose
Global Unicast2000::/3Public internet addresses (like IPv4 public IPs)
Link-Localfe80::/10Local network only (auto-configured on every interface)
Unique Localfc00::/7Private addresses (like IPv4 192.168.x.x)
Multicastff00::/8One-to-many communication
Loopback::1Localhost (like IPv4 127.0.0.1)

Well-known IPv6 addresses

Terminal
# Google Public DNS
2001:4860:4860::8888
2001:4860:4860::8844

# Cloudflare DNS
2606:4700:4700::1111
2606:4700:4700::1001

# Quad9 DNS
2620:fe::fe
2620:fe::9

IPv4 vs IPv6: Side-by-Side Comparison

FeatureIPv4IPv6
Address length32 bits128 bits
Address formatDotted decimal (192.168.1.1)Hexadecimal colon (2001:db8::1)
Total addresses~4.3 billion~340 undecillion
Header size20-60 bytes (variable)40 bytes (fixed)
FragmentationRouters and senderSender only
ChecksumIn headerRemoved (handled by L2/L4)
NAT requiredYes (address shortage)No (enough addresses for everyone)
IPsecOptionalBuilt-in (mandatory support)
Auto-configurationDHCP requiredSLAAC (stateless auto-config)
BroadcastSupportedReplaced by multicast
DNS recordA recordAAAA record

Security Differences

IPv4 security

IPv4 was designed without security in mind. IPsec (encryption and authentication) was added later as an optional extension. Most IPv4 traffic is unencrypted at the network layer.

NAT provides accidental security by hiding internal network topology, but NAT was never designed as a security feature. Learn more about how firewalls use IP addresses.

IPv6 security improvements

IPv6 was designed with security built in:

  • Mandatory IPsec support - Every IPv6 implementation must support IPsec
  • No NAT needed - Eliminates NAT-related vulnerabilities
  • Secure Neighbor Discovery (SEND) - Cryptographically signed neighbor discovery
  • Larger address space - Makes network scanning attacks harder (scanning a /64 subnet at 1 million addresses per second would take 584,942 years)

However, IPv6 introduces new attack surfaces:

  • Dual-stack configurations can be exploited
  • IPv6 tunneling can bypass IPv4 firewalls
  • SLAAC can expose device MAC addresses (mitigated by privacy extensions)

How to Check Your IPv6 Support

Test if you have IPv6

Terminal
# Check if your interface has an IPv6 address
# macOS/Linux
ifconfig | grep inet6

# Windows
ipconfig | findstr IPv6

Test IPv6 connectivity

Terminal
# Ping Google's IPv6 DNS
ping6 2001:4860:4860::8888

# Or on newer systems
ping -6 google.com

Check your public IPv6 address

Visit What's My IP - if your ISP supports IPv6, both your IPv4 and IPv6 addresses may be detected.

Dual-Stack: Running Both Protocols

Most modern networks run dual-stack - both IPv4 and IPv6 simultaneously. This allows communication with both IPv4-only and IPv6-only services.

TEXT
Your device
  ├── IPv4: 192.168.1.105  → IPv4 internet
  └── IPv6: 2001:db8::105  → IPv6 internet

When connecting to a dual-stack website, your operating system uses the Happy Eyeballs algorithm (RFC 6555) to try both IPv4 and IPv6 simultaneously and use whichever responds first.

IPv6 Adoption Rates

As of 2026, IPv6 adoption varies significantly by country:

CountryIPv6 Adoption
India~70%
United States~50%
Germany~60%
Japan~55%
Brazil~40%
Australia~30%
China~35%

Google reports that approximately 45% of all traffic to their services comes over IPv6. The adoption rate is growing steadily at 5-10% per year.

What This Means for You

For regular users: IPv6 is mostly invisible. Your ISP and operating system handle it automatically. You do not need to configure anything.

For developers: Ensure your applications support both IPv4 and IPv6. Test with IPv6 addresses. Use address-family-agnostic socket APIs.

For network administrators: Plan your IPv6 deployment now if you have not already. Dual-stack is the recommended transition strategy.

Summary

IPv4 is the protocol that built the internet, but its 4.3 billion address limit is now exhausted. IPv6 provides a permanent solution with a virtually unlimited address space, built-in security, and simpler header processing. The transition is happening gradually through dual-stack deployments.

Explore further:

Share this article