IPv4 vs IPv6: What’s the Difference?
IPv4 and IPv6 are the two versions of the Internet Protocol that assign addresses to devices on a network, where IPv4 uses 32-bit addresses and IPv6 uses 128-bit addresses. The Internet Engineering Task Force (IETF) defined IPv4 in RFC 791 in 1981 and IPv6 in RFC 8200. This article compares IPv4 and IPv6 across address length and format, the size of each address space, the IPv4 address exhaustion problem and the role of NAT, the built-in features of IPv6 such as autoconfiguration and IPsec, the current state of adoption and dual-stack operation, and the compatibility between the two protocols.
IPv4 provides roughly 4.3 billion addresses, while IPv6 provides roughly 340 undecillion addresses, which answers the address shortage that drove the move to IPv6. The two protocols are not directly interoperable, so networks run both at once during the transition. Each section names the standard, address format, or figure involved.
What Is the Difference Between IPv4 and IPv6?
The difference between IPv4 and IPv6 is that IPv4 uses 32-bit addresses written as four decimal numbers, while IPv6 uses 128-bit addresses written as eight hexadecimal groups. The table below compares the two protocols across their main attributes.
| Attribute | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Format | Dotted decimal (192.168.1.1) | Hexadecimal (2001:db8::1) |
| Address space | About 4.3 billion | About 340 undecillion |
| Configuration | Manual or DHCP | Autoconfiguration (SLAAC) or DHCPv6 |
| IPsec | Optional | Built into the protocol |
| NAT | Common due to shortage | Not required |
| Header | Variable length | Fixed 40-byte length |
| Broadcast | Supported | Replaced by multicast |
IPv4 and IPv6 both perform the same core task of addressing and routing packets. The two protocols differ in scale, configuration, and built-in features rather than in purpose. The general role of an address appears in the overview of an IP address.
What Is the Address Format of IPv4 and IPv6?
IPv4 writes an address as four decimal octets separated by dots, while IPv6 writes an address as eight groups of four hexadecimal digits separated by colons. The two formats reflect the different address lengths.
- IPv4 uses dotted decimal. An IPv4 address such as 192.168.1.1 holds four octets, each ranging from 0 to 255, for a total of 32 bits.
- IPv6 uses hexadecimal groups. An IPv6 address such as 2001:0db8:0000:0000:0000:0000:0000:0001 holds eight groups of 16 bits, for a total of 128 bits.
- IPv6 allows compression. A run of consecutive zero groups collapses to a double colon, so the example above shortens to 2001:db8::1.
- Leading zeros drop in IPv6. A group such as 0db8 writes as db8, which further shortens the address.
How Large Is the Address Space of Each Protocol?
IPv4 provides about 4.3 billion addresses, and IPv6 provides about 340 undecillion addresses. The difference comes from the address length.
IPv4 uses 32 bits, which gives 2 to the power of 32, or 4,294,967,296, total addresses. IPv6 uses 128 bits, which gives 2 to the power of 128, or roughly 340 trillion trillion trillion, addresses. The IPv6 space is large enough to assign a unique address to every device for the foreseeable future without reuse.
The figure of 340 undecillion writes as 3.4 followed by 38 digits. The host portion within a subnet is bounded by the subnet mask in IPv4 and by the prefix length in IPv6.
What Is IPv4 Address Exhaustion?
IPv4 address exhaustion is the depletion of the roughly 4.3 billion IPv4 addresses caused by the growth of internet-connected devices. The Internet Assigned Numbers Authority (IANA) allocated the final blocks of IPv4 addresses to the regional registries in 2011.
The number of devices on the internet passed the IPv4 address count, which created a shortage. The shortage drove two responses. The first response is Network Address Translation, which lets many devices share one public address.
The second response is IPv6, which removes the shortage through its far larger address space. The American Registry for Internet Numbers (ARIN) exhausted its free IPv4 pool in 2015. The exhaustion of IPv4 addresses is the primary reason the internet moves toward IPv6.
How Does NAT Extend IPv4?
Network Address Translation lets many devices on a private network share a single public IPv4 address, which delays IPv4 exhaustion. A router performs the translation between private and public addresses.
A home network assigns private IPv4 addresses such as 192.168.1.20 to each device. The router translates those private addresses to one public address when traffic leaves for the internet, and translates return traffic back to the correct private device. NAT conserves public addresses, because one public address serves an entire network.
NAT also adds a side effect of hiding internal addresses from the public internet. The full mechanism appears in the overview of Network Address Translation. IPv6 removes the need for NAT, because every device receives a globally unique address.
What Features Does IPv6 Add?
IPv6 adds autoconfiguration, built-in IPsec, a simplified header, and the removal of NAT as standard features. The protocol was designed to correct limitations of IPv4.
- Stateless address autoconfiguration assigns addresses. SLAAC lets a device generate its own IPv6 address from the network prefix without a DHCP server.
- IPsec is part of the protocol. IPv6 includes authentication and encryption support in the base specification, where IPv4 treats IPsec as an add-on.
- A fixed header simplifies routing. The IPv6 header is a fixed 40 bytes, which lets routers process packets with less overhead than the variable IPv4 header.
- Multicast replaces broadcast. IPv6 removes broadcast and uses multicast and anycast, which reduces unnecessary traffic on the network.
How Far Has IPv6 Adoption Progressed?
IPv6 adoption reached more than 40 percent of traffic to Google by 2024, according to Google IPv6 statistics, while most networks run IPv4 and IPv6 together through dual-stack. Adoption varies widely by country.
Dual-stack operation runs IPv4 and IPv6 on the same device at the same time, so the device uses whichever protocol a destination supports. A dual-stack approach allows a gradual transition, because a network does not switch off IPv4 until every destination supports IPv6.
Some countries report IPv6 adoption above 60 percent, while others remain below 10 percent. The transition continues, because IPv4 still carries a large share of internet traffic and many legacy systems support only IPv4.
How Does Security Differ Between IPv4 and IPv6?
IPv6 includes IPsec support in its base specification, while IPv4 added IPsec later as an optional extension. The security difference covers encryption, address scanning, and privacy.

- IPsec authenticates and encrypts traffic. IPv6 defines IPsec headers in the core protocol, which standardizes end-to-end authentication and encryption.
- The larger IPv6 space resists scanning. A subnet with 2 to the power of 64 addresses is too large to scan address by address, unlike a small IPv4 subnet.
- Privacy extensions hide the interface identifier. RFC 4941 lets a device rotate the host portion of its IPv6 address so a server cannot track it over time.
- The loss of NAT removes one barrier. A globally routable IPv6 address exposes a device directly, so a firewall replaces the incidental filtering that NAT provided.
IPv6 does not make a network secure on its own, because misconfiguration affects both protocols. A firewall remains necessary on IPv6, since every device holds a public address rather than a private one behind NAT.
Are IPv4 and IPv6 Compatible?
IPv4 and IPv6 are not directly compatible, because the two protocols use different address lengths and packet formats. A pure IPv6 device cannot communicate with a pure IPv4 device without a translation mechanism.
- Dual-stack runs both protocols. A device with both IPv4 and IPv6 enabled communicates with hosts on either protocol.
- Tunneling carries IPv6 over IPv4. A tunnel wraps IPv6 packets inside IPv4 packets to cross an IPv4-only network segment.
- Translation converts between protocols. NAT64 and similar mechanisms translate IPv6 traffic to IPv4 so an IPv6-only client reaches an IPv4-only server.
- Applications may need updates. Software that stores addresses in a 32-bit field requires changes to handle the longer IPv6 address.
What Are the Types of IPv6 Addresses?
IPv6 defines three address types: unicast, multicast, and anycast, and removes the broadcast type that IPv4 uses. Each type controls how many interfaces a packet reaches.
- A unicast address identifies one interface. A packet sent to a unicast address reaches a single device, the same role the common IPv4 address fills.
- A multicast address reaches a group. A packet sent to a multicast address, which begins with ff00::/8, reaches every interface that joined the group.
- An anycast address reaches the nearest member. A packet sent to an anycast address reaches the closest of several interfaces that share the address.
- A link-local address stays on one link. An address in the fe80::/10 range works only on the local segment and is generated automatically for every IPv6 interface.
The removal of broadcast reduces unnecessary traffic, because multicast delivers only to interested devices. Every IPv6 interface holds a link-local address in addition to any global address.
How Does IPv6 Support the Internet of Things?
IPv6 supports the Internet of Things by providing enough addresses to assign a unique global address to every connected device without NAT. The number of connected devices is the reason the address space matters.

The International Data Corporation estimated tens of billions of connected devices by the middle of the 2020s, a figure that exceeds the entire IPv4 address space. IPv6 assigns each sensor, meter, and appliance its own routable address, which removes the address-sharing workaround that NAT requires. A direct global address simplifies device management and remote access, because each device is reachable without port forwarding.
Stateless address autoconfiguration also lets a device join a network and obtain an address without a DHCP server, which suits large fleets of low-power devices. The address space of IPv6 is the feature that makes this scale possible.
Key Takeaways
- IPv4 uses 32 bits and IPv6 uses 128 bits. The longer IPv6 address gives a far larger pool of addresses.
- IPv6 solves address exhaustion. IPv4 offers about 4.3 billion addresses, while IPv6 offers about 340 undecillion.
- NAT extends IPv4. Network Address Translation lets many devices share one public IPv4 address.
- IPv6 builds in extra features. Autoconfiguration, IPsec, and a fixed header come as standard in IPv6.
- Networks run dual-stack. Most networks operate IPv4 and IPv6 together during the transition.
What is the main difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses written in dotted decimal, while IPv6 uses 128-bit addresses written in hexadecimal. IPv6 provides a far larger address space than IPv4.
Why was IPv6 created?
IPv6 was created to solve IPv4 address exhaustion. IPv4 provides about 4.3 billion addresses, which the growth of internet devices outpaced. IPv6 provides about 340 undecillion addresses.
How many addresses does IPv6 have?
IPv6 has about 340 undecillion addresses, written as 2 to the power of 128. The figure equals 3.4 followed by 38 digits, enough for every device for the foreseeable future.
Is IPv6 faster than IPv4?
IPv6 can route more efficiently through a fixed header and no NAT, but speed depends mainly on the connection and network path. The performance difference in practice is usually small.
Can IPv4 and IPv6 work together?
Yes. Most networks run dual-stack, with IPv4 and IPv6 active at the same time. Tunneling and translation mechanisms such as NAT64 also bridge the two protocols during the transition.
Do I need IPv6 at home?
Many internet providers already assign IPv6 alongside IPv4 through dual-stack. IPv6 is not required for most home use yet, but adoption continues to grow across networks worldwide.
Last Thoughts on IPv4 vs IPv6
IPv4 and IPv6 are the two Internet Protocol versions, where IPv4 uses 32-bit dotted-decimal addresses and IPv6 uses 128-bit hexadecimal addresses. The 4.3 billion IPv4 addresses ran short as internet devices multiplied, which led to Network Address Translation and the move to the roughly 340 undecillion addresses of IPv6.
IPv6 adds autoconfiguration, built-in IPsec, and a fixed header, and most networks run both protocols through dual-stack during the transition. The address shortage that NAT addresses is covered in the overview of Network Address Translation, the meaning of each address in the overview of an IP address, and the broader set of topics on the how networks work hub.


