News for hackers. Stuff that matters.
Re:Enabling IPv6 support for IPv4-only apps on Linux by WorldMaker on Thursday October 05, 2023 @01:21AM (#37775145)
> The only reason v6 is dual stack is because they're changing all the existing addresses and routing. If you're only creating a second header format that everything is updated to support, it can be mostly unified. Routing tables etc would all shared.

A new header format is a new version of IP. That's how it was designed. That's the compatibility story of IP. There is no way (there never was a way) to change the IPv4 header format without incrementing the version number. There is no way to not create a "second" stack when you increment the version number. Different versions are always different "stacks". They are always going to have different mechanics and need different hardware.

All the other things that IPv6 changed didn't make it a different stack. Making a version 6 at all made a new stack and all the other things were changed to throw in additional improvements (and make things simpler) since there needed to be a different stack anyway. If version 6 had changed "just" the header it still would have been just as hard to upgrade to, but people would have even fewer reasons to upgrade.

Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Thursday October 05, 2023 @11:32AM (#37779917)
You can call it a separate stack if you want, either way, the difficulty of going v6 comes from having totally separate addresses and routes as opposed to sharing everything. Basically every system out there is already capable of handling ipv6 headers, but they don't use it.
Re:Enabling IPv6 support for IPv4-only apps on Linux by icedchai on Thursday October 05, 2023 @12:17PM (#37780511)
If you increase the size of the address with "v4.1", you have the same situation as v6: a new protocol. How are you going to announce "v4.1" routes without updating BGP? You can't.
Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Thursday October 05, 2023 @12:56PM (#37781013)
You'd update BGP and the routers. They'd support both v4 and v4.1 packets with unified routing. All existing ownership of /32s from ipv4 would get carried over. Say v4.1 addrs are 64-bit max. V4.1 dst=1.2.3.4.53.2.1 could get BGP-routed to a 1.2.3/24 router, routed to a 1.2.3.4/32, to 1.2.3.4.53/40, to the dst. Also, during the transition period, a v4.1 packet addressed to a 32-bit addr would get auto-translated to v4.

This is unlike v6, which cannot address anything inside the v4 space. v6 and v4 are totally separate planes.

Re:Enabling IPv6 support for IPv4-only apps on Linux by WorldMaker on Thursday October 05, 2023 @01:32PM (#37781437)
BGP was already creaking under exponential growth effects under v4. It was the opinion of engineers deeper in that than me that BGP as it stood wouldn't have supported the weight of routes beyond 32-bits without massive tables that would not scale well at all. BGP was considered to be on the list of things that drastically needed to change as the address space expanded. (Again, you don't have to take my word for it, the IETF notes are of the various debates are generally public and so are the resulting RFCs.)

You are doing a lot of magic heavy lifting in "You'd update BGP and the routers" as if there was a way to do that with a "small point update", especially once you realize how much firmware and hardware was always the issue that needed changing; updating IP was never an easy software-only problem. Just because you think you can imagine it doesn't mean it was technically feasible, especially at internet scale. Engineers spent years exploring options before they arrived at the IPv6 proposals. The space/memory inefficiency of v4 BGP was one of the problems they had to address. Sure, they felt a need to address it with a brand new protocol with less resemblance to BGP than some would have liked, but that wasn't because they were a priori trying to make life more difficult for everyone: they wanted devices to be able to route IPv6 without needing GBs to TBs of RAM just for routes and were afraid that "just use good old BGP but massively extended with a larger address space" was going to go that way and possibly quickly.

Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Thursday October 05, 2023 @02:01PM (#37781831)
I don't mean to downplay the difficulty of supporting longer addresses in these systems, but it's been done for v6 already. That technical challenge has been mostly solved, and an adoption problem has taken its place.
Re:Enabling IPv6 support for IPv4-only apps on Linux by WorldMaker on Thursday October 05, 2023 @02:42PM (#37782381)
There's no IPv6 adoption problem in the consumer and developing world space. The remaining adoption hold-outs are corporate interests and the reasons for their hold-outs have generally nothing to do with BGP or other dissimilarities between v4 and v6, and everything to do with cargo culting "security best practices", sunk cost fallacy, and kind of generally wealth (massive ancient investments in IPv4 address space, including some ancient early windfalls when companies like Microsoft and GE got /8s just for asking in the right years; for now a lot of corporate America can easily afford to only support IPv4 for "business operations" so long as they don't have to deal with some major consumer networks).

There are major IPv6-only consumer networks (it's now quite common among the mobile carriers). IPv6 routing is starting to be generally faster and more reliable for consumers. Consumers have easily adopted v6 mostly without realizing it. ("Happy Eyeballs", indeed.)

There's no "adoption problem". It is adopted. It is working as intended. Will there be a day that we "turn off v4 for good"? Probably not, but every engineer who helped build v6 should have been well aware of Postel's Law and its many corollaries and the root "Internet law" that "no matter how many networks exist, they will always communicate and cooperate; there are many networks but only one Internet". IPv1 and IPv2 likely will always be the only IP versions to truly die and that will always be an historic accident of when IPv4 was devised while the Internet was still mostly young and "just" a research project among academics. Killing IPv4 was never the goal of IPv6, it had to live side-by-side, and everyone knew it. Is IPv6 a "success" at current adoption rates? Success is subjective. Obviously we disagree on how successful it is/has been. That may not change, because they are and always will be opinions.

Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Thursday October 05, 2023 @03:27PM (#37783119)
Enough things are v4-only that I couldn't imagine going all-v6 even at home, and that's predicated on my home ISP even giving a v6 address, which hasn't been a given. If v6 isn't intended to replace v4, I don't see what the point is; it's preferable to run one stack rather than two, and v4 is the easier choice still.
Re:Enabling IPv6 support for IPv4-only apps on Linux by WorldMaker on Thursday October 05, 2023 @06:20PM (#37785006)
Why would the point of v6 be to entirely replace v4? That's such an impossible to accomplish goal even if v6 was the most perfect protocol to ever exist and even if you didn't believe that by that point v4 was embedded in so much hardware as to be physically impossible to replace without incredible amounts of hardware recycling problems, including some dangerous deep sea diving and missions to space. Even in your own home you indicate you likely have hardware that you aren't in a hurry to replace.

The point of IPv6 was always to build an internet that could address the next several billion devices. IPv4 addressed way more devices than its developers ever intended and did an arguably above-and-beyond job at addressing the first billion or so. (We can argue for hours though on how hacks like NAT44 have broken some of the original spirit of IPv4, of course, in the course of prolonging its useful device addressing lifespan.) IPv6 is succeeding in that. There are emerging world devices getting addressed that could never afford a cramped IPv4 address. There are nearly as many mobile devices running IPv6-only or IPv6-first as servers in the first couple of decades of IPv4.

Will all of the "first billion" devices move to the new protocol? On the one hand, probably not. On the other hand, does it matter? The dream of the internet was always about bridging a bunch of networks that had no right talking to each other and that many people thought it impossible that they would ever speak common protocols. There's only one internet because no matter how complicated it gets, people are still cobbling together incredible ways for different stacks to talk to each. This is how the internet was built, this is how the internet will always exist. This was true in the era when internet tools were built out of putty around unix-to-unix copy somehow speaking to VAX servers across an Appletalk bridge to a token ring ethernet adapter to a proprietary IBM Mainframe protocol. It is still the case with IPv4 and IPv6 acting as side-by-side "friends" working together for the common good of the internet.

The internet doesn't really care if you only want to run "one stack" instead of two if you are fine that an increasing amount of your traffic is going through the equivalents of an Appletalk bridge, who may start charging for it at some point (or are volunteers running it for fun and might get bored). (I think in this analogy the biggest one of those Appletalk bridges is Cloudflare? Even I can't tell if I'm joking or not. It does explain some things about CF's business model.) It will take decades for it to get to that, though.

Anecdotally, my home ISP grants me an IPv6 allotment and I've noticed quite a bit of traffic using it. It's kind of fascinating because my current Wifi router indeed has some sort of memory pressure issue with some combo of IPv4 BGP routes and NAT44 firewall states and just entirely falls apart routing IPv4 at some point when it has been running for long enough. My previous employer's IPv4-only VPN seemed to especially stress it for whatever reasons, during WFH life, and I'd have to restart the router somewhat regularly for it to start routing IPv4 correctly again. IPv6 traffic just worked even when the router was dying on IPv4 traffic. If I wasn't on my work laptop or trying to use a site like HN or GitHub, I could go sometimes hours to days before realizing IPv4 addressing was broken again. My "prosumer" perspective is IPv6 is the reliable stack I use most often (gaming, lots of daily browsing, key apps I rely on, even many of my consumer devices just quietly falling back to 464XLAT and "Teredo" tunnels and still reaching IPv4 stuff despite my local router falling apart) and IPv4 the increasingly weird and flaky stack. I only know I can point a finger at IPv4 because I'm just enough of a nerd to do small bits of debugging when it happens out of curiosity, but it is an interesting pattern, anecdotally.

Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Friday October 06, 2023 @12:04PM (#37792543)
The authors of IPv6 intended to replace v4 with it, according to https://web.archive.org/web/20190129005124/http://www.ipv6.o...

Presumably the next several billion devices want to talk to the current ones. There will always be old devices left behind on old protocols, same as how old versions of SSL get rejected everywhere, and they can deal with it via compatibility layers like 4-to-6 NAT.

Re:Enabling IPv6 support for IPv4-only apps on Linux by icedchai on Thursday October 05, 2023 @01:25PM (#37781363)
Upgrading the routers is a monumental task and handling the "transition" when some routers are upgraded with v4.1 and some are not is impossible. What happens during the transition when a v4.1 source tries to send data to a v4 destination? The v4 can't talk back. You can't fit 64 bits in a 32 bit address. This is the same problem as with v6.
Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Thursday October 05, 2023 @01:53PM (#37781728)
Right, it only converts to v4 if both src and dst are 32-bit, which is fine in v4.1 too. Everyone can adopt v4.1 hardware/software without even thinking about it but hold off on using >32-bit addrs until they feel like enough peers are on v4.1. Yes it's only a one-way compatibility, but that's way better than v6 which is incompatible both ways, creating gridlock.

If you really want extra compatibility, idk if this is a good idea but it's an option... Go v4.1 using up to 40-bit addresses for now (but leave room for more). Translate a v4.1 TCP/IP packet with a 40-bit src and 32-bit dst to v4, truncating the last 8 bits of the src IP, provided the last 8 of the src port matches them. IPv4-only dst can respond fine. When that /32 v4.1 router receives the v4 response, set the last 8 bits of the dst IP to the last 8 of the dst port. So it's kinda like NAT except translating to a public /40 IPv4.1 instead of a private IPv4. And you just speak v4.1 without all this if the dst is >32 bits.

Re:Enabling IPv6 support for IPv4-only apps on Linux by icedchai on Thursday October 05, 2023 @06:39PM (#37785149)
I think you underestimate the complexity of deploying a new protocol like that.

Also, you know NAT64 exists, right? You can have a v6 only network connecting to v4 hosts. Is that not enough compatibility if you don't want dual stack hosts?

Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Friday October 06, 2023 @12:05PM (#37792557)
I can't tell you the man-hours, but I can tell you it'd be easier than ipv6. And yes I'm aware that you can give a "v6 only network" a v4 address, which means you're still on ipv4.
Re:Enabling IPv6 support for IPv4-only apps on Linux by hot_gril on Friday October 06, 2023 @07:31PM (#37797656)
(ipv4.1 could also be implemented using the ipv6 header, btw)