IPv4 and IPv6: Why the Internet Uses Two Address Families
📑 On this page
- IPv4 address space
- Network address translation
- IPv6 address space
- IPv6 address types
- Link-local
- Global unicast
- Unique local
- Loopback
- Automatic configuration
- A concrete dual-stack connection
- Why IPv6 is not simply "IPv4 with longer addresses"
- Security and IPv6
- Transition mechanisms
- Does IPv6 remove NAT?
- Common misunderstandings
- "IPv6 is automatically faster"
- "IPv4 will stop working when IPv6 arrives"
- "IPv6 does not need a firewall"
- "The huge address space means one device gets only one permanent address"
- Knowledge check
- The one idea to remember
The internet began using IPv4 long before billions of people carried several connected devices. Its address space could not support indefinite growth with one globally unique address per interface.
IPv6 was designed as the long-term successor.
IPv4 uses 32-bit addresses. IPv6 uses 128-bit addresses, creating an enormously larger space and modernizing several network mechanisms.
The internet uses both because replacing a global protocol cannot happen in one coordinated moment.
IPv4 address space
IPv4 addresses contain 32 bits:
2^32 = 4,294,967,296 possible patternsThey are written as four decimal octets:
192.0.2.10Not all patterns are available for ordinary global assignment. Ranges are reserved for private networks, multicast, loopback, documentation, and other purposes.
Early allocation practices also assigned large blocks generously. Internet growth exhausted the central pool of unallocated IPv4 addresses.
Existing addresses continue to be transferred and reused, but scarcity creates operational cost.
Network address translation
NAT allowed many private devices to share fewer public IPv4 addresses.
A home router records translations such as:
192.168.1.42:53000
↕
public-address:62001Replies to the public address and translated port are mapped back to the internal connection.
Carrier-grade NAT adds another provider-level translation layer, allowing many customers to share public IPv4 addresses.
NAT extended IPv4's life but complicates:
- Inbound connections
- Peer-to-peer applications
- Troubleshooting
- Address-based logging
- Protocols that embed addresses
NAT is not a complete firewall, though translation state often coincides with filtering behavior.
IPv6 address space
IPv6 addresses contain 128 bits:
2^128That is approximately 3.4 × 10^38 possible values.
The space supports hierarchical allocation and many addresses per interface without depending on widespread address sharing.
IPv6 is written in hexadecimal groups:
2001:0db8:0000:0000:0000:0000:0000:0010Leading zeros in a group can be omitted:
2001:db8:0:0:0:0:0:10One continuous run of zero groups can be compressed with :::
2001:db8::10Only one :: can appear because two would make expansion ambiguous.
IPv6 address types
An IPv6 interface commonly has several addresses.
Link-local
Addresses beginning with fe80::/10 support communication on the local link and are essential for neighbor discovery and router communication.
Global unicast
Globally routed addresses commonly come from 2000::/3.
Unique local
Addresses in fc00::/7 are intended for private-like internal use and are not normally routed globally.
Loopback
::1represents the local host.
IPv6 does not use broadcast in the IPv4 sense. It relies on multicast and other mechanisms.
Automatic configuration
IPv6 routers send router advertisements.
Hosts can use Stateless Address Autoconfiguration to form addresses from an announced prefix. DHCPv6 can provide additional configuration or managed addressing.
Neighbor Discovery Protocol replaces several IPv4 local-network mechanisms, including ARP's address resolution role.
An interface can create temporary privacy addresses for outbound connections so one stable address is not exposed everywhere indefinitely.
A concrete dual-stack connection
Suppose a laptop and website both support IPv4 and IPv6.
- DNS returns IPv4 and IPv6 addresses.
- The client tries suitable paths, often preferring the one that connects successfully first.
- If IPv6 works well, traffic uses it.
- If not, IPv4 remains available.
This is dual stack: both protocols operate.
Applications generally ask the operating system to connect to a hostname rather than manually choosing address families.
Broken partial IPv6 can create delays, so modern connection algorithms race or stagger attempts to avoid waiting too long.
Why IPv6 is not simply "IPv4 with longer addresses"
IPv6 also changes:
- Header structure
- Address configuration
- Neighbor discovery
- Fragmentation behavior
- Multicast use
- Extension headers
Routers do not fragment IPv6 packets in transit. Endpoints use path-MTU discovery and fragment when necessary.
The header is designed for efficient forwarding with optional information placed in extension headers.
IPv6 still needs transport protocols, DNS, routing, firewalls, and application security.
Security and IPv6
The large address space does not make hosts invisible.
Attackers can discover services through DNS, logs, traffic observation, predictable addressing, or targeted scanning.
IPv6 needs firewall policy just like IPv4.
Organizations sometimes secure IPv4 carefully while accidentally leaving broad IPv6 access because they forgot it was enabled.
Security tools, monitoring, and access rules must cover both families.
Transition mechanisms
IPv4 and IPv6 packets are not directly interchangeable.
Transition approaches include:
- Dual stack
- Tunneling one protocol through another
- Protocol translation
- IPv6-only networks with translation to IPv4 services
Each adds operational complexity.
The long coexistence continues because every provider, device, application, enterprise, and embedded system follows its own upgrade schedule.
Does IPv6 remove NAT?
IPv6 makes globally unique addressing practical and removes address scarcity as the main reason for NAT.
Networks still use firewalls to control inbound and outbound communication.
Some organizations use IPv6 prefix translation or other mechanisms for operational reasons, but end-to-end addressing can be restored without widespread port-sharing NAT.
Address privacy and access control should be handled deliberately rather than relying on translation as accidental protection.
Common misunderstandings
"IPv6 is automatically faster"
It can produce a better route or avoid translation, but speed depends on provider paths, routing, network quality, and implementation.
"IPv4 will stop working when IPv6 arrives"
They have coexisted for years, and transition remains gradual.
"IPv6 does not need a firewall"
Globally unique addressing does not grant permission. Filtering and service security remain essential.
"The huge address space means one device gets only one permanent address"
IPv6 commonly assigns several addresses with different scopes and lifetimes.
Knowledge check
1. How many bits are in IPv4 and IPv6 addresses?
IPv4 uses 32 bits; IPv6 uses 128 bits.
2. What problem did widespread IPv4 NAT help manage?
It allowed many private devices to share scarce public IPv4 addresses.
3. What does 2001:db8::10 abbreviate?
It compresses leading zeros and one continuous run of all-zero 16-bit groups in an IPv6 address.
4. What is dual stack?
It is operating IPv4 and IPv6 simultaneously so communication can use either address family.
The one idea to remember
IPv6 expands addressing from 32 to 128 bits and updates network operation, but global migration requires long coexistence with IPv4.
NAT preserved scarce IPv4 space; IPv6 restores abundant end-to-end addressing while still requiring routing, firewalls, and secure applications.
Next, we will follow routers as they turn destination prefixes into hop-by-hop forwarding decisions.