Re:Potholes to avoid when migrating to IPv6
by wolrah on Monday December 31, 2018 @01:00PM
(#18795868)
> We can’t re-use dots because then there’d be addresses that are _both_ IPv4 and IPv6.
How so? 192:168:1:1 is not a valid IPv6 address, so it'd be easy to differentiate with dots
If you were to interpret it as ::192:168:1:1 then it'd be a valid IPv6 address, but that interpretation would be incorrect and even so would be in the "IPv4-Compatible IPv6 address" range that was intended to map directly to the IPv4 address as a transitional function anyways.
Not really sure why that idea got dropped, it seems to me like it makes a lot of sense to do any v4 mapping in the ::0/96 range.
Re:Potholes to avoid when migrating to IPv6
by cytzol on Monday December 31, 2018 @01:05PM
(#18795900)
> 192:168:1:1 is not a valid IPv6 address
Ack, you’re right. For some reason, I was thinking it would get parsed as “192:168::1:1”.
That mapping does make sense.
> Using colons for separators when they’re already being used for ports served no purpose but to confuse.
Dots and colons are the only separators I can think of that are available on common keyboards, and don’t look ugly. We can’t re-use dots because then there’d be addresses that are _both_ IPv4 and IPv6. And I’m serious about the ugly part! Try writing an address out using commas or semicolons or asterisks or something, it just looks weird.
> Having more than a single valid form of an address again only serves to confuse.
Yes, as the article demonstrates, it certainly introduces edge cases that aren’t present in IPv4 — but the alternative is having to type out all the zeroes. Would you want to type out ’0000:0000:0000:0000:0000:0000:0000:0001’ each time?
> If there’s anything to learn from the UNIX principals it’s there is great power in making things easily manipulated as strings.
I think this is a testament to how wrong that statement is. How many scripts have broken because a file path has a space character in it? How many content injection attacks have there been, caused by code that blindly concatenates strings together? IPv6 addresses are just another example.
It’s a shame, but IPv6 is the best we’re going to get.