Re: [Rtg-yang-coord] comment concerning draft-shaikh-rtgwg-policy-model-00
"Acee Lindem (acee)" <acee@cisco.com> Wed, 27 May 2015 16:57 UTC
Return-Path: <acee@cisco.com>
X-Original-To: rtg-yang-coord@ietfa.amsl.com
Delivered-To: rtg-yang-coord@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1])
by ietfa.amsl.com (Postfix) with ESMTP id 030A21A8743
for <rtg-yang-coord@ietfa.amsl.com>; Wed, 27 May 2015 09:57:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5,
SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5]
autolearn=ham
Received: from mail.ietf.org ([4.31.198.44])
by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id I9TRdvyVbbyT for <rtg-yang-coord@ietfa.amsl.com>;
Wed, 27 May 2015 09:57:51 -0700 (PDT)
Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80])
(using TLSv1 with cipher RC4-SHA (128/128 bits))
(No client certificate requested)
by ietfa.amsl.com (Postfix) with ESMTPS id 168C11A8742
for <Rtg-yang-coord@ietf.org>; Wed, 27 May 2015 09:57:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=cisco.com; i=@cisco.com; l=22488; q=dns/txt;
s=iport; t=1432745871; x=1433955471;
h=from:to:subject:date:message-id:references:in-reply-to:
mime-version; bh=2dks9yfNif8nkP/NWOtD6ZLdg6O4ZMnXLIEPCfqdXR8=;
b=E9+x0FbPO+LA2TltJFISHUQ306K3LcXT/C8TdBxykCtoeG+wr/c8WJ6Z
YYc5xItbEi0AwabHOmGuGfiB7WIoxFuQB7KwH6YbQEvBl6Xvuul1rRou+
dmP5XO60nigNhFTm5Os6kVx9IayHCuyDx5Ul0ZFPwxhAt68WlxdiwMAb8 c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CUBQD/9mVV/4cNJK1ZA4JFS1ReBoMZsASOF4ICAQmFdwIcgSJMAQEBAQEBgQuEIgEBAQQBAQEgBCUiGQICAQgOAgECAQECKAMCAgIZCgILFAkIAgQBEogoBQ2tTIVqnjkBAQEBAQEBAQEBAQEBAQEBAQEBAQEXBIs2hC09CgEMCxGCVy+BFgWQTII8hDWGWoEphnCIHIMhg1kjggocgVJvAYEDAR4HHIEBAQEB
X-IronPort-AV: E=Sophos;i="5.13,506,1427760000";
d="scan'208,217";a="419941957"
Received: from alln-core-2.cisco.com ([173.36.13.135])
by rcdn-iport-9.cisco.com with ESMTP; 27 May 2015 16:57:35 +0000
Received: from xhc-aln-x05.cisco.com (xhc-aln-x05.cisco.com [173.36.12.79])
by alln-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t4RGvZPb025994
(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL);
Wed, 27 May 2015 16:57:35 GMT
Received: from xmb-aln-x06.cisco.com ([169.254.1.97]) by xhc-aln-x05.cisco.com
([173.36.12.79]) with mapi id 14.03.0195.001;
Wed, 27 May 2015 11:57:34 -0500
From: "Acee Lindem (acee)" <acee@cisco.com>
To: Anees Shaikh <aashaikh@google.com>, Juergen Schoenwaelder
<j.schoenwaelder@jacobs-university.de>, "rtg-yang-coord@ietf.org"
<Rtg-yang-coord@ietf.org>
Thread-Topic: [Rtg-yang-coord] comment concerning
draft-shaikh-rtgwg-policy-model-00
Thread-Index: AQHQmJeOz/AOLj/BaE+NpkVfLOeIoJ2QGTMAgABF4wA=
Date: Wed, 27 May 2015 16:57:34 +0000
Message-ID: <15B43214-AE84-49C0-A83B-9E4DB6184CC6@cisco.com>
References: <20150527122452.GC41087@elstar.local>
<CAJK7ZqKHEYpD3nb8J5hjbex=NVhAAtURHWw5jGKxdrRWZe+sCw@mail.gmail.com>
<D18B6A36.1F437%acee@cisco.com>
In-Reply-To: <D18B6A36.1F437%acee@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.116.152.203]
Content-Type: multipart/alternative;
boundary="_000_15B43214AE8449C0A83B9E4DB6184CC6ciscocom_"
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-yang-coord/DhoxOPis2dQ_Zft5DWODr0buC_k>
Subject: Re: [Rtg-yang-coord] comment concerning
draft-shaikh-rtgwg-policy-model-00
X-BeenThere: rtg-yang-coord@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "\"List to discuss coordination between the Routing related YANG
models\"" <rtg-yang-coord.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-yang-coord>,
<mailto:rtg-yang-coord-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtg-yang-coord/>
List-Post: <mailto:rtg-yang-coord@ietf.org>
List-Help: <mailto:rtg-yang-coord-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-yang-coord>,
<mailto:rtg-yang-coord-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 27 May 2015 16:57:54 -0000
On May 27, 2015, at 12:47 PM, Acee Lindem (acee) <acee@cisco.com<mailto:acee@cisco.com>> wrote:
Hi Anees,
I had noted problems with the prefix-lists in the draft as well but hadn’t got around to raising them. One thing about the masklength and masklength-range is that there is no validation in the model snippet below. In other words, there is nothing to express that the masklength must between 0..32 for IPv4 addresses and 0..128 for IPv6 addresses (this is enforced by the ip-prefix type from RFC 6991). Similarly, as a string there in no inherent validation of the masklength-range (e.g., both values must be >= masklength, second value must be >= first-value, and both values must be >= AF specific limit).
Of course I meant "<= AF specific limit”.
Thanks,
Acee
Also, there is nothing to prevent one from mixing IPv4 and IPv6 prefixes in the same length which is definitely not allowed for the prefix-lists we all know and love.
Thanks,
Acee
From: Anees Shaikh <aashaikh@google.com<mailto:aashaikh@google.com>>
Date: Wednesday, May 27, 2015 at 12:09 PM
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>>, Routing YANG <rtg-yang-coord@ietf.org<mailto:rtg-yang-coord@ietf.org>>
Subject: Re: [Rtg-yang-coord] comment concerning draft-shaikh-rtgwg-policy-model-00
Juergen, you're right that prefix-lists in the model turned out to be a bit problematic as currently defined. We've updated the model in the most recent revision after going through some translations of our configs to the OpenConfig model and running into some issues. The updated version looks more like the following:
list prefix {
key "address masklength masklength-range";
leaf address {
type inet:ip-address;
}
leaf masklength {
type uint8;
}
leaf masklength-range {
type string {
pattern '^([0-9]+\.\.[0-9]+)|exact$';
}
}
}
The model used address and a separate masklength so that range checking could be performed on the mask. We've since removed the range-checking in favor of simplifying to keep a single prefix list for both address types, ipv4 and ipv6.
The original model had the problem you mention, which is that all keys must be mandatory, including masklength-range, which meant there was no simple way to express an exact prefix other than, e.g., 21..21 which we didn't think was desirable. Changing the masklength-range to a string allows a more flexible pattern (including an 'exact' setting). The masklength-range is included in the keys to make the list have unique members.
I think we could also consider your suggestion to use a inet:ip-prefix instead of address since we're not doing range-checking on the masklength in the current approach -- will discuss with the co-authors.
Agree with your suggestion to make the XML examples more conformant (they should certainly validate), though we've only been using ad-hoc namespaces for models that are not IETF WG models so far. My understanding is that this is the recommended practice.
thanks.
-- Anees
On Wed, May 27, 2015 at 5:24 AM, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote:
Hi,
I have read the document and I have a small comment.
- You define a list 'prefix' in the list 'prefix-set' which is keyed
by three leafs. As a result, all three leafs are mandatory. Your XML
instance snipped in section 10 does not validate because it is
missing mandatory key elements. I wonder (a) why did you not use
inet:ip-prefix instead of the pair inet:ip-address and a unit8
masklength. And given the desire to represent a prefix range, would
a special syntax not make sense, e.g. an extension of ip-prefix,
lets call it ip-prefix-range, that allows to express a range of
prefixes:
10.3.192.0/21-24<http://10.3.192.0/21-24> -> 10.3.192.0/21<http://10.3.192.0/21>
10.3.192.0/22<http://10.3.192.0/22>
10.3.192.0/23<http://10.3.192.0/23>
10.3.192.0/24<http://10.3.192.0/24>
If the '-24' part is made optional, your prefix list will be
collapsed to a simple
list prefix {
key prefix-range;
leaf prefix-range {
type ip-prefix-range;
}
}
Such an ip-prefix-range type may even be a useful addition to
ietf-inet-types.
- The XML snippets are nice but it would be cool if they were using
proper namespaces and validate against the data model. Perhaps
something to consider for -01. The pyang tutorial provides examples
how to validate XML snippets against YANG definitions.
/js
--
Juergen Schoenwaelder Jacobs University Bremen gGmbH
Phone: +49 421 200 3587<tel:%2B49%20421%20200%203587> Campus Ring 1 | 28759 Bremen | Germany
Fax: +49 421 200 3103<tel:%2B49%20421%20200%203103> <http://www.jacobs-university.de/>
_______________________________________________
Rtg-yang-coord mailing list
Rtg-yang-coord@ietf.org<mailto:Rtg-yang-coord@ietf.org>
https://www.ietf.org/mailman/listinfo/rtg-yang-coord
_______________________________________________
Rtg-yang-coord mailing list
Rtg-yang-coord@ietf.org<mailto:Rtg-yang-coord@ietf.org>
https://www.ietf.org/mailman/listinfo/rtg-yang-coord
- [Rtg-yang-coord] comment concerning draft-shaikh-… Juergen Schoenwaelder
- Re: [Rtg-yang-coord] comment concerning draft-sha… Anees Shaikh
- Re: [Rtg-yang-coord] comment concerning draft-sha… Acee Lindem (acee)
- Re: [Rtg-yang-coord] comment concerning draft-sha… Acee Lindem (acee)
- Re: [Rtg-yang-coord] comment concerning draft-sha… Anees Shaikh
- Re: [Rtg-yang-coord] comment concerning draft-sha… Jeff Tantsura
- Re: [Rtg-yang-coord] comment concerning draft-sha… Anees Shaikh
- Re: [Rtg-yang-coord] comment concerning draft-sha… Acee Lindem (acee)
- Re: [Rtg-yang-coord] comment concerning draft-sha… Mahesh Jethanandani
- Re: [Rtg-yang-coord] comment concerning draft-sha… Anees Shaikh