Subject: [netmod] Link-local address

From: Reshad Rahman <[email-masked]>
Date: Fri, 23 Jul 2021 15:37:08 -0400

Hi,

Are there any defined types for V4 and V6 link-local addresses? Didn’t see a definition in ietf-inet-types.

Regards,

Reshad.

---

From: Jürgen Schönwälder <[email-masked]>
Date: Fri, 23 Jul 2021 22:18:27 +0200

> Are there any defined types for V4 and V6 link-local addresses? Didn’t see a definition in ietf-inet-types.

So far we stayed away from defining specific types for the different
"classes" of IP addresses, such as link-local or multi-cast or private
or loopback or ... addresses.

Since an ip-address (ipv4-address, ipv6-address) carries an optional
zone index, it should be possible to derive further types that add a
pattern for the specific prefixes, e.g. something like this:

typedef ipv6-address-link-local {
  type ipv6-address
  pattern '[fF][eE]80:.*'
  description
    "A link-local IPv6 address in the prefix fe80::/10 as defined
     in section 2.5.6. of RFC 4291."
  reference
    "RFC 4291: IP Version 6 Addressing Architecture"
}

Translating the prefix into a pattern is a bit ugly but doable. The
pattern does not try to capture all restrictions but the description
clause takes care of this. ;-)

/js

-- 
Juergen Schoenwaelder           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/>