🌐
IPv4 vs IPv6
How the two internet addressing schemes differ.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32-bit | 128-bit |
| Total addresses | ~4.3 billion (2³²) | ~340 undecillion (2¹²⁸) |
| Notation | Dotted decimal192.168.1.1 | Hex, colon-separated2001:db8::8a2e:370:7334 |
| Groups | 4 octets (0–255) | 8 groups of 4 hex digits |
| Configuration | Manual or DHCP | Autoconfiguration (SLAAC) or DHCPv6 |
| NAT | Common (address scarcity) | Rarely needed (huge space) |
| Header | Variable, more fields | Simplified, fixed 40 bytes |
| Security | IPsec optional | IPsec designed in |
| Broadcast | Yes | No — uses multicast/anycast |
Why IPv6 exists
The world ran out of unique IPv4 addresses — 4.3 billion isn't enough for billions of phones, computers and connected devices. IPv6's 128-bit space is effectively unlimited, removing the need for workarounds like NAT and simplifying routing.
Do I need to do anything?
Usually no. Modern operating systems and most ISPs support both ("dual stack") and pick the best one automatically. IPv4 will coexist with IPv6 for a long time.
Quick examples
- IPv4 loopback:
127.0.0.1· IPv6 loopback:::1 - Shortening IPv6: consecutive zero groups collapse to
::(once per address).