Subject: Re: [netmod] LL review of draft-bjorklund-netmod-ip-cfg-00

From: "t.petch" <[email-masked]>
Date: Tue, 2 Aug 2011 16:25:17 +0200

I said that I would check out my memory of why I expect mask bits to be
contiguous and I find:

RFC950
 "Subnet Field
      The bit field in an Internet address denoting the subnet number.
      The bits making up this field are not necessarily contiguous in
      the address."

RFC1122
"This notation is not intended to imply that the 1-bits in an address mask need
be contiguous."

RFC1812
 "The <Subnet-number> bits SHOULD be contiguous and fall between the
   <Network-number> and the <Host-number> fields.  More up to date
   protocols do not refer to a subnet mask, but to a prefix length; "

and

" Architecturally
   correct subnet masks are capable of being represented using the
   prefix length description.  They comprise that subset of all possible
   bits patterns that have

     o a contiguous string of ones at the more significant end,
     o a contiguous string of zeros at the less significant end, and
     o no intervening bits.

   Routers SHOULD always treat a route as a network prefix, and SHOULD
   reject configuration and routing information inconsistent with that
   model."

which I would summarise as SHOULD be contiguous.  Some routing protocols and MIB
modules make that a MUST (eg BGP4, OSPFv3).

Tom Petch

----- Original Message -----
From: "t.petch" <[email-masked]>
To: <[email-masked]>; "Martin Bjorklund" <[email-masked]>
Cc: <[email-masked]>
Sent: Saturday, July 23, 2011 12:34 PM
Subject: Re: [netmod] LL review of draft-bjorklund-netmod-ip-cfg-00

> ----- Original Message -----
> From: "Martin Bjorklund" <[email-masked]>
> To: <[email-masked]>
> Cc: <[email-masked]>; <[email-masked]>
> Sent: Friday, July 22, 2011 8:07 PM
> > Phil Shafer <[email-masked]> wrote:
> > > "t.petch" writes:
> > > >Ouch; I disagree.  I have come across non-contiguous netmasks invariably
> > > >created by accident and boy, were they a nightmare to track down and put
> > > >right.
> > > >I have not checked what the standards say but my recollection is that
they
> > > >are
> > > >taboo.  (I would say suicidal).
> > >
> > > Suicidal or not, customers use them on both our gear and that other router
> > > company's gear.  We had to implement to allow customers to upgrade to our
> > > boxes, so I know that they are in use and quite intentional.  OSPF doesn't
> > > like this, but it's definitely out there.
> >
> > So the question is if it is worth standardizing, or if a
> > vendor-specific augmentation will do it?
>
> vendor-specific:-)
>
> I will look for the statements that I think exist in standards-track protocol
> RFC about them.  As Juergen says, MIB modules do not support it and I believe
> that that reflects the underlying protocol but I will look some more.
>
> Tom Petch
>
> > /martin
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

---

From: "Randy Presuhn" <[email-masked]>
Date: Tue, 2 Aug 2011 19:34:50 -0700

Hi -

> To: <[email-masked]>; "Martin Bjorklund" <[email-masked]>; "Juergen Schoenwaelder" <[email-masked]>
> Cc: <[email-masked]>
> Sent: Tuesday, August 02, 2011 7:25 AM
...

So where does this lead?  I think...

If the "contiguous" requirement is merely a SHOULD, then the configuration
model needs to be able to represent discontiguous ones as well, since
they are merely discouraged, but not forbidden by the base specifications.
Otherwise, vendors whose equipment supports the possibility of being
configured with discontiguous masks will need to resort to proprietary
models, defeating the purpose of a standard.

Randy

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 17 Aug 2011 23:52:38 +0200 (CEST)

> models, defeating the purpose of a standard.

Yes, but if the usage of non-contiguous masks are rare, this might
still be ok.

This said, if the WG believes we should support this case, we can do:

         choice subnet {
           leaf prefix-length {
             type uint8 {
               range "0..32";
             }
           }
           leaf netmask {
             type inet:ipv4-address;
           }
         }

And if we want to be even more advanced, we can do:

         choice subnet {
           leaf prefix-length {
             type uint8 {
               range "0..32";
             }
           }
           leaf netmask {
             if-feature non-contiguous-netmasks;
             type inet:ipv4-address;
           }
         }

/martin

---

From: Phil Shafer <[email-masked]>
Date: Thu, 18 Aug 2011 11:10:08 -0400

>             if-feature non-contiguous-netmasks;

Very slick.  And for places that accept either a prefix or an
address, can we default the prefix-length to 32, right?

Thanks,
 Phil

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 19 Aug 2011 10:51:02 +0200 (CEST)

> address, can we default the prefix-length to 32, right?

Sorry, I don't understand.  Can you examplify?

/martin