--- 1/draft-ietf-i2rs-rib-data-model-02.txt 2015-11-01 23:15:36.981568315 -0800 +++ 2/draft-ietf-i2rs-rib-data-model-03.txt 2015-11-01 23:15:37.169572913 -0800 @@ -1,26 +1,26 @@ Network Working Group L. Wang Internet-Draft Individual Intended status: Standards Track H. Ananthakrishnan -Expires: April 20, 2016 Packet Design +Expires: May 4, 2016 Packet Design M. Chen Huawei A. Dass S. Kini Ericsson N. Bahadur Bracket Computing - October 18, 2015 + November 1, 2015 A YANG Data Model for Routing Information Base (RIB) - draft-ietf-i2rs-rib-data-model-02 + draft-ietf-i2rs-rib-data-model-03 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 April 20, 2016. + This Internet-Draft will expire on May 4, 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 @@ -61,30 +61,30 @@ 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.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 14 + 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 13 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 16 - 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 18 - 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 58 - 5. Security Considerations . . . . . . . . . . . . . . . . . . . 58 - 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 58 - 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 59 - 7.1. Normative References . . . . . . . . . . . . . . . . . . 59 - 7.2. Informative References . . . . . . . . . . . . . . . . . 59 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59 + 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 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). @@ -123,71 +123,70 @@ 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. - module: i2rs-rib + 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 +--rw rib-family rib-family-def - +--rw enable-ip-rpf-check? boolean + +--rw ip-rpf-check? boolean +--rw route-list* [route-index] +--rw route-index uint64 - +--rw route-type route-type-def +--rw match - | +--rw (rib-route-type)? + | +--rw (route-type)? | +--:(ipv4) | | ... | +--:(ipv6) | | ... | +--:(mpls-route) | | ... | +--:(mac-route) | | ... | +--:(interface-route) | ... +--rw nexthop | +--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}? - | | ... - | +--:(nexthop-replicates) {nexthop-replicates}? | ... +--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 enable-ip-rpf-check? boolean + | | +--ro ip-rpf-check? boolean | +--ro output | +--ro result boolean +---x rib-delete | +--ro input | | +--ro rib-name string | +--ro output | +--ro result boolean +---x route-add | +--ro input | | +--ro rib-name string @@ -205,90 +204,99 @@ | +--ro output | +--ro result boolean +---x route-update | +--ro input | | +--ro rib-name string | | +--ro (match-conditions)? | | +--:(match-route-prefix) | | | ... | | +--:(match-route-attributes) | | | ... + | | +--:(match-route-vendor-attributes) {...vendor-attributes}? + | | | ... | | +--:(match-nexthop) | | ... | +--ro output | +--ro result boolean +---x nh-add | +--ro input | | +--ro rib-name string | | +--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}? - | | | ... - | | +--:(nexthop-replicates) {nexthop-replicates}? | | ... | +--ro output | +--ro result boolean | +--ro nexthop-id uint32 +---x nh-delete +--ro input | +--ro rib-name string - | +--ro (nexthop-context-or-id)? - | +--:(nexthop-context) + | +--ro nexthop-id uint32 + | +--ro sharing-flag boolean + | +--ro (nexthop-type)? + | +--:(nexthop-base) | | ... - | +--:(nexthop-identifier) - | +--ro nexthop-identifer uint32 + | +--:(nexthop-chain) {nexthop-chain}? + | | ... + | +--:(nexthop-replicates) {nexthop-replicates}? + | | ... + | +--:(nexthop-protection) {nexthop-protection}? + | | ... + | +--:(nexthop-load-balance) {nexthop-load-balance}? + | ... +--ro output +--ro result boolean notifications: +---n nexthop-resolution-status-change | +--ro nexthop | | +--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}? - | | | ... - | | +--:(nexthop-replicates) {nexthop-replicates}? | | ... | +--ro nexthop-state nexthop-state-def +---n route-change +--ro rib-name string +--ro rib-family rib-family-def +--ro route-index uint64 - +--ro route-type route-type-def +--ro match - | +--ro (rib-route-type)? + | +--ro (route-type)? | +--:(ipv4) | | ... | +--:(ipv6) | | ... | +--:(mpls-route) | | ... | +--:(mac-route) | | ... | +--:(interface-route) | ... +--ro route-installed-state route-installed-state-def +--ro route-state route-state-def - +--ro route-reason route-reason-def + +--ro route-change-reason route-reason-def Figure 1: Overview of I2RS Rib Module Structure 2.1. RIB Capability RIB capability negotiation is very important because not all of the hardware will be able to support all kinds of nexthops and there should be a limitation on how many levels of lookup can be practically performed. Therefore, a RIB data model MUST specify a way for an external entity to learn about the functional capabilities @@ -323,23 +331,23 @@ +--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 enable-ip-rpf-check? boolean + +--rw ip-rpf-check? boolean +--rw route-list* [route-index] - ... (refer to Sec.2.3) + ... (refer to Section 2.3) Figure 2: Routing Instance Stuture 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 @@ -354,51 +362,48 @@ 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. +--rw route-list* [route-index] +--rw route-index uint64 - +--rw route-type route-type-def +--rw match - | +--rw (rib-route-type)? + | +--rw (route-type)? | +--:(ipv4) | | +--rw ipv4 - | | +--rw ipv4-route-type match-ip-route-type-def - | | +--rw (match-ip-route-type)? + | | +--rw (ip-route-match-type)? | | +--:(dest-ipv4-address) | | | ... | | +--:(src-ipv4-address) | | | ... | | +--:(dest-src-ipv4-address) | | ... | +--:(ipv6) | | +--rw ipv6 - | | +--rw ipv6-route-type match-ip-route-type-def - | | +--rw (match-ip-route-type)? + | | +--rw (ip-route-match-type)? | | +--:(dest-ipv6-address) | | | ... | | +--:(src-ipv6-address) | | | ... | | +--:(dest-src-ipv6-address) | | ... | +--:(mpls-route) | | +--rw mpls-label uint32 | +--:(mac-route) | | +--rw mac-address uint32 | +--:(interface-route) | +--rw interface-identifier if:interface-ref +--rw nexthop - | ...(refer to Sec.2.4) + | ...(refer to Section 2.4) Figure 3: Routes Structure 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 @@ -431,40 +437,40 @@ The structure tree of nexthop is shown in the following figures. +--rw nexthop | +--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-chain* [nexthop-chain-member-id] -| | +--rw nexthop-chain-member-id uint32 + | | +--rw nexthop-list* [nexthop-member-id] + | | +--rw nexthop-member-id uint32 + | +--:(nexthop-replicates) {nexthop-replicates}? + | | +--rw nexthop-replicates + | | +--rw nexthop-list* [nexthop-member-id] + | | +--rw nexthop-member-id uint32 | +--:(nexthop-protection) {nexthop-protection}? | | +--rw nexthop-protection -| | +--rw nexthop-protection-list* [...-member-id] -| | +--rw nexthop-protection-member-id uint32 + | | +--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-lb -| | +--rw nexthop-lbs* [nexthop-lbs-member-id] -| | +--rw nexthop-lbs-member-id uint32 -| | +--rw nhop-lb-weight nhop-lb-weight-def -| +--:(nexthop-replicates) {nexthop-replicates}? -| +--rw nexthop-replicates -| +--rw nexthop-replicates* [nexthop-replicates-member-id] -| +--rw nexthop-replicates-member-id uint32 + | +--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 6 (as shown blow) is a sub-tree of nexthop, it's under the + Figure 5 (as shown blow) is a sub-tree of nexthop, it's under the nexthop base node. +--:(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) @@ -480,59 +486,65 @@ | | +--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 source-ipv4-address inet:ipv4-address - | | | +--rw destination-ipv4-address inet:ipv4-address + | | | +--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 source-ipv6-address inet:ipv6-address - | | | +--rw destination-ipv6-address inet:ipv6-address + | | | +--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-action-type)? - | | | +--:(mpls-push) - | | | | +--rw mpls-push boolean - | | | | +--rw mpls-label uint32 + | | | +--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 - | | | +--:(mpls-swap) - | | | +--rw mpls-swap boolean - | | | +--rw mpls-in-label uint32 - | | | +--rw mpls-out-label uint32 + | | | +--:(label-swap) + | | | +--rw label-swap + | | | +--rw in-label uint32 + | | | +--rw out-label uint32 | | | +--rw ttl-action? ttl-action-def | | +--:(gre) {gre-tunnel}? - | | | +--rw gre-ip-destination inet:ipv4-address - | | | +--rw gre-protocol-type inet:ipv4-address - | | | +--rw gre-key? uint64 + | | | +--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-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 source-ipv6-address inet:ipv6-address + | | | | +--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-type)? | | | +--:(ipv4) @@ -541,43 +553,42 @@ | | | | +--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 + | | +--rw vxlan-identifier uint32 | +--:(tunnel-decap-nexthp) {nexthop-tunnel}? | | +--rw tunnel-decap | | +--rw (tunnel-type)? | | +--:(ipv4) {ipv4-tunnel}? | | | +--rw ipv4-decap - | | | +--rw ipv4-decap boolean + | | | +--rw ipv4-decap tunnel-decap-action-def | | | +--rw ttl-action? ttl-action-def | | +--:(ipv6) {ipv6-tunnel}? | | | +--rw ipv6-decap - | | | +--rw ipv6-decap boolean + | | | +--rw ipv6-decap tunnel-decap-action-def | | | +--rw hop-limit-action? hop-limit-action-def | | +--:(mpls) {mpls-tunnel}? - | | +--rw mpls-pop - | | +--rw mpls-pop boolean + | | +--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 - 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. @@ -622,73 +633,74 @@ input parameters. The output is the result of the delete operation: 1 means success, 0 means failed. 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 enable-ip-rpf-check? boolean + | | +--ro ip-rpf-check? boolean | +--ro output | +--ro result boolean +---x rib-delete | +--ro input | | +--ro rib-name string | +--ro output | +--ro result boolean +---x route-add | +--ro input | | +--ro rib-name string | | +--ro routes + | | +--ro route-list* [route-index] | | ... | +--ro output | +--ro result boolean +---x route-delete | +--ro input | | +--ro rib-name string | | +--ro routes + | | +--ro route-list* [route-index] | | ... | +--ro output | +--ro result boolean +---x route-update | +--ro input | | +--ro rib-name string | | +--ro (match-conditions)? | | +--:(match-route-prefix) | | | ... | | +--:(match-route-attributes) | | | ... - | | +--:(match-vendor-route-attributes) + | | +--:(match-route-vendor-attributes) {..vendor-attributes}? | | | ... | | +--:(match-nexthop) | | ... | +--ro output | +--ro result boolean +---x nh-add | +--ro input | | +--ro rib-name string | | +--ro nexthop-id uint32 | | +--ro sharing-flag boolean | | +--ro (nexthop-type)? | | ... | +--ro output | +--ro result boolean | +--ro nexthop-id uint32 +---x nh-delete +--ro input | +--ro rib-name string - | +--ro (nexthop-context-or-id)? - | +--:(nexthop-context) - | | ... - | +--:(nexthop-identifier) + | +--ro nexthop-id uint32 + | +--ro sharing-flag boolean + | +--ro (nexthop-type)? | ... +--ro output +--ro result boolean 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 @@ -726,99 +738,113 @@ notifications: +---n nexthop-resolution-status-change | +--ro nexthop | | +--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}? - | | | ... - | | +--:(nexthop-replicates) {nexthop-replicates}? | | ... | +--ro nexthop-state nexthop-state-def +---n route-change +--ro rib-name string +--ro rib-family rib-family-def +--ro route-index uint64 - +--ro route-type route-type-def +--ro match - | +--ro (rib-route-type)? + | +--ro (route-type)? | +--:(ipv4) | | ... | +--:(ipv6) | | ... | +--:(mpls-route) | | ... | +--:(mac-route) | | ... | +--:(interface-route) | ... +--ro route-installed-state route-installed-state-def +--ro route-state route-state-def - +--ro route-reason route-reason-def + +--ro route-change-reason route-reason-def Figure 7: Notifications Structure 3. YANG Modules - // file "i2rs rib@2015-10-17.yang" + // file "ietf i2rs rib@2015-10-28.yang" - module i2rs-rib { - namespace "urn:ietf:params:xml:ns:yang:i2rs-rib"; + module ietf-i2rs-rib { + namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; // replace with iana namespace when assigned - prefix "i2rs-rib"; - + prefix "iir"; import ietf-inet-types { prefix inet; //rfc6991 } import ietf-interfaces { prefix "if"; } import ietf-yang-types { prefix yang; } organization - "IETF I2RS WG"; + "IETF I2RS (Interface to Routing System) Working Group"; contact - "email: wang_little_star@sina.com - email: hari@packetdesign.com - email: mach.chen@huawei.com - email: amit.dass@ericsson.com - email: sriganesh.kini@ericsson.com - email: nitin_bahadur@yahoo.com"; + "WG Web: + WG List: + WG Chair: Susan Hares + + + WG Chair: Jeffrey Haas + + + Editor: Lixing Wang + + + Editor: Hariharan Ananthakrishnan + + + Editor: Mach(Guoyi) Chen + + + Editor: Amit Dass + + + 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-17" { + revision "2015-10-28" { description "initial revision"; - reference "draft-ietf-i2rs-rib-info-model-07"; + reference "draft-ietf-i2rs-rib-info-model-08"; } - //Nexthhop related features + //Features feature nexthop-tunnel { description "This feature means that a node support - tunnel nexhtop capability. The i2rs client - can specify a tunnel nexthop to a route."; - + tunnel nexhtop capability."; } feature nexthop-chain { description "This feature means that a node support chain nexhtop capability."; } feature nexthop-protection { description @@ -831,130 +857,178 @@ "This feature means that a node support relicates nexhtop capability."; } feature nexthop-load-balance { description "This feature means that a node support load balance nexhtop capability."; } - //Tunnel encap related features feature ipv4-tunnel { description "This feature means that a node support IPv4 tunnel encapsulation capability."; } + feature ipv6-tunnel { description "This feature means that a node support IPv6 tunnel encapsulation capability."; } + feature mpls-tunnel { description "This feature means that a node support MPLS tunnel encapsulation capability."; } + feature vxlan-tunnel { description "This feature means that a node support VxLAN tunnel encapsulation capability."; } + feature gre-tunnel { description "This feature means that a node support GRE tunnel encapsulation capability."; } + feature nvgre-tunnel { description "This feature means that a node support NvGRE tunnel encapsulation capability."; } + feature route-vendor-attributes { + description + "This feature means that a node support + route vendor attributes."; + } + //Identities and Type Definitions - identity mpls-action { + identity mpls-label-action { description "Base identify from which all mpls label operations are derived. The MPLS label stack operations include: push - to add a new label to a label stack, pop - to pop the top label from a label stack, swap - to change the top label of a label stack with new label."; } identity label-push { - base "mpls-action"; + base "mpls-label-action"; description "MPLS label stack operation: push."; } identity label-pop { - base "mpls-action"; + base "mpls-label-action"; description "MPLS label stack operation: pop."; } identity label-swap { - base "mpls-action"; + base "mpls-label-action"; description "MPLS label stack operation: swap."; } - typedef mpls-action-def { + typedef mpls-label-action-def { type identityref { - base "mpls-action"; + base "mpls-label-action"; } description - "MPLS action def."; + "MPLS label action def."; } + + identity tunnel-decap-action { + description + "Base identify from which all tunnel decap + actions are derived. + Tunnel decap actions include: + ipv4-decap - to decap an IPv4 tunnel, + ipv6-decap - to decap an IPv6 tunnel."; + } + + identity ipv4-decap { + base "tunnel-decap-action"; + description + "IPv4 tunnel decap."; + } + + identity ipv6-decap { + base "tunnel-decap-action"; + description + "IPv4 tunnel decap."; + } + + typedef tunnel-decap-action-def { + 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. - "; + by one and copy it to inner header."; } - identity ttl-no-action { + identity no-action { base "ttl-action"; description "Do nothing regarding the TTL."; } - identity ttl-copy-to-inner { + identity copy-to-inner { base "ttl-action"; description "Copy the TTL of the outer header to inner header."; } - identity ttl-decrease-and-copy-to-inner { + identity decrease-and-copy-to-inner { base "ttl-action"; description "Decrease TTL by one and copy the TTL to inner header."; } + identity decrease-and-copy-to-next { + base "ttl-action"; + description + "Decrease TTL by one and copy the TTL + to the next header.For example: when + MPLS label swapping, decrease the TTL + of the in label and copy it to the out + label."; + } + typedef ttl-action-def { type identityref { base "ttl-action"; } description "TTL action def."; } - identity hop-limit-action { description "Base identify from which all hop limit actions are derived."; } identity hop-limit-no-action { base "hop-limit-action"; description "Do nothing regarding the hop limit."; @@ -1020,53 +1094,52 @@ } typedef special-nexthop-def { type identityref { base "special-nexthop"; } description "Special nexthop def."; } - identity match-ip-route-type { + identity ip-route-match-type { description "Base identify from which all route match types are derived. Route match type could be: match source, or match destination, or match source and destination."; } identity match-ip-src { - base "match-ip-route-type"; + base "ip-route-match-type"; description "Source route match type."; } identity match-ip-dest { - base "match-ip-route-type"; + base "ip-route-match-type"; description "Destination route match type"; } identity match-ip-src-dest { - base "match-ip-route-type"; + base "ip-route-match-type"; description "Src and Dest route match type"; - } - typedef match-ip-route-type-def { + typedef ip-route-match-type-def { type identityref { - base "match-ip-route-type"; + base "ip-route-match-type"; } description - "Route match type def."; + "IP route match type def."; } identity rib-family { description "Base identify from which all rib address families are derived."; } identity ipv4-rib-family { base "rib-family"; @@ -1310,174 +1382,150 @@ 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."; } - typedef nhop-lb-weight-def { + typedef nexthop-lb-weight-def { type uint8 { range "1..99"; } description "Nhop-lb-weight is a number between 1 and 99."; } //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."; } - leaf route-type { - type route-type-def; - mandatory true; - description - "Route types, e.g., IPv4, IPv6, MPLS, MAC etc. route types."; - - } container match { description "The match condition specifies the kind of route (IPv4, MPLS, etc.) and the set of fields to match on."; - choice rib-route-type { + choice route-type { description - "To match a route according to rib route type."; + "Route types: IPv4, IPv6, MPLS, MAC etc."; case ipv4 { description - "IPv4 rib case."; + "IPv4 route case."; container ipv4 { description - "IPv4 route match type."; - leaf ipv4-route-type { - type match-ip-route-type-def; - mandatory true; + "IPv4 route match."; + choice ip-route-match-type { description - "Route match type, it could be: + "IP route match type options: match source, or match destination, or - match source and destination. - "; - } - choice match-ip-route-type { - description - "To match a route according to match type."; + match source and destination."; case dest-ipv4-address { leaf dest-ipv4-prefix { type inet:ipv4-prefix; mandatory true; description - "To match an IPv4 destination address."; + "An IPv4 destination address as the match."; } } case src-ipv4-address { leaf src-ipv4-prefix { type inet:ipv4-prefix; mandatory true; description - "To match an IPv4 source address."; + "An IPv4 source address as the match."; } } case dest-src-ipv4-address { container dest-src-ipv4-address { description - "To match IPv4 source and destination addreses."; - + "A combination of an IPv4 source and + an IPv4 destination address as the match."; leaf dest-ipv4-prefix { type inet:ipv4-prefix; mandatory true; description - "The IPv4 destination address of - the match condition."; + "The IPv4 destination address of the match."; } leaf src-ipv4-prefix { type inet:ipv4-prefix; mandatory true; description - "The IPv4 source address of - the match condition."; + "The IPv4 source address of the match"; } } } } } } case ipv6 { description - "IPv6 rib case."; + "IPv6 route case."; container ipv6 { description - "IPv6 route match type."; - leaf ipv6-route-type { - type match-ip-route-type-def; - mandatory true; + "IPv6 route match."; + choice ip-route-match-type { description - "Route match type, it could be: + "IP route match type options: match source, or match destination, or - match source and destination. - "; - } - choice match-ip-route-type { - description - "To match a route according to match type."; + match source and destination."; case dest-ipv6-address { leaf dest-ipv6-prefix { type inet:ipv6-prefix; mandatory true; description - "To match an IPv6 destination address."; + "An IPv6 destination address as the match."; } } case src-ipv6-address { leaf src-ipv6-prefix { type inet:ipv6-prefix; mandatory true; description - "To match an IPv6 source address."; + "An IPv6 source address as the match."; } } case dest-src-ipv6-address { container dest-src-ipv6-address { description - "To match the source and destination addreses."; + "A combination of an IPv6 source and + an IPv6 destination address as the match."; leaf dest-ipv6-prefix { type inet:ipv6-prefix; mandatory true; description - "The IPv6 destination address of - the match condition."; + "The IPv6 destination address of the match"; + } leaf src-ipv6-prefix { type inet:ipv6-prefix; mandatory true; description - "The IPv6 source address of - the match condition."; + "The IPv6 source address of the match."; } } } } } } case mpls-route { description - "MPLS rib case."; + "MPLS route case."; leaf mpls-label { type uint32 ; mandatory true; description "The label used for matching."; } } case mac-route { description "MAC rib case."; @@ -1480,25 +1528,24 @@ } case mac-route { description "MAC rib case."; leaf mac-address { type uint32 ; mandatory true; description "The MAC address used for matching."; } - } case interface-route { description - "Interface rib case."; + "Interface route case."; leaf interface-identifier { type if:interface-ref; mandatory true; description "The interface used for matching."; } } } } } @@ -1540,160 +1587,164 @@ "Route attributes."; uses route-attributes; } container route-vendor-attributes { description "Route vendor attributes."; uses route-vendor-attributes; } } - grouping nexthop { - description - "The nexthop structure."; - leaf nexthop-id { - type uint32; - mandatory true; - description - "The nexthop identifier of a nexthop."; - } - leaf sharing-flag { - type boolean; - mandatory true; - description - "To indicate whether a nexthop is sharable - or non-sharable. - 1 - means sharable - 0 - means non-sharable."; - } - choice nexthop-type { - description - "Based on nexthop type to derive the nexthop."; - case nexthop-base { - container nexthop-base { - description - "A nexthop base container."; - uses nexthop-base; - } - } - case nexthop-chain { - if-feature nexthop-chain; - container nexthop-chain { + grouping nexthop-list { description - "A nexthop chain container."; - list nexthop-chain { - key "nexthop-chain-member-id"; + "A generic nexthop list."; + list nexthop-list { + key "nexthop-member-id"; description - "A list of nexthop members of - a load nexthop chain."; - leaf nexthop-chain-member-id { + "A list of nexthop."; + leaf nexthop-member-id { type uint32; mandatory true; description "A nexthop identifier that points - to a nexthop chain member. - A nexthop chain member is a nexthop."; - } + to a nexthop list member. + A nexthop list member is a nexthop."; } } } - case nexthop-protection { - if-feature nexthop-protection; - container nexthop-protection { + + grouping nexthop-list-p { description - "A protection nexthop container."; - list nexthop-protection-list { - key "nexthop-protection-member-id"; + "A nexthop list with preference parameter."; + list nexthop-list { + key "nexthop-member-id"; description - "A list of nexthop protection - members of a load balance nexthop."; - leaf nexthop-protection-member-id { + "A list of nexthop."; + leaf nexthop-member-id { type uint32; mandatory true; description "A nexthop identifier that points - to a protection nexthop member. - A protection nexthop member is - a nexthop."; + to a nexthop list member. + A nexthop list member is a nexthop."; } leaf nexthop-preference { type nexthop-preference-def; mandatory true; 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."; } } } - } - case nexthop-load-balance { - if-feature nexthop-load-balance; - container nexthop-lb { + + grouping nexthop-list-w { description - "A load balance nexthop container."; - list nexthop-lbs { - key "nexthop-lbs-member-id"; + "A nexthop list with weight parameter."; + list nexthop-list { + key "nexthop-member-id"; description - "A list of nexthop load balance - members of a load balance nexthop."; - leaf nexthop-lbs-member-id { + "A list of nexthop."; + + leaf nexthop-member-id { type uint32; mandatory true; description "A nexthop identifier that points - to a load balance nexthop member. - A load balance nexthop member is - a nexthop."; + to a nexthop list member. + A nexthop list member is a nexthop."; } - leaf nhop-lb-weight { - type nhop-lb-weight-def; + leaf nexthop-lb-weight { + type nexthop-lb-weight-def; mandatory true; description "The weight of a nexthop of the load balance nexthops."; } } } + + grouping nexthop { + description + "The nexthop structure."; + leaf nexthop-id { + type uint32; + mandatory true; + description + "The nexthop identifier of 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 + "Nexthop type options."; + case nexthop-base { + container nexthop-base { + description + "The base nexthop."; + uses nexthop-base; + } + } + case nexthop-chain { + if-feature nexthop-chain; + container nexthop-chain { + description + "A chain nexthop."; + uses nexthop-list; + } } case nexthop-replicates { if-feature nexthop-replicates; container nexthop-replicates { description - "A nexthop replicates container."; - list nexthop-replicates { - key "nexthop-replicates-member-id"; - description - "A list of replicate nexthop members - that belong to the nexthop-replicates."; - leaf nexthop-replicates-member-id { - type uint32; + "A replicates nexthop."; + uses nexthop-list; + } + } + case nexthop-protection { + if-feature nexthop-protection; + container nexthop-protection { description - "A nexthop identifier that points - to a replicates nexthop member. - A replicates nexthop member is a nexthop."; + "A protection nexthop."; + uses nexthop-list-p; } } + case nexthop-load-balance { + if-feature nexthop-load-balance; + container nexthop-lbs { + description + "A load balance nexthop."; + uses nexthop-list-w; } } } } + grouping nexthop-base { description - "The base nexthop content for a route."; + "The base nexthop."; choice nexthop-base-type { description - "Based on nexthop chain type to select - relevant nexthop chain member."; + "Nexthop base type options."; case special-nexthop { leaf special { type special-nexthop-def; description "A special nexthop."; } } case egress-interface-nexthop { leaf outgoing-interface { type if:interface-ref; @@ -1727,44 +1778,44 @@ "Name of the outgoing interface."; } leaf ipv4-address { type inet:ipv4-address; mandatory true; description "The nexthop points to an interface with an IPv4 address."; } description - "Egress-interface and ip address: This can be usesd - in cases e.g.where the ip address is a link-local - address."; + "The nexthop is an Egress-interface and an ip + address.This can be usesd 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 { type inet:ipv6-address; mandatory true; description "The nexthop points to an interface with an IPv6 address."; } description - "Egress-interface and ip address: This can be usesd - in cases e.g.where the ip address is a link-local - address."; + "The nexthop is an Egress-interface and an ip + address.This can be usesd 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."; } @@ -1846,27 +1896,27 @@ type string; mandatory true; description "A tunnel name that points to a logical tunnel."; } } grouping ipv4-header { description "The IPv4 header encapsulation information."; - leaf source-ipv4-address { + leaf src-ipv4-address { type inet:ipv4-address; mandatory true; description "The source ip address of the header."; } - leaf destination-ipv4-address { + leaf dest-ipv4-address { type inet:ipv4-address; mandatory true; description "The destination ip address of the header."; } leaf protocol { type uint8; mandatory true; description "The protocol id of the header."; @@ -1879,27 +1929,27 @@ leaf dscp { type uint8; description "The DSCP field of the header."; } } grouping ipv6-header { description "The IPv6 header encapsulation information."; - leaf source-ipv6-address { + leaf src-ipv6-address { type inet:ipv6-address; mandatory true; description "The source ip address of the header."; } - leaf destination-ipv6-address { + leaf dest-ipv6-address { type inet:ipv6-address; mandatory true; description "The destination ip address of the header."; } leaf next-header { type uint8; mandatory true; description "The next header of the IPv6 header."; @@ -1956,113 +2007,137 @@ or IPv6 header for encapsulation."; case ipv4 { uses ipv4-header; } case ipv6 { uses ipv6-header; } } leaf vxlan-identifier { type uint32; + mandatory true; description "The VxLAN identifier of the VxLAN header."; } } + grouping gre-header { description "The GRE encapsulation header information."; - leaf gre-ip-destination { + choice dest-address-type { + description + "GRE options: IPv4 and IPv6"; + case ipv4 { + leaf ipv4-dest { type inet:ipv4-address; mandatory true; description "The destination ip address of the GRE header."; } - leaf gre-protocol-type { - type inet:ipv4-address; + + } + case ipv6 { + leaf ipv6-dest { + type inet:ipv6-address; + mandatory true; + description + "The destination ip address of the GRE header."; + } + } + } + leaf protocol-type { + type uint16; mandatory true; description "The protocol type of the GRE header."; } - leaf gre-key { + leaf key { type uint64; description "The GRE key of the GRE header."; } } grouping mpls-header { description "The MPLS encapsulation header information."; - choice mpls-action-type { + list label-operations { + key "label-oper-id"; description - "Based on action type to perform different operation."; - case mpls-push { - leaf mpls-push { - type boolean; - mandatory true; + "Label operations."; + leaf label-oper-id { + type uint32; description - "Push a MPLS label to the label stack."; + "An optional identifier that points + to a label operation."; } - leaf mpls-label { + choice label-actions { + description + "Label action options."; + case label-push { + container label-push { + description + "Label push operation."; + leaf label { type uint32; mandatory true; description - "The MPLS label to be pushed."; + "The label to be pushed."; + } leaf s-bit { type boolean; description "The s-bit of the label to be pushed. "; } leaf tc-value { type uint8; description "The traffic class value of the label to be pushed."; } leaf ttl-value { type uint8; description "The TTL value of the label to to be pushed."; } } - case mpls-swap { - leaf mpls-swap { - type boolean; - mandatory true; - description - "Swap a MPLS label with another label."; } - leaf mpls-in-label { + case label-swap { + container label-swap { + description + "Label swap operation."; + leaf in-label { type uint32; mandatory true; description - "The in MPLS label."; + "The label to be swapped."; } - leaf mpls-out-label { + leaf out-label { type uint32; mandatory true; description "The out MPLS label."; } leaf ttl-action { type ttl-action-def; description "The label ttl actions: - 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; uses ipv4-header; } @@ -2087,78 +2162,79 @@ uses vxlan-header; } } } grouping tunnel-decap { description "Tunnel decapsulation inforamtion."; choice tunnel-type { description - "Tunnel options for next-hops."; + "Nexthop tunnel type options."; case ipv4 { if-feature ipv4-tunnel; container ipv4-decap { + description + "IPv4 decap."; leaf ipv4-decap { - type boolean; + type tunnel-decap-action-def; mandatory true; description "IPv4 decap operations."; } leaf ttl-action { type ttl-action-def; description "The ttl actions: no-action or copy to inner header."; } - description - "IPv4 decap."; } } case ipv6 { if-feature ipv6-tunnel; container ipv6-decap { + description + "IPv6 decap."; leaf ipv6-decap { - type boolean; + type tunnel-decap-action-def; mandatory true; description "IPv6 decap operations."; } leaf hop-limit-action { type hop-limit-action-def; description "The hop limit actions: no-action or copy to inner header."; } - description - "IPv6 decap."; } } case mpls { if-feature mpls-tunnel; - container mpls-pop { - leaf mpls-pop { - type boolean; + container label-pop { + description + "MPLS decap."; + leaf label-pop { + type mpls-label-action-def; mandatory true; description - "Pop a MPLS label from the label stack."; + "Pop a label from the label stack."; } leaf ttl-action { type ttl-action-def; description "The label ttl actions: no-action or copy to inner label"; } - description - "MPLS decap."; } } + } } grouping route-attributes { description "Route attributes."; leaf route-preference { type uint32 ; mandatory true; description @@ -2186,95 +2262,93 @@ case mpls-route-attributes { } case ethernet-route-attributes { } } } } container routing-instance { description - "Configuration of an 'i2rs' pseudo-protocol - instance consists of a list of ribs."; + "A routing instance, in the context of + the RIB information model, is a collection + of RIBs, interfaces, and routing parameters"; leaf name { type string; mandatory true; description - "A routing instance is identified by its name, - INSTANCE_name. This MUST be unique across all - routing instances in a given network device."; + "The name of the routing instance.This MUST + be unique across all routing instances in + a given network device."; } list interface-list { key "name"; description "This represents the list of interfaces associated with this routing instance. The interface list helps constrain the boundaries of packet forwarding. Packets coming on these interfaces are directly associated with the given routing instance. The interface list contains a list of identifiers, with each identifier uniquely identifying an interface."; leaf name { type if:interface-ref; description - "A reference to the name of a configured - network layer interface."; + "A reference to the name of a network layer interface."; } } leaf router-id { type yang:dotted-quad; description "Router ID - 32-bit number in the form of a dotted quad."; } leaf lookup-limit { type uint8; description "A limit on how many levels of a lookup can be performed."; } list rib-list { key "name"; description - "This is the list of RIBs associated with this routing - instance. Each routing instance can have multiple RIBs - to represent routes of different types."; + "A list of RIBs that are associated with the routing + instance."; leaf name { type string; mandatory true; description - "A reference to the name of a rib."; + "A reference to the name of each rib."; } leaf rib-family { type rib-family-def; mandatory true; description - "The address family of the rib."; + "The address family of a rib."; } - leaf enable-ip-rpf-check { + leaf ip-rpf-check { type boolean; description "Each RIB can be optionally associated with a ENABLE_IP_RPF_CHECK attribute that enables Reverse path forwarding (RPF) checks on all IP routes in that RIB. Reverse path forwarding (RPF) check is used to prevent spoofing and limit malicious traffic."; } list route-list { key "route-index"; description - "A routes of a rib."; + "A list of routes of a rib."; uses route; } } } /*RPC Operations*/ - rpc rib-add { description "To add a rib to a instance"; input { leaf rib-name { type string; mandatory true; description "A reference to the name of the rib that is to be added."; @@ -2278,65 +2352,64 @@ description "A reference to the name of the rib that is to be added."; } leaf rib-family { type rib-family-def; mandatory true; description "The address family of the rib."; } - leaf enable-ip-rpf-check { + leaf ip-rpf-check { type boolean; description "Each RIB can be optionally associated with a ENABLE_IP_RPF_CHECK attribute that enables Reverse path forwarding (RPF) checks on all IP routes in that RIB. Reverse path forwarding (RPF) check is used to prevent spoofing and limit malicious traffic."; } } - output { leaf result { type boolean ; mandatory true; description "Return the result of the rib-add operation. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } } rpc rib-delete { description - "To delete a rib from a routing instance, - by deleting the rib, all routes installed + "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 { type string; mandatory true; description "A reference to the name of the rib that is to be deleted."; } } output { leaf result { type boolean ; mandatory true; description "Return the result of the rib-delete operation. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } } rpc route-add { description "To add a route or a list of route to a rib"; input { leaf rib-name { type string; @@ -2340,41 +2413,53 @@ input { 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 - "Use a list to include all routes to be added."; - + "The list of routes to be added."; uses route-prefix; + container route-attributes { uses route-attributes; + description + "Route attributes."; + } + container route-vendor-attributes { + if-feature route-vendor-attributes; uses route-vendor-attributes; + description + "Route vendor attributes."; + } + container nexthop { uses nexthop; + description + "Nexthop."; + } } } } - output { leaf result { type boolean ; mandatory true; description "Return the result of the route-add operation. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } } rpc route-delete { description "To delete a route or a list of route from a rib"; input { leaf rib-name { type string; @@ -2386,197 +2471,202 @@ 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; description "Return the result of the route-delete operation. - - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } } 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 c. nexthop; 2. The update parameters to be used: a. new nexhop; b. new route attributes; Actions: 1. update the nexthop 2. update the route attributes The outputs: - 1 - success; - 0 - failed. + true - success; + false - failed. "; - input { leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } + choice match-conditions { description - "When conditions matched, update the routes."; - //Update routes that have the matched route prefixes + "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 include: - - 1. update nexthop - 2. update route attributes - 3. update route-vendor-attributes. + "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; } } } } } - //Update the routes that have the matched attributes 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 { description - "Update actions include: - 1. update nexthop - 2. update route attributes - 3. update route-vendor-attributes. - "; + "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; } } } - //Update the routes that have the matched vendor attributes - case match-vendor-route-attributes { - container input-vendor-route-attributes { + 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 { description - "Update actions include: - 1. update nexthop - 2. update route attributes - 3. update route-vendor-attributes. - "; + "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 { uses route-vendor-attributes; } } } - //Update the routes that have the matched nexthop 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 { description - "Update actions include: + "Update actions: 1. update nexthop 2. update route attributes - 3. update route-vendor-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; } } } } } output { leaf result { type boolean ; mandatory true; description "Return the result of the route-update operation. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } } rpc nh-add { description "To add a nexthop to a rib. Inputs parameters: 1. rib name 2. nexthop; Actions: Add the nexthop to the rib Outputs: 1.Operation result: - 1 - means success - 0 - means faled; + true - success + false - failed; 2. nexthop identifier."; input { leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } uses nexthop; } @@ -2573,77 +2663,61 @@ 2. nexthop identifier."; input { leaf rib-name { type string; mandatory true; 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. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } 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 { leaf rib-name { type string; mandatory true; description "A reference to the name of a rib."; } - choice nexthop-context-or-id { - description - "Delete a nexthop by inputing - the nexthop itself or its nexthop id."; - case nexthop-context { uses nexthop; } - case nexthop-identifier { - leaf nexthop-identifer { - type uint32; - mandatory true; - description - "A reference to the nexthop to be deleted."; - } - } - } - } - output { leaf result { type boolean ; mandatory true; description "Return the result of the nh-delete operation. - 1 - means success; - 0 - means falied."; + true - success; + false - failed."; } } + } /*Notifications*/ notification nexthop-resolution-status-change { description "Nexthop resolution status (resolved/unresolved) notification."; container nexthop{ description "The nexthop."; @@ -2760,22 +2833,22 @@ 7.2. Informative References [I-D.ietf-i2rs-architecture] Atlas, A., Halpern, J., Hares, S., Ward, D., and T. Nadeau, "An Architecture for the Interface to the Routing System", draft-ietf-i2rs-architecture-09 (work in progress), March 2015. [I-D.ietf-i2rs-rib-info-model] Bahadur, N., Kini, S., and J. Medved, "Routing Information - Base Info Model", draft-ietf-i2rs-rib-info-model-07 (work - in progress), September 2015. + Base Info Model", draft-ietf-i2rs-rib-info-model-08 (work + in progress), October 2015. [I-D.ietf-i2rs-usecase-reqs-summary] Hares, S. and M. Chen, "Summary of I2RS Use Case Requirements", draft-ietf-i2rs-usecase-reqs-summary-01 (work in progress), May 2015. Authors' Addresses Lixing Wang Individual