Quick Summary
- IPv4 addresses are 32 bits (about 4.29 billion total) and look like 192.168.1.10; IPv6 addresses are 128 bits (about 3.4×1038) and look like 2001:db8::1
- IPv6 was created because IPv4 ran out of addresses -- the larger space removes that limit and restores end-to-end connectivity without heavy NAT
- IPv6 drops broadcast in favor of multicast, adds link-local (fe80::/10) and SLAAC self-configuration, and is usually deployed alongside IPv4 as dual-stack
The Phone-Number Analogy
Imagine a country whose phone numbers are only a few digits long. At first there are plenty to go around. But as more and more people get phones, the numbers run out -- there simply are not enough combinations. That is exactly what happened to IPv4. Its addresses are 32 bits long, which allows for about 4.29 billion of them. That sounded enormous in the 1980s, but with phones, laptops, servers, cameras, and smart light bulbs all wanting an address, the world ran out.
IPv6 is the fix -- and it is not a small fix. Instead of 32 bits, an IPv6 address is 128 bits long. That is roughly 3.4×1038 addresses, a number so vast that you could give billions of addresses to every grain of sand on Earth and never run out. Where IPv4 handed out a few short phone numbers, IPv6 hands out so many that scarcity simply stops being a problem.
The two protocols do the same job -- delivering packets from one device to another -- but they are not directly compatible. A device speaking only IPv4 cannot talk to a device speaking only IPv6. That is why the internet is migrating gradually, usually by running both at once (a setup called dual-stack) until IPv6 is everywhere.
What an Address Looks Like in Each Version
Here is the same idea -- "the address of one device" -- written the IPv4 way and the IPv6 way. Notice IPv4 uses four decimal octets, while IPv6 uses eight groups of hexadecimal digits separated by colons:
IPv6 Address Inspector & Compressor
Type any IPv6 address (full or shortened). The tool expands it, compresses it to the shortest legal form, and tells you what kind of address it is.
IPv6 has so many more addresses that on this chart the IPv4 bar would be far too thin to even see at true scale — IPv6 is about 79 billion billion billion times larger.
Two quirks make IPv6 compression confusing at first. First, you may drop leading zeros in
each group, so 0db8 becomes db8 and 0000 becomes 0.
Second, you may replace one run of all-zero groups with a double colon :: --
but only once per address, otherwise the address would be ambiguous. By convention you collapse the
longest run of zeros. That is why 2001:0db8:0000:0000:0000:0000:0000:0001 shortens to the much
friendlier 2001:db8::1.
The Key Differences, One at a Time
Address Size and Notation
IPv4 uses 32 bits, written as four decimal octets from 0 to 255, like
192.168.1.10 -- about 4.29 billion addresses total (232). IPv6 uses
128 bits, written as eight groups of four hexadecimal digits separated by colons, like
2001:db8::1 -- about 3.4×1038 addresses (2128). The hex
notation looks intimidating, but the compression rules (drop leading zeros, use :: once)
keep real-world addresses short.
No Broadcast -- Multicast Instead
IPv4 has a broadcast address (the last address in a subnet) that reaches every host at once. IPv6
removes broadcast entirely and uses multicast instead, which delivers
only to interested listeners. For example, ff02::1 reaches all nodes on the local link.
IPv6 also defines link-local addresses in fe80::/10 that every interface
gets automatically and that are valid only on the local network segment.
Autoconfiguration and Less NAT
IPv6 supports SLAAC (Stateless Address Autoconfiguration), letting a host build its own address from a router-advertised prefix without a DHCP server. And because addresses are so plentiful, every device can have a globally unique one -- so NAT is largely unnecessary. That restores true end-to-end connectivity, where two devices can address each other directly instead of hiding behind a shared public address. Firewalls still guard the door; they just no longer rewrite addresses to save space.
Simpler Header, Smoother Transition
The IPv6 header is a fixed 40 bytes with optional extension headers, which is simpler
and more efficient for routers to process than IPv4's variable header. Because the two protocols are not
interoperable, the internet migrates using three techniques: dual-stack (run IPv4 and
IPv6 side by side), tunneling (wrap one inside the other), and
translation (convert between them). Prefix lengths still use slash notation -- a
/64 is the typical subnet and a /48 is a common site allocation.
IPv4 vs IPv6 in the Real World
Here are three places where the difference between the two protocols actually shows up:
Your Home Router
Most home networks run dual-stack: your devices get a private IPv4 address like
192.168.1.20 behind NAT, and -- if your ISP supports it -- a globally routable IPv6
address via SLAAC. The same laptop quietly uses whichever version a given website supports, with no
action from you.
Large Websites
Major sites have offered IPv6 for years. Over 40% of traffic to Google already arrives over IPv6. When both ends support it, the connection uses IPv6; when one side is IPv4-only, it gracefully falls back. This is why the switch is invisible to most users.
Mobile Networks
Many mobile carriers are IPv6-first because they have far more phones than IPv4 addresses. They assign each phone an IPv6 address and use translation (like NAT64) to reach the remaining IPv4-only parts of the internet, neatly side-stepping IPv4 exhaustion.
Common IPv6 Misunderstandings
IPv6 trips people up in a few predictable ways. Watch out for these:
Using :: More Than Once
The double colon :: may appear only once in an address. Writing something
like 2001::25de::cade is invalid, because a parser cannot tell how many zero groups belong
to each ::. Collapse a single zero-run -- by convention, the longest one.
Expecting IPv4 and IPv6 to Interoperate
An IPv6-only host cannot talk directly to an IPv4-only host -- the protocols are separate. If a service seems unreachable, check whether both ends actually share a protocol. The fix is usually dual-stack or a translation gateway, not "they should just work together."
Confusing ::1 With fe80::
::1 is the loopback -- the IPv6 equivalent of 127.0.0.1,
meaning "this device." A fe80:: address is link-local -- a real interface
address that works only on the local segment. They are not the same thing and are not interchangeable.
Why IPv6 Exists at All
The whole story comes down to arithmetic. IPv4's 32-bit space tops out at roughly 4.29 billion addresses, and the regional registries that hand them out have run dry. NAT bought the world extra time by letting many devices share one public IPv4 address, but that is a workaround, not a cure -- it breaks the original end-to-end design of the internet. IPv6's 128-bit space is the real cure: with about 3.4×1038 addresses, scarcity is no longer a concern, every device can be directly addressable again, and the protocol header is cleaner in the bargain.
How the Migration Actually Happens
You will not wake up one day to find IPv4 switched off. The transition is incremental and mostly invisible. The dominant approach is dual-stack, where devices and routers speak both protocols and simply prefer IPv6 when it is available. Where dual-stack is not possible, networks use tunneling to carry one protocol's packets inside the other, or translation gateways to convert between them. Over time, more of the internet becomes IPv6-native, and IPv4 fades into a compatibility layer.
The bottom line: IPv4 and IPv6 do the same job, but IPv6 was built to outlast the address shortage that nearly throttled the internet's growth. Once you can read an IPv6 address, compress it correctly, and recognize loopback, link-local, and multicast at a glance, the protocol stops looking cryptic and starts looking like a roomier version of the IPv4 you already know.
Frequently asked questions about IPv4 vs IPv6
What is the difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses written as four decimal octets like 192.168.1.10, giving about 4.29 billion total addresses. IPv6 uses 128-bit addresses written as eight groups of four hexadecimal digits like 2001:db8::1, giving roughly 3.4×1038 addresses. IPv6 also drops broadcast in favor of multicast, supports stateless autoconfiguration (SLAAC), and makes NAT largely unnecessary.
How many addresses does IPv6 have?
IPv6 addresses are 128 bits long, so there are 2^128 of them — approximately 3.4×1038 (about 340 undecillion) addresses. That is so many that every grain of sand on Earth could be assigned billions of addresses, compared with IPv4's roughly 4.29 billion (2^32) total.
Why are we switching from IPv4 to IPv6?
The internet ran out of unallocated IPv4 addresses because 32 bits only provides about 4.29 billion of them, far fewer than the number of connected devices. IPv6's 128-bit space removes that limit, restores true end-to-end connectivity without heavy NAT, and simplifies the packet header. Adoption is gradual via dual-stack, with over 40% of traffic to Google already arriving over IPv6.
Does IPv6 still use NAT?
Generally no. NAT was invented to stretch the scarce IPv4 address space by sharing one public address among many private devices. Because IPv6 has an effectively unlimited supply of globally unique addresses, every device can have its own public address, restoring true end-to-end connectivity. Firewalls still control access, but address-translation NAT is largely unnecessary in IPv6.
What is a link-local IPv6 address?
A link-local address is an IPv6 address in the fe80::/10 range that is automatically assigned to every IPv6 interface and is valid only on the local link (a single network segment). It is never routed beyond that link and is used for neighbor discovery, router solicitation, and other on-link communication. The IPv6 loopback address ::1 is separate and refers to the device itself.
Put addressing into practice
You just learned how IPv4 and IPv6 addresses are built and read. The lab is IPv4-only, so practise there: wire up a topology, assign addresses and masks, and trace packets to see ARP, gateways and routes decide where each one goes.
Launch the networking lab →