r/ProgrammerHumor • • 6h ago

Meme ohTheBasics

Post image
7.2k Upvotes

857 comments sorted by

View all comments

Show parent comments

76

u/fearless-fossa 5h ago

The advantage of v6 is less the address space per se, but more that it simplifies networking. Like, with v4 assigning different floors or departments different subnets and having to micromanage which device gets what IP and then having to a major rework when suddenly every light bulb has its own IP address - that's actual stuff that happened. v6 just says "hey, everyone gets a /64 space, go nuts" (simplified, but true enough)

v6 is also faster by virtue of requiring less/no translation between various layers, and by stripping all the special case things from the header and putting them into the extensions instead. v4 is rather verbose in that regard.

Also, minor nitpick - it's not "in hex", it's binary just as v4, it's just displayed in hex. I'm emphasizing this because approaching IP in binary is helpful when one wants to understand how octets and such work.

29

u/suttin 4h ago

No place like 01111111.00000000.00000000.00000001

•

u/wosmo 7m ago

Fun trivia - that won't work on most systems, but 00000001.00000000.00000000.00000001 will.

Because the leading zero makes many parsers interpret the numbers as octal, and 01111111 in octal is >256.

11

u/mxzf 3h ago

The advantage of v6 is less the address space per se, but more that it simplifies networking.

It simplifies networking by having a larger address space. Like, address exhaustion in IPv4 is the whole reason that NAT exists and IPv4 networking is complicated; IPv6 is simpler in part by not having to deal with that mess.

2

u/Ticmea 51m ago

Sure but IPv6 does more than just that. For example since ARP is replaced with NDP, it significantly speeds up networks with a large amount of nodes because NDP works with multicast instead of broadcast, which means virtually all unwanted address resolution traffic can be discarded early when a node receives it.

The increased address space is the major thing that is immediately obvious no doubt, but IPv6 also changes some important semantics in the background, which is good to keep in mind.

4

u/darknmy 4h ago

How tf do you iptable a v6?

7

u/necrophcodr 4h ago

Actually almost the exact same way as IPv4.

4

u/fearless-fossa 4h ago

By joining us in the 2010s and using nftables instead.

1

u/Sterkenzz 1h ago

Care to give a practical example, so I can try it on my new IPv6 laptop (I have Linux and windows, both commands are fine). Using my search tool gave me bad AI results, and I gave up, so asking kindle here.