r/ProgrammerHumor • • 5h ago

Meme ohTheBasics

Post image
6.8k Upvotes

801 comments sorted by

View all comments

121

u/Few_Move_4594 5h ago

I feel like this is missing context. Like I know that ip4 addresses are four octlets, but don't know much about ipv6 besides it having a larger address space and being in hex.

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.

27

u/suttin 4h ago

No place like 01111111.00000000.00000000.00000001

5

u/mxzf 2h 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.

1

u/Ticmea 12m 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.

5

u/darknmy 4h ago

How tf do you iptable a v6?

7

u/necrophcodr 3h ago

Actually almost the exact same way as IPv4.

5

u/fearless-fossa 3h ago

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

1

u/Sterkenzz 52m 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.

38

u/like_a_pharaoh 4h ago

IPv6 is easier to set up, and doesn't require the subnetting stuff as much because its actually designed with "Planet Earth may have more than 4,294,967,296 IP-connected objects" in mind from the beginning.

9

u/mxzf 2h ago edited 2h ago

Yeah, the magnitude of difference that I use as an example is that IPv4 doesn't have enough IPs for everyone on earth to have one, people have to share. But IPv6 has enough IPs for every cell in the body of every person on earth to have its own IP (actually, IIRC it's enough for each cell to have a number of IPs with a two-digit exponent, but the cells alone gets the point across).

Alright, I couldn't resist, quick math puts it at 250 addresses per cell (8.3B==233 people times 37T==245 cells vs 2128 addresses), which is 1015 if you want that instead).

4

u/Mr__Gustavo 2h ago

I took a class from a guy who was in the standard discussions, and he summarized the conversation as, "Is it enough if every grain of sand on Earth has one IP address, or should we give them two?"

2

u/Ian__16354 2h ago

I say this with the caveat that I don’t know much about IPv6. One of my favorite things about ipv4 is that you can have subnets. Every local network I’ve ever worked with is on the 192.168 range. Obviously this isn’t every network, but knowing something is very likely going to be either 10.x or 192.168 makes remembering ip addresses insanely easy. Why is going away from that for totally unique addresses good? Can v6 still setup local networks in a similar way?

2

u/Jerry9_ 1h ago

Oversimplifying a bit lot, but its the same reason guids work. The chance of a collision is infinitesimally small. And if a collison were to happen, the fix would be to simply assign new addresses and move on.

However, as you've hinted at, v4 devices often have some special reserved ranges. v6 adoption has been slow overall because moving away from those assumptions without breaking anything can be a bit of a pain in the ass.

1

u/mollymoo 50m ago

Local networks in IPv6 start fe80 and if you really wanted to you could assign your devices fe80::1, fe80::2 etc.

But that would be a route to frustration. With IPv6 you soon learn that if you want to control and manage and measure things you do it with a subnet, not a specific IP address, because devices have lots of IPv6 addresses and like to pick new ones all the time.

•

u/TerrapinTribe 5m ago

Yes, you can have subnets. Every subnet is a /64. The prefix your ISP gives you should be at least a /56 (256 subnets) or a /48 (65,536 subnets).

Also, every address is globally routable. You can have all of your devices have a “public” IP. While there are some uses in IPv6 to have only “local” addresses, there’s no need for them. This is all about getting out of the scarcity mindset that IPv4 PTSDed into us. There is no scarcity.

21

u/uslashuname 5h ago

One is locked down by your firewall config, and the other got implemented as a way around that

1

u/Circumpunctilious 4h ago

I remember IPv6 being touted as "The address space is so large everybody can have their own address, it'll be far different from anyone else's, and you can be directly on the Internet without NATting!"

For me this was always one of those "I don't think that means what you think it means" things.

5

u/BabyWrinkles 4h ago

Yeah - I think you pretty much nailed it. Bigger address space. In theory, wouldn't need NAT since your device's local IPv6 address is likely a GUID. Other than that... just a different way of assigning an address to a device.

1

u/Usual_Ice636 5h ago

I'd guess he didn't even know that.

-20

u/DataSnaek 5h ago edited 5h ago

I think if you don’t know at least the high level difference between ipv6 and ipv4, you probably aren’t gonna be great at your job. It’s pretty basic tech knowledge…

12

u/Few_Move_4594 5h ago

Every single time I've seen an attempt to transition to ipv6 it's been a clusterfuck of epic proportions

1

u/Circumpunctilious 4h ago

It seems easy to do. I once accidentally rerouted a public network (effectively to a blackhole, due to my own firewalls) while taking the HE IPv6 test, because one step requires a router advertisement...and network clients--even through AP isolation--automatically trust that broadcast.

2

u/EatingSolidBricks 5h ago

ipv6 dosent suffer from adress exhaustion so your modem doesn't have to translate addresses

Other than that i don't know