Score:3

Why not shorten a single :0000: field in IPv6

jp flag

rfc5952, section 4.2.2 "Handling One 16-Bit 0 Field" goes:

The symbol "::" must not be used to shorten just one 16-bit 0 field. For example, the representation
2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.

The kawamura-03 draft has a hint as to why:

4.2.2. One 16 bit 0 Field

"::" should not be used to shorten just one 16 bit 0 field for it would tend to mislead that there are more than one 16 bit field that is shortened.

But I'm not sure I follow the rationale here. Wouldn't it be simpler to understand if :: always expanded to the maximum allowed amount of zeros?

cn flag
Why would human understanding be relevant, particularly is that would mean telling someone i.e. more details on a phone line to enter. There is no need to "understand" for a human.
anx avatar
fr flag
anx
I have yet to see a parser that accepts it yet does anything other than exactly what you suggest: storing the maximum allowed amount (one) of all-zero blocks at the location of `::`.
cn flag
@anx Indeed, and the spec is clear about what is expected from a parser (it *must* do what you said, regardless whether the input is in the canonical form or not), but the question is about why this rule exists for generating the canonical text representation of an address.
cn flag
@TomTom The concern expressed in the second quote (from the draft) is clearly about not confusing humans, and I suppose even bothering with defining this canonical text representation in the first place is largely about making things easier for humans. Also, the specific case that this question is about does make the canonical text representation ever so slightly longer in the particular case where it is relevant.
cn flag
As for "Wouldn't it be simpler to understand if :: always expanded to the maximum allowed amount of zeros?", that is indeed how it works.
Michael Hampton avatar
cz flag
It's a good question, but whatever discussion took place in the WG about this was likely in 2009 or earlier, and as far as I can tell, not online. I think it is unlikely you will ever get an answer beyond "this representation is designed for use by humans".
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.