MPLS Working Group T. Saad Internet-Draft K. Raza Intended status: Standards Track R. Gandhi Expires: April 13, 2019 Cisco Systems Inc X. Liu Jabil V. Beeram Juniper Networks October 10, 2018 A YANG Data Model for MPLS Base draft-ietf-mpls-base-yang-07 Abstract This document contains a specification of the the MPLS base YANG model. The MPLS base YANG model serves as a base framework for configuring and managing an MPLS switching subsystem on an MPLS- enabled router. It is expected that other MPLS YANG models (e.g. MPLS LSP Static, LDP or RSVP-TE YANG models) will augment the MPLS base YANG model. 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 https://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 April 13, 2019. Copyright Notice Copyright (c) 2018 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 (https://trustee.ietf.org/license-info) in effect on the date of Saad, et al. Expires April 13, 2019 [Page 1] Internet-Draft MPLS Base YANG Data Model October 2018 publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect 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. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Acronyms and Abbreviations . . . . . . . . . . . . . . . 3 2. MPLS Base Model . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Model Overview . . . . . . . . . . . . . . . . . . . . . 3 2.2. Model Organization . . . . . . . . . . . . . . . . . . . 4 2.3. Model Tree Diagram . . . . . . . . . . . . . . . . . . . 5 2.4. Model YANG Module . . . . . . . . . . . . . . . . . . . . 7 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 4. Security Considerations . . . . . . . . . . . . . . . . . . . 15 5. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 16 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 16 7. Normative References . . . . . . . . . . . . . . . . . . . . 16 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 1. Introduction A core routing data model is defined in [RFC8349], and it provides a basis for the development of data models for routing protocols. The MPLS base model augments core routing data model with additional data specific to MPLS technology as described in the MPLS architecture document [RFC3031]. The MPLS base model serves as a basis for future development of MPLS data models covering more-sophisticated MPLS feauture(s) and sub- system(s). The main purpose is to provide essential building blocks for the more-complicated data models involving different control- plane protocols, and advanced MPLS functions. To this end, it is expected that the MPLS base data model will be augmented by a number of other modules developed at IETF (e.g. by TEAS and MPLS working groups). The YANG module in this document conforms to the Network Management Datastore Architecture (NMDA) [RFC8342]. Saad, et al. Expires April 13, 2019 [Page 2] Internet-Draft MPLS Base YANG Data Model October 2018 1.1. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. The terminology for describing YANG data models is found in [RFC7950]. 1.2. Acronyms and Abbreviations MPLS: Multiprotocol Label Switching RIB: Routing Information Base LSP: Label Switched Path LSR: Label Switching Router LER: Label Edge Router FEC: Forwarding Equivalence Class NHLFE: Next Hop Label Forwarding Entry ILM: Incoming Label Map 2. MPLS Base Model This document describes the ietf-mpls YANG module that provides base components of the MPLS data model. It is expected that other MPLS YANG modules will augment the ietf-mpls base module for other MPLS extension to provision LSP(s) (e.g. MPLS Static, MPLS LDP or MPLS RSVP-TE LSP(s)). 2.1. Model Overview This document defines a mechanism to model MPLS labeled routes as an augmentation of the the routing RIB data model defined in [RFC8349] for IP prefix routes that are MPLS labelled. The other MPLS route(s) that are non-IP prefix routes are modelled by introducing a new "mpls" address-family RIB as per recommendation . Saad, et al. Expires April 13, 2019 [Page 3] Internet-Draft MPLS Base YANG Data Model October 2018 2.2. Model Organization Routing module +---------------+ v: import | ietf-routing | o: augment +---------------+ o | v MPLS base +-----------+ v: import module | ietf-mpls | o: augment +-----------+ o o--+ | \ v v +--------------------+ +---------------------+ MPLS Static | ietf-mpls-static@ | | ietf-mpls-ldp.yang@ | . . LSP module +-------------------+ +----------------------+ @: not in this document, shown for illustration only Figure 1: Relationship between MPLS modules The ietf-mpls module imports the followinig modules: o ietf-routing defined in [RFC8349] o ietf-routing-types defined in [RFC8294] o ietf-interfaces defined in [RFC8343] ietf-mpls module contains the following high-level types and groupings: label-block-alloc-mode: A base YANG identity for supported label block allocation mode(s). mpls-operations-type: An enumeration type that represents support possible MPLS operation types (impose-and-forward, pop-and-forward, pop-impose- and-forward, and pop-and-lookup) nhlfe-role: An enumeration type that represents the role of the NHLFE entry. nhlfe-single-contents: Saad, et al. Expires April 13, 2019 [Page 4] Internet-Draft MPLS Base YANG Data Model October 2018 A YANG grouping that describes single NHLFE and its associated parameters as described in the MPLS architecture document [RFC3031]. nhlfe-multiple-contents: A YANG grouping that describes a set of NHLFE(s) and their associated parameters as described in the MPLS architecture document [RFC3031]. interface-mpls-properties: A YANG grouping that describes the properties of an MPLS interface on a device. interfaces-mpls: A YANG grouping that describes the list of MPLS enabled interfaces on a device. label-block-properties: A YANG grouping that describes the properties of an MPLS label block. label-blocks: A YANG grouping that describes the list of MPLS enabled interfaces on a device. 2.3. Model Tree Diagram The MPLS base tree diagram that follows the notation defined in [RFC8340] is shown in Figure 2. module: ietf-mpls augment /rt:routing: +--rw mpls +--rw ttl-propagate? boolean +--rw label-blocks | +--rw label-block* [index] | +--rw index string | +--rw start-label? rt-types:mpls-label | +--rw end-label? rt-types:mpls-label | +--rw block-allocation-mode? identityref | +--ro state | +--ro free-labels-count? uint32 | +--ro inuse-labels-count? uint32 Saad, et al. Expires April 13, 2019 [Page 5] Internet-Draft MPLS Base YANG Data Model October 2018 +--rw interface* [name] +--rw name if:interface-ref +--rw enabled? boolean +--rw mtu? uint32 augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route: +--ro local-label? rt-types:mpls-label augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/rt:next-hop/ rt:next-hop-options/rt:simple-next-hop: +--ro remote-labels +--ro remote-label* [index] +--ro index uint8 +--ro label? rt-types:mpls-label augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/rt:next-hop/ rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/rt:next-hop: +--ro index? string +--ro backup-index? string +--ro loadshare? uint16 +--ro role? nhlfe-role +--ro remote-labels +--ro remote-label* [index] +--ro index uint8 +--ro label? rt-types:mpls-label augment /rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input: +---w local-label? rt-types:mpls-label augment /rt:routing/rt:ribs/rt:rib/rt:active-route/rt:output/rt:route/ rt:next-hop/rt:next-hop-options/rt:simple-next-hop: +-- index? string +-- backup-index? string +-- loadshare? uint16 +-- role? nhlfe-role +-- remote-labels +-- remote-label* [index] +-- index uint8 +-- label? rt-types:mpls-label augment /rt:routing/rt:ribs/rt:rib/rt:active-route/rt:output/rt:route/ rt:next-hop/rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/ rt:next-hop: +-- index? string +-- backup-index? string +-- loadshare? uint16 +-- role? nhlfe-role +-- remote-labels +-- remote-label* [index] +-- index uint8 Saad, et al. Expires April 13, 2019 [Page 6] Internet-Draft MPLS Base YANG Data Model October 2018 +-- label? rt-types:mpls-label Figure 2: MPLS Base tree diagram 2.4. Model YANG Module This section describes the "ietf-mpls" YANG module that provides base components of the MPLS data model. Other YANG module(s) may import and augment the base MPLS module to add feature specific data. file "ietf-mpls@2017-10-10.yang" module ietf-mpls { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-mpls"; prefix "mpls"; import ietf-routing { prefix "rt"; reference "RFC8349: A YANG Data Model for Routing Management"; } import ietf-routing-types { prefix "rt-types"; reference "RFC6991: Common YANG Data Types"; } import ietf-interfaces { prefix "if"; reference "RFC7223: A YANG Data Model for Interface Management"; } organization "IETF MPLS Working Group"; contact "WG Web: WG List: WG Chair: Loa Andersson WG Chair: Nic Leymann Editor: Tarek Saad Saad, et al. Expires April 13, 2019 [Page 7] Internet-Draft MPLS Base YANG Data Model October 2018 Editor: Kamran Raza Editor: Rakesh Gandhi Editor: Xufeng Liu Editor: Vishnu Pavan Beeram Editor: Himanshu Shah Editor: Igor Bryskin "; description "This YANG module defines the essential components for the management of the MPLS subsystem."; revision "2018-10-10" { description "Latest revision: - Addressed MPLS-RT review comments"; reference "RFC 3031: A YANG Data Model for base MPLS"; } /* Identities */ identity mpls { base rt:address-family; description "This identity represents the MPLS address family."; } identity label-block-alloc-mode { description "Base identity label-block allocation mode"; } identity label-block-alloc-mode-manager { base label-block-alloc-mode; description "Label block allocation on reserved block is managed by label manager"; } Saad, et al. Expires April 13, 2019 [Page 8] Internet-Draft MPLS Base YANG Data Model October 2018 identity label-block-alloc-mode-application { base label-block-alloc-mode; description "Label block allocation on reserved block is managed by application"; } /** * Typedefs */ typedef mpls-operations-type { type enumeration { enum impose-and-forward { description "Operation impose outgoing label(s) and forward to next-hop"; } enum pop-and-forward { description "Operation pop incoming label and forward to next-hop"; } enum pop-impose-and-forward { description "Operation pop incoming label, impose one or more outgoing label(s) and forward to next-hop"; } enum swap-and-forward { description "Operation swap incoming label, with outgoing label and forward to next-hop"; } enum pop-and-lookup { description "Operation pop incoming label and perform a lookup"; } } description "MPLS operations types"; } typedef nhlfe-role { type enumeration { enum PRIMARY { description "Next-hop acts as primary traffic carrying"; } enum BACKUP { description "Next-hop acts as backup"; Saad, et al. Expires April 13, 2019 [Page 9] Internet-Draft MPLS Base YANG Data Model October 2018 } enum PRIMARY_AND_BACKUP { description "Next-hop acts as primary and backup simultaneously"; } } description "The next-hop role"; } grouping nhlfe-single-contents { description "MPLS simple NHLFE contents"; container remote-labels { description "Remote labels container"; list remote-label { key "index"; description "Remote label list"; leaf index { type uint8 { range "0..255"; } description "Index of the label. Index 0 indicates top of the label stack"; } leaf label { type rt-types:mpls-label; description "The outgoing MPLS labels to impose"; } } } } grouping nhlfe-multiple-contents { description "MPLS NHLFE contents"; leaf index { type string; description "A user-specified identifier utilised to uniquely reference the next-hop entry in the next-hop list. The value of this index has no semantic meaning other than for referencing the entry."; } leaf backup-index { type string; Saad, et al. Expires April 13, 2019 [Page 10] Internet-Draft MPLS Base YANG Data Model October 2018 description "A user-specified identifier utilised to uniquely reference the backup next-hop entry in the NHLFE list. The value of this index has no semantic meaning other than for referencing the entry."; } leaf loadshare { type uint16; description "This value is used to compute a loadshare to perform un-equal load balancing when multiple outgoing next-hop(s) are specified. A share is computed as a ratio of this number to the total under all next-hops(s)."; } leaf role { type nhlfe-role; description "NHLFE role"; } uses nhlfe-single-contents; } grouping interface-mpls-properties { description "MPLS interface contents grouping"; leaf enabled { type boolean; description "'true' if mpls encapsulation is enabled on the interface. 'false' if mpls encapsulation is enabled on the interface."; } leaf mtu { type uint32; description "MPLS Maximum Transmission Unit (MTU) in bytes"; } } grouping interfaces-mpls { description "List of MPLS interfaces"; list interface { key "name"; description "List of MPLS interfaces"; leaf name { type if:interface-ref; description "The name of a configured MPLS interface"; Saad, et al. Expires April 13, 2019 [Page 11] Internet-Draft MPLS Base YANG Data Model October 2018 } uses interface-mpls-properties; } } grouping label-block-properties { description "Label-block configuration items"; leaf index { type string; description "A user-specified identifier utilised to uniquely reference an MPLS label block"; } leaf start-label { type rt-types:mpls-label; description "Label-block start"; } leaf end-label { type rt-types:mpls-label; description "Label-block end"; } leaf block-allocation-mode { type identityref { base label-block-alloc-mode; } description "Label-block allocation mode"; } } grouping label-block_state { description "Label-block state items"; leaf free-labels-count { when "../../block-allocation-mode = " + "'label-block-alloc-mode-manager'"; type uint32; description "Label-block free labels count"; } leaf inuse-labels-count { when "../../block-allocation-mode = " + "'label-block-alloc-mode-manager'"; type uint32; description "Label-block inuse labels count"; } } grouping globals { description "MPLS global configuration grouping"; leaf ttl-propagate { Saad, et al. Expires April 13, 2019 [Page 12] Internet-Draft MPLS Base YANG Data Model October 2018 type boolean; default 'true'; description "Propagate TTL between IP and MPLS"; } } grouping label-blocks { description "Label-block allocation grouping"; container label-blocks { description "Label-block allocation container"; list label-block { must "start-label >= end-label" { error-message "start-label can not be less than end-label"; } key index; unique "start-label end-label"; description "List of MPLS label-blocks"; uses label-block-properties; container state { config false; description "Holds state information"; uses label-block_state; } } } } augment "/rt:routing" { description "MPLS augmentation."; container mpls { description "MPLS container, to be used as an augmentation target node other MPLS sub-features config, e.g. MPLS static LSP, MPLS LDP LSPs, and Trafic Engineering MPLS LSP Tunnels, etc."; uses globals; uses label-blocks; uses interfaces-mpls; } } /* MPLS routes augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { when "derived-from-or-self(../../rt:address-family, " + "'mpls:mpls')" { description "This augment is valid only for IPv4 unicast."; } description "This leaf augments an MPLS routes."; Saad, et al. Expires April 13, 2019 [Page 13] Internet-Draft MPLS Base YANG Data Model October 2018 leaf local-label { type rt-types:mpls-label; description "MPLS local label."; } } /* MPLS simple-next-hop augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { when "derived-from-or-self(../../../rt:address-family, " + "'mpls:mpls')" { description "This augment is valid only for IPv4 unicast."; } description "Augment 'simple-next-hop' case in IPv4 unicast routes."; uses nhlfe-single-contents; } /* MPLS next-hop-list augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route/" + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + "rt:next-hop-list/rt:next-hop" { when "derived-from-or-self(../../../../../rt:address-family, " + "'mpls:mpls')" { description "This augment is valid only for IPv4 unicast."; } description "This leaf augments the 'next-hop-list' case of IPv4 unicast routes."; uses nhlfe-multiple-contents; } /* MPLS RPC input augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { description "This augment adds the input parameter of the 'active-route' action."; /* uses nhlfe-multiple-contents; */ leaf local-label { type rt-types:mpls-label; description "MPLS local label."; } } Saad, et al. Expires April 13, 2019 [Page 14] Internet-Draft MPLS Base YANG Data Model October 2018 /* MPLS RPC output augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + "rt:output/rt:route/" + "rt:next-hop/rt:next-hop-options/rt:simple-next-hop" { description "This augment adds the destination prefix to the reply of the 'active-route' action."; uses nhlfe-multiple-contents; } augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/" + "rt:output/rt:route/" + "rt:next-hop/rt:next-hop-options/rt:next-hop-list/" + "rt:next-hop-list/rt:next-hop" { description "This augment adds the destination prefix to the reply of the 'active-route' action."; uses nhlfe-multiple-contents; } } Figure 3: MPLS base YANG module 3. IANA Considerations This document registers the following URIs in the IETF XML registry [RFC3688]. Following the format in [RFC3688], the following registration is requested to be made. URI: urn:ietf:params:xml:ns:yang:ietf-mpls XML: N/A, the requested URI is an XML namespace. This document registers a YANG module in the YANG Module Names registry [RFC6020]. name: ietf-mpls namespace: urn:ietf:params:xml:ns:yang:ietf-mpls prefix: ietf-mpls reference: RFC3031 4. Security Considerations The YANG modules specified in this document define a schema for data that is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer Saad, et al. Expires April 13, 2019 [Page 15] Internet-Draft MPLS Base YANG Data Model October 2018 is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446]. The NETCONF access control model [RFC8341] provides the means to restrict access for particular NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content. Some of the readable data nodes in these YANG modules may be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g., via get, get-config, or notification) to these data nodes. These are the subtrees and data nodes and their sensitivity/vulnerability: /rt:routing/rt:ribs/rt:rib/rt:active-route/rt:output/rt:route: this path is augmented by additional MPLS leaf(s) defined in this model. Access to this information may disclose the per prefix and/or other information. /rt:routing/rt:ribs/rt:rib/rt:active-route/rt:output/rt:route/ rt:next-hop/rt:next-hop-options/rt:simple-next-hop: this path is augmented by additional MPLS leaf(s) defined in this model. Access to this information may disclose the next-hop or path per prefix and/ or other information. 5. Acknowledgement The authors would like to thank the members of the multi-vendor YANG design team who are involved in the definition of this model. 6. Contributors Igor Bryskin Huawei Technologies email: Igor.Bryskin@huawei.com Himanshu Shah Ciena email: hshah@ciena.com 7. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . Saad, et al. Expires April 13, 2019 [Page 16] Internet-Draft MPLS Base YANG Data Model October 2018 [RFC3031] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol Label Switching Architecture", RFC 3031, DOI 10.17487/RFC3031, January 2001, . [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004, . [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010, . [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, . [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, . [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016, . [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, "Common YANG Data Types for the Routing Area", RFC 8294, DOI 10.17487/RFC8294, December 2017, . [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, . [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487/RFC8341, March 2018, . Saad, et al. Expires April 13, 2019 [Page 17] Internet-Draft MPLS Base YANG Data Model October 2018 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, . [RFC8343] Bjorklund, M., "A YANG Data Model for Interface Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, . [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for Routing Management (NMDA Version)", RFC 8349, DOI 10.17487/RFC8349, March 2018, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . Authors' Addresses Tarek Saad Cisco Systems Inc Email: tsaad@cisco.com Kamran Raza Cisco Systems Inc Email: skraza@cisco.com Rakesh Gandhi Cisco Systems Inc Email: rgandhi@cisco.com Xufeng Liu Jabil Email: Xufeng_Liu@jabil.com Vishnu Pavan Beeram Juniper Networks Email: vbeeram@juniper.net Saad, et al. Expires April 13, 2019 [Page 18]