--- 1/draft-ietf-i2rs-rib-data-model-03.txt 2015-11-23 00:16:00.108762692 -0800 +++ 2/draft-ietf-i2rs-rib-data-model-04.txt 2015-11-23 00:16:00.336768261 -0800 @@ -1,26 +1,26 @@ Network Working Group L. Wang Internet-Draft Individual Intended status: Standards Track H. Ananthakrishnan -Expires: May 4, 2016 Packet Design +Expires: May 25, 2016 Packet Design M. Chen Huawei A. Dass S. Kini Ericsson N. Bahadur Bracket Computing - November 1, 2015 + November 22, 2015 A YANG Data Model for Routing Information Base (RIB) - draft-ietf-i2rs-rib-data-model-03 + draft-ietf-i2rs-rib-data-model-04 Abstract This document defines a YANG data model for Routing Information Base (RIB) that aligns with the I2RS RIB information model. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this @@ -34,21 +34,21 @@ 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 May 4, 2016. + This Internet-Draft will expire on May 25, 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 @@ -58,45 +58,45 @@ the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 2. Model Structure . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. RIB Capability . . . . . . . . . . . . . . . . . . . . . 7 - 2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 7 + 2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 8 2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 13 - 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 16 - 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 17 - 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 59 - 5. Security Considerations . . . . . . . . . . . . . . . . . . . 59 - 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 59 - 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 60 - 7.1. Normative References . . . . . . . . . . . . . . . . . . 60 - 7.2. Informative References . . . . . . . . . . . . . . . . . 60 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 + 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 14 + 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 18 + 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 19 + 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 63 + 5. Security Considerations . . . . . . . . . . . . . . . . . . . 63 + 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 63 + 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 64 + 7.1. Normative References . . . . . . . . . . . . . . . . . . 64 + 7.2. Informative References . . . . . . . . . . . . . . . . . 64 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 64 1. Introduction The Interface to the Routing System (I2RS) [I-D.ietf-i2rs-architecture] provides read and write access to the information and state within the routing process that exists inside the routing elements, this is achieved via the protocol message exchange between I2RS clients and I2RS agents associated with the routing system. One of the functions of I2RS is to read and write data of Routing Information Base (RIB). [I-D.ietf-i2rs-usecase-reqs-summary] introduces a set of RIB use - cases and the RIB information model is defined in + cases. The RIB information model is defined in [I-D.ietf-i2rs-rib-info-model]. This document defines a YANG [RFC6020][RFC6991] data model for the RIB that satisfies the RIB use cases and aligns with the RIB information model. 1.1. Definitions and Acronyms RIB: Routing Information Base @@ -118,24 +118,24 @@ 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. Model Structure - The following figure shows an overview of structure tree of the i2rs- - rib module. To give a whole view of the structure tree, some details - of the tree are omitted. The detail are introduced in the following - sub-sections. + The following figure shows an overview of structure tree of the ietf- + i2rs-rib module. To give a whole view of the structure tree, some + details of the tree are omitted. The relevant details are introduced + in the following sub-sections. module: ietf-i2rs-rib +--rw routing-instance +--rw name string +--rw interface-list* [name] | +--rw name if:interface-ref +--rw router-id? yang:dotted-quad +--rw lookup-limit? uint8 +--rw rib-list* [name] +--rw name string @@ -149,126 +149,149 @@ | | ... | +--:(ipv6) | | ... | +--:(mpls-route) | | ... | +--:(mac-route) | | ... | +--:(interface-route) | ... +--rw nexthop - | +--rw nexthop-id uint32 - | +--rw sharing-flag boolean + | +--rw nexthop-id? uint32 + | +--rw sharing-flag? boolean | +--rw (nexthop-type)? | +--:(nexthop-base) | | ... | +--:(nexthop-chain) {nexthop-chain}? | | ... | +--:(nexthop-replicates) {nexthop-replicates}? | | ... | +--:(nexthop-protection) {nexthop-protection}? | | ... | +--:(nexthop-load-balance) {nexthop-load-balance}? | ... +--rw route-statistic | ... +--rw route-attributes | ... +--rw route-vendor-attributes rpcs: +---x rib-add - | +--ro input - | | +--ro rib-name string - | | +--ro rib-family rib-family-def - | | +--ro ip-rpf-check? boolean + | +---w input + | | +---w rib-name string + | | +---w rib-family rib-family-def + | | +---w ip-rpf-check? boolean | +--ro output - | +--ro result boolean + | +--ro result uint32 + | +--ro reason? string +---x rib-delete - | +--ro input - | | +--ro rib-name string + | +---w input + | | +---w rib-name string | +--ro output - | +--ro result boolean + | +--ro result uint32 + | +--ro reason? string +---x route-add - | +--ro input - | | +--ro rib-name string - | | +--ro routes - | | +--ro route-list* [route-index] + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w routes + | | +---w route-list* [route-index] | | ... | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x route-delete - | +--ro input - | | +--ro rib-name string - | | +--ro routes - | | +--ro route-list* [route-index] + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w routes + | | +---w route-list* [route-index] | | ... | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x route-update - | +--ro input - | | +--ro rib-name string - | | +--ro (match-conditions)? + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w (match-options)? | | +--:(match-route-prefix) | | | ... | | +--:(match-route-attributes) | | | ... - | | +--:(match-route-vendor-attributes) {...vendor-attributes}? + | | +--:(match-route-vendor-attributes) {...}? | | | ... | | +--:(match-nexthop) | | ... | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x nh-add - | +--ro input - | | +--ro rib-name string - | | +--ro nexthop-id uint32 - | | +--ro sharing-flag boolean - | | +--ro (nexthop-type)? + | +---w input + | | +---w rib-name string + | | +---w nexthop-id? uint32 + | | +---w sharing-flag? boolean + | | +---w (nexthop-type)? | | +--:(nexthop-base) | | | ... | | +--:(nexthop-chain) {nexthop-chain}? | | | ... | | +--:(nexthop-replicates) {nexthop-replicates}? | | | ... | | +--:(nexthop-protection) {nexthop-protection}? | | | ... | | +--:(nexthop-load-balance) {nexthop-load-balance}? | | ... | +--ro output - | +--ro result boolean - | +--ro nexthop-id uint32 + | +--ro result uint32 + | +--ro reason? string + | +--ro nexthop-id? uint32 +---x nh-delete - +--ro input - | +--ro rib-name string - | +--ro nexthop-id uint32 - | +--ro sharing-flag boolean - | +--ro (nexthop-type)? + +---w input + | +---w rib-name string + | +---w nexthop-id? uint32 + | +---w sharing-flag? boolean + | +---w (nexthop-type)? | +--:(nexthop-base) | | ... | +--:(nexthop-chain) {nexthop-chain}? | | ... | +--:(nexthop-replicates) {nexthop-replicates}? | | ... | +--:(nexthop-protection) {nexthop-protection}? | | ... | +--:(nexthop-load-balance) {nexthop-load-balance}? | ... +--ro output - +--ro result boolean + +--ro result uint32 + +--ro reason? string notifications: +---n nexthop-resolution-status-change | +--ro nexthop - | | +--ro nexthop-id uint32 - | | +--ro sharing-flag boolean + | | +--ro nexthop-id? uint32 + | | +--ro sharing-flag? boolean | | +--ro (nexthop-type)? | | +--:(nexthop-base) | | | ... + | | +--:(nexthop-chain) {nexthop-chain}? | | | ... | | +--:(nexthop-replicates) {nexthop-replicates}? | | | ... | | +--:(nexthop-protection) {nexthop-protection}? | | | ... | | +--:(nexthop-load-balance) {nexthop-load-balance}? | | ... | +--ro nexthop-state nexthop-state-def +---n route-change @@ -316,40 +339,38 @@ A routing instance, in the context of the RIB information model, is a collection of RIBs, interfaces, and routing protocol parameters. A routing instance creates a logical slice of the router and can allow multiple different logical slices; across a set of routers; to communicate with each other. And the routing protocol parameters control the information available in the RIBs. More detail about routing instance can be found in Section 2.2 of [I-D.ietf-i2rs-rib-info-model]. - As described in [I-D.ietf-i2rs-rib-info-model], there will be - multiple routing instances for a router. At the same time, for a - routing instance, there would be multiple RIBs as well. Therefore, - this model uses "list" to express the RIBs. The structure tree is - shown as following figure. + For a routing instance, there will be multiple RIBs. Therefore, this + model uses "list" to express the RIBs. The structure tree is shown + as following figure. +--rw routing-instance +--rw name string +--rw interface-list* [name] | +--rw name if:interface-ref +--rw router-id? yang:dotted-quad +--rw lookup-limit? uint8 +--rw rib-list* [name] +--rw name string +--rw rib-family rib-family-def +--rw ip-rpf-check? boolean +--rw route-list* [route-index] ... (refer to Section 2.3) - Figure 2: Routing Instance Stuture + Figure 2: Routing Instance Structure 2.3. Route A route is essentially a match condition and an action following that match. The match condition specifies the kind of route (e.g., IPv4, MPLS, MAC, Interface etc.) and the set of fields to match on. According to the definition in [I-D.ietf-i2rs-rib-info-model], a route MUST associate with the following attributes: @@ -358,21 +379,22 @@ o ACTIVE: Indicates whether a route is fully resolved and is a candidate for selection. o INSTALLED: Indicates whether the route got installed in the FIB. In addition, a route can associate with one or more optional route attributes(e.g., route-vendor-attributes). For a RIB, there will have a number of routes, so the routes are - expressed as a list under the rib list. + expressed as a list under a specific rib. Each rib has its own route + list. +--rw route-list* [route-index] +--rw route-index uint64 +--rw match | +--rw (route-type)? | +--:(ipv4) | | +--rw ipv4 | | +--rw (ip-route-match-type)? | | +--:(dest-ipv4-address) | | | ... @@ -402,50 +424,61 @@ 2.4. Nexthop A nexthop represents an object resulting from a route lookup. As illustrated in Section 2.4 of [I-D.ietf-i2rs-rib-info-model], to support various of use cases (e.g., load balance, protection, multicast or the combination of them), the nexthop is modelled as a multi-level structure and supports recursion. The first level of the nexthop includes the following four types: - o Base: The "base" nexthop itself is a hierarchical structure, it is - the base of all other nexthop types. The first level of the base - nexthop includes special-nexthop and nexthop-chain. The nexthop- - chain can have one or more nexthop chain members, each member is - one of the four types (as listed below) of specific nexthop. - - Other first level nexthop (e.g., load-balance, protection and - replicate) will finally be iterated to a "base" nexthop. + o Base: The "base" nexthop is the foundation of all other nexthop + types. It includes the follow basic nexthops: * nexthop-id + * IPv4 address + + * IPv6 address + * egress-interface + * egress-interface with IPv4 address + + * egress-interface with IPv6 address + + * egress-interface with MAC address + * logical-tunnel * tunnel-encap + * tunnel-decap + + * rib-name + + o Chain:Provide a way to perform multiple operations on a packet by + logically combining them. + o Load-balance: Designed for load-balance case where it normally will have multiple weighted nexthops. o Protection: Designed for protection scenario where it normally will have primary and standby nexthop. o Replicate: Designed for multiple destinations forwarding. The structure tree of nexthop is shown in the following figures. +--rw nexthop - | +--rw nexthop-id uint32 - | +--rw sharing-flag boolean + | +--rw nexthop-id? uint32 + | +--rw sharing-flag? boolean | +--rw (nexthop-type)? | +--:(nexthop-base) | | ...(refer to Figure 5) | +--:(nexthop-chain) {nexthop-chain}? | | +--rw nexthop-chain | | +--rw nexthop-list* [nexthop-member-id] | | +--rw nexthop-member-id uint32 | +--:(nexthop-replicates) {nexthop-replicates}? | | +--rw nexthop-replicates | | +--rw nexthop-list* [nexthop-member-id] @@ -454,24 +487,24 @@ | | +--rw nexthop-protection | | +--rw nexthop-list* [nexthop-member-id] | | +--rw nexthop-member-id uint32 | | +--rw nexthop-preference nexthop-preference-def | +--:(nexthop-load-balance) {nexthop-load-balance}? | +--rw nexthop-lbs | +--rw nexthop-list* [nexthop-member-id] | +--rw nexthop-member-id uint32 | +--rw nexthop-lb-weight nexthop-lb-weight-def - Figure 4: Nexhop Structure + Figure 4: Nexthop Structure Figure 5 (as shown blow) is a sub-tree of nexthop, it's under the - nexthop base node. + nexthop base node and shows that structure of the "base" nexthop. +--:(nexthop-base) | +--rw nexthop-base | +--rw (nexthop-base-type)? | +--:(special-nexthop) | | +--rw special? special-nexthop-def | +--:(egress-interface-nexthop) | | +--rw outgoing-interface if:interface-ref | +--:(ipv4-address-nexthop) | | +--rw ipv4-address inet:ipv4-address @@ -486,225 +519,301 @@ | | +--rw outgoing-interface if:interface-ref | | +--rw ipv6-address inet:ipv6-address | +--:(egress-interface-mac-nexthop) | | +--rw egress-interface-mac-address | | +--rw outgoing-interface if:interface-ref | | +--rw ieee-mac-address uint32 | +--:(tunnel-encap-nexthop) {nexthop-tunnel}? | | +--rw tunnel-encap | | +--rw (tunnel-type)? | | +--:(ipv4) {ipv4-tunnel}? + | | | +--rw ipv4-header | | | +--rw src-ipv4-address inet:ipv4-address | | | +--rw dest-ipv4-address inet:ipv4-address | | | +--rw protocol uint8 | | | +--rw ttl? uint8 | | | +--rw dscp? uint8 | | +--:(ipv6) {ipv6-tunnel}? + | | | +--rw ipv6-header | | | +--rw src-ipv6-address inet:ipv6-address | | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw next-header uint8 | | | +--rw traffic-class? uint8 | | | +--rw flow-label? uint16 | | | +--rw hop-limit? uint8 | | +--:(mpls) {mpls-tunnel}? + | | | +--rw mpls-header | | | +--rw label-operations* [label-oper-id] | | | +--rw label-oper-id uint32 | | | +--rw (label-actions)? | | | +--:(label-push) | | | | +--rw label-push | | | | +--rw label uint32 | | | | +--rw s-bit? boolean | | | | +--rw tc-value? uint8 | | | | +--rw ttl-value? uint8 | | | +--:(label-swap) | | | +--rw label-swap | | | +--rw in-label uint32 | | | +--rw out-label uint32 | | | +--rw ttl-action? ttl-action-def | | +--:(gre) {gre-tunnel}? + | | | +--rw gre-header | | | +--rw (dest-address-type)? | | | | +--:(ipv4) | | | | | +--rw ipv4-dest inet:ipv4-address | | | | +--:(ipv6) | | | | +--rw ipv6-dest inet:ipv6-address | | | +--rw protocol-type uint16 | | | +--rw key? uint64 | | +--:(nvgre) {nvgre-tunnel}? + | | | +--rw nvgre-header | | | +--rw (nvgre-type)? | | | | +--:(ipv4) | | | | | +--rw src-ipv4-address inet:ipv4-address | | | | | +--rw dest-ipv4-address inet:ipv4-address | | | | | +--rw protocol uint8 | | | | | +--rw ttl? uint8 | | | | | +--rw dscp? uint8 | | | | +--:(ipv6) | | | | +--rw src-ipv6-address inet:ipv6-address | | | | +--rw dest-ipv6-address inet:ipv6-address | | | | +--rw next-header uint8 | | | | +--rw traffic-class? uint8 | | | | +--rw flow-label? uint16 | | | | +--rw hop-limit? uint8 | | | +--rw virtual-subnet-id uint32 | | | +--rw flow-id? uint16 | | +--:(vxlan) {vxlan-tunnel}? + | | +--rw vxlan-header | | +--rw (vxlan-type)? | | | +--:(ipv4) | | | | +--rw src-ipv4-address inet:ipv4-address | | | | +--rw dest-ipv4-address inet:ipv4-address | | | | +--rw protocol uint8 | | | | +--rw ttl? uint8 | | | | +--rw dscp? uint8 | | | +--:(ipv6) | | | +--rw src-ipv6-address inet:ipv6-address | | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw next-header uint8 | | | +--rw traffic-class? uint8 | | | +--rw flow-label? uint16 | | | +--rw hop-limit? uint8 | | +--rw vxlan-identifier uint32 - | +--:(tunnel-decap-nexthp) {nexthop-tunnel}? + | +--:(tunnel-decap-nexthop) {nexthop-tunnel}? | | +--rw tunnel-decap | | +--rw (tunnel-type)? | | +--:(ipv4) {ipv4-tunnel}? | | | +--rw ipv4-decap | | | +--rw ipv4-decap tunnel-decap-action-def | | | +--rw ttl-action? ttl-action-def | | +--:(ipv6) {ipv6-tunnel}? | | | +--rw ipv6-decap | | | +--rw ipv6-decap tunnel-decap-action-def | | | +--rw hop-limit-action? hop-limit-action-def | | +--:(mpls) {mpls-tunnel}? | | +--rw label-pop | | +--rw label-pop mpls-label-action-def | | +--rw ttl-action? ttl-action-def | +--:(logical-tunnel-nexthop) {nexthop-tunnel}? | | +--rw logical-tunnel | | +--rw tunnel-type tunnel-type-def | | +--rw tunnel-name string | +--:(rib-name-nexthop) - | +--rw rib-name? string + | | +--rw rib-name? string + | +--:(nexthop-identifier) + | +--rw nexthop-ref nexthop-ref + Figure 5: Nexthop Base Structure 2.5. RPC Operations This module defines the following RPC operations: o rib-add: It is defined to add a rib to a routing instance. A name of the rib, address family of the rib and whether the RPF check is enabled are passed as the input parameters. The output is the - result of the add operation: 1 means success, and 0 means failed. + result of the add operation: + + * true - success; + + * false - failed; when failed, the i2rs agent may return the + specific reason that causes the failure. o rib-delete: It is defined to delete a rib from a routing instance. When a rib is deleted, all routes installed in the rib will be deleted. A name of the rib is passed as the input parameter. The - output is the result of the delete operation: 1 means success, and - 0 means failed. + output is the result of the delete operation: + + * true - success; + + * false - failed; when failed, the i2rs agent may return the + specific reason that causes the failure. o route-add: It is defined to add a route or a set of routes to a rib. A rib name, the route prefix(es), route attributes, route - vendor attributes and nexthop are passed as the input parameters. - The output is the result of the add operation: 1 means success, - and 0 means failed. Before calling the route-add rpc, it is - required to call the nh-add rpc to create and/or return the - nexthop identifier. + vendor attributes, nexthop and whether return failure detail are + passed as the input parameters. Before calling the route-add rpc, + it is required to call the nh-add rpc to create and/or return the + nexthop identifier. The output is a combination of the route + operation states that include: + + * success-count: the numbers of routes that are successfully + added; + + * failed-count: the numbers of the routes that are failed to be + added; + + * failure-detail: shows the specific failed routes that failure + reason. o route-delete: It is defined to delete a route or a set of routes - from a rib. A name of the rib and the route prefix(es) are passed - as the input parameters. The output is the result of the delete - operation: 1 means success, and 0 means failed. + from a rib. A name of the rib, the route prefix(es) and whether + return failure detail are passed as the input parameters. The + output is combination of the route operation states that include: + + * success-count: the numbers of routes that are successfully + deleted; + + * failed-count: the numbers of the routes that are failed to be + deleted; + + * failure-detail: shows the specific failed routes that failure + reason. o route-update: It is defined to update a route or a set of routes. A rib name, the route prefix(es), or route attributes, or route vendor attributes, or nexthop are passed as the input parameters. The match conditions can be either route prefix(es), or route attributes, or route vendor attributes, or nexthop. The update actions include: update the nexthop, update the route attributes, - update the route vendor attributes. The output is the result of - the update operation: 1 means success, and 0 means failed. + update the route vendor attributes. The output is combination of + the route operation states that include: + + * success-count: the numbers of routes that are successfully + updated; + + * failed-count: the numbers of the routes that are failed to be + updated; + + * failure-detail: shows the specific failed routes that failure + reason. o nh-add: It is defined to add a nexthop to a rib. A name of the rib and a nexthop are passed as the input parameters. The network - node is required to allocate a nexhop identifier to the nexthop. - The outputs include the result of the update operation (1 means - success, and 0 means failed ) and the nexthop identifier that is - allocated to the nexthop. + node is required to allocate a nexthop identifier to the nexthop. + The outputs include the result of the nexthop add operation. + + * true - success; when success, a nexthop identifier will be + returned to the i2rs client. + + * false - failed; when failed, the i2rs agent may return the + specific reason that causes the failure. o nh-delete: It is defined to delete a nexthop from a rib. A name of a rib and a nexthop or nexthop identifier are passed as the input parameters. The output is the result of the delete - operation: 1 means success, 0 means failed. + operation: + + * true - success; + + * false - failed; when failed, the i2rs agent may return the + specific reason that causes the failure. The structure tree of rpcs is showing in following figure. rpcs: +---x rib-add - | +--ro input - | | +--ro rib-name string - | | +--ro rib-family rib-family-def - | | +--ro ip-rpf-check? boolean + | +---w input + | | +---w rib-name string + | | +---w rib-family rib-family-def + | | +---w ip-rpf-check? boolean | +--ro output - | +--ro result boolean + | +--ro result uint32 + | +--ro reason? string +---x rib-delete - | +--ro input - | | +--ro rib-name string + | +---w input + | | +---w rib-name string | +--ro output - | +--ro result boolean + | +--ro result uint32 + | +--ro reason? string +---x route-add - | +--ro input - | | +--ro rib-name string - | | +--ro routes - | | +--ro route-list* [route-index] + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w routes + | | +---w route-list* [route-index] | | ... | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x route-delete - | +--ro input - | | +--ro rib-name string - | | +--ro routes - | | +--ro route-list* [route-index] + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w routes + | | +---w route-list* [route-index] | | ... + | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x route-update - | +--ro input - | | +--ro rib-name string - | | +--ro (match-conditions)? + | +---w input + | | +---w return-failure-detail? boolean + | | +---w rib-name string + | | +---w (match-options)? | | +--:(match-route-prefix) | | | ... | | +--:(match-route-attributes) | | | ... - | | +--:(match-route-vendor-attributes) {..vendor-attributes}? + | | +--:(match-route-vendor-attributes) {...}? | | | ... | | +--:(match-nexthop) | | ... | +--ro output - | +--ro result boolean + | +--ro success-count uint32 + | +--ro failed-count uint32 + | +--ro failure-detail + | +--ro failed-routes* [route-index] + | +--ro route-index uint32 + | +--ro error-code? uint32 +---x nh-add - | +--ro input - | | +--ro rib-name string - | | +--ro nexthop-id uint32 - | | +--ro sharing-flag boolean - | | +--ro (nexthop-type)? + | +---w input + | | +---w rib-name string + | | +---w nexthop-id? uint32 + | | +---w sharing-flag? boolean + | | +---w (nexthop-type)? | | ... | +--ro output - | +--ro result boolean - | +--ro nexthop-id uint32 + | +--ro result uint32 + | +--ro reason? string + | +--ro nexthop-id? uint32 +---x nh-delete - +--ro input - | +--ro rib-name string - | +--ro nexthop-id uint32 - | +--ro sharing-flag boolean - | +--ro (nexthop-type)? + +---w input + | +---w rib-name string + | +---w nexthop-id? uint32 + | +---w sharing-flag? boolean + | +---w (nexthop-type)? | ... +--ro output - +--ro result boolean - + +--ro result uint32 + +--ro reason? string Figure 6: RPCs Structure 2.6. Notifications Asynchronous notifications are sent by the RIB manager of a network device to an external entity when some event triggers on the network device. A RIB data-model MUST support sending 2 kind of asynchronous notifications. 1. Route change notification: @@ -769,21 +878,21 @@ | +--:(interface-route) | ... +--ro route-installed-state route-installed-state-def +--ro route-state route-state-def +--ro route-change-reason route-reason-def Figure 7: Notifications Structure 3. YANG Modules - // file "ietf i2rs rib@2015-10-28.yang" + file "ietf-i2rs-rib@2015-11-20.yang" module ietf-i2rs-rib { namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; // replace with iana namespace when assigned prefix "iir"; import ietf-inet-types { prefix inet; //rfc6991 } @@ -821,54 +930,54 @@ Editor: Sriganesh Kini Editor: Nitin Bahadur "; description "This module defines a YANG data model for Routing Information Base (RIB) that aligns with the I2RS RIB information model."; - revision "2015-10-28" { + revision "2015-11-20" { description "initial revision"; - reference "draft-ietf-i2rs-rib-info-model-08"; + reference "draft-ietf-i2rs-data-model-04"; } //Features feature nexthop-tunnel { description "This feature means that a node support - tunnel nexhtop capability."; + tunnel nexthop capability."; } feature nexthop-chain { description "This feature means that a node support - chain nexhtop capability."; + chain nexthop capability."; } feature nexthop-protection { description "This feature means that a node support - protection nexhtop capability."; + protection nexthop capability."; } feature nexthop-replicates { description "This feature means that a node support - relicates nexhtop capability."; + relicates nexthop capability."; } feature nexthop-load-balance { description "This feature means that a node support - load balance nexhtop capability."; + load balance nexthop capability."; } feature ipv4-tunnel { description "This feature means that a node support IPv4 tunnel encapsulation capability."; } feature ipv6-tunnel { description @@ -969,27 +1078,21 @@ type identityref { base "tunnel-decap-action"; } description "Tunnel decap def."; } identity ttl-action { description "Base identify from which all TTL - actions are derived. - The tll actions include: - - ttl-no-action: do nothing regarding the TTL, or - - ttl-copy-to-inner: copy the TTL of the outer - header to inner header, or - - ttl-decrease-and-copy-to-inner: Decrease the TTL - by one and copy it to inner header."; + actions are derived."; } identity no-action { base "ttl-action"; description "Do nothing regarding the TTL."; } identity copy-to-inner { base "ttl-action"; @@ -1377,33 +1481,45 @@ "Route reason def."; } typedef nexthop-preference-def { type uint8 { range "1..99"; } description "Nexthop-preference is used for protection schemes. It is an integer value between 1 and 99. A lower - value indicates higher preference. To download a - primary/standby/tertiary group to the FIB, the - nexthops that are resolved and have two highest - preferences are selected."; + value indicates higher preference. To download N + nexthops to the FIB, the N nexthops with the lowest + value are selected."; } typedef nexthop-lb-weight-def { type uint8 { range "1..99"; } description "Nhop-lb-weight is a number between 1 and 99."; } + typedef nexthop-ref { + type leafref { + path "/iir:routing-instance" + + "/iir:rib-list" + + "/iir:route-list" + + "/iir:nexthop" + + "/iir:nexthop-id"; + } + description + "A nexthop reference that provides + an indirection reference to a nexthop."; + } + //Groupings grouping route-prefix { description "The common attributes used for all types of route prefix."; leaf route-index { type uint64 ; mandatory true; description "Route index."; } @@ -1521,21 +1637,21 @@ "MPLS route case."; leaf mpls-label { type uint32 ; mandatory true; description "The label used for matching."; } } case mac-route { description - "MAC rib case."; + "MAC route case."; leaf mac-address { type uint32 ; mandatory true; description "The MAC address used for matching."; } } case interface-route { description "Interface route case."; @@ -1538,28 +1654,29 @@ } case interface-route { description "Interface route case."; leaf interface-identifier { type if:interface-ref; mandatory true; description "The interface used for matching."; } + } } } } grouping route { description - "The common attributes usesd for all types of route."; + "The common attributes used for all types of route."; uses route-prefix; container nexthop { description "The nexthop of the route."; uses nexthop; } container route-statistic { description "The statistic information of the route."; leaf route-state { @@ -1665,27 +1780,25 @@ the load balance nexthops."; } } } grouping nexthop { description "The nexthop structure."; leaf nexthop-id { type uint32; - mandatory true; description - "The nexthop identifier of a nexthop."; + "An identifier that refers to a nexthop."; } leaf sharing-flag { type boolean; - mandatory true; description "To indicate whether a nexthop is sharable or non-sharable. true - sharable, means the nexthop can be shared with other routes false - non-sharable, means the nexthop can not be shared with other routes."; } choice nexthop-type { description @@ -1779,23 +1892,24 @@ } leaf ipv4-address { type inet:ipv4-address; mandatory true; description "The nexthop points to an interface with an IPv4 address."; } description "The nexthop is an Egress-interface and an ip - address.This can be usesd in cases e.g.where + address.This can be used in cases e.g.where the ip address is a link-local address."; } + } case egress-interface-ipv6-nexthop { container egress-interface-ipv6-address { leaf outgoing-interface { type if:interface-ref; mandatory true; description "Name of the outgoing interface."; } leaf ipv6-address { @@ -1800,21 +1914,21 @@ } leaf ipv6-address { type inet:ipv6-address; mandatory true; description "The nexthop points to an interface with an IPv6 address."; } description "The nexthop is an Egress-interface and an ip - address.This can be usesd in cases e.g.where + address.This can be used in cases e.g.where the ip address is a link-local address."; } } case egress-interface-mac-nexthop { container egress-interface-mac-address { leaf outgoing-interface { type if:interface-ref; mandatory true; description "Name of the outgoing interface."; @@ -1840,21 +1954,21 @@ "This can be an encap representing an IP tunnel or MPLS tunnel or others as defined in info model. An optional egress interface can be chained to the tunnel encap to indicate which interface to send the packet out on. The egress interface is useful when the network device contains Ethernet interfaces and one needs to perform address resolution for the IP packet."; } } - case tunnel-decap-nexthp { + case tunnel-decap-nexthop { if-feature nexthop-tunnel; container tunnel-decap { uses tunnel-decap; description "This is to specify decapsulating a tunnel header."; } } case logical-tunnel-nexthop { if-feature nexthop-tunnel; container logical-tunnel { @@ -1867,23 +1981,30 @@ } case rib-name-nexthop { leaf rib-name { type string; description "A nexthop pointing to a rib indicates that the route lookup needs to continue in The specified rib. This is a way to perform chained lookups."; } } + case nexthop-identifier { + leaf nexthop-ref { + type nexthop-ref; + mandatory true; + description + "A nexthop reference that points to a nexthop."; + } + } } } - grouping route-vendor-attributes { description "Route vendor attributes."; } grouping logical-tunnel { description "A logical tunnel that is identified by a type and a tunnel name."; leaf tunnel-type { @@ -2124,49 +2244,74 @@ - No-action, or - Copy to inner label,or - Decrease (the in label) by 1 and copy to the out label."; } } } } } } + grouping tunnel-encap{ description "Tunnel encapsulation inforamtion."; choice tunnel-type { description "Tunnel options for next-hops."; case ipv4 { if-feature ipv4-tunnel; + container ipv4-header { uses ipv4-header; + description + "IPv4 header."; + } } case ipv6 { if-feature ipv6-tunnel; + container ipv6-header { uses ipv6-header; + description + "IPv6 header."; + } } case mpls { if-feature mpls-tunnel; + container mpls-header { uses mpls-header; + description + "MPLS header."; + } } case gre { if-feature gre-tunnel; + container gre-header { uses gre-header; + description + "GRE header."; + } } case nvgre { if-feature nvgre-tunnel; + container nvgre-header { uses nvgre-header; + description + "NvGRE header."; + } } case vxlan { if-feature vxlan-tunnel; + container vxlan-header { uses vxlan-header; + description + "VxLAN header."; + } } } } grouping tunnel-decap { description "Tunnel decapsulation inforamtion."; choice tunnel-type { description "Nexthop tunnel type options."; @@ -2369,22 +2513,28 @@ prevent spoofing and limit malicious traffic."; } } output { leaf result { type boolean; mandatory true; description "Return the result of the rib-add operation. true - success; - false - failed."; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that causes the failure."; } + } } rpc rib-delete { description "To delete a rib from a routing instance. After deleting the rib, all routes installed in the rib will be deleted as well."; input { leaf rib-name { @@ -2395,263 +2545,306 @@ that is to be deleted."; } } output { leaf result { type boolean; mandatory true; description "Return the result of the rib-delete operation. true - success; - false - failed."; + false - failed"; + } + leaf reason { + type string; + description + "The specific reason that causes failure."; + } + } + } + + grouping route-operation-state { + description + "Route operation state."; + leaf success-count { + type uint32; + mandatory true; + description + "The numbers of routes that are successfully + added/deleted/updated."; + } + leaf failed-count { + type uint32; + mandatory true; + description + "The numbers of the routes that are failed + to be added/deleted/updated."; + } + container failure-detail { + description + "The failure detail reflects the reason why a route + operation fails. It is a array that includes the route + index and error code of the failed route."; + list failed-routes { + key "route-index"; + description + "The list of failed routes."; + leaf route-index { + type uint32; + description + "The route index of the failed route."; + } + leaf error-code { + type uint32; + description + "The error code that reflects the failure reason."; + } } } } rpc route-add { description "To add a route or a list of route to a rib"; input { + leaf return-failure-detail { + type boolean; + default false; + description + "Whether return the failure detail. + true - return the failure detail; + false - do not return the failure detail; + the default is false."; + } leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } container routes { description "The routes to be added to the rib."; list route-list { key "route-index"; description "The list of routes to be added."; uses route-prefix; container route-attributes { uses route-attributes; description - "Route attributes."; + "The route attributes."; } container route-vendor-attributes { if-feature route-vendor-attributes; uses route-vendor-attributes; description - "Route vendor attributes."; + "The route vendor attributes."; } container nexthop { uses nexthop; description - "Nexthop."; + "The nexthop of the added route."; } } } } output { - leaf result { - type boolean; - mandatory true; - description - "Return the result of the route-add operation. - true - success; - false - failed."; - } + uses route-operation-state; } } rpc route-delete { description "To delete a route or a list of route from a rib"; input { + leaf return-failure-detail { + type boolean; + default false; + description + "Whether return the failure detail. + true - return the failure detail; + false - do not return the failure detail; + the default is false."; + } leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } container routes { description "The routes to be added to the rib."; list route-list{ key "route-index"; description "The list of routes to be deleted."; uses route-prefix; } } } output { - leaf result { - type boolean ; - mandatory true; + uses route-operation-state; + } + } + + grouping route-update-options { description - "Return the result of the route-delete operation. - true - success; - false - failed."; + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes."; + choice update-options { + description + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes."; + case update-nexthop { + container updated-nexthop { + uses nexthop; + description + "The nexthop used for updating."; + } + } + case update-route-attributes { + container updated-route-attr { + uses route-attributes; + description + "The route attributes used for updating."; + } + } + case update-route-vendor-attributes { + container updated-route-vendor-attr { + uses route-vendor-attributes; + description + "The vender route attributes used for updating."; + } + } } } rpc route-update { description "To update a route or a list of route of a rib. The inputs: 1. The match conditions, could be: a. route prefix, or - b. route attribtes, or + b. route attributes, or c. nexthop; 2. The update parameters to be used: - a. new nexhop; - b. new route attributes; + a. new nexthop; + b. new route attributes;nexthop Actions: 1. update the nexthop 2. update the route attributes The outputs: - true - success; - false - failed. + success-count - the number of routes updated; + failed-count - the number of routes fail to update + failure-detail - the detail failure info. "; input { + leaf return-failure-detail { + type boolean; + default false; + description + "Whether return the failure detail. + true - return the failure detail; + false - do not return the failure detail; + the default is false."; + } leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } - - choice match-conditions { + choice match-options { description "Match options."; case match-route-prefix { description "Update the routes that match route prefix(es) condition."; container input-routes { description "The matched routes to be updated."; list route-list { key "route-index"; description "The list of routes to be updated."; uses route-prefix; - choice update-actions-prefix { - description - "Update actions: - 1. update the nexthop - 2. update the route attributes - 3. update the route-vendor-attributes. - "; - case update-nexthop { - uses nexthop; - } - case update-route-attributes { - uses route-attributes; - } - case update-route-vendor-attributes { - if-feature route-vendor-attributes; - uses route-vendor-attributes; - } - } + uses route-update-options; } } } case match-route-attributes { description "Update the routes that match the route attributes condition."; container input-route-attributes { description "The route attributes are used for matching."; uses route-attributes; } - choice update-actions-attributes { + container update-parametors { description - "Update actions: + "Update options: 1. update the nexthop 2. update the route attributes 3. update the route-vendor-attributes."; - case update-nexthop { - uses nexthop; - } - case update-route-attributes { - uses route-attributes; - } - case update-route-vendor-attributes { - if-feature route-vendor-attributes; - uses route-vendor-attributes; - } + uses route-update-options; } } case match-route-vendor-attributes { if-feature route-vendor-attributes; description "Update the routes that match the vendor attributes condition"; container input-route-vendor-attributes { description "The vendor route attributes are used for matching."; uses route-vendor-attributes; } - choice update-actions-vendor-attributes { + container update-parameters-vendor { description - "Update actions: + "Update options: 1. update the nexthop 2. update the route attributes 3. update the route-vendor-attributes."; - case update-nexthop { - uses nexthop; - } - case update-route-attributes { - uses route-attributes; - } - case update-route-vendor-attributes { - uses route-vendor-attributes; - } + uses route-update-options; } } case match-nexthop { description "Update the routes that match the nexthop."; container input-nexthop { description "The nexthop used for matching."; uses nexthop; - } - - choice update-actions-nexthop { + container update-parameters-nexthop { description - "Update actions: - 1. update nexthop - 2. update route attributes - 3. update route-vendor-attributes."; - case update-nexthop { - uses nexthop; - } - case update-route-attributes { - uses route-attributes; - } - case update-route-vendor-attributes { - if-feature route-vendor-attributes; - uses route-vendor-attributes; - } + "Update options: + 1. update the nexthop + 2. update the route attributes + 3. update the route-vendor-attributes."; + uses route-update-options; } } } } output { - leaf result { - type boolean ; - mandatory true; - description - "Return the result of the route-update operation. - true - success; - false - failed."; - } + uses route-operation-state; } } rpc nh-add { description "To add a nexthop to a rib. Inputs parameters: 1. rib name 2. nexthop; Actions: @@ -2668,27 +2861,31 @@ description "A reference to the name of a rib."; } uses nexthop; } output { leaf result { type boolean ; mandatory true; description - "Return the result of the nh-add operation. + "Return the result of the rib-add operation. true - success; - false - failed."; + false - failed;"; + } + leaf reason { + type string; + description + "The specific reason that causes the failure."; } leaf nexthop-id { type uint32; - mandatory true; description "A nexthop identifer that is allocated to the nexthop."; } } } rpc nh-delete { description "To delete a nexthop from a rib"; input { @@ -2698,28 +2895,31 @@ description "A reference to the name of a rib."; } uses nexthop; } output { leaf result { type boolean ; mandatory true; description - "Return the result of the nh-delete operation. + "Return the result of the rib-add operation. true - success; false - failed."; } + leaf reason { + type string; + description + "The specific reason that causes the failure."; + } } - } - /*Notifications*/ notification nexthop-resolution-status-change { description "Nexthop resolution status (resolved/unresolved) notification."; container nexthop{ description "The nexthop."; uses nexthop; } @@ -2763,21 +2963,21 @@ } leaf route-change-reason { type route-reason-def; mandatory true; description "Return the reason that causes the route change."; } } } - // + 4. IANA Considerations This document requests to register a URI in the "IETF XML registry" [RFC3688]: -------------------------------------------------------------------- URI: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib Registrant Contact: The IESG.XML: N/A, the requested URI is an XML namespace.