[Docs] [txt|pdf] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02

Network Working Group                                          J. George
Internet-Draft                                                    Google
Intended status: Informational                                   L. Fang
Expires: January 6, 2016                                       Microsoft
                                                              E. Osborne
                                                                 Level 3
                                                               R. Shakir
                                                                      BT
                                                            July 5, 2015


             MPLS / TE Model for Service Provider Networks
              draft-openconfig-mpls-consolidated-model-01

Abstract

   This document defines a framework for a YANG data model for
   configuring and managing label switched paths, including the
   signaling protocols, traffic engineering, and operational aspects
   based on carrier and content provider operational requirements.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on January 6, 2016.

Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect



George, et al.           Expires January 6, 2016                [Page 1]


Internet-Draft               MPLS / TE Model                   July 2015


   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Goals and approach  . . . . . . . . . . . . . . . . . . .   2
   2.  Model overview  . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  MPLS global . . . . . . . . . . . . . . . . . . . . . . .   5
     2.2.  TE global attributes  . . . . . . . . . . . . . . . . . .   5
     2.3.  Signaling protocol overview . . . . . . . . . . . . . . .   5
     2.4.  LSP overview  . . . . . . . . . . . . . . . . . . . . . .   8
   3.  Example use cases . . . . . . . . . . . . . . . . . . . . . .  10
     3.1.  Traffic engineered p2p LSP signaled with RSVP . . . . . .  10
     3.2.  Traffic engineered LSP signaled with SR . . . . . . . . .  12
     3.3.  IGP-congruent LDP-signaled LSP  . . . . . . . . . . . . .  12
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  13
   6.  YANG modules  . . . . . . . . . . . . . . . . . . . . . . . .  13
     6.1.  MPLS base modules . . . . . . . . . . . . . . . . . . . .  14
     6.2.  MPLS LSP submodules . . . . . . . . . . . . . . . . . . .  24
     6.3.  MPLS signaling protocol modules . . . . . . . . . . . . .  43
   7.  Contributing Authors  . . . . . . . . . . . . . . . . . . . .  68
   8.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  69
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  69
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  70

1.  Introduction

   This document describes a YANG [RFC6020] data model for MPLS and
   traffic engineering, covering label switched path (LSP)
   configuration, as well as signaling protocol configuration.  The
   model is intended to be vendor-neutral, in order to allow operators
   to manage MPLS in heterogeneous environments with physical or virtual
   devices (routers, switches, servers, etc.) supplied by multiple
   vendors.  The model is also intended to be readily mapped to existing
   implementations, to facilitate support from as large a set of routing
   hardware and software vendors as possible.

1.1.  Goals and approach

   The focus area of the model in this revision, is to set forth a
   framework for MPLS, with hooks into which information specific to
   various signaling-protocols can be added.  The framework is built
   around functionality from a network operator perspective rather than
   a signaling protocol-centric approach.  For example, a traffic-



George, et al.           Expires January 6, 2016                [Page 2]


Internet-Draft               MPLS / TE Model                   July 2015


   engineered LSP will have configuration relating to its path
   computation method, regardless of whether it is signaled with RSVP-TE
   or with segment routing.  Thus, rather than creating separate per-
   signaling protocol models and trying to stitch them under a common
   umbrella, this framework focuses on functionality, and adds signaling
   protocol-specific information under it where applicable.

   This model does not aim to be feature complete (i.e., cover all
   possible aspects or features of MPLS).  Rather its development is
   driven by examination of actual production configurations in use
   across a number of operator network deployments.

   Configuration items that are deemed to be widely available in
   existing major implementations are included in the model.  Those
   configuration items that are only available from a single
   implementation are omitted from the model with the expectation they
   will be available in companion modules that augment the current
   model.  This allows clarity in identifying data that is part of the
   vendor-neutral model.

   An important aspect of the model is the representation of operational
   state data.  This draft takes the approach described in
   [I-D.openconfig-netmod-opstate] and models configuration and
   operational state together.  Thus, rather than building a separate
   tree of operational state, the operational state and configuration
   data are located in parallel containers at the leaves of the data
   model.  This approach allows easy reuse of groupings across models,
   as well as making it easier to correlate configuration and state.

   The consolidated MPLS model encompasses the signaling protocols,
   label-switched paths (configuration and operational state), and
   generic TE attributes.  The model is designed from an operational and
   functional perspective, rather than focusing on protocol-centric
   configuration.  This allows protocol-independent functions to be
   logically separated from protocol-specific details.

   One question that arises in this approach is how the consolidated
   model is integrated with routing instances (e.g., VRFs).  This model
   should be considered as part of a higher level network device model
   which includes definitions for other routing protocols and system
   services.  For example, in [I-D.openconfig-netmod-model-structure],
   VRFs and other logical instances are defined with MPLS/TE components
   within VRFs as appropriate.  In particular, some parts of the MPLS
   model would be instantiated within a VRF, while other parts would
   have common definitions across VRFs.

   Where possible, naming in the model follows conventions used in
   available standards documents, and otherwise tries to be self-



George, et al.           Expires January 6, 2016                [Page 3]


Internet-Draft               MPLS / TE Model                   July 2015


   explanatory with sufficient descriptions of the intended behavior.
   Similarly, configuration data value constraints and default values,
   where used, are based on recommendations in current standards
   documentation.  Since implementations vary widely in this respect,
   this version of the model specifies only a limited set of defaults
   and ranges with the expectation of being more prescriptive in future
   versions based on actual operator use.

   Note that this version of the model is a work-in-progress in several
   respects.  Although we present a complete framework for MPLS and
   traffic engineering from an operational perspective, some signaling
   protocol configuration will be completed in future revisions.

2.  Model overview

   The overall MPLS model is defined across several YANG modules and
   submodules but at a high level is organized into 4 main sections:

   o  global -- configuration affecting MPLS behavior which exists
      independently of the underlying signaling protocol or label
      switched path configuration.

   o  te-global-attributes -- configuration affecting MPLS-TE behavior
      which exists independently of the underlying signaling protocol or
      label switched path configuration.

   o  signaling protocols -- configuration specific to signaling
      protocols used to setup and manage label switched paths.

   o  label switched paths -- configuration specific to instantiating
      and managing individual label switched paths.

   The top level of the model is shown in the tree view below:

   +--rw mpls!
         +--rw global
         |     ...
         +--rw te-global-attributes
         |     ...
         +--rw signaling-protocols
         |     ...
         +--rw lsps
               ...








George, et al.           Expires January 6, 2016                [Page 4]


Internet-Draft               MPLS / TE Model                   July 2015


2.1.  MPLS global

   The global section of the framework provides configuration data for
   MPLS items which exist independently of an individual label switched
   path or signaling protocol and are applicable to the MPLS protocol
   itself.  Items such as the depth of the label stack supported, or
   specific label ranges may be included here.

2.2.  TE global attributes

   The TE global attributes section of the framework provides
   configuration control for MPLS-TE items which exist independently of
   an individual label switched path or signaling protocol.  These
   standalone items are applicable to the entire logical routing device,
   and establish fundamental configuration such as the threshold for
   interface bandwidth change that triggers update events into the IGP
   traffic engineering database (TED).  Timers are also specified which
   determine the length of time an LSP must be present before being
   considered viable for forwarding use (mpls-lsp-install-delay), and
   the length of time between LSP teardown and removal of the LSP from
   the network element's forwarding information base (mpls-lsp-cleanup-
   delay).  Also specified are the name to value mappings of MPLS
   administrative groups (mpls-admin-groups).


   +--rw te-global-attributes
         |  +--rw ted-update-threshold
         |     ...
         |  +--rw te-interfaces* [interface-name]
         |  |  +--rw interface-name                    string
         |  |  +--rw interface-admin-groups*           leafref
         |  |  +--rw interface-ted-update-threshold?   leafref
         |  +--rw te_lsp_timers
         |  |  +--rw config
         |  |  |  +--rw te-lsp-install-delay?      uint16
         |  |  |  +--rw te-lsp-cleanup-delay?      uint16
         |  |  |  +--rw te-lsp-reoptimize-timer?   uint16
         |  |  +--ro state
         |     ...
         |  +--rw mpls-admin-groups* [admin-group-name]
         |     +--rw admin-group-name     string
         |     +--rw admin-group-value?   uint32

2.3.  Signaling protocol overview

   The signaling protocol section of the framework provides
   configuration elements for configuring three major methods of
   signaling label switched paths: RSVP-TE, segment routing, and label



George, et al.           Expires January 6, 2016                [Page 5]


Internet-Draft               MPLS / TE Model                   July 2015


   distribution protocol (LDP).  BGP-LU will be included in a future
   version of this draft by definitions in the BGP model
   ([I-D.shaikh-idr-bgp-model]) and corresponding augmentations to the
   MPLS model.

   +--rw signaling-protocols
         |  +--rw rsvp-te
         |     ...
         |  +--rw segment-routing
         |     ...
         |  +--rw ldp
         |     ...

   Configuration of RSVP-TE is centered around interfaces on the device
   which participate in the protocol.  A key focus is to expose common
   RSVP-TE configuration parameters which are used to enhance scale and
   reliability (refresh-reduction, refresh-reduction-reliable).  Items
   which are applicable globally in the RSVP-TE protocol such as
   graceful restart, soft preemption and various statistics are grouped
   into a global section under the protocol.































George, et al.           Expires January 6, 2016                [Page 6]


Internet-Draft               MPLS / TE Model                   July 2015


  +--rw signaling-protocols
        |  +--rw rsvp-te
        |  |  +--rw global
        |  |  |  +--rw graceful-restart
        |     ...
        |  |  |  +--rw soft-preemption
        |     ...
        |  |  |  +--rw statistics
        |     ...
        |  |  |     +--ro state
        |  |  |        +--ro protocol
        |  |  |        |  +--ro hello-sent?   yang:counter32
        |  |  |        |  +--ro hello-rcvd?   yang:counter32
        |  |  |        |  +--ro path-sent?    yang:counter32
        |  |  |        |  +--ro path-rcvd?    yang:counter32
        |  |  |        +--ro error
        |  |  |           +--ro authentication-failure?   yang:counter32
        |  |  |           +--ro PathErr?                  yang:counter32
        |  |  |           +--ro ResvErr?                  yang:counter32
        |  |  |           +--ro path-timeout?             yang:counter32
        |  |  |           +--ro resv-timeout?             yang:counter32
        |  |  |           +--ro rate-limit?               yang:counter32
        |  |  +--rw interfaces* [interface-name]
        |  |     +--rw interface-name      string
        |  |     +--rw protocol_options
        |  |     |  +--rw config
        |  |     |  |  +--rw hello-interval?               uint16
        |  |     |  |  +--rw refresh-reduction?            boolean
        |  |     |  |  +--rw refresh-reduction-reliable?   boolean
        |  |     |  +--ro state
        |     ...
        |  |     +--rw authentication
        |     ...
        |  |     +--rw subscription
        |     ...
        |  |     +--rw link-protection
        |  |        +--rw config
        |  |        |  +--rw enable?                     boolean
        |  |        |  +--rw link-protection-only?       boolean
        |  |        |  +--rw bypass-optimize-interval?   uint16
        |     ...

   Containers for specifying signaling via segment routing and LDP are
   also present.  Specific subelements will be added for those
   protocols, as well as for BGP labeled unicast, in the next revision.






George, et al.           Expires January 6, 2016                [Page 7]


Internet-Draft               MPLS / TE Model                   July 2015


2.4.  LSP overview

   This part of the framework contains LSP information.  At the high
   level, LSPs are split into three categories: traffic-engineering-
   capable (constrained-path), non-traffic-engineered determined by the
   IGP (unconstrained-path), and hop-by-hop configured (static).

   +--rw mpls!
         +--rw lsps
            +--rw constrained-path
            |     ...
            +--rw unconstrained-path
            |     ...
            +--rw static-lsps
                  ...

   The first two categories, constrained-path and unconstrained-path are
   the ones for which multiple signaling protocols exist, and are
   organized in protocol-specific and protocol-independent sections.
   For example, traffic-engineered (constrained path) LSPs may be set up
   using RSVP-TE or segment routing, and unconstrained LSPs that follow
   the IGP path may be signaled with LDP or with segment routing.  IGP-
   determined LSPs may also be signaled by RSVP but this usage is not
   considered in the current version of the model.

   A portion of the data model for constrained path traffic-engineered
   LSPs signaled with RSVP is shown below.  The first part of the model
   is signaling-protocol independent.  Attributes such as the path
   computation method, the constraints for the the path, the bandwidth
   allocated to it, and even the frequency of reoptimization are
   signaling-protocol independent.  Protocol specific data, such as the
   setup and hold priorities for RSVP are specified in the protocol
   specific configuration.

+--rw mpls!
      +--rw lsps
         +--rw constrained-path
         |  +--rw paths
         |  |  +--rw path* [path-name]
         |  |  |  +--rw path-name    leafref
         |  ...
         |  |  +--rw hops* [address]
         |  |     +--rw address    leafref
         |  ...
         |  +--rw label-switched-path* [signaled-name]
         |     +--rw signaled-name                leafref
         |     +--rw config
         |     |  +--rw signaled-name?             string



George, et al.           Expires January 6, 2016                [Page 8]


Internet-Draft               MPLS / TE Model                   July 2015


         |     |  +--rw lsp-description?           string
         |     |  +--rw destination?               inet:ip-address
         |     |  +--rw te-lsp-reoptimize-timer?   uint16
         |     +--ro state
         |  ...
         |     +--rw path-computation-method
         |     |  +--rw path-computation?   identityref
         |     |  +--rw explicit-path
         |     |  |  +--rw path-name?   leafref
         |     |  +--rw queried-path
         |     |  |  +--rw path-computation-server?   inet:ip-address
         |     |  +--rw locally-computed
         |     |     +--rw use-cspf?          boolean
         |     |     +--rw cspf-tiebreaker?   cspf-tie-breaking
         |     +--rw path-attributes
         |     |  +--rw config
         |     |  |  +--rw (lsp-bandwidth)?
         |     |  |  |  +--:(explicit)
         |     |  |  |  |  +--rw set-bandwidth?    uint32
         |     |  |  |  +--:(auto)
         |     |  |  |     +--rw auto-bandwidth
         |  ...
         |     |  |  +--rw metric?           te-metric-type
         |  ...
         |     +--rw lsp-placement-constraints
         |     |  +--rw admin-groups
         |     |  |  +--rw exclude-groups
         |     |  |     +--rw config
         |     |  |     |  +--rw exclude-groups* [admin-group-name]
         |     |  |     |     +--rw admin-group-name    leafref
         |  ...
         |     |  +--rw include-any-groups
         |     |  |  +--rw config
         |     |  |  |  +--rw include-any-groups* [admin-group-name]
         |     |  |  |     +--rw admin-group-name    leafref
         |  ...
         |     |  +--rw include-all-groups
         |     |     +--rw include-any-groups* [admin-group-name]
         |     |     |  +--rw admin-group-name    leafref
         |     |     +--rw config
         |     |     |  +--rw include-all-groups* [admin-group-name]
         |     |     |     +--rw admin-group-name    leafref
         |  ...
         |     +--rw protection
         |     |  +--rw config
         |     |  |  +--rw protection-style-requested?   mpls-protection-style
         |  ...
         |     +--rw path-setup



George, et al.           Expires January 6, 2016                [Page 9]


Internet-Draft               MPLS / TE Model                   July 2015


         |        +--rw rsvp!
         |        |  +--rw path-specification
         |        |  +--rw tunnel
         |        |     +--rw config
         |        |     |  +--rw tunnel-type?   mplst:tunnel-type
         |        |     +--ro state
         |        |     |  +--ro tunnel-type?   mplst:tunnel-type
         |        |     +--rw p2p-lsp
         |        |     |  +--rw config
         |        |     |  |  +--rw setup-priority?    uint8
         |        |     |  |  +--rw hold-priority?     uint8
         |        |     |  |  +--rw retry-timer?       uint16
         |        |     |  |  +--rw destination?       inet:ip-address
         |        |     |  |  +--rw tunnel-local-id?   union
         |        |     |  |  +--rw soft-preemption?   boolean
         |  ...


   Similarly, the partial model for non-traffic-engineered, or IGP-
   based, LSPs is shown below:

   +--rw mpls!
         +--rw lsps
            +--rw unconstrained-path
               +--rw path-setup-protocol
                  +--rw ldp!
                  |     ...
                  +--rw segment-routing!
                        ...

3.  Example use cases

3.1.  Traffic engineered p2p LSP signaled with RSVP

   A possible scenario may be the establishment of a mesh of traffic-
   engineered LSPs where RSVP signaling is desired, and the LSPs use a
   local constrained path calculation to determine their path.  These
   LSPs would fall into the category of a constrained-path LSP.  The LSP
   will specify the path setup method as RSVP inside the path-setup
   container, indicating the LSP desires RSVP signaling.  The LSP would
   be configured as locally-computed under the path-computation-method
   container, specifying the use of CSPF (use-cspf).  Additional
   attributes such as bandwidth (explicit or auto) are available in the
   path-attributes container.  The relevant parts of the model are shown
   below:






George, et al.           Expires January 6, 2016               [Page 10]


Internet-Draft               MPLS / TE Model                   July 2015


+--rw mpls!
      +--rw lsps
         +--rw constrained-path
         |  +--rw label-switched-path* [signaled-name]
         |     +--rw signaled-name                leafref
         |     +--rw config
         |     |  +--rw signaled-name?             string
         |     |  +--rw lsp-description?           string
         |     |  +--rw destination?               inet:ip-address

         |  ...
         |     +--rw path-computation-method
         |  ...
         |     |  +--rw locally-computed
         |     |     +--rw use-cspf?          boolean
         |     |     +--rw cspf-tiebreaker?   cspf-tie-breaking
         |     +--rw path-attributes
         |     |  +--rw config
         |     |  |  +--rw (lsp-bandwidth)?
         |     |  |  |  +--:(explicit)
         |     |  |  |  |  +--rw set-bandwidth?    uint32
         |  ...
         |     |  |  +--rw metric?           te-metric-type
         |  ...
         |     +--rw protection
         |     |  +--rw config
         |     |  |  +--rw protection-style-requested?   mpls-protection-style
         |  ...
         |     +--rw path-setup
         |        +--rw rsvp!
         |        |  +--rw path-specification
         |        |  +--rw tunnel
         |        |     +--rw config
         |        |     |  +--rw tunnel-type?   mplst:tunnel-type
         |  ...
         |        |     +--rw p2p-lsp
         |        |     |  +--rw config
         |        |     |  |  +--rw setup-priority?    uint8
         |        |     |  |  +--rw hold-priority?     uint8
         |        |     |  |  +--rw retry-timer?       uint16
         |        |     |  |  +--rw destination?       inet:ip-address
         |        |     |  |  +--rw tunnel-local-id?   union
         |        |     |  |  +--rw soft-preemption?   boolean








George, et al.           Expires January 6, 2016               [Page 11]


Internet-Draft               MPLS / TE Model                   July 2015


3.2.  Traffic engineered LSP signaled with SR

   A possible scenario may be the establishment of disjoint paths in a
   network where there is no requirement for per-LSP state to be held on
   midpoint nodes within the network, or RSVP-TE is unsuitable (as
   described in [I-D.ietf-spring-segment-routing-mpls] and
   [I-D.shakir-rtgwg-sr-performance-engineered-lsps]).  Such LSPs fall
   in the constrained-path category.  Similar to any other traffic
   engineered LSPs, the path computation method must be specified.  Path
   attributes, such as the as lsp- placement-constraints (expressed as
   administrative groups) or metric must be defined.  Finally, the path
   must be specified in a signaling- protocol specific manner
   appropriate for SR.  The same configuration elements from the tree
   above apply in this case, except that path setup is done by the head-
   end by building a label stack, rather than signaled.

3.3.  IGP-congruent LDP-signaled LSP

   A possible scenario may be the establishment of a full mesh of LSPs.
   When traffic engineering is not an objective, no constraints are
   placed on the end-to-end path, and the best- effort path can be setup
   using LDP signaling simply for label distribution.  The LSPs follow
   IGP-computed paths, and fall in the unconstrained-path category in
   the model.  Protocol-specific configuration pertaining to the
   signaling protocol used, such as the FEC definition and metrics
   assigned are in the path- setup-protocol portion of the model.

   The relevant part of the model for this case is shown below:

     +--rw mpls!
         +--rw lsps
            +--rw unconstrained-path
               +--rw path-setup-protocol
                  +--rw ldp!
                     +--rw tunnel
                        +--rw tunnel-type?   mplst:tunnel-type
                        +--rw ldp-type?      enumeration
                        +--rw p2p-lsp
                        |  +--rw fec-address*   inet:ip-prefix
                        +--rw p2mp-lsp
                        +--rw mp2mp-lsp

   A common operational issue encountered when using LDP is traffic
   blackholing under the following scenario: when an IGP failure occurs,
   LDP is not aware of it as these are two protocols running
   independently, resulting in traffic blackholing at the IGP failure
   point even though LDP is up and running.  LDP-IGP synchronization
   [RFC5443] can be used to cost out the IGP failing point/segment to



George, et al.           Expires January 6, 2016               [Page 12]


Internet-Draft               MPLS / TE Model                   July 2015


   avoid the blackholing issue.  The LDP-IGP synchronization function
   will be incorporated in a future version of this document.

   Note that targeted LDP sessions are not discussed in this use case,
   and will be incorporated as a separate use case in a future version
   of this document.

4.  Security Considerations

   MPLS configuration has a significant impact on network operations,
   and as such any related protocol or model carries potential security
   risks.

   YANG data models are generally designed to be used with the NETCONF
   protocol over an SSH transport.  This provides an authenticated and
   secure channel over which to transfer BGP configuration and
   operational data.  Note that use of alternate transport or data
   encoding (e.g., JSON over HTTPS) would require similar mechanisms for
   authenticating and securing access to configuration data.

   Most of the data elements in the configuration model could be
   considered sensitive from a security standpoint.  Unauthorized access
   or invalid data could cause major disruption.

5.  IANA Considerations

   This YANG data model and the component modules currently use a
   temporary ad-hoc namespace.  If and when it is placed on redirected
   for the standards track, an appropriate namespace URI will be
   registered in the IETF XML Registry" [RFC3688].  The MPLS YANG
   modules will be registered in the "YANG Module Names" registry
   [RFC6020].

6.  YANG modules

   The modules and submodules comprising the MPLS configuration and
   operational model are currently organized as depcited below.














George, et al.           Expires January 6, 2016               [Page 13]


Internet-Draft               MPLS / TE Model                   July 2015


                                 +-------+
               +---------------->| MPLS  |<--------------+
               |                 +-------+               |
               |                     ^                   |
               |                     |                   |
          +----+-----+      +--------+-------+     +-----+-----+
          | TE LSPs  |      | IGP-based LSPs |     |static LSPs|
          |          |      |                |     |           |
          +----------+      +----------------+     +-----------+
              ^  ^                    ^  ^
              |  +----------------+   |  +--------+
              |                   |   |           |
              |   +------+      +-+---+-+      +--+--+
              +---+ RSVP |      |SEGMENT|      | LDP |
                  +------+      |ROUTING|      +-----+
                                +-------+

   The base MPLS module includes submodules describing the three
   different types of support LSPs, i.e., traffic-engineered
   (constrained-path), IGP congruent (unconstrained-path), and static.
   The signaling protocol specific parts of the model are described in
   separate modules for RSVP, segment routing, and LDP.  As mentioned
   earlier, support for BGP labeled unicast is also planned in a future
   revision.

   A module defining various reusable MPLS types is included, and these
   modules also make use of the standard Internet types, such as IP
   addresses, as defined in RFC 6991 [RFC6991].

6.1.  MPLS base modules

<CODE BEGINS> file mpls.yang
module mpls {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/mpls";

  prefix "mpls";


  // import some basic types
  import mpls-types { prefix mplst; }
  import mpls-rsvp { prefix rsvp; }
  import mpls-sr { prefix sr; }
  import mpls-ldp { prefix ldp; }




George, et al.           Expires January 6, 2016               [Page 14]


Internet-Draft               MPLS / TE Model                   July 2015


  // include submodules
  include mpls-te;
  include mpls-igp;
  include mpls-static;


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "This module provides data definitions for configuration of
    Multiprotocol Label Switching (MPLS) and associated protocols for
    signaling and traffic engineering.

    RFC 3031: Multiprotocol Label Switching Architecture

    The MPLS / TE data model consists of several modules and
    submodules as shown below.  The top-level MPLS module describes
    the overall framework.  Three types of LSPs are supported:

    i) traffic-engineered (or constrained-path)

    ii) IGP-congruent (LSPs that follow the IGP path)

    iii) static LSPs which are not signaled

    The structure of each of these LSP configurations is defined in
    corresponding submodules.  Companion modules define the relevant
    configuration and operational data specific to key signaling
    protocols used in operational practice.


                              +-------+
            +---------------->| MPLS  |<--------------+
            |                 +-------+               |
            |                     ^                   |
            |                     |                   |
       +----+-----+      +--------+-------+     +-----+-----+
       | TE LSPs  |      | IGP-based LSPs |     |static LSPs|
       |          |      |                |     |           |
       +----------+      +----------------+     +-----------+
           ^  ^                    ^  ^
           |  +----------------+   |  +--------+
           |                   |   |           |



George, et al.           Expires January 6, 2016               [Page 15]


Internet-Draft               MPLS / TE Model                   July 2015


           |   +------+      +-+---+-+      +--+--+
           +---+ RSVP |      |SEGMENT|      | LDP |
               +------+      |ROUTING|      +-----+
                             +-------+
    ";

  revision "2014-12-12" {
    description
      "Initial revision";
    reference "TBD";
  }

  // extension statements

  // feature statements

  // identity statements


  // grouping statements

  grouping path-setup-common {
    description "common definitions for all signaling protocols";

    // TODO: not clear we really need this
    leaf path-setup-type {
      type identityref {
        base mplst:path-setup-protocol;
      }
      description "path setup protocol to use with the LSP";
    }
  }

  grouping mpls-administrative-groups {
    description
      "global level definitions for MPLS link admin groups";

    list mpls-admin-groups {

      key admin-group-name;
      description "configuration of value to name mapping for mpls
      affinities/admin-groups";

      leaf admin-group-name {
        type string;
        description "name for mpls admin-group";
      }




George, et al.           Expires January 6, 2016               [Page 16]


Internet-Draft               MPLS / TE Model                   July 2015


      leaf admin-group-value {
        type uint32;
        description "value for mpls admin-group";
      }

    }
  }

 grouping mpls-ted-update-threshold_config {
    description "Configuration options for traffic
    engineering database update thresholds.";
    leaf-list ted-update-threshold {
      type mplst:percentage;
      max-elements 16;
      description "stepped percentages of interface bandwidth change
        which trigger update events into the IGP
        traffic engineering database (TED)";
    }
  }
  grouping mpls-ted-update-threshold {
    description "Top level group for traffic engineering
    database flooding options";
    container ted-update-threshold {
      description "Interface bandwidth change percentages
      that trigger update events into the IGP traffic
      engineering database (TED)";
      container config {
        description "Configuration parameters for TED
        update threshold ";
        uses mpls-ted-update-threshold_config;
      }
      container state {
        description "State parameters for TED update threshold ";
        config false;
        uses mpls-ted-update-threshold_config;
      }
    }
  }


  grouping te_lsp_delay_config {
    leaf te-lsp-install-delay {
      type uint16 {
        range 0..3600;
      }
      units seconds;
      description "delay the use of newly installed te lsp for a
      specified amount of time.";



George, et al.           Expires January 6, 2016               [Page 17]


Internet-Draft               MPLS / TE Model                   July 2015


    }

    leaf te-lsp-cleanup-delay {
      type uint16;
      units seconds;
      description "delay the removal of old te lsp for a specified
      amount of time";
    }
  }

  grouping te-interfaces {
    description "global level definitions for interfaces on which TE is run";

    // TODO: this should be made a reference to an interface in the
    // interfaces model
    // TODO - should probably have as key the interface name, also
    // need an easy way to specify all interfaces and to exclude
    // interfaces.
    list te-interfaces {

      key interface-name;
      description "interfaces for which MPLS is enabled";

      leaf interface-name {
        type string;
        description "reference to interface name";
        // TODO: add ref to interface model
      }

      leaf-list interface-admin-groups {
        type leafref {
          path "/mpls:mpls/mpls:te-global-attributes/mpls:mpls-admin-groups/"
          + "mpls:admin-group-name";
        }
        description
          "list of configured admin-groups on the interface";
      }

      leaf interface-ted-update-threshold {
        type leafref {
          path "/mpls/te-global-attributes/ted-update-threshold/config/ted-update-threshold";
        }
        description
          "ted update threshold on the interface";
      }


    }



George, et al.           Expires January 6, 2016               [Page 18]


Internet-Draft               MPLS / TE Model                   July 2015


    container te_lsp_timers {
      description "definition for delays associated with setup and cleanup of TE LSPs";
      container config {
        uses te_lsp_delay_config;
        uses te_lsp_reoptimize_config;
      }
      container state {
        config false;
        uses te_lsp_delay_config;
        uses te_lsp_reoptimize_config;
      }
    }

  }

container mpls {
    presence "top-level container for MPLS config and operational
    state";

    description "Anchor point for mpls configuration and operational
    data";

    container global {
      // entropy label support, label ranges will be added here in the future.
     description "general mpls configuration applicable to any type of LSP and signaling protocol";
    }

    container te-global-attributes {
      description "traffic-engineering global attributes";

      uses mpls-ted-update-threshold;
      uses te-interfaces;
      uses mpls-administrative-groups;

    }

    container signaling-protocols {
      description "top-level signaling protocol configuration";

      uses rsvp:rsvp-global;
      uses sr:sr-global;
      uses ldp:ldp-global;
    }

    container lsps {
      description "LSP definitions and configuration";

      container constrained-path {



George, et al.           Expires January 6, 2016               [Page 19]


Internet-Draft               MPLS / TE Model                   July 2015


        description "traffic-engineered LSPs supporting different
        path computation and signaling methods";

        uses mpls-te-global;
        uses path-definitions;

        list label-switched-path {
          key signaled-name;
          description "list of defined TE LSPs";

          leaf signaled-name {
            type leafref {
              path "../config/signaled-name";
            }

            description "LSP name, also carried in signaling messages
            when appropriate";
          }

          uses te-lsp-common;
          uses te-lsp-setup;
        }
      }

      container unconstrained-path {
        description "LSPs that use the IGP-determined path, i.e., non
        traffic-engineered, or non constrained-path";

        uses igp-lsp-common;
        uses igp-lsp-setup;

      }

      container static-lsps {
      description "statically configured LSPs, without dynamic
        signaling";

        uses static-lsp-main;
      }
    }
  }

  // augment statements

  // rpc statements

  // notification statements
}



George, et al.           Expires January 6, 2016               [Page 20]


Internet-Draft               MPLS / TE Model                   July 2015


<CODE ENDS>


   <CODE BEGINS> file mpls-types.yang
   module mpls-types {

     yang-version "1";

     // namespace
     namespace "http://openconfig.net/yang/mpls-types";

     prefix "mplst";



     // meta
     organization "OpenConfig working group";

     contact
       "OpenConfig working group
       netopenconfig@googlegroups.com";

     description
       "General types for MPLS / TE data model";

     revision "2015-02-01" {
       description
         "Initial revision";
       reference "TBD";
     }

     // extension statements

     // feature statements

     // identity statements

     // using identities rather than enum types to simplify adding new
     // signaling protocols as they are introduced and supported
     identity path-setup-protocol {
       description "base identity for supported MPLS signaling
       protocols";
     }

     identity path-setup-rsvp {
       base path-setup-protocol;
       description "RSVP-TE signaling protocol";
     }



George, et al.           Expires January 6, 2016               [Page 21]


Internet-Draft               MPLS / TE Model                   July 2015


     identity path-setup-sr {
       base path-setup-protocol;
       description "Segment routing";
     }

     identity path-setup-ldp {
       base path-setup-protocol;
       description "lDP - RFC 5036";
     }

     // typedef statements

     typedef percentage {
       type uint8 {
         range "0..100";
       }
       description
         "Integer indicating a percentage value";
     }


     typedef mpls-label {
       type union {
         type uint32 {
           range 16..1048575;
         }
         type enumeration {
           enum IPV4_EXPLICIT_NULL {
             value 0;
             description "valid at the bottom of the label stack,
             indicates that stack must be popped and packet forwarded
             based on IPv4 header";
           }
           enum ROUTER_ALERT {
             value 1;
             description "allowed anywhere in the label stack except
             the bottom, local router delivers packet to the local CPU
             when this label is at the top of the stack";
           }
           enum IPV6_EXPLICIT_NULL {
             value 2;
             description "valid at the bottom of the label stack,
             indicates that stack must be popped and packet forwarded
             based on IPv6 header";
           }
           enum IMPLICIT_NULL {
             value 3;
             description "assigned by local LSR but not carried in



George, et al.           Expires January 6, 2016               [Page 22]


Internet-Draft               MPLS / TE Model                   July 2015


             packets";
           }
           enum ENTROPY_LABEL_INDICATOR {
             value 7;
             description "Entropy label indicator, to allow an LSR
             to distinguish between entropy label and applicaiton
             labels RFC 6790";
           }
         }
       }
       description "type for MPLS label value encoding";
       reference "RFC 3032 - MPLS Label Stack Encoding";
     }

     typedef tunnel-type {
       type enumeration {
         enum P2P {
           description "point-to-point label-switched-path";
         }
         enum P2MP {
           description "point-to-multipoint label-switched-path";
         }
         enum MP2MP {
           description "multipoint-to-multipoint label-switched-path";
         }
       }
       description "defines the tunnel type for the LSP";
       reference
         "RFC 6388 - Label Distribution Protocol Extensions for
         Point-to-Multipoint and Multipoint-to-Multipoint Label Switched
         Paths
         RFC 4875 - Extensions to  Resource Reservation Protocol
         - Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE
         Label Switched Paths (LSPs)";
     }

     // grouping statements

     // data definition statements

     // augment statements

     // rpc statements

     // notification statements

   }
   <CODE ENDS>



George, et al.           Expires January 6, 2016               [Page 23]


Internet-Draft               MPLS / TE Model                   July 2015


6.2.  MPLS LSP submodules

<CODE BEGINS> file mpls-te.yang
submodule mpls-te {

  yang-version "1";

  belongs-to "mpls" {
    prefix "mpls";
  }


  // import some basic types
  import ietf-inet-types { prefix inet; }
  import mpls-types { prefix mplst; }
  import mpls-rsvp { prefix rsvp; }
  import mpls-sr { prefix sr; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "Configuration related to constrained-path LSPs and traffic
    engineering.  These definitions are not specific to a particular
    signaling protocol or mechanism (see related submodules for
        signaling protocol-specific configuration).";

  revision "2014-07-07" {
    description
      "Initial revision";
    reference "TBD";
  }

  // extension statements

  // feature statements

  // identity statements

  // using identities for path comp method, though enums may also
  // be appropriate if we decided these are the primary computation
  // mechanisms in future.
  identity path-computation-method {



George, et al.           Expires January 6, 2016               [Page 24]


Internet-Draft               MPLS / TE Model                   July 2015


    description "base identity for supported path computation
      mechanisms";
  }

  identity locally-computed {
    base path-computation-method;
    description "indicates a constrained-path LSP in which the
      path is computed by the local LER";
  }

  identity externally-queried {
    base path-computation-method;
    description "constrained-path LSP in which the path is
      obtained by querying an external source, such as a PCE server";
  }

  identity explicitly-defined {
    base path-computation-method;
    description "constrained-path LSP in which the path is
      explicitly specified as a collection of strict or/and loose
      hops";
  }

  // typedef statements

  typedef mpls-hop-type {
    type enumeration {
      enum LOOSE {
        description "loose hop in an explicit path";
      }
      enum STRICT {
        description "strict hop in an explicit path";
      }
    }
    description "enumerated type for specifying loose or strict
      paths";
  }

  typedef te-metric-type {
    type union {
      type enumeration {
        enum IGP {
          description "set the LSP metric to track the underlying
            IGP metric";
        }
      }
      type uint32;
    }



George, et al.           Expires January 6, 2016               [Page 25]


Internet-Draft               MPLS / TE Model                   July 2015


    description "union type for setting the LSP TE metric to a
      static value, or to track the IGP metric";
  }

  typedef cspf-tie-breaking {
    type enumeration {
      enum RANDOM {
        description "CSPF calculation selects a random path among
          multiple equal-cost paths to the destination";
      }
      enum LEAST_FILL {
        description "CSPF calculation selects the path with greatest
          available bandwidth";
      }
      enum MOST_FILL {
        description "CSPF calculation selects the path with the least
          available bandwidth";
      }
    }
    default RANDOM;
    description "type to indicate the CSPF selection policy when
      multiple equal cost paths are available";
  }

  typedef mpls-protection-style {
    type enumeration {
      enum UNPROTECTED {
        description "no protection is desired for the lsp";
      }
      enum LINK-PROTECTION-REQUESTED {
        description "link protection is desired for the lsp";
      }
      enum LINK-NODE-PROTECTION-REQUESTED {
        description "node and link protection is desired for the lsp";
      }
    }
    default UNPROTECTED;
    description
      "Specifies the protection type for the LSP";
  }

  // grouping statements

  grouping te_lsp_reoptimize_config {
    leaf te-lsp-reoptimize-timer {
      type uint16;
      units seconds;
      description "frequency of reoptimization of a te lsp";



George, et al.           Expires January 6, 2016               [Page 26]


Internet-Draft               MPLS / TE Model                   July 2015


    }
  }

  grouping te-lsp-common {
    description "common definitions for traffic-engineered LSPs";

    container config {
      uses te-lsp-common_config;
      uses te_lsp_reoptimize_config;
    }

    container state {
      config false;
      uses te-lsp-common_config;
      uses te_lsp_reoptimize_config;
    }

    container path-computation-method {
      description "select and configure the way the LSP path is
        computed";

      leaf path-computation {
        type identityref {
          base path-computation-method;
        }
        description "path computation method to use with the LSP";
      }

      uses te-lsp-comp-explicit;
      uses te-lsp-comp-queried;
      uses te-lsp-comp-local;
    }

    container path-attributes {
      description "general path attribute settings for TE-LSP
        tunnels";

      container config {
        description "configuration relating to LSP bandwidth
        and metrics";
        uses te-lsp-bandwidth_config;
        uses te-lsp-metric_config;
      }

      container state {
        description "operational state relating to LSP bandwidth
        and metrics";
        config false;



George, et al.           Expires January 6, 2016               [Page 27]


Internet-Draft               MPLS / TE Model                   July 2015


        uses te-lsp-bandwidth_config;
        uses te-lsp-metric_config;
      }

      // XXX - no, this is also there for LDP - also removed the
      // reference to "igp metric" as this is going to be confusing,
      // unless we mandate for the LSP to have the same metric as the
      // Igp, which is going to be hard with some vendors
      // implementations.

    }


    container lsp-placement-constraints {
      description
        "constraints on lsp routing such as admin-groups";

      container admin-groups {
        description
          "Include/Exclude constraints for link affinities";

        container exclude-groups {
          container config {
            description "configuration specifying admin
            groups which must be strictly excluded in the
            LSP path";
            uses te-lsp-exclude-admin-group_config;
          }
          container state {
            description "operational state reflecting
            admin groups which must be strictly excluded";
            config false;
            uses te-lsp-exclude-admin-group_config;
          }
        }
      }
      container include-any-groups {
        container config {
          description "configuration specifying admin
          groups, any of which must be included in the
          LSP path";
          uses te-lsp-include-any-admin-group_config;
        }
        container state {
          description "operational state relating to admin
          groups, any of which must be included in the
          LSP path";
          config false;



George, et al.           Expires January 6, 2016               [Page 28]


Internet-Draft               MPLS / TE Model                   July 2015


          uses te-lsp-include-any-admin-group_config;
        }
      }
      container include-all-groups {
          uses te-lsp-include-any-admin-group_config;
        container config {
          description "configuration specifying admin
          groups, all of which must be included in the
          LSP path";
          uses te-lsp-include-all-admin-group_config;
        }
        container state {
          description "operational state relating to admin
          groups, all of which must be included in the
          LSP path";
          config false;
          uses te-lsp-include-all-admin-group_config;
        }
      }
    }

    container protection {
      description "failure protection properties for the LSP";

      container config {
        description "configuration stating which MPLS protection
        options will be requested by the LSP";
        uses te-lsp-protection_config;
      }

      container state {
        description "operational state reflecting which
        MPLS protection options will be requested by the LSP";
        config false;
        uses te-lsp-protection_config;
      }

    }
  }

  grouping te-lsp-common_config {
    leaf signaled-name {
      type string;
      description "LSP name, also carried in signaling messages
        when appropriate";
    }

    leaf lsp-description {



George, et al.           Expires January 6, 2016               [Page 29]


Internet-Draft               MPLS / TE Model                   July 2015


      type string;
      description "optional text description for the LSP";
    }
    leaf destination {
      type inet:ip-address;
      description "destination egress node for the LSP";
    }
  }
  //}
  // TODO - note that this is only currently defined for
  // RSVP-like entities

  grouping te-lsp-bandwidth_config {
    choice lsp-bandwidth {
      default explicit;
      description "select how bandwidth for the LSP will be
        specified and managed";
      case explicit {
        leaf set-bandwidth {
          type uint32;
          description "set bandwidth explicitly, e.g., using
            offline calculation";
        }
      }
      case auto {
        uses te-lsp-auto-bandwidth_config;
      }
    }
  }

  grouping te-lsp-auto-bandwidth_config {
    container auto-bandwidth {
      description "configure auto-bandwidth operation in
        which devices automatically adjust bandwidth to meet
        requirements";

      leaf enabled {
        type boolean;
        default false;
        description "enables mpls auto-bandwidth on the
          lsp";
      }

      leaf min-bw {
        type uint32;
        description "set the minimum bandwidth in Mbps for an
          auto-bandwidth LSP";
      }



George, et al.           Expires January 6, 2016               [Page 30]


Internet-Draft               MPLS / TE Model                   July 2015


      leaf max-bw {
        type uint32;
        description "set the maximum bandwidth in Mbps for an
          auto-bandwidth LSP";
      }

      leaf adjust-interval {
        type uint32;
        description "time in seconds between adjustments to
          LSP bandwidth";
      }

      leaf adjust-threshold {
        type mplst:percentage;
        description "percentage difference between the LSP's
          specified bandwidth and its current bandwidth
          allocation -- if the difference is greater than the
          specified percentage, auto-bandwidth adjustment is
          triggered";
      }

      container overflow {
        description "configuration of MPLS overflow bandwidth
          adjustement for the LSP";
        uses te-lsp-overflow_config;
      }

      container underflow {
        description "configuration of MPLS underflow bandwidth
          adjustement for the LSP";
        uses te-lsp-underflow_config;
      }
    }
  }

  grouping te-lsp-metric_config {
    leaf metric {
      type te-metric-type;
      description "LSP metric, either explicit or IGP";
    }
  }

  grouping  te-lsp-overflow_config {
    description "configuration for mpls lsp bandwidth
      overflow adjustment";

    leaf enabled {
      type boolean;



George, et al.           Expires January 6, 2016               [Page 31]


Internet-Draft               MPLS / TE Model                   July 2015


      default false;
      description "enables mpls lsp bandwidth overflow
        adjustment on the lsp";
    }

    leaf overflow-threshold {
      type mplst:percentage;
      description "bandwidth percentage change to trigger
        an overflow event";

    }

    leaf trigger-event-count {
      type uint16;
      description "number of consecutive overflow sample
        events needed to trigger an overflow adjustment";
    }
  }

  grouping te-lsp-underflow_config {
    description
      "configuration for mpls lsp bandwidth
      underflow adjustment";

    leaf enabled {
      type boolean;
      default false;
      description "enables bandwidth underflow
        adjustment on the lsp";
    }

    leaf underflow-threshold {
      type mplst:percentage;
      description "bandwidth percentage change to trigger
        and underflow event";
    }

    leaf trigger-event-count {
      type uint16;
      description "number of consecutive underflow sample
        events needed to trigger an underflow adjustment";
    }
  }

  grouping te-lsp-exclude-admin-group_config {
    list exclude-groups {

      key admin-group-name;



George, et al.           Expires January 6, 2016               [Page 32]


Internet-Draft               MPLS / TE Model                   July 2015


      description
        "list of admin-groups to exclude in path calculation";

      leaf admin-group-name {
        type leafref {
          path "/mpls/te-global-attributes/mpls-admin-groups/" +
            "admin-group-name";
        }
        description
          "name of the admin group -- references a defined admin
          group";
      }
    }
  }

  grouping te-lsp-include-all-admin-group_config {
    list include-all-groups {

      key admin-group-name;
      description
        "list of admin-groups of which all must be included";

      leaf admin-group-name {
        type leafref {
          path "/mpls/te-global-attributes/mpls-admin-groups/" +
            "admin-group-name";
        }
        description
          "name of the admin group -- references a defined
          admin group";
      }
    }
  }

  grouping te-lsp-include-any-admin-group_config {
    list include-any-groups {

      key admin-group-name;
      description
        "list of admin-groups of which one must be included";

      leaf admin-group-name {
        type leafref {
          path "/mpls/te-global-attributes/mpls-admin-groups/" +
            "admin-group-name";
        }
        description
          "name of the admin group -- references a defined



George, et al.           Expires January 6, 2016               [Page 33]


Internet-Draft               MPLS / TE Model                   July 2015


          admin group";
      }
    }
  }

  grouping te-lsp-protection_config {
    leaf protection-style-requested {
      type mpls-protection-style {
      }
      description "style of mpls frr protection desired. both
        facility backup and one-to-one are options";
    }
  }

  grouping te-lsp-comp-explicit {
    description "definitions for LSPs in which hops are explicitly
      specified";

    container explicit-path {
      description "LSP with explicit path specification";

      leaf path-name {
        type leafref {
          path "/mpls/lsps/constrained-path/"
            + "paths/path/config/path-name";
          require-instance true;
        }
          description "reference to a defined path";
      }
    }
  }

  grouping te-lsp-comp-queried {
    description "definitons for LSPs computed by querying a remote
      service, e.g., PCE server";

    container queried-path {
      description "LSP with path queried from an external server";

      leaf path-computation-server {
      type inet:ip-address;
      description "Address of the external path computation
        server";
      }
    }
  }

  grouping te-lsp-comp-local {



George, et al.           Expires January 6, 2016               [Page 34]


Internet-Draft               MPLS / TE Model                   July 2015


    description "definitons for locally-computed LSPs";

    container locally-computed {
      description "LSP with path computed by local ingress LSR";

      leaf use-cspf {
        type boolean;
        description "Flag to enable CSPF for locally computed LSPs";
      }
      leaf cspf-tiebreaker {
        type cspf-tie-breaking;
        description
          "Determine the tie-breaking method to choose between
          equally desirable paths during CSFP computation";
      }
    }
  }


  grouping path-definitions-old {
    description "describe path configuration for specifying LSP
      hops";

    container paths {

      leaf path-name {
        type leafref {
          path "/mpls/lsps/constrained-path/"
            + "path-name/config/path/path-name";
          require-instance true;
        }
      }

      container named-path {
        description "definition for name of LSP path object";
        container config {
          uses te-lsp-path-name_config;
        }
        container state {
          config false;
          uses te-lsp-path-name_config;
        }
      }

      container hops {
        description "definition of hop objects for a LSP
          path";
        container config {



George, et al.           Expires January 6, 2016               [Page 35]


Internet-Draft               MPLS / TE Model                   July 2015


          uses te-lsp-path-hop_config;
        }
        container state {
          config false;
          uses te-lsp-path-hop_config;
        }
      }
    }
  }

  grouping path-definitions {
    description "common information for MPLS path definition";
    container paths {
      list path {
        description "definition for naming a LSP path
          object";
        key path-name;

        leaf path-name {
          type leafref {
            path "/mpls/lsps/constrained-path/"
            + "paths/path/config/path-name";
            require-instance true;
          }
        }
        container config {
          description "configuration for LSP path name";
          uses te-lsp-path-name_config;
        }
        container state {
          description "operational state for LSP path name";
          config false;
          uses te-lsp-path-name_config;
        }
      }
      list hops {
        description "definition of hop objects for a LSP
          path";
        key address;

        leaf address {
          type leafref {
            path "/mpls/lsps/constrained-path/"
              + "paths/hops/config/address";
            require-instance true;
          }
        }
        container config {



George, et al.           Expires January 6, 2016               [Page 36]


Internet-Draft               MPLS / TE Model                   July 2015


          description "configuration for specifying LSP path
            hops";
          uses te-lsp-path-hop_config;
        }
        container state {
          description "operational state for specifying LSP path
            hops";
          config false;
          uses te-lsp-path-hop_config;
        }
      }
    }
  }

  grouping te-lsp-path-information_config {
    description "common information for MPLS path definition";
    // TODO - this has to be redone with pathname in the config container and a leafref
    list path {
      key path-name;
      description "specification of LSP path";

      leaf path-name {
        type string;
        description "identifier for the LSP path";
      }

      list hop {
        key address;
        description "specification of the strict and loose hops in
          the path";

        leaf address {
          type inet:ip-address;
          description "router hop for the LSP path";
        }

        leaf type {
          type mpls-hop-type;
          description "strict or loose hop";
        }
      }
    }
  }

  grouping te-lsp-path-name_config {

    description "common information for MPLS path name definition";




George, et al.           Expires January 6, 2016               [Page 37]


Internet-Draft               MPLS / TE Model                   July 2015


    leaf path-name {
      type string;
      description "identifier for the LSP path";
    }
  }

  grouping te-lsp-path-hop_config {

    description "common information for MPLS path hops definition";

    leaf address {
      type inet:ip-address;
      description "router hop for the LSP path";
    }

    leaf type {
      type mpls-hop-type;
      description "strict or loose hop";
    }
  }

  grouping te-lsp-setup {
    description "signaling protocol configuration for traffic
      engineered LSPs";

    container path-setup {
      description "select and configure the signaling method for
        the LSP";

      // uses path-setup-common;
      uses rsvp:te-lsp-rsvp-setup;
      uses sr:te-lsp-sr-setup;
    }
  }

  grouping mpls-te-global {
    description "global level defintions for mpls traffic
      engineered LSPs";
  }

// data definition statements

// augment statements

// rpc statements

// notification statements
}



George, et al.           Expires January 6, 2016               [Page 38]


Internet-Draft               MPLS / TE Model                   July 2015


<CODE ENDS>


   <CODE BEGINS> file mpls-igp.yang
   submodule mpls-igp {

     yang-version "1";

     belongs-to "mpls" {
       prefix "mpls";
     }


     // import some basic types
     import mpls-ldp { prefix ldp; }
     import mpls-sr { prefix sr; }



     // meta
     organization "OpenConfig working group";

     contact
       "OpenConfig working group
       netopenconfig@googlegroups.com";

     description
       "Configuration generic configuration parameters for IGP-congruent
       LSPs";

     revision "2014-07-07" {
       description
         "Initial revision";
       reference "TBD";
     }

     // extension statements

     // feature statements

     // identity statements

     // typedef statements

     // grouping statements


     grouping igp-lsp-common {



George, et al.           Expires January 6, 2016               [Page 39]


Internet-Draft               MPLS / TE Model                   July 2015


       description "common definitions for IGP-congruent LSPs";

       // container path-attributes {
       //  description "general path attribute settings for IGP-based
       //  LSPs";

       //}

     }


     grouping igp-lsp-setup {
       description "signaling protocol definitions for IGP-based LSPs";

       container path-setup-protocol {
         description "select and configure the signaling method for
             the LSP";

         // uses path-setup-common;
         uses ldp:igp-lsp-ldp-setup;
         uses sr:igp-lsp-sr-setup;
       }
     }


     // data definition statements

     // augment statements

     // rpc statements

     // notification statements

   }
   <CODE ENDS>


   <CODE BEGINS> file mpls-static.yang
   submodule mpls-static {

     yang-version "1";

     belongs-to "mpls" {
       prefix "mpls";
     }

     // import some basic types
     import mpls-types {prefix mplst; }



George, et al.           Expires January 6, 2016               [Page 40]


Internet-Draft               MPLS / TE Model                   July 2015


     import ietf-inet-types { prefix inet; }


     // meta
     organization "OpenConfig working group";

     contact
       "OpenConfig working group
       netopenconfig@googlegroups.com";

     description
       "Defines static LSP configuration";

     revision "2015-02-01" {
       description
         "Initial revision";
       reference "TBD";
     }

     // extension statements

     // feature statements

     // identity statements

     // typedef statements

     // grouping statements

     grouping static-lsp-common {
       description "common definitions for static LSPs";

       leaf next-hop {
         type inet:ip-address;
         description "next hop IP address for the LSP";
       }

       leaf incoming-label {
         type mplst:mpls-label;
         description "label value on the incoming packet";
       }

       leaf push-label {
         type mplst:mpls-label;
         description "label value to push at the current hop for the
         LSP";
       }
     }



George, et al.           Expires January 6, 2016               [Page 41]


Internet-Draft               MPLS / TE Model                   July 2015


     grouping static-lsp-main {
       description "grouping for top level list of static LSPs";


       list label-switched-path {
         key name;
         description "list of defined static LSPs";

         leaf name {
           type string;
           description "name to identify the LSP";
         }

         // TODO: separation into ingress, transit, egress may help
         // to figure out what exactly is configured, but need to
         // consider whether implementations can support the
         // separation
         container ingress {
           description "Static LSPs for which the router is an
             ingress node";

           uses static-lsp-common;
         }

         container transit {
           description "static LSPs for which the router is a
             transit node";

           uses static-lsp-common;
         }

         container egress {
           description "static LSPs for which the router is a
             egress  node";

           uses static-lsp-common;
         }
       }
     }

     // data definition statements

     // augment statements

     // rpc statements

     // notification statements




George, et al.           Expires January 6, 2016               [Page 42]


Internet-Draft               MPLS / TE Model                   July 2015


   }
   <CODE ENDS>


6.3.  MPLS signaling protocol modules

<CODE BEGINS> file mpls-rsvp.yang
module mpls-rsvp {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/rsvp";

  prefix "rsvp";

  // import some basic types
  import ietf-inet-types { prefix inet; }
  import mpls-types { prefix mplst; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "Configuration for RSVP-TE signaling, including global protocol
    parameters and LSP-specific configuration for constrained-path
    LSPs";

  revision "2015-04-22" {
    description
      "Initial revision";
    reference "TBD";
  }

  // extension statements

  // feature statements

  // identity statements

  // typedef statements

  // grouping statements



George, et al.           Expires January 6, 2016               [Page 43]


Internet-Draft               MPLS / TE Model                   July 2015


  grouping mpls-rsvp-soft-preemption_config {
    description "Configuration for MPLS soft preemption";
    leaf enable {
      type boolean;
      default false;
      description "Enables soft preemption on a node.";
    }

    leaf soft-preemption-timeout {
      type uint16 {
        range 0..max;
      }
      // The RFC actually recommends 30 seconds as default.
      default 0;
      description "Timeout value for soft preemption to revert
        to hard preemption";
      reference "RFC5712 MPLS-TE soft preemption";
    }
  }

  grouping mpls-rsvp-soft-preemption {
    description "Top level group for MPLS soft preemption";
    container soft-preemption {
      description "Protocol options relating to RSVP
      soft preemption";
      container config {
        description "Configuration parameters relating to RSVP
        soft preemption support";
        uses mpls-rsvp-soft-preemption_config;
      }
      container state {
        description "State parameters relating to RSVP
        soft preemption support";
        config false;
        uses mpls-rsvp-soft-preemption_config;
      }
    }
  }


  grouping mpls-rsvp-protocol_options_config {
    description "RSVP protocol options configuration.";
    leaf hello-interval {
      type uint16 {
        range 1000..max;
      }
      default 9000;
      units milliseconds;



George, et al.           Expires January 6, 2016               [Page 44]


Internet-Draft               MPLS / TE Model                   July 2015


      description "set the interval in ms between RSVP hello
        messages";
    }
    leaf refresh-reduction {
      type boolean;
      default true;
      description "enables all RSVP refresh reduction message
        bundling, RSVP message ID, reliable message delivery
        and summary refresh";
      reference "RFC 2961 RSVP Refresh Overhead Reduction
        Extensions";
    }

    leaf refresh-reduction-reliable {
      type boolean;
      default true;
      description "enables RSVP refresh reduction reliable
        delivery and message_ID";
      reference "RFC 2961 RSVP Refresh Overhead Reduction
        Extensions";
    }
  }

  grouping mpls-rsvp-protocol_options {
    description "Top level group for RSVP protocol options";
    // TODO: confirm that the described semantics are supported
    // on various implementations. Finer grain configuration
    // will be vendor-specific
    container protocol_options {
      container config {
        description "Configuration for RSVP refresh reduction";
        uses mpls-rsvp-protocol_options_config;
      }
      container state {
        description "State for RSVP refresh reduction";
        config false;
        uses mpls-rsvp-protocol_options_config;
      }
    }
  }

  grouping mpls-rsvp-subscription_config {
    description "RSVP subscription configuration";
    leaf subscription {
      type mplst:percentage;
      description "percentage of the interface bandwidth that
        RSVP can reserve";
    }



George, et al.           Expires January 6, 2016               [Page 45]


Internet-Draft               MPLS / TE Model                   July 2015


  }
  grouping mpls-rsvp-subscription {
    description "Top level group for RSVP subscription options";
    container subscription {
      description "Bandwidth percentage reservable by RSVP
      on an interface";
      container config {
        uses mpls-rsvp-subscription_config;
      }
      container state {
        config false;
        uses mpls-rsvp-subscription_config;
      }
    }
  }

  grouping mpls-rsvp-graceful-restart_config {
    description
      "Configuration parameters relating to RSVP Graceful-Restart";

    leaf enable {
      type boolean;
      default false;
      description "Enables graceful restart on the node.";
    }

    leaf restart-time {
      type uint32;
      description
        "Graceful restart time (seconds).";
      reference
        "RFC 5495: Description of the Resource
        Reservation Protocol - Traffic-Engineered
        (RSVP-TE) Graceful Restart Procedures";
    }
    leaf recovery-time {
      type uint32;
      description
        "RSVP state recovery time";
    }
  }

  grouping mpls-rsvp-graceful-restart {
    description "Top level group for RSVP graceful-restart
    parameters";
    container graceful-restart {
      container config {
        description "Configuration parameters relating to



George, et al.           Expires January 6, 2016               [Page 46]


Internet-Draft               MPLS / TE Model                   July 2015


        graceful-restart";
        uses mpls-rsvp-graceful-restart_config;
      }
      container state {
        config false;
        description "State information associated with
        RSVP graceful-restart";
        uses mpls-rsvp-graceful-restart_config;
      }
    }
  }

  grouping mpls-rsvp-authentication_config {
    description "RSVP authentication parameters container.";
    leaf enable {
      type boolean;
      default false;
      description "Enables RSVP authentication on the node.";
    }
    leaf authentication-key {
      type string {
        // Juniper supports 1..16, Cisco has a much bigger range, up to 60.
        length "1..32";
      }
      description
        "authenticate RSVP signaling
        messages";
      reference
        "RFC 2747: RSVP Cryptographic Authentication";
    }
  }

  grouping mpls-rsvp-authentication {
    description "Top level group for RSVP authentication, as per RFC2747";
    container authentication {
      container config {
        description "Configuration parameters relating
        to authentication";
        uses mpls-rsvp-authentication_config;
      }
      container state {
        config false;
        description "State information associated
        with authentication";
        uses mpls-rsvp-authentication_config;
      }
    }
  }



George, et al.           Expires January 6, 2016               [Page 47]


Internet-Draft               MPLS / TE Model                   July 2015


  grouping mpls-rsvp-link-protection_config {
    description "RSVP facility (link/node) protection configuration";
    leaf enable {
      type boolean;
      default false;
      description "Enables facility protection on the interface.";
    }
    leaf link-protection-only {
      type boolean;
      default false;
      description "disables node protection on this interface,
                  and forces only link protection";
    }

    leaf bypass-optimize-interval {
      type uint16;
      units seconds;
      description "interval between periodic optimization
        of the bypass LSPs";
      // note: this is interface specific on juniper
      // on iox, this is global. need to resolve.
    }
    // to be completed, things like enabling link protection,
    // optimization times, etc.
  }

  grouping mpls-rsvp-link-protection {
    description "Top level group for RSVP protection";
    container link-protection {
      description "link-protection (NHOP) related configuration";
      container config {
        description "Configuration for link-protection";
        uses mpls-rsvp-link-protection_config;
      }
      container state {
        description "State for link-protection";
        config false;
        uses mpls-rsvp-link-protection_config;
      }

    }
  }

  grouping mpls-rsvp-error-statistics {
    description "RSVP-TE packet statistics";
    container error {
      description "RSVP-TE error statistics";
      leaf authentication-failure {



George, et al.           Expires January 6, 2016               [Page 48]


Internet-Draft               MPLS / TE Model                   July 2015


        type yang:counter32;
        description
          "Authentication failure count";
      }

      leaf PathErr {
        type yang:counter32;
        description
          "Path error to client count";
      }

      leaf ResvErr {
        type yang:counter32;
        description
          "Resv error to client count";
      }

      leaf path-timeout {
        type yang:counter32;
        description
          "Path timeout count";
      }

      leaf resv-timeout {
        type yang:counter32;
        description
          "Resv timeout count";
      }

      leaf rate-limit {
        type yang:counter32;
        description
          "Count of packets that were rate limited";
      }

      // TODO - complete the other error statistics
    }
  }

  grouping mpls-rsvp-protocol-statistics {
    description "RSVP protocol statistics";
    container protocol {
      description "RSVP-TE protocol statistics";
      leaf hello-sent {
        type yang:counter32;
        description
          "Hello sent count";
      }



George, et al.           Expires January 6, 2016               [Page 49]


Internet-Draft               MPLS / TE Model                   July 2015


      leaf hello-rcvd {
        type yang:counter32;
        description
          "Hello received count";
      }

      leaf path-sent {
        type yang:counter32;
        description
          "Path sent count";
      }

      leaf path-rcvd {
        type yang:counter32;
        description
          "Path received count";
      }

      // TODO - To be completed the other packet statistics
    }
  }

  grouping mpls-rsvp-statistics {
    description "RSVP-TE statistics";
    container statistics {
      description "Statistics related to RSVP-TE";
      container  config {
        description "Configuration for RSVP-TE statistics";
      }
      container state {
        config false;
        description "State for RSVP-TE statistics on an interface";
        uses mpls-rsvp-protocol-statistics;
        uses mpls-rsvp-error-statistics;
      }
    }
  }

  grouping rsvp-global {
    description "Global RSVP protocol configuration";
    container rsvp-te {
      description "RSVP-TE global signaling protocol configuration";

      container global {
        uses mpls-rsvp-graceful-restart;
        uses mpls-rsvp-soft-preemption;
        // TODO - reconcile global and per-interface protocol-related statistics
        uses mpls-rsvp-statistics;



George, et al.           Expires January 6, 2016               [Page 50]


Internet-Draft               MPLS / TE Model                   July 2015


      }
      // interfaces, bw percentages, hello timers, etc goes here";

      list interfaces {
        key interface-name;
        description "list of per-interface RSVP configurations";

        // TODO: update to interface ref -- move to separate
        // augmentation.
        leaf interface-name {
          type string;
          description "references a configured IP interface";
        }
        uses mpls-rsvp-protocol_options;
        uses mpls-rsvp-authentication;
        uses mpls-rsvp-subscription;
        // uses mpls-rsvp-ted-update-threshold; /* this moved to the te-global attributes stanza */
        uses mpls-rsvp-link-protection;

      }
    }
  }

  grouping mpls-rsvp-te-tunnel {
    description "definitions for RSVP-signaled LSP tunnel types,
                .e.g., applicable to point-to-point LSPs";

    container tunnel {
      description "contains configuration stanzas for different LSP
        tunnel types (P2P, P2MP, etc.)";

      container config {
        description "configuration of overall tunnel parameters";
        uses mpls-rsvp-tunnel-type_config;
      }

      container state {
        description "state information for mpls tunnels";
        config false;
        uses mpls-rsvp-tunnel-type_config;
      }
      uses mpls-rsvp-p2p-lsp-top;
      uses mpls-rsvp-p2mp-lsp-top;
    }
  }

  grouping mpls-rsvp-p2mp-lsp-top {
    description "Top level grouping for P2MP LSPs";



George, et al.           Expires January 6, 2016               [Page 51]


Internet-Draft               MPLS / TE Model                   July 2015


    container p2mp-lsp {
      when "tunnel-type = 'P2MP'" {
        description "container is active when LSP tunnel type is
          point to multipoint";
      }
      description "properties of point-to-multipoint tunnels";
      container config {
        description "configuration of p2mp lsps";
        uses mpls-rsvp-tunnel-rsvp-p2mp_config;
      }
      container state {
        description "state information of p2mp lsps";
        config false;
        uses mpls-rsvp-tunnel-rsvp-p2mp_config;
      }
    }
  }

  grouping mpls-rsvp-p2p-lsp-top {
    description "Top level grouping for P2P LSPs";
    container p2p-lsp {
      when "tunnel-type = 'P2P'" {
        description "container active when LSP tunnel type is
          point to point";
      }
      description "properties of point-to-point tunnels";
      container config {
        description "configuration for p2p lsps";
        uses mpls-rsvp-tunnel-rsvp-p2p_config;
      }
      container state {
        description "state information for p2p lsps";
        config false;
        uses mpls-rsvp-tunnel-rsvp-p2p_config;
      }
    }
  }

  grouping mpls-rsvp-tunnel-type_config {
    description "Configuration of MPLS tunnel type";
    leaf tunnel-type {
      type mplst:tunnel-type;
      description "specifies the type of LSP, e.g., P2P or P2MP";
    }
  }

  grouping mpls-rsvp-tunnel-rsvp-p2mp_config {
    description "properties of point-to-multipoint tunnels";



George, et al.           Expires January 6, 2016               [Page 52]


Internet-Draft               MPLS / TE Model                   July 2015


    leaf-list destination {
      type inet:ip-address;
      description "list of destinations / egress nodes for the
        multipoint LSP tunnel";
    }

  }

  grouping mpls-rsvp-tunnel-rsvp-p2p_config {
    description "properties of point-to-point tunnels";
    leaf setup-priority {
      type uint8 {
        range 0..7;
      }
      default 7;
      description "preemption priority during LSP setup, lower is
        higher priority; default 7 indicates that LSP will not
        preempt established LSPs during setup";
      reference "RFC 3209 - RSVP-TE: Extensions to RSVP for LSP Tunnels";
    }

    leaf hold-priority {
      type uint8 {
        range 0..7;
      }
      default 0;
      description "preemption priority once the LSP is established,
                  lower is higher priority; default 0 indicates that other LSPs
                    will not preempt the LSPs once established";
      reference "RFC 3209 - RSVP-TE: Extensions to RSVP for LSP Tunnels";
    }

    leaf retry-timer {
      type uint16 {
        range 1..600;
      }
      units seconds;
      description "sets the time between attempts to establish the
        LSP";
    }
    leaf destination {
      type inet:ip-address;
      description "destination egress node for the LSP";
    }

    leaf tunnel-local-id {
      type union {
        type uint32;



George, et al.           Expires January 6, 2016               [Page 53]


Internet-Draft               MPLS / TE Model                   July 2015


        type string;
      }
      description "locally signficant optional identifier for the
        LSP; may be a numerical or string value";
    }

    leaf soft-preemption {
      type boolean;
      description "enables RSVP soft-preemption on this LSP";
      default false;
    }
  }

  grouping te-lsp-rsvp-setup {
    description "data definitions for RSVP-signalled LSPs";
    container rsvp {
      presence "Presence of this container sets the LSP to use
        RSVP signaling";
      description "Configuration for RSVP-signalled TE LSPs";
      container path-specification {
        description "Definition of primary/backup paths for purpose
          of signaling the LSP";
      }
      uses mpls-rsvp-te-tunnel;
    }
  }

  // data definition statements

  // augment statements

  // rpc statements

  // notification statements

}
<CODE ENDS>


   <CODE BEGINS> file mpls-sr.yang
   module mpls-sr {

     yang-version "1";

     // namespace
     namespace "http://openconfig.net/yang/sr";

     prefix "sr";



George, et al.           Expires January 6, 2016               [Page 54]


Internet-Draft               MPLS / TE Model                   July 2015


     // import some basic types
     import ietf-inet-types { prefix inet; }
     import mpls-types { prefix mplst; }

     // meta
     organization "OpenConfig working group";

     contact
       "OpenConfig working group
       netopenconfig@googlegroups.com";

     description
       "Configuration for MPLS with segment routing-based LSPs,
       including global parameters, and LSP-specific configuration for
       both constrained-path and IGP-congruent LSPs";

     revision "2014-07-07" {
       description
         "Initial revision";
       reference "TBD";
     }

     // extension statements

     // feature statements

     // identity statements

     // typedef statements

     grouping srgb_config {

       // Matches the "global" configuration options in
       // draft-litkowski-spring-yang...
       // TODO: request for this to be a separate
       // grouping such that it can be included.

       leaf lower-bound {
         type uint32;
         description
           "Lower value in the block.";
       }
       leaf upper-bound {
         type uint32;
         description
           "Upper value in the block.";
       }
       description



George, et al.           Expires January 6, 2016               [Page 55]


Internet-Draft               MPLS / TE Model                   July 2015


         "List of global blocks to be advertised.";
     }

     grouping srgb_state {
       description
         "State parameters relating to the SRGB";

       leaf size {
         type uint32;
         description
           "Number of indexes in the SRGB block";
       }
       leaf free {
         type uint32;
         description
           "Number of SRGB indexes that have not yet been allocated";
       }
       leaf used {
         type uint32;
         description
           "Number of SRGB indexes that are currently allocated";
       }

       // TODO: where do we put LFIB entries?

     }

     grouping adjacency-sid_config {
       description
         "Configuration related to an Adjacency Segment Identifier
         (SID)";

       // tuned from draft-litkowski-spring-yang
       // TODO: need to send a patch

       leaf-list advertise {
         type enumeration {
           enum "PROTECTED" {
             description
               "Advertise an Adjacency-SID for this interface, which is
               eligible to be protected using a local protection
               mechanism on the local LSR. The local protection
               mechanism selected is dependent upon the configuration
               of RSVP-TE FRR or LFA elsewhere on the system";
           }
           enum UNPROTECTED {
             description
               "Advertise an Adajcency-SID for this interface, which is



George, et al.           Expires January 6, 2016               [Page 56]


Internet-Draft               MPLS / TE Model                   July 2015


               explicitly excluded from being protected by any local
               protection mechanism";
           }
         }
         description
           "Specifies the type of adjacency SID which should be
           advertised for the specified entity.";
       }

       leaf-list groups {
         type uint32;
         description
           "Specifies the groups to which this interface belongs.
           Setting a value in this list results in an additional AdjSID
           being advertised, with the S-bit set to 1. The AdjSID is
           assumed to be protected";
       }
     }

     grouping interface_config {
       description
         "Configuration parameters relating to a Segment Routing
         enabled interface";

       leaf interface {
         type string;
         // TODO: this should be changed to a leafref.
         description
           "Reference to the interface for which segment routing
           configuration is to be applied.";
       }
     }

     // grouping statements

     grouping sr-global {
       description "global segment routing signaling configuration";

       container segment-routing {
         description "SR global signaling config";

         list srgb {
           key "lower-bound upper-bound";
           uses srgb_config;
           container config {
             description
               "Configuration parameters relating to the Segment Routing
               Global Block (SRGB)";



George, et al.           Expires January 6, 2016               [Page 57]


Internet-Draft               MPLS / TE Model                   July 2015


             uses srgb_config;
           }
           container state {
             config false;
             description
               "State parameters relating to the Segment Routing Global
               Block (SRGB)";
             uses srgb_config;
             uses srgb_state;
           }
           description
             "List of Segment Routing Global Block (SRGB) entries. These
             label blocks are reserved to be allocated as domain-wide
             entries.";
         }

         list interfaces {
           key "interface";
           uses interface_config;
           container config {
             description
               "Interface configuration parameters for Segment Routing
               relating to the specified interface";
             uses interface_config;
           }
           container state {
             config false;
             description
               "State parameters for Segment Routing features relating
               to the specified interface";
             uses interface_config;
           }
           container adjacency-sid {
             description
               "Configuration for Adjacency SIDs that are related to
               the specified interface";
             container config {
               description
                 "Configuration parameters for the Adjacency-SIDs
                 that are related to this interface";
               uses adjacency-sid_config;
             }
             container state {
               config false;
               description
                 "State parameters for the Adjacency-SIDs that are
                 related to this interface";
               uses adjacency-sid_config;



George, et al.           Expires January 6, 2016               [Page 58]


Internet-Draft               MPLS / TE Model                   July 2015


             }
           }
           description
             "List of interfaces with associated segment routing
             configuration";
         }
       }
     }

     grouping te-tunnel-sr_config {
       description
         "Configuration parameters relating to all SR-TE LSPs";

       leaf tunnel-type {
         type mplst:tunnel-type;
         description "specifies the type of LSP, e.g., P2P or P2MP";
       }

       leaf sid-selection-mode {
         type enumeration {
           enum "ADJ-SID-ONLY" {
             description
               "The SR-TE tunnel should only use adjacency SIDs
               to build the SID stack to be pushed for the LSP";
           }
           enum "MIXED-MODE" {
             description
               "The SR-TE tunnel can use a mix of adjacency
               and prefix SIDs to build the SID stack to be pushed
               to the LSP";
           }
         }
         default "MIXED-MODE";
         description
           "The restrictions placed on the SIDs to be selected by the
           calculation method for the SR-TE LSP";
       }

       leaf sid-protection-required {
         type boolean;
         default "false";
         description
           "When this value is set to true, only SIDs that are
           protected are to be selected by the calculating method
           for the SR-TE LSP.";
       }
     }




George, et al.           Expires January 6, 2016               [Page 59]


Internet-Draft               MPLS / TE Model                   July 2015


     grouping te-tunnel-sr_state {
       description
         "State parameters relating to an SR-TE tunnel";
       // placeholder
       // TODO: selected SID stack
     }

     grouping te-sr_config {
       description
         "Configuration parameters relating to an SR-TE LSP";

       leaf destination {
         type inet:ip-address;
         description
           "The destination IP for the SR-TE LSP";
       }
     }

     grouping te-sr_state {
       description
         "State parameters relating to SR-TE for the LSP";
       // placeholder
     }

     grouping te-tunnel-sr {
       description "defintiions for SR-signaled LSP tunnel types,
       .e.g., applicable to point-to-point LSPs";

       container config {
         description
           "Configuration parameters relating to SR-TE";
         uses te-sr_config;
       }
       container state {
         config false;
         description
           "State parameters relating to SR-TE";
         uses te-sr_config;
         uses te-sr_state;
       }

       container tunnel {
         description "contains configuration stanzas for different LSP
         tunnel types (P2P, P2MP, etc.)";

         container config {
           description
             "Configuration parameters relating to SR-TE for the



George, et al.           Expires January 6, 2016               [Page 60]


Internet-Draft               MPLS / TE Model                   July 2015


             tunnel";
           uses te-tunnel-sr_config;
         }
         container state {
           config false;
           description
             "State information relating to SR-TE for the tunnel";
           uses te-tunnel-sr_config;
           uses te-tunnel-sr_state;
         }

         container p2p-lsp {
           when "tunnel-type = 'P2P'" {
             description "container active when LSP tunnel type is
             point to point";
           }
           description "Config for point-to-point tunnels";

           // fill out the configuration details per segment
           // routing requrements
         }
       }
     }


     grouping te-lsp-sr-setup {
       description "data definitions for SR signaling";

       container segment-routing {

         presence "Presence of this container sets the LSP to use
         SR signaling";

         description "Configuration for signaling SR-based TE LSPs";

         uses te-tunnel-sr;
       }
     }

     grouping sr_fec-address_config {
       description
         "Configuration parameters relating to a FEC that is to be
         advertised by Segment Routing";

       leaf fec-address {
         type inet:ip-prefix;
         description
           "FEC that is to be advertised as part of the Prefix-SID";



George, et al.           Expires January 6, 2016               [Page 61]


Internet-Draft               MPLS / TE Model                   July 2015


       }
     }

     grouping sr_fec-prefix-sid_config {
       description
         "Configuration parameters relating to the nature of the
         Prefix-SID that is to be advertised for a particular FEC";

       leaf type {
         type enumeration {
           enum "INDEX" {
             description
               "Set when the value of the prefix SID should be specified
               as an off-set from the SRGB's zero-value. When multiple
               SRGBs are specified, the zero-value is the minimum
               of their lower bounds";
           }
           enum "ABSOLUTE" {
             description
               "Set when the value of a prefix SID is specified as the
               absolute value within an SRGB. It is an error to specify
               an absolute value outside of a specified SRGB";
           }
         }
         default "INDEX";
         description
           "Specifies how the value of the Prefix-SID should be
           interpreted - whether as an offset to the SRGB, or as an
           absolute value";
       }

       leaf node-flag {
         type boolean;
         description
           "Specifies that the Prefix-SID is to be treated as a Node-SID
           by setting the N-flag in the advertised Prefix-SID TLV in the
           IGP";
       }

       leaf last-hop-behavior {
         type enumeration {
           enum "EXPLICIT-NULL" {
             description
               "Specifies that the explicit null label is to be used
               when the penultimate hop forwards a labelled packet to
               this Prefix-SID";
           }
           enum "UNCHANGED" {



George, et al.           Expires January 6, 2016               [Page 62]


Internet-Draft               MPLS / TE Model                   July 2015


             description
               "Specicies that the Prefix-SID's label value is to be
               left in place when the penultimate hop forwards to this
               Prefix-SID";
           }
           enum "PHP" {
             description
               "Specicies that the penultimate hop should pop the
               Prefix-SID label before forwarding to the eLER";
           }
         }
         description
           "Configuration relating to the LFIB actions for the
           Prefix-SID to be used by the penultimate-hop";
       }
     }


     grouping igp-tunnel-sr {
       description "defintiions for SR-signaled, IGP-based LSP tunnel
       types";

       container tunnel {
         description "contains configuration stanzas for different LSP
         tunnel types (P2P, P2MP, etc.)";

         leaf tunnel-type {
           type mplst:tunnel-type;
           description "specifies the type of LSP, e.g., P2P or P2MP";
         }

         container p2p-lsp {
           when "tunnel-type = 'P2P'" {
             description "container active when LSP tunnel type is
             point to point";
           }
           description "properties of point-to-point tunnels";

           list fec {
             key "fec-address";
             uses sr_fec-address_config;

             description
               "List of FECs that are to be originated as SR LSPs";

             container config {
               description
                 "Configuration parameters relating to the FEC to be



George, et al.           Expires January 6, 2016               [Page 63]


Internet-Draft               MPLS / TE Model                   July 2015


                 advertised by SR";
               uses sr_fec-address_config;
             }
             container state {
               config false;
               description
                 "Operational state relating to a FEC advertised by SR";
               uses sr_fec-address_config;
             }
             container prefix-sid {
               description
                 "Parameters relating to the Prefix-SID
                 used for the originated FEC";

               container config {
                 description
                   "Configuration parameters relating to the Prefix-SID
                   used for the originated FEC";
                 uses sr_fec-prefix-sid_config;
               }
               container state {
                 config false;
                 description
                   "Operational state parameters relating to the
                   Prefix-SID used for the originated FEC";
                 uses sr_fec-prefix-sid_config;
               }
             }
           }
         }
       }
     }

     grouping igp-lsp-sr-setup {
       description "grouping for SR-IGP path setup for IGP-congruent
       LSPs";

       container segment-routing {

         presence "Presence of this container sets the LSP to use
         SR signaling";

         description "segment routing signaling extensions for
         IGP-confgruent LSPs";

         uses igp-tunnel-sr;

       }



George, et al.           Expires January 6, 2016               [Page 64]


Internet-Draft               MPLS / TE Model                   July 2015


     }

     // data definition statements

     // augment statements

     // rpc statements

     // notification statements

   }
   <CODE ENDS>


   <CODE BEGINS> file mpls-ldp.yang
   module mpls-ldp {

     yang-version "1";

     // namespace
     namespace "http://openconfig.net/yang/ldp";

     prefix "ldp";

     // import some basic types
     import ietf-inet-types { prefix inet; }
     import mpls-types { prefix mplst; }


     // meta
     organization "OpenConfig working group";

     contact
       "OpenConfig working group
       netopenconfig@googlegroups.com";

     description
       "Configuration of Label Distribution Protocol global and LSP-
       specific parameters for IGP-congruent LSPs";

     revision "2014-07-07" {
       description
         "Initial revision";
       reference "TBD";
     }

     // extension statements




George, et al.           Expires January 6, 2016               [Page 65]


Internet-Draft               MPLS / TE Model                   July 2015


     // feature statements

     // identity statements

     // typedef statements

     // grouping statements

      grouping ldp-global {
       description "global LDP signaling configuration";

       container ldp {
         description "LDP global signaling configuration";

         container timers {
           description "LDP timers";
         }
       }
     }


     grouping igp-tunnel-ldp {
       description "common defintiions for LDP-signaled LSP tunnel
       types";

       container tunnel {
         description "contains configuration stanzas for different LSP
         tunnel types (P2P, P2MP, etc.)";

         leaf tunnel-type {
           type mplst:tunnel-type;
             description "specifies the type of LSP, e.g., P2P or P2MP";
         }

         leaf ldp-type {
           type enumeration {
             enum BASIC {
               description "basic hop-by-hop LSP";
             }
             enum TARGETED {
               description "tLDP LSP";
             }
           }
           description "specify basic or targeted LDP LSP";
         }

         container p2p-lsp {
           when "tunnel-type = 'P2P'" {



George, et al.           Expires January 6, 2016               [Page 66]


Internet-Draft               MPLS / TE Model                   July 2015


             description "container active when LSP tunnel type is
             point to point";
           }

           description "properties of point-to-point tunnels";

           leaf-list fec-address {
             type inet:ip-prefix;
             description "Address prefix for packets sharing the same
             forwarding equivalence class for the IGP-based LSP";
           }
         }

         container p2mp-lsp {
           when "tunnel-type = 'P2MP'" {
             description "container is active when LSP tunnel type is
             point to multipoint";
           }

           description "properties of point-to-multipoint tunnels";

           // TODO: specify group/source, etc.

         }

         container mp2mp-lsp {
           when "tunnel-type = 'MP2MP'" {
             description "container is active when LSP tunnel type is
             multipoint to multipoint";
           }

           description "properties of multipoint-to-multipoint tunnels";

           // TODO: specify group/source, etc.

         }
       }
     }

     grouping igp-lsp-ldp-setup {
       description "grouping for LDP setup attributes";

       container ldp {

         presence "Presence of this container sets the LSP to use
         LDP signaling";

         description "LDP signaling setup for IGP-congruent LSPs";



George, et al.           Expires January 6, 2016               [Page 67]


Internet-Draft               MPLS / TE Model                   July 2015


         // include tunnel (p2p, p2mp, ...)

         uses igp-tunnel-ldp;

       }
     }

     // data definition statements

     // augment statements

     // rpc statements

     // notification statements

   }
   <CODE ENDS>


7.  Contributing Authors

   The following people contributed significantly to this document and
   are listed below:

   Ina Minei
   Google
   1600 Amphitheatre Parkway
   Mountain View, CA 94043
   US
   Email: inaminei@google.com

   Anees Shaikh
   Google
   1600 Amphitheatre Parkway
   Mountain View, CA 94043
   US
   Email: aashaikh@google.com

   Phil Bedard
   Cox Communications
   Atlanta, GA 30319
   US
   Email: phil.bedard@cox.com








George, et al.           Expires January 6, 2016               [Page 68]


Internet-Draft               MPLS / TE Model                   July 2015


8.  Acknowledgements

   The authors are grateful for valuable contributions to this document
   and the associated models from: Ebben Aires, Deepak Bansal, Nabil
   Bitar, Feihong Chen, Mazen Khaddam.

9.  References

   [I-D.ietf-spring-segment-routing-mpls]
              Filsfils, C., Previdi, S., Bashandy, A., Decraene, B.,
              Litkowski, S., Horneffer, M., Shakir, R., Tantsura, J.,
              and E. Crabbe, "Segment Routing with MPLS data plane",
              draft-ietf-spring-segment-routing-mpls-01 (work in
              progress), May 2015.

   [I-D.openconfig-netmod-model-structure]
              Shaikh, A., Shakir, R., D'Souza, K., and L. Fang,
              "Operational Structure and Organization of YANG Models",
              draft-openconfig-netmod-model-structure-00 (work in
              progress), March 2015.

   [I-D.openconfig-netmod-opstate]
              Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling
              of Operational State Data in YANG", draft-openconfig-
              netmod-opstate-00 (work in progress), March 2015.

   [I-D.shaikh-idr-bgp-model]
              Shaikh, A., Shakir, R., Patel, K., Hares, S., D'Souza, K.,
              Bansal, D., Clemm, A., Alex, A., Jethanandani, M., and X.
              Liu, "BGP Model for Service Provider Networks", draft-
              shaikh-idr-bgp-model-02 (work in progress), June 2015.

   [I-D.shakir-rtgwg-sr-performance-engineered-lsps]
              Shakir, R., Vernals, D., and A. Capello, "Performance
              Engineered LSPs using the Segment Routing Data-Plane",
              draft-shakir-rtgwg-sr-performance-engineered-lsps-00 (work
              in progress), July 2013.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              January 2004.

   [RFC5443]  Jork, M., Atlas, A., and L. Fang, "LDP IGP
              Synchronization", RFC 5443, March 2009.

   [RFC6020]  Bjorklund, M., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010.




George, et al.           Expires January 6, 2016               [Page 69]


Internet-Draft               MPLS / TE Model                   July 2015


   [RFC6991]  Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
              July 2013.

Authors' Addresses

   Joshua George
   Google
   1600 Amphitheatre Pkwy
   Mountain View, CA  94043
   US

   Email: jgeorge@google.com


   Luyuan Fang
   Microsoft
   15590 NE 31st St
   Redmond, WA  98052
   US

   Email: lufang@microsoft.com


   Eric Osborne
   Level 3

   Email: eric.osborne@level3.com


   Rob Shakir
   BT
   pp. C3L, BT Centre
   81, Newgate Street
   London  EC1A 7AJ
   UK

   Email: rob.shakir@bt.com
   URI:   http://www.bt.com/













George, et al.           Expires January 6, 2016               [Page 70]


Html markup produced by rfcmarkup 1.129b, available from https://tools.ietf.org/tools/rfcmarkup/