On Thu, 18 Apr 2019, Juergen Schoenwaelder wrote:
The values 2001:db8::1/64 and 2001:db8::/64 are both legal inputs but
they result in the same value. In situations where multiple inputs
resolve to the same value, we define a canonical representation. And
in the case of ipv6-prefix, the canonical representation is
2001:db8::/64. Hence, if you configure 2001:db8::1/64, then the server
will accept that input report the value back as 2001:db8::/64. The
main reason for having canonical formats is to make comparisons easy
and predictable. Think about xpath expressions - without a predictable
canonical representations, they would become rather complex since they
would have to deal with several different representations.
Yes, I perfectly understand the IPv6 compression canonical format, since
it results in two bit fields expressed in ASCII can be string compared.
However, from a networking point of view 2001:db8::/64 and 2001:db8::1/64
are NOT the same, and I believe all systems I have interacted with would
throw an error if I tried to commect 2001:db8::1/64 when the system
expected the last 64 bits to be zeroed.
2001:db8::/64 2001:db8:0::/64 is the same thing when you use ut fir
configuration, after the configuration has been applied in the system.
They're two different (correct) representations of the same configuration
item. I fully understand why the canonical format is needed here and how
it's supposed to be used.
2001:db8::/64 and 2001:db8::1/64 are NOT the same if you use them.
https://tools.ietf.org/html/rfc6020#section-9.1
" For most types, there is a single canonical representation of the
type's values. Some types allow multiple lexical representations of
the same value, for example, the positive integer "17" can be
represented as "+17" or "17". Implementations MUST support all
lexical representations specified in this document."
I don't know what the word "lexical" representation means here. Let's take
another example.
If I commit "+17.4" into an integer, should I expect the netconf server to
round this down to 17 and commit that? This is effectively the same thing
as the above example. When I tried this just now, I got that 17.4 is not a
valid integer from the software I am using. Is this software doing the
wrong thing?
--
Mikael Abrahamsson email: swm...@swm.pp.se
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod