In message <[email protected]>, Cutler James 
R writes:
> On Feb 5, 2013, at 10:12 PM, Mark Andrews <[email protected]> wrote:
> > prefix:  A variable-length field containing an IP address or the
> >           prefix of an IP address.  An IPv4-mapped address [RFC4291] =
> must
> >           be used to represent an IPv4 address as a prefix value.  The
> >           prefix should be left aligned, big-endian, and zero padded =
> on
> >           the right up to the next octet boundary.  So the length of =
> this
> >           field should be between 0 and 16 bytes
> >=20
> >     is ambigious on the encoding of 2002:1234:8734::/64
> >=20
> >     is it:
> >     40:20:02:12:34:87:34:00:00:00:00:00:00:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00:00:00:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00:00:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00:00
> >     or
> >     40:20:02:12:34:87:34:00:00
> >     or
> >     40:20:02:12:34:87:34:00
> >     or
> >     40:20:02:12:34:87:34
> >=20
> >     All appear to be legal.  It would be cleaner if the
> >     floor((prefix-len+7)/8) gave the number of octets in
> >     the prefix field.
> 
> Mark,
> 
> You have me confused here.  /64 defines a prefix length of 64 bits, =
> exactly 8 octets. Octet for Octet, 20:02:12:34:87:34:00:00 is =
> unambiguously correct and in accordance with the definition cited.  =
> Please explain where the leading 40 originates.

The 40 was the prefix length octet (0x40 == 64). Sorry for not being
clear on that.

The sub-option has a length field which means that you can append
zeros up to the defined maximum (16).  As it is a zero padded field
you can also theoretically remove trailing zeros without loss of
information.  Nothing in the definition says that you can't do that.

prefix-len:  An 8-bit unsigned integer; the number of leading bits in
        the prefix that are valid.  The value ranges from 0 to 128.

Mark

> James R. Cutler
> [email protected]
> 
> 
> 
> 
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [email protected]
--------------------------------------------------------------------
IETF IPv6 working group mailing list
[email protected]
Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

Reply via email to