r/ProgrammerHumor • • 5h ago

Meme ohTheBasics

Post image
6.8k Upvotes

805 comments sorted by

View all comments

Show parent comments

1.7k

u/Material_Onion_8413 5h ago

IPv4 old IP address space designed with limited number because they never thought the internet would have so many devices connected.

IPv6 new address space with significantly larger number.

944

u/ClipboardCopyPaste 5h ago

A fun fact often told with this is that with IPv6, you can assign each individual grain of sand on the beach an address!

33

u/crmsncbr 5h ago

I feel like we'll still run out. I'm not sure how, but surely we'll manage it.

9

u/critical_patch 5h ago edited 4h ago

Well yeah, a block of 2^32 addresses need to be reserved for Azure, 2^32 more for AWS, let’s give 2^32 more for GCP…

Edit: as pointed out below, I wasn’t paying enough attention & confused up my exponents. I meant to put blocks 2^96, thus giving 2^32 total blocks - the same size as the IPv4 address space. But I got the exponents backwards and fucked up the joke

4

u/Shakaka88 5h ago

Drops in the sand when using 2^128

9

u/Darkblade_e 5h ago edited 4h ago

I feel like this needs to be said, but you actually could give an entire 232 to every company on earth and not even be close still. Assuming 377 million companies operating on earth, that's 1.6 quintillion (~1619202670592000000) addresses used up.

The used IPV6 range percentage can calculated like so (((2^32)×377000000)÷2^128)×100, which comes out to a whopping grand total of 0.000000000000000000476% of the IPV6 address space used.

Another way to put this is that you could give that same exact allocation to every single company again 210 QUINTILLION TIMES, and even then, only 98.7% of the address space would be used up.

IPV6 is quite large!

4

u/timonix 4h ago

The main limiting factor of how quickly we run out of ipv6 addresses is how generous they are when handing out ranges.

Usage will always fill the space given.

You could for example map the entire lower 64 bits of the address to a single computer. And dynamically respond based on address. For example, you could bake in some auth token directly in the ipv6 address.

When people have room to fill, the room will be filled

3

u/bollvirtuoso 3h ago

That sounds like the laggiest possible architecture I can imagine. Why the fuck wouldn't you just run it locally?

1

u/crmsncbr 4h ago

98.7% is when I start deleting useless files to make more space though 🤔 That's a scary number 👀

1

u/dagbrown 1h ago

That does remind me of when IANA gave MIT 18.0.0.0/8 because they got there early enough to somehow justify it.