RTG Working Group Q. Liang Internet-Draft G. Yan Intended status: Standards Track S. Zhuang Expires: April 18, 2016 Huawei Technologies October 16, 2015 A YANG Data Model for Static Route draft-liang-rtgwg-staticrt-yang-cfg-00 Abstract This document defines a YANG data model for static routes. The data model includes configuration data and state data. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 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 April 18, 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 Liang, et al. Expires April 18, 2016 [Page 1] Internet-Draft Yang Model for Static Routes October 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. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 2. Static Route Data Model . . . . . . . . . . . . . . . . . . . 3 3. Static Route YANG Module . . . . . . . . . . . . . . . . . . 6 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 5. Security Considerations . . . . . . . . . . . . . . . . . . . 16 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.1. NormativeInformative . . . . . . . . . . . . . . . . . . 16 7.2. Informative References . . . . . . . . . . . . . . . . . 17 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 1. Introduction Static routes are special routes that are configured manually by network administrators. On simple networks, the network administrator configures static routes in the routers which cannot run dynamic routing protocols or cannot generate routes to a special destination network, so that the network can run properly. Route selection can be controlled using static routes. However, each time a fault occurs on the network or the network topology changes, maybe the network administrator need to reconfigure the static routes. This document defines a YANG [RFC6020] data model for the configuration and state data of static route. Any RPC or notification definition is not part of this document. . YANG is proving relevant beyond its initial confines, as bindings to other interfaces(e.g. ReST) and encoding other than XML (e.g. JSON) are being defined. Furthermore, YANG data models can be used as the basis of implementation for other interface, such as CLI and Programmatic APIs. As many vendors have different object constructs to represent the same static route, it has been tried to design this model in a very flexible, extensible and generic way to fit into most of the vendor requirements. Liang, et al. Expires April 18, 2016 [Page 2] Internet-Draft Yang Model for Static Routes October 2015 1.1. Terminology The following terms are defined in [RFC6020] : o configuration data o data model o module o state data The terminology for describing YANG data models is found in [RFC6020]. 1.2. Tree Diagrams A simplified graphical representation of the data model is used in this document. The meaning of the symbols in these diagrams is as follows: o Brackets "[" and "]" enclose list keys. o Abbreviations before data node names: "rw" means configuration data (read-write), and "ro" means state data (read-only). o Symbols after data node names: "?" means an optional node, "!" means a presence container, and "*" denotes a list and 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. 2. Static Route Data Model The data model has the following structure for configuration of static routes: module: ietf-staticrt +--rw staticrt | +--rw staticrt-cfg | | +--rw staticrt-topo* [VRF-name address-family topo-name] | | +--rw topo-name string | | +--rw VRF-name string | | +--rw address-family identityref | | +--rw enable-FRR? boolean Liang, et al. Expires April 18, 2016 [Page 3] Internet-Draft Yang Model for Static Routes October 2015 | | +--rw staticrt-entries* [ip-prefix ip-prefix-mask output-interface target-VRF-name target-nexthop] | | +--rw ip-prefix inet:ip-address | | +--rw ip-prefix-mask inet:ip-address | | +--rw output-interface string | | +--rw target-VRF-name string | | +--rw target-nexthop inet:ip-address | | +--rw description? string | | +--rw preference? uint32 | | +--rw cost? uint32 | | +--rw tag? uint32 | | +--rw enable-inherit-cost? boolean | | +--rw is-permanent? boolean | | +--rw not-advertise? boolean | | +--rw is-iterated-to-host-route? boolean | | +--rw BFD-enable? boolean | | +--rw BFD-session-name? string | | +--rw adminstated-down-not-selected? boolean | +--ro staticrt-state | +--ro staticrt-rib | | +--ro staticrt-route* | | +--ro index? uint32 | | +--ro topo-name? string | | +--ro VRF-name? string | | +--ro address-family? string | | +--ro ip-prefix inet:ip-address | | +--ro ip-prefix-mask inet:ip-address | | +--ro output-interface? string | | +--ro target-VRF-name? string | | +--ro target-nexthop? inet:ip-address | | +--ro description? string | | +--ro preference? uint32 | | +--ro cost? uint32 | | +--ro tag? uint32 | | +--ro enable-inherit-cost? boolean | | +--ro is-permanent? boolean | | +--ro not-advertise? boolean | | +--ro is-iterated-to-host-route? boolean | | +--ro BFD-enable? boolean | | +--ro BFD-session-name? string | | +--ro adminstated-down-not-selected? boolean | | +--ro iterated-nexthop? inet:ip-address | | +--ro iterated-output-interface? string | | +--ro label? uint32 | | +--ro route-state? string | | +--ro interface-state? string | | +--ro BFD-state? string | | +--ro local-address? inet:ip-address Liang, et al. Expires April 18, 2016 [Page 4] Internet-Draft Yang Model for Static Routes October 2015 | | +--ro remote-address? inet:ip-address | +--ro staticrt-statistics | +--ro staticrt-stats* | +--ro topo-name? string | +--ro VRF-name? string | +--ro address-family? string | +--ro static-route-stats* | +--ro ip-prefix inet:ip-address | +--ro ip-prefix-mask inet:ip-address | +--ro output-interface? string | +--ro target-VRF-name? string | +--ro target-nexthop? inet:ip-address | +--ro description? string | +--ro preference? uint32 | +--ro cost? uint32 | +--ro tag? uint32 | +--ro enable-inherit-cost? boolean | +--ro is-permanent? boolean | +--ro not-advertise? boolean | +--ro is-iterated-to-host-route? boolean | +--ro classified-pkts? uint64 | +--ro classified-bytes? uint64 +--rw BFD-paras-cfg +--rw BFD-enable? boolean +--rw BFD-session-paras* [BFD-session-name] +--rw BFD-session-name string +--rw address-family? identityref +--rw interface-name? string +--rw destination-VRF-name? string +--rw nexthop? inet:ip-address +--rw local-ip-address? inet:ip-address +--rw min-tx-interval? uint32 +--rw min-rx-interval? uint32 +--rw multiplier? uint32 This data model defines the configuration and state containers for static routes. In staticrt-cfg container, there is a list of configuration containers per static route, which contains the configuration for static route. The data model for state of static routes defines two state containers. Container staticrt-rib contains the current state of static routes. In the second container, there is statistics information for static routes. The staticrt-entries in the staticrt- statistics container is listed per routing instance per address family. The list of staticrt-entries is in order of applied rules in the forwarding path. Liang, et al. Expires April 18, 2016 [Page 5] Internet-Draft Yang Model for Static Routes October 2015 This data model also defines the configuration for BFD session using to detect the configured nexthop reachability of the static route. 3. Static Route YANG Module file "ietf-staticrt@2015-10-16.yang" module ietf-staticrt{ namespace "urn:ietf:params:xml:ns:yang:ietf-staticrt"; prefix staticrt; import ietf-inet-types { prefix inet; } organization "TBD"; contact "TBD"; description "This module contains a collection of YANG definitions for configuring static routes."; revision 2015-10-17 { description "Initial revision."; reference " [draft-ietf-netmod-routing-cfg-16] A YANG Data Model for Routing Management. "; } identity address-family { description "Base identity from which identities describing address families are derived."; } identity ipv4 { base address-family; description "This identity represents IPv4 address family."; } identity ipv6 { base address-family; description "This identity represents IPv6 address family."; } Liang, et al. Expires April 18, 2016 [Page 6] Internet-Draft Yang Model for Static Routes October 2015 grouping staticrt-entry { description "This group defines the static route."; leaf ip-prefix { type inet:ip-address; mandatory "true"; description "The destination ip prefix of the static route."; } leaf ip-prefix-mask { type inet:ip-address; mandatory "true"; description "The destination ip prefix mask of the static route."; } leaf output-interface { type string; description " The name of the output interface."; } leaf target-VRF-name { type string; description "The VRF name of the target nexthop."; } leaf target-nexthop { type inet:ip-address; description " The configured target nexthop."; } leaf description { type string; description " The description of the static route."; } leaf preference { type uint32; description "Specifies route preference."; } Liang, et al. Expires April 18, 2016 [Page 7] Internet-Draft Yang Model for Static Routes October 2015 leaf cost { type uint32; description "Specifies route cost."; } leaf tag { type uint32; description "Specifies route tag."; } leaf enable-inherit-cost { type boolean; default false; description "The flag indicates whether the static route should inherit the cost of the iterated route."; } leaf is-permanent { type boolean; default false; description "The flag indicates whether the static route should be released permanently."; } leaf not-advertise { type boolean; default false; description "The flag indicates whether the router should not advertise the static route."; } leaf is-iterated-to-host-route { type boolean; default false; description "The flag indicates whether the static route should be iterated to a host route."; } } grouping staticrt-BFD-paras { description "This group defines the corresponding BFD session information for detecting the configured nexthop reachability of the static route."; Liang, et al. Expires April 18, 2016 [Page 8] Internet-Draft Yang Model for Static Routes October 2015 leaf BFD-enable { type boolean; description " The flag indicates whether the router enable the corresponding BFD session for this static route."; } leaf BFD-session-name { type string; description "The BFD session name."; } leaf adminstated-down-not-selected { type boolean; description "If this flag is true,it indicates that the corresponding static route should not be selected when the BFD session associated with it is in the AdminDown State."; } } grouping staticrt-reachability-paras { description "This group defines the reachability detecting session information for detecting the configured nexthop reachability of the static route."; uses staticrt-BFD-paras; } grouping staticrt-BFD-state { description "This group defines the corresponding BFD session state as a detecting result of the configured nexthop reachability."; leaf BFD-state { type string; config false; description "The BFD session state."; } leaf local-address { type inet:ip-address; config false; description "the local IP address of the corresponding BFD session."; } Liang, et al. Expires April 18, 2016 [Page 9] Internet-Draft Yang Model for Static Routes October 2015 leaf remote-address { type inet:ip-address; config false; description "the remote IP address of the corresponding BFD session."; } } grouping staticrt-reachability-state { description "This group defines the reachability detecting session state as a detecting result of the configured nexthop reachability."; uses staticrt-BFD-state; } container staticrt { description "Container for static route configuration and state"; container staticrt-cfg { description "Configuration for static route."; list staticrt-topo { key "VRF-name address-family topo-name"; description "Configuration of a static route list."; leaf topo-name { type string; description "The topology name of the destination ip prefix belonging to."; } leaf VRF-name { type string; description "The VRF-name of the staticrt-entry"; } leaf address-family { type identityref { base address-family; } description "address-family of the staticrt-entry"; } leaf enable-FRR { Liang, et al. Expires April 18, 2016 [Page 10] Internet-Draft Yang Model for Static Routes October 2015 type boolean; description "Enable FRR.FRR is implemented only on static routes that are manually configured. That is, FRR is not implemented on iterated next hops."; } list staticrt-entries { key "ip-prefix ip-prefix-mask output-interface " +"target-VRF-name target-nexthop"; ordered-by system; uses staticrt-entry; uses staticrt-reachability-paras; description "Define static routes."; } } } container staticrt-state { config false; description "Operational state of static routes."; container staticrt-rib{ description "Define the operational state data for static routes."; list staticrt-route { description "Static routes are organized into list of routes."; leaf index { type uint32; description "Static route entry index."; } leaf topo-name { type string; description "The topology name of the destination ip prefix belonging to."; } leaf VRF-name { type string; Liang, et al. Expires April 18, 2016 [Page 11] Internet-Draft Yang Model for Static Routes October 2015 description "VRF-name of the set of static routes"; } leaf address-family { type string; description "Address-family of the set of static-routes"; } uses staticrt-entry; uses staticrt-reachability-paras; leaf iterated-nexthop { type inet:ip-address; config false; description "The iterated nexthop."; } leaf iterated-output-interface { type string; config false; description "The iterated output interface name."; } leaf label { type uint32; config false; description "Specifies egress label."; } leaf route-state { type string; config false; description "Route state."; } leaf interface-state { type string; config false; description "The configured output interface state."; } uses staticrt-reachability-state; } } container staticrt-statistics { config false; description Liang, et al. Expires April 18, 2016 [Page 12] Internet-Draft Yang Model for Static Routes October 2015 "Define the statistics of list of static routes."; list staticrt-stats { description "Statistics of list of static routes per VRF & Address-family & topology."; leaf topo-name { type string; description "The topology name of the destination ip prefix belonging to."; } leaf VRF-name { type string; description "Vrf-name of the set of static routes"; } leaf address-family { type string; description "Address-family of the set of static-routes"; } list static-route-stats { description "This defines the static route statistics of each static route."; uses staticrt-entry; leaf classified-pkts { type uint64; description " Number of total packets which matched to the static route"; } leaf classified-bytes { type uint64; description " Number of total bytes which matched to the static route"; } } } } } Liang, et al. Expires April 18, 2016 [Page 13] Internet-Draft Yang Model for Static Routes October 2015 } container BFD-paras-cfg { description "This container defines the corresponding BFD session information for detecting the configured nexthop reachability of the static route."; leaf BFD-enable { type boolean; description "The flag indicates whether the router enable the corresponding BFD session for this static route."; } list BFD-session-paras { key "BFD-session-name"; description "The BFD sessions for static routes"; leaf BFD-session-name { type string; description "The BFD session name."; } leaf address-family { type identityref { base address-family; } description " address-family of the staticrt-entry"; } leaf interface-name { type string; description "Interface name."; } leaf destination-VRF-name { type string; description "Destination vpn instance name for Gateway."; } leaf nexthop { type inet:ip-address; description "NextHop address."; } leaf local-ip-address { Liang, et al. Expires April 18, 2016 [Page 14] Internet-Draft Yang Model for Static Routes October 2015 type inet:ip-address; description "The local ip address of the BFD session."; } leaf min-tx-interval { type uint32; description "Min transmit interval."; } leaf min-rx-interval { type uint32; description "Min receive interval."; } leaf multiplier { type uint32; description "Multiplier value."; } } } } 4. IANA Considerations This document registers a URI in the "IETF XML Registry" [RFC3688]. Following the format in [RFC3688], the following registration has been made. URI: urn:ietf:params:xml:ns:yang:ietf-staticrt Registrant Contact: The RTGWG WG of the IETF. 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-staticrt Namespace: urn:ietf:params:xml:ns:yang:ietf-staticrt Prefix: staticrt Reference: RFC xxxx Liang, et al. Expires April 18, 2016 [Page 15] Internet-Draft Yang Model for Static Routes October 2015 5. Security Considerations The YANG module defined in this memo is designed to be accessed via the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242]. The NETCONF access control model [RFC6536] provides the means to restrict access for particular NETCONF users to a pre-configured subset of all available NETCONF protocol operations and content. There are a number of data nodes defined in the YANG module which 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., ) to these data nodes without proper protection can have a negative effect on network operations. 6. Acknowledgements The editor of this document wishes to thank Eric Wu, Guangying Zheng, Baohua Song, Xiangfeng Ding for the guidance and support in coming up with this draft. 7. References 7.1. NormativeInformative [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, . Liang, et al. Expires April 18, 2016 [Page 16] Internet-Draft Yang Model for Static Routes October 2015 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration Protocol (NETCONF) Access Control Model", RFC 6536, DOI 10.17487/RFC6536, March 2012, . 7.2. Informative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . Authors' Addresses Qiandeng Liang Huawei Technologies 101 Software Avenue, Yuhuatai District Nanjing 210012 China Email: liangqiandeng@huawei.com Gang Yan Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: yangang@huawei.com Shunwan Zhuang Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: zhuangshunwan@huawei.com Liang, et al. Expires April 18, 2016 [Page 17]