Regarding (1):

RFC 7277 uses inet:ipv6-address-no-zone in the situation you describe
for good reasons. Using ipv6-address in a context where the zone is
already given is a modeling problem, not a problem of the type
definition itself. The inet:ipv6-address type is for situations where
an interface context (or zone identifier) is not implied by the
context.

Regarding (2):

This is a result of the history: there were times where certain OSes
did not always have names for all interfaces, so the lowest common
denominator was the interface number. Perhaps this has changed and we
can assume that interface names are readily available everywhere today.

/js

On Tue, Jun 28, 2022 at 01:01:51PM +0000, Rob Wilton (rwilton) wrote:
> Hi,
> 
> Putting aside the discussion about whether we should be changing the use of 
> ip-address vs ip-address-no-zone in existing YANG modules for the moment, I 
> believe that the current ipv4-address|ipv6-address|ip-address definitions is 
> either wrong, or unhelpful for two reasons:
> 
> (1) It specifies that If a zone index is not present, then the default zone 
> of the device will be used.
> 
> Specifically, I interpret this as, if a YANG module uses the type 
> ip|ipv4|ipv6|-address when the associated interface is provided via context 
> (e.g., either a leaf in a parent key, or a sibling interface-ref leaf) then 
> if the device returns a link-local IP address without a zone then it must be 
> associated with the default zone of the device and not the associated 
> interface.  I.e., the only way that devices return the correct value in this 
> case would be to always return the zone information (in ifindex format) for 
> all link-local addresses.
> 
> (2) The ipv4|v6-address-types specify that the canonical format for zones is 
> the numerical format.  I.e., using the ifindex for an interface which isn't 
> really meaningful or helpful for clients interacting with a device via YANG, 
> and which may have no idea what the associated SNMP IfIndex is.  It seems to 
> me that the canonical format for zones should be the interface name, not the 
> IfIndex.
> 
> I would be interested to understand whether there is any WG consensus that 
> these are valid problems with how ip-address (and friends) is defined both 
> for implementations that include zone information and also those that don't.
> 
> Regards,
> Rob
> 
> // As a contributor
> 
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Jürgen Schönwälder              Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to