Re: [mpls] MPLS label and LSE data models

"Acee Lindem (acee)" <> Wed, 19 July 2017 16:47 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6DC7F129482; Wed, 19 Jul 2017 09:47:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -14.521
X-Spam-Status: No, score=-14.521 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id NAt_HAxpHLPV; Wed, 19 Jul 2017 09:47:33 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id C2FF3129B14; Wed, 19 Jul 2017 09:47:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;;; l=38777; q=dns/txt; s=iport; t=1500482850; x=1501692450; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=NgM17KHsfJUdmJKixXNW/oX2p/lwBSQF+sl4t4iOncg=; b=Nv5sVwEgoIjq02vYfFKDdyrZhLibbV0ww5SrAz7/f2EwGDFV7GX2WPMU iqbDr35YzleSRHSThx/Q9an0zlVBxDoB/7pbbYYgCrWE0nkpibmzswM9P xDYXQGmBEeN6ycBwetvJxgu+86O+98QTJ926ymWJLYhYJ6E53kDydFFD/ c=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.40,381,1496102400"; d="scan'208,217";a="269838514"
Received: from ([]) by with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2017 16:47:07 +0000
Received: from ( []) by (8.14.5/8.14.5) with ESMTP id v6JGl6Q7021190 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 19 Jul 2017 16:47:07 GMT
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 19 Jul 2017 12:47:06 -0400
Received: from ([]) by ([]) with mapi id 15.00.1210.000; Wed, 19 Jul 2017 12:47:06 -0400
From: "Acee Lindem (acee)" <>
To: "Robert Wilton -X (rwilton - ENSOFT LIMITED at Cisco)" <>, "Tarek Saad (tsaad)" <>, Jeffrey Haas <>, Xufeng Liu <>
CC: "" <>, "" <>, "" <>, "" <>
Thread-Topic: MPLS label and LSE data models
Date: Wed, 19 Jul 2017 16:47:06 +0000
Message-ID: <>
References: <> <> <> <> <> <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_D59500DAB9C44aceeciscocom_"
MIME-Version: 1.0
Archived-At: <>
Subject: Re: [mpls] MPLS label and LSE data models
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Multi-Protocol Label Switching WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 19 Jul 2017 16:47:36 -0000

So, for this particular grouping the only action I’m going to take is to update the description fields to address any confusion. It should be noted that the RFC 8022 next-hop index has not semantic meaning other than referencing the next-hop. The label-stack id has similar semantics.

ACEE-M-G2HR:conventions-features acee$ git diff ietf-routing-types.yang
diff --git a/ietf-routing-types.yang b/ietf-routing-types.yang
index b83699d..6e77ce0 100644
--- a/ietf-routing-types.yang
+++ b/ietf-routing-types.yang
@@ -607,7 +607,10 @@ module ietf-routing-types {

   grouping mpls-label-stack {
-      "A grouping that specifies an MPLS label stack.";
+      "A grouping that specifies an MPLS label stack. List
+       entries are ordered with the first entry being the
+       top of stack, the next entry being the next entry
+       on the stack, and so on.";
     container mpls-label-stack {
         "Container for a list of MPLS label stack entries.";
@@ -618,9 +621,11 @@ module ietf-routing-types {
         leaf id {
           type uint8;
-            "Identifies the sequence of an MPLS label stack entries.
-             An entry with smaller ID value is precedes an entry in
-             the label stack with a smaller ID.";
+            "Identifies the entry in a sequence of an MPLS label
+             stack entries. An entry with smaller ID value is
+             precedes an entry in the label stack with a smaller
+             ID. The value of this id has no semantic meaning other
+             than ordering and referencing the entry.";
         leaf label {
           type rt-types:mpls-label;


From: "Robert Wilton -X (rwilton - ENSOFT LIMITED at Cisco)" <<>>
Date: Monday, July 17, 2017 at 8:51 AM
To: Acee Lindem <<>>, "Tarek Saad (tsaad)" <<>>, Jeff Haas <<>>, Xufeng Liu <<>>
Cc: "<>" <<>>, "<>" <<>>, Routing WG <<>>, "<>" <<>>
Subject: Re: MPLS label and LSE data models


Just as a point of reference, for VLAN tag stacks, the outermost VLAN tag is always first in the list.

Regarding relax the ordering or not, I may not be answering exactly the same question, but I would say that you want a have a canonical order (to allow for easy and efficient comparison), and forcing everyone to have to sort the label stack before using it would probably just be regarded as a wart.


On 14/07/2017 22:31, Acee Lindem (acee) wrote:
Hi Tarek, Jeff,

Typically, YANG indices are added to YANG lists to simply imply ordering. I don’t believe there is absolutely any value in trying to enforce the semantics of a precise label position on this index. It is fairly obvious that the first label in the list is the first label in the stack, the second label in the list is the second label in the stack, and so on… Hopefully, the other YANG model authors will agree with me on this point and the “Index 0 as top” convention should be relaxed. Is there a YANG doctor in the house???

Now, we currently specify the top label as the first label in the list while Jeff has proposed that the bottom label be the first label.  Surely, there is an existing convention within MPLS RFCs and drafts and we should be consistent. I’d research myself but I have a ton of other things to do prior to leaving for Prague tomorrow. When someone refers to the first label, is the top or bottom label? I have always been referring to the first label as the top label (with all due respect to C stack implementations).


From: "Tarek Saad (tsaad)" <<>>
Date: Thursday, July 13, 2017 at 1:12 PM
To: Jeff Haas <<>>, Xufeng Liu <<>>
Cc: Greg Mirsky <<>>, "<>" <<>>, "<>" <<>>, "<>" <<>>, Routing WG <<>>
Subject: Re: MPLS label and LSE data models
Resent-From: <<>>
Resent-To: <<>>, Yingzhen Qu <<>>, Acee Lindem <<>>, Christian Hopps <<>>, <<>>
Resent-Date: Thursday, July 13, 2017 at 1:12 PM

Hi Jeff and Xufeng,

Sorry, catching up on this thread. Yes, we've made a change for the MPLS label-stack from "leaf-list" to a "list with key index" to address having multiple labels of same value in the same stack.

We noted an assumption in the description that index 0 is the top of the stack followed by the remainder of the labels in the stack. However, you have a point about enforcing index (n-1) being present before accepting index n. There is some discussion on 'preceding-sibling' and 'following-sibling' with some recommendations in rfc6087.. I'll need to check if enforcing such "when" check is good idea in YANG.

Another idea (not so elegant) is relax this "index 0 as top" and just accept the lowest index of the list as the top followed by the remainder labels (as sorted in index increasing order).



-----Original Message-----

From: Jeffrey Haas <<>>

Date: Thursday, July 13, 2017 at 12:51 PM

To: Xufeng Liu <<>>

Cc: Greg Mirsky <<>>, "<>" <<>>, "<>" <<>>, "<>" <<>>, "<>" <<>>

Subject: Re: MPLS label and LSE data models

Resent-From: <<>>

Resent-To: Tarek Saad <<>>, <<>>, <<>>, <<>>, <<>>, <<>>, <<>>, <<>>, <<>>, <<>>

Resent-Date: Thursday, July 13, 2017 at 12:42 PM


    On Thu, Jul 13, 2017 at 04:14:18PM +0000, Xufeng Liu wrote:

    > Thanks for looking at this. You are right, but we are still discussing various approaches for the static MPLS and the conclusion has not been reached yet.

    > We'd like to hear what you think and appreciate your comments.

    To offer a suggestion, order the stack from bottom (lowest number) to top

    (highest).  Require that bottom of stack be element index zero.

    My yang constraints are a bit weak but I believe you can construct an XPath

    that requires that a node of index 0 must be present.

    The above two suggestions don't help with the issues of needing to sort the

    list by index in order to generate the stack, but it does at least remove

    any possible ambiguity about the critical bottom of stack semantic.

    -- Jeff

rtgwg mailing list<>