zero suppression vs compression in addresses

Jay Hennigan jay at west.net
Sat May 16 02:24:22 CEST 2009


Alan Batie wrote:
> I think I may have misinterpreted how zero compression and suppression
> work:  when I say 2607:f678:1::0/60, I expect the "::" to mean "all 0's
> from the preceding digit to the next", but from what I'm seeing
> configuring things, (leading) zero *suppression* seems to be happening
> at the same time within word (32 bit) boundaries, which colons always
> delineate, making that really 2607:f678:0001::0/60.  Thus what I really
> wanted to say was 2607:f678:1000::0/60.

1.  IPv6 addresses are 128 bits, written as eight quads of hex digits. 
Each quad is delimited by a colon.

2.  Within each quad, leading zeros may be dropped, but (for this step) 
if a quad is all zeros leave a single zero.

3. After doing this, if one or more successive quads is zero, that group 
of zeros can be replaced with a double colon, BUT only one double colon 
can appear per address.

(You can reverse steps 2 and 3 if you choose)

So, if you have:

2001:0030:0000:0000:02a4:0000:0000:00d3

    it becomes

2001:30:0:0:2a4:0:0:d3

Which can EITHER be expressed as

2001:30::2a4:0:0:d3

        OR

2001:30:0:0:2a4::d3

     BUT NOT

2001:30::2a4::d3


--
Jay Hennigan - CCIE #7880 - Network Engineering - jay at impulse.net
Impulse Internet Service  -  http://www.impulse.net/
Your local telephone and internet company - 805 884-6323 - WB6RDV



More information about the ipv6-ops mailing list