file "ietf-mpls@2020-12-18.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 "RFC 8349: A YANG Data Model for Routing Management (NMDA Version)"; } import ietf-routing-types { prefix rt-types; reference "RFC 8294: Common YANG Data Types for the Routing Area"; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-interfaces { prefix if; reference "RFC 8343: A YANG Data Model for Interface Management"; } organization "IETF MPLS Working Group"; contact "WG Web: WG List: Editor: Tarek Saad Editor: Kamran Raza Editor: Rakesh Gandhi Editor: Xufeng Liu Editor: Vishnu Pavan Beeram "; description "This YANG module defines the essential components for the management of the MPLS subsystem. The model fully conforms to the Network Management Datastore Architecture (NMDA). Copyright (c) 2020 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 8960; see the RFC itself for full legal notices."; revision 2020-12-18 { description "Initial revision."; reference "RFC 8960: A YANG Data Model for MPLS Base"; } /* Identities */ identity mpls { base rt:address-family; description "This identity represents the MPLS address family."; } identity mpls-unicast { base mpls:mpls; description "This identity represents the MPLS unicast address family."; } identity label-block-alloc-mode { description "Base identity for label-block allocation mode."; } identity label-block-alloc-mode-manager { base label-block-alloc-mode; description "Label-block allocation on the reserved block is managed by the label manager."; } identity label-block-alloc-mode-application { base label-block-alloc-mode; description "Label-block allocation on the reserved block is managed by the application."; } /** * Typedefs */ typedef mpls-operations-type { type enumeration { enum impose-and-forward { description "Operation to impose one or more outgoing labels and forward to the next hop."; } enum pop-and-forward { description "Operation to pop the incoming label and forward to the next hop."; } enum pop-impose-and-forward { description "Operation to pop the incoming label, impose one or more outgoing labels, and forward to the next hop."; } enum swap-and-forward { description "Operation to swap the incoming label with the outgoing label and forward to the next hop."; } enum pop-and-lookup { description "Operation to pop the incoming label and perform a lookup."; } } description "Types of MPLS operations."; } typedef nhlfe-role { type enumeration { enum primary { description "The next hop acts as the primary for carrying traffic."; } enum backup { description "The next hop acts as the backup."; } enum primary-and-backup { description "The next hop simultaneously acts as both the primary and the backup for carrying traffic."; } } description "Role of the next hop."; } grouping nhlfe-single-contents { description "A grouping that describes a single Next Hop Label Forwarding Entry (NHLFE) and its associated parameters as described in the MPLS architecture. This grouping is specific to the case when a single next hop is associated with the route."; uses rt-types:mpls-label-stack; } grouping nhlfe-multiple-contents { description "A grouping that describes a set of NHLFEs and their associated parameters as described in the MPLS architecture. This grouping is used when multiple next hops are associated with the route."; leaf index { type string; description "A user-specified identifier utilized 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; description "A user-specified identifier utilized 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."; reference "RFC 4090: Fast Reroute Extensions to RSVP-TE for LSP Tunnels RFC 5714: IP Fast Reroute Framework"; } leaf loadshare { type uint16; default "1"; description "This value is used to compute a load share to perform unequal load balancing when multiple outgoing next hops are specified. A share is computed as a ratio of this number to the total under all next hops."; reference "RFC 3031: Multiprotocol Label Switching Architecture, Sections 3.11 and 3.12 RFC 7424: Mechanisms for Optimizing Link Aggregation Group (LAG) and Equal-Cost Multipath (ECMP) Component Link Utilization in Networks, Section 5.4"; } leaf role { type nhlfe-role; description "Role of the NHLFE."; } uses nhlfe-single-contents; } grouping interfaces-mpls { description "List of MPLS interfaces."; container interfaces { description "List of MPLS-enabled interfaces."; list interface { key "name"; description "MPLS-enabled interface entry."; leaf name { type if:interface-ref; description "A reference to the name of an interface in the system that is to be enabled for MPLS."; } leaf mpls-enabled { type boolean; default "false"; description "'true' if MPLS encapsulation is enabled on the interface. 'false' if MPLS encapsulation is disabled on the interface."; } leaf maximum-labeled-packet { type uint32; units "octets"; description "Maximum labeled packet size."; reference "RFC 3032: MPLS Label Stack Encoding, Section 3.2"; } } } } grouping globals { description "MPLS global configuration grouping."; leaf ttl-propagate { type boolean; default "true"; description "Propagate TTL between IP and MPLS."; } } grouping label-blocks { description "Label-block allocation grouping."; container mpls-label-blocks { description "Label-block allocation container."; list mpls-label-block { key "index"; description "List of MPLS label blocks."; leaf index { type string; description "A user-specified identifier utilized to uniquely reference an MPLS label block."; } leaf start-label { type rt-types:mpls-label; must '. <= ../end-label' { error-message "'start-label' must be less than or equal " + "to 'end-label'"; } description "Label-block start."; } leaf end-label { type rt-types:mpls-label; must '. >= ../start-label' { error-message "'end-label' must be greater than or " + "equal to 'start-label'"; } description "Label-block end."; } leaf block-allocation-mode { type identityref { base label-block-alloc-mode; } description "Label-block allocation mode."; } leaf inuse-labels-count { when "derived-from-or-self(../block-allocation-mode, " + "'mpls:label-block-alloc-mode-manager')"; type yang:gauge32; config false; description "Number of labels in use in the label block."; } } } } grouping rib-mpls-properties { description "A grouping of native MPLS RIB properties."; leaf destination-prefix { type leafref { path "../mpls-local-label"; } description "MPLS destination prefix."; } leaf route-context { type string; description "A context associated with the native MPLS route."; } } grouping rib-active-route-mpls-input { description "A grouping applicable to native MPLS RIB 'active-route' RPC input augmentation."; leaf destination-address { type leafref { path "../mpls-local-label"; } description "MPLS native 'active-route' destination."; } leaf mpls-local-label { type rt-types:mpls-label; description "MPLS local label."; } } augment "/rt:routing" { description "MPLS augmentation."; container mpls { description "MPLS container to be used as an augmentation target node for the configuration of other MPLS sub-features, e.g., MPLS static Label Switched Paths (LSPs), MPLS LDP LSPs, and Traffic Engineering MPLS LSP Tunnels."; uses globals; uses label-blocks; uses interfaces-mpls; } } /* Augmentation of MPLS routes */ augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { description "This augmentation is applicable to all MPLS routes."; leaf mpls-enabled { type boolean; default "false"; description "Indicates whether MPLS is enabled for this route."; } leaf mpls-local-label { when "../mpls-enabled = 'true'"; type rt-types:mpls-label; description "MPLS local label associated with the route."; } uses rib-mpls-properties { /* MPLS Address Family (AF) augmentation to the native MPLS RIB */ when "derived-from-or-self(../../rt:address-family, " + "'mpls:mpls')" { description "This augment is valid only for routes of the native MPLS RIB."; } } } /* 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" { description "Augments the 'simple-next-hop' case in IP unicast routes."; uses nhlfe-single-contents { when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + "/mpls:mpls-enabled = 'true'"; } } /* 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" { description "This leaf augments the 'next-hop-list' case of IP unicast routes."; uses nhlfe-multiple-contents { when "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" + "/mpls:mpls-enabled = 'true'"; } } /* MPLS RPC input augmentation */ augment "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" { description "Input MPLS augmentation for the 'active-route' action statement."; uses rib-active-route-mpls-input { /* MPLS AF augmentation to the native MPLS RIB */ when "derived-from-or-self(../rt:address-family, " + "'mpls:mpls')" { description "This augment is valid only for routes of the native MPLS RIB."; } } } /* 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 "Output MPLS augmentation for the 'active-route' action statement."; uses nhlfe-single-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 "Output MPLS augmentation for the 'active-route' action statement."; uses nhlfe-multiple-contents; } } Figure 4: MPLS Base YANG Module 3. IANA Considerations This document registers the following URI in the "ns" subregistry of the "IETF XML Registry" [RFC3688]. URI: urn:ietf:params:xml:ns:yang:ietf-mpls Registrant Contact: The MPLS WG of the IETF. XML: N/A; the requested URI is an XML namespace. This document registers the following YANG module in the "YANG Module Names" registry [RFC6020]. Name: ietf-mpls Namespace: urn:ietf:params:xml:ns:yang:ietf-mpls Prefix: mpls Reference: RFC 8960 4. Security Considerations The YANG module specified in this document defines 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 is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446]. The Network Configuration Access Control Model (NACM) [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. There are a number of data nodes defined in this YANG module that are writable/creatable/deletable (i.e., config true, which is the default). These data nodes may be considered sensitive or vulnerable in some network environments. Write operations (e.g., edit-config) to these data nodes without proper protection can have a negative effect on network operations. These are the subtrees and data nodes and their sensitivity/vulnerability: "/rt:routing/mpls:mpls/mpls:label-blocks": There are data nodes under this path that are writable, such as "start-label" and "end-label". Write operations to those data nodes may result in disruption to existing traffic. Some of the readable data nodes in this YANG module 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:routes/rt:route/rt:next-hop/ rt:next-hop-options/rt:next-hop-list/rt:next-hop-list/rt:next-hop" and "/rt:routing/rt:ribs/rt:rib/rt:active- route/rt:output/rt:route/rt:next-hop/rt:next-hop-options/ rt:simple-next-hop": These two paths are augmented by additional MPLS leafs defined in this model. Access to this information may disclose the next-hop information for the prefix route and/or other information. Some of the RPC operations in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control access to these operations. These are the operations and their sensitivity/vulnerability: "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:input" and "/rt:routing/rt:ribs/rt:rib/rt:active-route/rt:output/rt:route": These two paths are augmented by additional MPLS data nodes that are defined in this model. Access to those paths may disclose information about per-prefix routes and/or other information; such disclosure may be used for further attacks. The security considerations spelled out in [RFC3031] and [RFC3032] apply for this document as well. 5. References 5.1. Normative References [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack Encoding", RFC 3032, DOI 10.17487/RFC3032, 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, . [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, July 2013, . [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, . [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, . [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, . [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, July 2018, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . 5.2. Informative References [RFC3031] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol Label Switching Architecture", RFC 3031, DOI 10.17487/RFC3031, January 2001, . [RFC4090] Pan, P., Ed., Swallow, G., Ed., and A. Atlas, Ed., "Fast Reroute Extensions to RSVP-TE for LSP Tunnels", RFC 4090, DOI 10.17487/RFC4090, May 2005, . [RFC5714] Shand, M. and S. Bryant, "IP Fast Reroute Framework", RFC 5714, DOI 10.17487/RFC5714, January 2010, . [RFC7424] Krishnan, R., Yong, L., Ghanwani, A., So, N., and B. Khasnabish, "Mechanisms for Optimizing Link Aggregation Group (LAG) and Equal-Cost Multipath (ECMP) Component Link Utilization in Networks", RFC 7424, DOI 10.17487/RFC7424, January 2015, . [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", RFC 7951, DOI 10.17487/RFC7951, August 2016, . Appendix A. Data Tree Instance Example A simple network setup is shown in Figure 5. R1 runs the IS-IS routing protocol and learns about the reachability of two IPv4 prefixes (P1: 198.51.100.1/32 and P2: 198.51.100.2/32) and two IPv6 prefixes (P3: 2001:db8:0:10::1/128 and P4: 2001:db8:0:10::2/128). We also assume that R1 learns about local and remote MPLS label bindings for each prefix using IS-IS (e.g., using Segment Routing (SR) extensions). State on R1: ============ IPv4 Prefix MPLS Label P1: 198.51.100.1/32 16001 P2: 198.51.100.2/32 16002 IPv6 Prefix MPLS Label P3: 2001:db8:0:10::1/128 16003 P4: 2001:db8:0:10::2/128 16004 RSVP MPLS LSPv4-Tunnel: Source: 198.51.100.3 Destination: 198.51.100.4 Tunnel-ID: 10 LSP-ID: 1 192.0.2.5/30 2001:db8:0:1::1/64 eth0 +--- / +-----+ | R1 | +-----+ \ +--- eth1 192.0.2.13/30 2001:db8:0:2::1/64 Figure 5: Example of Network Configuration The instance data tree could then be illustrated as shown in Figure 6, using JSON format [RFC7951]: { "ietf-routing:routing":{ "ribs":{ "rib":[ { "name":"RIB-V4", "address-family": "ietf-ipv4-unicast-routing:v4ur:ipv4-unicast", "routes":{ "route":[ { "next-hop":{ "outgoing-interface":"eth0", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16001, "ttl":255 } ] }, "ietf-ipv4-unicast-routing:next-hop-address": "192.0.2.5" }, "source-protocol":"ietf-isis:isis", "ietf-mpls:mpls-enabled":true, "ietf-mpls:mpls-local-label":16001, "ietf-ipv4-unicast-routing:destination-prefix": "198.51.100.1/32", "ietf-mpls:route-context":"SID-IDX:1" }, { "next-hop":{ "next-hop-list":{ "next-hop":[ { "outgoing-interface":"eth0", "ietf-mpls:index":"1", "ietf-mpls:backup-index":"2", "ietf-mpls:role":"primary-and-backup", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16002, "ttl":255 } ] }, "ietf-ipv4-unicast-routing:address": "192.0.2.5" }, { "outgoing-interface":"eth1", "ietf-mpls:index":"2", "ietf-mpls:backup-index":"1", "ietf-mpls:role":"primary-and-backup", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16002, "ttl":255 } ] }, "ietf-ipv4-unicast-routing:address": "192.0.2.13" } ] } }, "source-protocol":"ietf-isis:isis", "ietf-mpls:mpls-enabled":true, "ietf-mpls:mpls-local-label":16002, "ietf-ipv4-unicast-routing:destination-prefix": "198.51.100.2/32", "ietf-mpls:route-context":"SID-IDX:2" } ] } }, { "name":"RIB-V6", "address-family": "ietf-ipv6-unicast-routing:v6ur:ipv6-unicast", "routes":{ "route":[ { "next-hop":{ "outgoing-interface":"eth0", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16003, "ttl":255 } ] }, "ietf-ipv6-unicast-routing:next-hop-address": "2001:db8:0:1::1" }, "source-protocol":"ietf-isis:isis", "ietf-mpls:mpls-enabled":true, "ietf-mpls:mpls-local-label":16003, "ietf-ipv6-unicast-routing:destination-prefix": "2001:db8:0:10::1/128", "ietf-mpls:route-context":"SID-IDX:3" }, { "next-hop":{ "next-hop-list":{ "next-hop":[ { "outgoing-interface":"eth0", "ietf-mpls:index":"1", "ietf-mpls:backup-index":"2", "ietf-mpls:role":"primary-and-backup", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16004, "ttl":255 } ] }, "ietf-ipv6-unicast-routing:address": "2001:db8:0:1::1" }, { "outgoing-interface":"eth1", "ietf-mpls:index":"2", "ietf-mpls:backup-index":"1", "ietf-mpls:role":"primary-and-backup", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":16004, "ttl":255 } ] }, "ietf-ipv6-unicast-routing:address": "2001:db8:0:2::1" } ] } }, "source-protocol":"ietf-isis:isis", "ietf-mpls:mpls-enabled":true, "ietf-mpls:mpls-local-label":16004, "ietf-ipv6-unicast-routing:destination-prefix": "2001:db8:0:10::2/128", "ietf-mpls:route-context":"SID-IDX:4" } ] } }, { "name":"RIB-MPLS", "address-family":"ietf-mpls:mpls:mpls", "routes":{ "route":[ { "next-hop":{ "outgoing-interface":"eth0", "ietf-mpls:mpls-label-stack":{ "entry":[ { "id":1, "label":24002, "ttl":255 } ] }, "ietf-ipv4-unicast-routing:next-hop-address": "192.0.2.5" }, "source-protocol":"ietf-rsvp:rsvp", "ietf-mpls:mpls-enabled":true, "ietf-mpls:mpls-local-label":24001, "ietf-mpls:destination-prefix":"24001", "ietf-mpls:route-context": "RSVP Src:198.51.100.3,Dst:198.51.100.4,T:10,L:1" } ] } } ] }, "ietf-mpls:mpls":{ "mpls-label-blocks":{ "mpls-label-block":[ { "index":"mpls-srgb-label-block", "start-label":16000, "end-label":16500, "block-allocation-mode": "ietf-mpls:label-block-alloc-mode-manager" } ] }, "interfaces":{ "interface":[ { "name":"eth0", "mpls-enabled":true, "maximum-labeled-packet":1488 }, { "name":"eth1", "mpls-enabled":true, "maximum-labeled-packet":1488 } ] } } } } Figure 6: Instance Data Tree Example Acknowledgments The authors would like to thank Xia Chen for her contributions to the early draft revisions of this document. Contributors Igor Bryskin Huawei Technologies Email: i_bryskin@yahoo.com Himanshu Shah Ciena Email: hshah@ciena.com Authors' Addresses Tarek Saad Juniper Networks Email: tsaad@juniper.net Kamran Raza Cisco Systems, Inc. Email: skraza@cisco.com Rakesh Gandhi Cisco Systems, Inc. Email: rgandhi@cisco.com Xufeng Liu Volta Networks Email: xufeng.liu.ietf@gmail.com Vishnu Pavan Beeram Juniper Networks Email: vbeeram@juniper.net
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4