We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 7-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
On February 3rd, 2011, the Internet Assigned Numbers Authority (IANA) handed out the last blocks of IPv4 addresses to the five regional registries. After thirty years, the pool was empty. The internet's original address system had officially run dry.
And yet here we are, well into the 2020s, and most of the internet still runs on IPv4. New devices come online every second. Billions of IoT sensors, phones, and servers keep getting addresses. How?
Through a combination of NAT, CIDR, private address spaces, and dynamic allocation, all clever hacks that squeeze more life out of a fundamentally limited system. We've been patching the roof instead of building a new house.
IPv6 is that new house. It was designed in 1998, has been "coming soon" for over two decades, and offers enough addresses to assign a unique one to every atom on the surface of the Earth, several times over. The transition has been painfully slow, but it is genuinely happening now. Understanding both protocols and how they coexist is non-negotiable for anyone working in networking or cloud infrastructure.
IPv4 addresses look like this: 192.168.1.1, four groups of numbers (0-255), separated by dots. Each address is 32 bits long, giving us 2^32 = approximately 4.3 billion possible addresses.
IPv6 addresses look like this: 2001:0db8:85a3:0000:0000:8a2e:0370:7334, eight groups of four hexadecimal characters, separated by colons. Each address is 128 bits long, giving us 2^128 = approximately 340 undecillion (340 trillion trillion trillion) addresses.
To put that number in perspective: if you could assign a billion IPv6 addresses per second, it would take 10 billion trillion years to use them all. The sun will burn out long before we run out.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Total addresses | ~4.3 billion | ~340 undecillion |
| Format | Dotted decimal (192.168.1.1) | Hexadecimal groups (2001:db8::1) |
| Header size | 20-60 bytes (variable) | 40 bytes (fixed) |
| NAT required? | Yes, constantly | No, every device gets a public address |
| IPsec | Optional add-on | Built into the protocol |
| Broadcast | Yes | No (replaced by multicast/anycast) |
| Configuration | Manual or DHCP | SLAAC (auto-configuration) + DHCPv6 |
The fixed header size in IPv6 is a big deal for performance. IPv4 headers have variable lengths, which means routers have to parse each header to know where the data starts. IPv6 headers are always exactly 40 bytes, routers process them faster because there's no guesswork.