Network Working Group A. Lindem Internet-Draft Cisco Systems Intended status: Standards Track Y. Qu Expires: February 2, 2019 Huawei August 1, 2018 RIB YANG Data Model draft-acee-rtgwg-yang-rib-extend-07.txt Abstract The Routing Information Base (RIB) is a list of routes and their corresponding administrative data and operational state. The document [RFC8349] defines the basic building blocks for RIB, and this model augments it to support multiple next-hops (aka, paths) for each route as well as additional attributes. 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 February 2, 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 (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 to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of Lindem & Qu Expires February 2, 2019 [Page 1] Internet-Draft YANG RIB August 2018 the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 2 2. Design of the Model . . . . . . . . . . . . . . . . . . . . . 3 2.1. RIB Tags and Preference . . . . . . . . . . . . . . . . . 3 2.2. Multiple next-hops . . . . . . . . . . . . . . . . . . . 3 2.3. Repair path . . . . . . . . . . . . . . . . . . . . . . . 3 3. RIB Model Tree . . . . . . . . . . . . . . . . . . . . . . . 3 4. RIB YANG Model . . . . . . . . . . . . . . . . . . . . . . . 5 5. Security Considerations . . . . . . . . . . . . . . . . . . . 12 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.1. Normative References . . . . . . . . . . . . . . . . . . 14 7.2. Informative References . . . . . . . . . . . . . . . . . 15 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 1. Introduction This document defines a YANG, [RFC6020], data model which extends the generic data model for RIB by augmenting the ietf-routing model as defined in [RFC8349]. RIB is a collection of best routes from all routing protocols. Within a protocol routes are selected based on the metrics in use by that protocol, and the protocol install its best routes to RIB. RIB selects the best route by comparing the route preference (aka, administrative distance) of the associated protocol. The augmentations described herein extend the RIB to support multiple paths per route, route metrics, and administrative tags. 1.1. Requirements Language 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. Lindem & Qu Expires February 2, 2019 [Page 2] Internet-Draft YANG RIB August 2018 2. Design of the Model The YANG definitions in this document augment the ietf-routing model defined in [RFC8349], which provides a basis for routing system data model development. Together with modules defined in [RFC8349], a generic RIB Yang model is defined to implement and monitor RIB. The models in [RFC8349] also define the basic configuration and operational state for both IPv4 and IPv6 static routes and this document also provides augmentations for static routes to support multiple next-hop and more next-hop attributes. 2.1. RIB Tags and Preference Individual routes tags will be supported at both the route and next- hop level. A preference per next-hop is also supported for selection of the most prefered reachable static route. 2.2. Multiple next-hops Both Ipv4 and IPv6 static route configuration defined in [RFC8349] have been augmented with a multi-next-hop option. A static route/prefix can be configured to have multiple next-hops, each with their own tag and route preference. In RIB, a route may have multiple next-hops. They can be either equal cost multiple paths (ECMP), or they may have different metrics. 2.3. Repair path The loop-free alternate (LFA) Fast Reroute (FRR) pre-computes repair paths by routing protocols, and RIB stores the best repair path. A repair path is augmented in RIB operation state for each path. 3. RIB Model Tree A simplified graphical representation of the augmentations described herein is included below. The meaning of the symbols in this diagrams is as follows: o Brackets "[" and "]" enclose list keys. o Curly braces "{" and "}" contain names of optional features that make the corresponding node conditional. Lindem & Qu Expires February 2, 2019 [Page 3] Internet-Draft YANG RIB August 2018 o Abbreviations before data node names: "rw" means configuration (read-write), "ro" state data (read-only), "-x" RPC operations, and "-n" notifications. o Symbols after data node names: "?" means an optional node, "!" a container with presence, and "*" denotes a "list" or "leaf-list". o Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":"). o Ellipsis ("...") stands for contents of subtrees that are not shown. augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/rt:static-routes/v4ur:ipv4 /v4ur:route/v4ur:next-hop/v4ur:next-hop-options /v4ur:simple-next-hop: +--rw preference? uint32 +--rw tag? uint32 +--rw application-tag? uint32 augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/rt:static-routes/v4ur:ipv4 /v4ur:route/v4ur:next-hop/v4ur:next-hop-options /v4ur:next-hop-list/v4ur:next-hop-list/v4ur:next-hop: +--rw preference? uint32 +--rw tag? uint32 +--rw application-tag? uint32 augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/rt:static-routes/v6ur:ipv6 /v6ur:route/v6ur:next-hop/v6ur:next-hop-options /v6ur:simple-next-hop: +--rw preference? uint32 +--rw tag? uint32 +--rw application-tag? uint32 augment /rt:routing/rt:control-plane-protocols /rt:control-plane-protocol/rt:static-routes/v6ur:ipv6 /v6ur:route/v6ur:next-hop/v6ur:next-hop-options /v6ur:next-hop-list/v6ur:next-hop-list/v6ur:next-hop: +--rw preference? uint32 +--rw tag? uint32 +--rw application-tag? uint32 augment /rt:routing/rt:ribs/rt:rib: +--ro rib-summary-statistics +--ro total-routes? uint32 +--ro total-active-routes? uint32 +--ro total-route-memory? uint64 +--ro protocol-rib-statistics* [] +--ro rib-protocol? identityref Lindem & Qu Expires February 2, 2019 [Page 4] Internet-Draft YANG RIB August 2018 +--ro protocol-total-routes? uint32 +--ro protocol-active-routes? uint32 +--ro protocol-route-memory? uint64 augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route: +--ro metric? uint32 +--ro tag? uint32 +--ro application-tag? uint32 augment /rt:routing/rt:ribs/rt:rib/rt:routes: +--ro repair-route* [id] +--ro id string +--ro next-hop | +--ro outgoing-interface? if:interface-state-ref | +--ro next-hop-address? inet:ip-address +--ro metric? uint32 augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route /rt:next-hop/rt:next-hop-options/rt:simple-next-hop: +--ro repair-path? -> /rt:routing/ribs/rib/routes/repair-route/id augment /rt:routing/rt:ribs/rt:rib/rt:routes/rt:route /rt:next-hop/rt:next-hop-options/rt:special-next-hop: +--ro repair-path? -> /rt:routing/ribs/rib/routes/repair-route/id 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 repair-path? -> /rt:routing/ribs/rib/routes/repair-route/id 4. RIB YANG Model file "ietf-rib-extension@2018-08-01.yang" module ietf-rib-extension { namespace "urn:ietf:params:xml:ns:yang:ietf-rib-extension"; prefix rib; import ietf-inet-types { prefix "inet"; } import ietf-interfaces { prefix "if"; } import ietf-routing { prefix "rt"; } Lindem & Qu Expires February 2, 2019 [Page 5] Internet-Draft YANG RIB August 2018 import ietf-ipv4-unicast-routing { prefix "v4ur"; } import ietf-ipv6-unicast-routing { prefix "v6ur"; } organization "IETF RTGWG - Routing Working Group"; contact "WG Web: WG List: Author: Acee Lindem Author: Yingzhen Qu "; description "This YANG module extends the generic data model for RIB by augmenting the ietf-netmod-routing-cfg model. It is intended that the module will be extended by vendors to define vendor-specific RIB parameters. This YANG model conforms to the Network Management Datastore Architecture (NDMA) as described in RFC 8242. Copyright (c) 2018 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 (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2018-08-01 { description "Initial RFC Version"; reference "RFC XXXX: A YANG Data Model for RIB Extensions."; } Lindem & Qu Expires February 2, 2019 [Page 6] Internet-Draft YANG RIB August 2018 /* Groupings */ grouping rib-statistics { description "Statistics grouping used for RIB augmentation"; container rib-summary-statistics { config false; description "Container for RIB statistics"; leaf total-routes { type uint32; description "Total routes in the RIB from all protocols"; } leaf total-active-routes { type uint32; description "Total active routes in the RIB"; } leaf total-route-memory { type uint64; description "Total memory for all routes in the RIB from all protocol clients"; } list protocol-rib-statistics { description "List protocol statistics"; leaf rib-protocol { type identityref { base rt:routing-protocol; } description "Routing protocol for statistics"; } leaf protocol-total-routes { type uint32; description "Total number routes for protocol in the RIB"; } leaf protocol-active-routes { type uint32; description "Number active routes for protocol in the RIB"; } leaf protocol-route-memory { type uint64; description "Total memory for all routes in the RIB for protocol"; } } } } Lindem & Qu Expires February 2, 2019 [Page 7] Internet-Draft YANG RIB August 2018 grouping next-hop { description "Next-hop grouping"; leaf interface { type if:interface-ref; description "Outgoing interface"; } leaf address { type inet:ip-address; description "IPv4 or IPv6 Address of the next-hop"; } } grouping attributes { description "Common attributes applicable to all paths"; leaf metric { type uint32; description "Route metric"; } leaf tag { type uint32; description "Route tag"; } leaf application-tag { type uint32; description "Additional Application-Specific Route tag"; } } grouping path-attribute { description "Path attribute grouping"; leaf repair-path { type leafref { path "/rt:routing/rt:ribs/rt:rib/" + "rt:routes/repair-route/id"; } description "IP Fast ReRoute (IPFRR) repair path, use a path from repair-route list"; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/" + "v4ur:route/v4ur:next-hop/v4ur:next-hop-options/" Lindem & Qu Expires February 2, 2019 [Page 8] Internet-Draft YANG RIB August 2018 + "v4ur:simple-next-hop" { description "Augment 'simple-next-hop' case in IPv4 unicast route."; leaf preference { type uint32; default "1"; description "Route preference - Used to select among multiple static routes with a lower preference next-hop preferred and equal preference paths yielding Equal Cost Multi-Path (ECMP)."; } leaf tag { type uint32; default "0"; description "Route tag"; } leaf application-tag { type uint32; description "Additional Application-Specific Route tag"; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/rt:static-routes/v4ur:ipv4/" + "v4ur:route/v4ur:next-hop/v4ur:next-hop-options/" + "v4ur:next-hop-list/v4ur:next-hop-list/v4ur:next-hop" { description "Augment static route configuration 'next-hop-list'."; leaf preference { type uint32; default "1"; description "Route preference - Used to select among multiple static routes with a lower preference next-hop preferred and equal preference paths yielding Equal Cost Multi-Path (ECMP)."; } leaf tag { type uint32; default "0"; description "Route tag"; } leaf application-tag { type uint32; description "Additional Application-Specific Route tag"; } Lindem & Qu Expires February 2, 2019 [Page 9] Internet-Draft YANG RIB August 2018 } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/" + "v6ur:route/v6ur:next-hop/v6ur:next-hop-options/" + "v6ur:simple-next-hop" { description "Augment 'simple-next-hop' case in IPv6 unicast route."; leaf preference { type uint32; default "1"; description "Route preference - Used to select among multiple static routes with a lower preference next-hop preferred and equal preference paths yielding Equal Cost Multi-Path (ECMP)."; } leaf tag { type uint32; default "0"; description "Route tag"; } leaf application-tag { type uint32; description "Additional Application-Specific Route tag"; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/rt:static-routes/v6ur:ipv6/" + "v6ur:route/v6ur:next-hop/v6ur:next-hop-options/" + "v6ur:next-hop-list/v6ur:next-hop-list/v6ur:next-hop" { description "Augment static route configuration 'next-hop-list'."; leaf preference { type uint32; default "1"; description "Route preference - Used to select among multiple static routes with a lower preference next-hop preferred and equal preference paths yielding Equal Cost Multi-Path (ECMP)."; } leaf tag { type uint32; default "0"; description "Route tag"; Lindem & Qu Expires February 2, 2019 [Page 10] Internet-Draft YANG RIB August 2018 } leaf application-tag { type uint32; description "Additional Application-Specific Route tag"; } } augment "/rt:routing/rt:ribs/rt:rib" { description "Augment a RIB with statistics"; uses rib-statistics; } augment "/rt:routing/rt:ribs/rt:rib/" + "rt:routes/rt:route" { description "Augment a route in RIB with tag."; uses attributes; } augment "/rt:routing/rt:ribs/rt:rib/" + "rt:routes" { description "Augment a route with a list of repair-paths."; list repair-route { key "id"; description "A repair-path entry, which can be referenced by a repair-path."; leaf id { type string; description "A unique identifier."; } container next-hop { description "Route's next-hop attribute."; leaf outgoing-interface { type if:interface-state-ref; description "Name of the outgoing interface."; } leaf next-hop-address { type inet:ip-address; description Lindem & Qu Expires February 2, 2019 [Page 11] Internet-Draft YANG RIB August 2018 "IP address of the next hop."; } } leaf metric { type uint32; description "Route metric"; } } } augment "/rt:routing/rt:ribs/rt:rib/" + "rt:routes/rt:route/rt:next-hop/rt:next-hop-options/" + "rt:simple-next-hop" { description "Add more parameters to a path."; uses path-attribute; } augment "/rt:routing/rt:ribs/rt:rib/" + "rt:routes/rt:route/rt:next-hop/rt:next-hop-options/" + "rt:special-next-hop" { description "Add more parameters to a path."; uses path-attribute; } 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 case augments the 'next-hop-options' in the routing model."; uses path-attribute; } } 5. 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 Lindem & Qu Expires February 2, 2019 [Page 12] Internet-Draft YANG RIB August 2018 is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC5246]. The NETCONF access control model [RFC6536] provides the means to restrict access for particular NETCONF or RESTCONF users to a pre- configured subset of all available NETCONF or RESTCONF protocol operations and content. There are a number of data nodes defined in ietf-rib-extensions.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. For these augmentations to ietf-routing.yang, the abiliy to delete, add, and modify IPv4 and IPv6 static routes would allow traffic to be misrouted. Some of the readable data nodes in the ietf-rib-extensions.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. The exposure of the Routing Information Base (RIB) will expose the routing topology of the network. This may be undesirable since both due to the fact that exposure may facilitate other attacks. Additionally, network operators may consider their topologies to be sensitive confidential data. All the security considerations for [RFC8349] writable and readable data nodes apply to the augmentations described herein. 6. IANA Considerations This document registers a URI in the IETF XML registry [XML-REGISTRY]. Following the format in RFC 3688, the following registration is requested to be made: URI: urn:ietf:params:xml:ns:yang:ietf-rib Registrant Contact: The IESG. 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-acl namespace: urn:ietf:params:xml:ns:yang:ietf-rib prefix: ietf-rib reference: RFC XXXX Lindem & Qu Expires February 2, 2019 [Page 13] Internet-Draft YANG RIB August 2018 7. References 7.1. 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, . [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, . [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, . [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, DOI 10.17487/RFC6536, March 2012, . [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, . [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, . Lindem & Qu Expires February 2, 2019 [Page 14] Internet-Draft YANG RIB August 2018 7.2. Informative References [XML-REGISTRY] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. Appendix A. Acknowledgments The RFC text was produced using Marshall Rose's xml2rfc tool. The authors wish to thank Les Ginsberg, Krishna Deevi and Suyoung Yoon for their helpful comments and suggestions. Authors' Addresses Acee Lindem Cisco Systems 301 Midenhall Way Cary, NC 27513 USA EMail: acee@cisco.com Yingzhen Qu Huawei 2330 Central Expressway Santa Clara, CA 95050 USA EMail: yingzhen.qu@huawei.com Lindem & Qu Expires February 2, 2019 [Page 15]