Comment by karlshea

4 days ago

":: is all zeros" is too hard??

How many zeros?

  • Exactly enough to fill out the address, which is always the same length. BTW, IPv4 does basically the same thing. The address 127.1 is equivalent to 127.0.0.1.

    • Not really the same, the mechanics are different and this particular behaviour is pretty much an accident, not abbreviation.

      In IPv4 you also have 127.257 equal to 127.0.1.1, 123456789 equal to 7.91.205.21, and 010.010.010.010 is a well-know DNS server. This notation is also rejected by most implementations.

      2 replies →

  • There are a total of 8 groups of 4 hex digits, so 8 minus however many groups you already have.

    google.com: 2607:f8b0:4009:819::200e (5 groups) -> 2607:f8b0:4009:0819:0000:0000:0000:200e (3 groups of added zeros)

    a ULA address: fd2a:1::2 (3 groups) -> fd2a:0001:0000:0000:0000:0000:0000:0002 (5 added)

    localhost: ::1 -> 0000:0000:0000:0000:0000:0000:0000:0001