UDP Broadcasting And The Courageous New Global community Of IPv6


After not too long ago working our method via UDP broadcasting and network subnetting all within the consolation zone of IPv4, it’s time to deal with the elephant within the room, the one carrying a vivid neon ‘IPv6’ signal. Although it’s nonetheless very a lot a rumor at this level, supposedly IPv6 is slated to interchange the venerable IPv4 protocol. Rather than simply being IPv4-but-with-more-addresses, its designers took the chance to mainly fully redesign the protocol for the futuristic global community of the late 90s and the early 2000s.

Joking apart, IPv6 having been launched in 1995 and nonetheless struggling to meaningfully displace IPv4 does invite some worries about simply how straightforward it’s to change between these two basic web protocols. Say if we needed to affix the way forward for the 2000s and adapt our software program to talk IPv6 as an alternative of IPv4, what would change in regards to the aforementioned facets of IPv4 UDP broadcasting and IPv4 subnetting?

Speaking as an ignorant developer who largely is aware of IPv6 from these bizarre and laborious to recollect community addresses, in addition to many damaged router implementations, I’m not fully satisfied that I’m going to love what I’ll see.

Futuristic Broadcasting

We noticed with IPv4 UDP broadcasting that it was largely a matter of both figuring out the community interface’s broadcast tackle based mostly upon its subnet, or taking part in issues straightforward mode with the native broadcast tackle. In the case of IPv6 none of these items exist, nonetheless. This raises the query of how our lonely UDP packet can nonetheless ask everybody on an IPv6 community whether or not they have seen a selected community service.

Multicast address structure of IPv6. There's a broadcast in here somewhere. (Credit: Michel Bakni, Wikimedia)
Multicast tackle construction of IPv6. There’s a broadcast in right here someplace. (Credit: Michel Bakni, Wikimedia)

The easy reply is that IPv6 has a particular link-local multicast group at tackle ff02::1 that capabilities just about equivalent to an IP broadcast. This is the equal of IPv4 multicasting to deal with 224.0.0.1, so this isn’t technically a brand new function, simply that multicasting is non-obligatory in IPv4.

Even although IPv4 multicasting would appear to be typically carried out, it’s telling that regardless of spending a substantial period of time researching IPv4 broadcasting I’ve not seen this ‘multicast to all’ function used anyplace. Perhaps this makes IPv4 and IPv4 multicasting worthy of an article of their very own in some trend, because it appears to be a complete different grocery store of canned worms to peruse.

That apart, if we have been to have a look at this from a barely philosophical technical angle, then having broadcasting handled as simply one other kind of multicasting does make a number of sense. Rather than singling out a subset of nodes on the community interface, we simply mash the ‘all’ possibility. Very easy and stylish in a method.

Subnet Things

Whereas IPv4 subnetworks are a pleasant matter that may maintain any sysadmin entertained for days and can fortunately explode the software program written by an ignorant developer – who was till that second blissfully unaware of subnets past /24 – IPv6’s designers took a take a look at this veritable supply of leisure and determined that they needed none of this.

In IPv6 you get one subnet and it’s /64, and you’ll study to like all of its 264 potential addresses. Since this makes for about 4 billion instances the tackle area of IPv4 it does make for a compelling argument that it renders subnets pointless.

Of course, whereas actually the individuals who hammered out the RFCs for IPv6 have been proud of all these adjustments, it’s considerably of a working gag that it’s the worst factor that has occurred to sysadmins since IPv4.

A 2017 Standard

The barely smaller elephant within the room that’s hiding within the shadow of the neon-sign-adorned IPv6 elephant is the one carrying a hand-scribbled RFC 8200 signal slung round its neck with a little bit of bailing rope. This was specifically when the IPv6 RFCs obtained the ‘Internet Standard’ degree of maturity, main some to query whether or not the push to change to IPv6 in the course of the years prior was in any respect warranted.

The timeline of IPv6 RFCs up till its Internet Standard level. (Credit: Michel Bakni, Wikimedia)
The timeline of IPv6 RFCs up until its Internet Standard degree. (Credit: Michel Bakni, Wikimedia)

This little factoid is simply one of many many issues that networking individuals have with IPv6. For instance this 2020 rant by Teknikal_Domain, with the principle focus being that as an alternative of being simply an IPv4 with 64-bit addressing area and among the warts of IPv4 smoothed over, it noticed match so as to add many particulars and complexity that no person requested for and recent warts that might have been simply prevented.

The annoying factor is in fact that IPv4 Internet tackle allocations have just about run out in every single place, which means that you’re both fortunate proper now to nonetheless have an IPv4 tackle, or you need to pay a hosting provider extra, or your Internet connection finds itself with solely an IPv6 connection and the IPv4 facet of issues dumped behind carrier-grade community tackle translation (CG-NAT) that kills most IPv4-specific purposes.

Transitioning from IPv4 to IPv6 can also be a ache, as there’s no direct compatibility between the 2 protocols, with IPv6 presupposed to ‘encapsulate’ IPv4 packets whereas utilizing a twin community stack on the community gear facet of issues. Unfortunately this additionally signifies that on the Internet you now have a piece that’s IPv4-only, an IPv6-only subset and IPv4/v6-capable nodes which will or might not have a damaged dual-stack implementation.

Obviously this doesn’t actually assist anybody, and there’s a robust argument to be made that for LANs IPv4 is actually all you want.

A UDP Discovery Perspective

 NPTv6 Translator interconnects two network links, one of which is an "internal" network, and one of which is an "external" network. (Credit: EidenNor, Wikimedia)
NPTv6 Translator interconnects two community hyperlinks, considered one of which is an “inner” community, and considered one of which is an “exterior” community. (Credit: EidenNor, Wikimedia)

While the thought of cleansing up IPv4’s messy broadcast tackle choices with a easy multicast possibility is an effective one which I’ll positively be giving a shot in IPv4’s multicast function, and the dearth of subnets a welcome simplification, the entire idea of service discovery will get a bit bizarre with IPv6.

The first is that IPv6 doesn’t do NAT and until you utilize the non-routable prefix your LAN won’t be non-public within the IPv4 NAT-ed LAN sense. Fortunately IPv6 does do NPT, which is basically NAT, however with prefixes as an alternative of addresses, so it’s completely totally different.

Although with routable IPv6 prefixes you could possibly completely do a worldwide tackle area service discovery, this is able to clearly be lower than fascinating. Since service discovery tends to be nearly units on the LAN anyway, this makes the usage of IPv6 on the very least a questionable proposition, and a legal responsibility within the worst case.

Ultimately as good as IPv6 appears in some respects, if you take a look at the entire bundle it actually simply makes you want for it having been mainly IPv4 with a bigger tackle area and necessary options like multicasting. For now which means that relating to e.g. my NyanSD service discovery library, I see no purpose to make use of IPv6-style UDP broadcast, even the library already fetches the IPv6 tackle of any discovered service.

It’s completely potential that I’m flawed and that inside a number of years we’ll all be utilizing IPv6-only on our LANs, ideally with globally routable IPs like we’re again on the Nineties web with individuals plugging their PCs straight into the modem with zero NAT or different issues.



Source link