> On Apr 1, 2019, at 12:37 PM, Kristian Larsson <[email protected]> wrote: > > > >> On 2019-04-01 19:29, Martin Bjorklund wrote: >> Hi, >> The request was for a combined type that contains both an ip address >> *and* a prefix length in one value. Hence the name >> "ip-address-and-prefix-length" :) > > Right you are, though I'm open to other names but let's first agree on use > case / need :) > > >> I know that this type is convenient, esp. if you use it for manual >> input, but I wonder if it really is good practice to squeeze two >> values into one. > > Dunno how "manual" has any bearing. This is IMHO just about natural data > modeling. > > You say it's two values but when one can't be used without the other, are > they so separated? You can't configure an interface with just an address or > just a subnet mask. You need both - they belong together.
That can be modeled into the data module, I.e. that you have to specify both the address and the prefix length. The reason Martin mentioned two values is because even if they are modeled with a ‘/‘ character, the end system will consume them as two separate values. > > Similarly, in a routing table you have prefixes, which consist of an address > and a length - it got its own data type yet you could apply your argument to > it and say they should be separated. It's just that *that* data type forbids > bits to be set in the mask portion of the address, which is correct for the > routing table use case, but means it can't be used to describe an interface > address and mask. > > kll Mahesh Jethanandani [email protected] > > > > >> /martin >> "Acee Lindem (acee)" <[email protected]> wrote: >>> Ok, now I'm confused. I see that the ietf-inet-type model already has the >>> types ipv4-prefix and ipv6-prefix. How are these any different??? >>> Thanks, >>> Acee >>> >>> On 4/1/19, 12:31 PM, "Acee Lindem (acee)" <[email protected]> wrote: >>> >>> I believe the "address-" could be omitted from the type identifiers. At >>> least within the routing area, "ipv4-prefix" is unambiguous. >>> Thanks, >>> Acee >>> On 4/1/19, 12:14 PM, "netmod on behalf of Juergen Schoenwaelder" >>> <[email protected] on behalf of [email protected]> >>> wrote: >>> This is the right time for this and I would call these >>> ip-address-prefix, ipv4-address-prefix and ipv6-address >>> prefix. >>> /js >>>> On Mon, Apr 01, 2019 at 04:38:34PM +0200, Kristian Larsson >>>> wrote: >>>> Hello, >>>> >>>> seeing that 6991 is up for a refresh I wonder if this would be the time to >>>> suggest the addition of a type for address-and-prefix-length, for example >>>> like 192.0.2.1/24? >>>> >>>> I find that it's the most natural way express the address and prefix-length >>>> to configure on an interface or for some other use. We currently have an >>>> ip-prefix type which allows CIDR style prefixes but since all bits to the >>>> right of the mask is to be 0 it is only possible to use for describing the >>>> IP prefix / network address itself - not the address of a host in that >>>> network. >>>> >>>> I actually wish the interface-ip modules would have used a combined leaf >>>> for >>>> these settings rather than the dual-leaf approach it currently has, but I >>>> suppose that ship has sailed :/ >>>> >>>> Regardless, can we add such a type? Is this the document and time to do it? >>>> :) >>>> >>>> Kind regard, >>>> Kristian. >>>> >>>> _______________________________________________ >>>> netmod mailing list >>>> [email protected] >>>> https://www.ietf.org/mailman/listinfo/netmod >>> -- >>> 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/> >>> _______________________________________________ >>> netmod mailing list >>> [email protected] >>> https://www.ietf.org/mailman/listinfo/netmod >>> >>> _______________________________________________ >>> netmod mailing list >>> [email protected] >>> https://www.ietf.org/mailman/listinfo/netmod > > _______________________________________________ > netmod mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/netmod _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
