draft-ietf-i2rs-rib-data-model-03.txt   draft-ietf-i2rs-rib-data-model-04.txt 
Network Working Group L. Wang Network Working Group L. Wang
Internet-Draft Individual Internet-Draft Individual
Intended status: Standards Track H. Ananthakrishnan Intended status: Standards Track H. Ananthakrishnan
Expires: May 4, 2016 Packet Design Expires: May 25, 2016 Packet Design
M. Chen M. Chen
Huawei Huawei
A. Dass A. Dass
S. Kini S. Kini
Ericsson Ericsson
N. Bahadur N. Bahadur
Bracket Computing Bracket Computing
November 1, 2015 November 22, 2015
A YANG Data Model for Routing Information Base (RIB) A YANG Data Model for Routing Information Base (RIB)
draft-ietf-i2rs-rib-data-model-03 draft-ietf-i2rs-rib-data-model-04
Abstract Abstract
This document defines a YANG data model for Routing Information Base This document defines a YANG data model for Routing Information Base
(RIB) that aligns with the I2RS RIB information model. (RIB) that aligns with the I2RS RIB information model.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
skipping to change at page 1, line 45 skipping to change at page 1, line 45
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." 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 Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 27 skipping to change at page 2, line 27
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3
2. Model Structure . . . . . . . . . . . . . . . . . . . . . . . 3 2. Model Structure . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. RIB Capability . . . . . . . . . . . . . . . . . . . . . 7 2.1. RIB Capability . . . . . . . . . . . . . . . . . . . . . 7
2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 7 2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 8
2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 13 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 14
2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 16 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 18
3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 17 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 19
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 59 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 63
5. Security Considerations . . . . . . . . . . . . . . . . . . . 59 5. Security Considerations . . . . . . . . . . . . . . . . . . . 63
6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 59 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 63
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 60 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 64
7.1. Normative References . . . . . . . . . . . . . . . . . . 60 7.1. Normative References . . . . . . . . . . . . . . . . . . 64
7.2. Informative References . . . . . . . . . . . . . . . . . 60 7.2. Informative References . . . . . . . . . . . . . . . . . 64
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 64
1. Introduction 1. Introduction
The Interface to the Routing System (I2RS) The Interface to the Routing System (I2RS)
[I-D.ietf-i2rs-architecture] provides read and write access to the [I-D.ietf-i2rs-architecture] provides read and write access to the
information and state within the routing process that exists inside information and state within the routing process that exists inside
the routing elements, this is achieved via the protocol message the routing elements, this is achieved via the protocol message
exchange between I2RS clients and I2RS agents associated with the exchange between I2RS clients and I2RS agents associated with the
routing system. One of the functions of I2RS is to read and write routing system. One of the functions of I2RS is to read and write
data of Routing Information Base (RIB). data of Routing Information Base (RIB).
[I-D.ietf-i2rs-usecase-reqs-summary] introduces a set of RIB use [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]. [I-D.ietf-i2rs-rib-info-model].
This document defines a YANG [RFC6020][RFC6991] data model for the This document defines a YANG [RFC6020][RFC6991] data model for the
RIB that satisfies the RIB use cases and aligns with the RIB RIB that satisfies the RIB use cases and aligns with the RIB
information model. information model.
1.1. Definitions and Acronyms 1.1. Definitions and Acronyms
RIB: Routing Information Base RIB: Routing Information Base
skipping to change at page 3, line 38 skipping to change at page 3, line 38
denotes a "list" and "leaf-list". denotes a "list" and "leaf-list".
o Parentheses enclose choice and case nodes, and case nodes are also o Parentheses enclose choice and case nodes, and case nodes are also
marked with a colon (":"). marked with a colon (":").
o Ellipsis ("...") stands for contents of subtrees that are not o Ellipsis ("...") stands for contents of subtrees that are not
shown. shown.
2. Model Structure 2. Model Structure
The following figure shows an overview of structure tree of the i2rs- The following figure shows an overview of structure tree of the ietf-
rib module. To give a whole view of the structure tree, some details i2rs-rib module. To give a whole view of the structure tree, some
of the tree are omitted. The detail are introduced in the following details of the tree are omitted. The relevant details are introduced
sub-sections. in the following sub-sections.
module: ietf-i2rs-rib module: ietf-i2rs-rib
+--rw routing-instance +--rw routing-instance
+--rw name string +--rw name string
+--rw interface-list* [name] +--rw interface-list* [name]
| +--rw name if:interface-ref | +--rw name if:interface-ref
+--rw router-id? yang:dotted-quad +--rw router-id? yang:dotted-quad
+--rw lookup-limit? uint8 +--rw lookup-limit? uint8
+--rw rib-list* [name] +--rw rib-list* [name]
+--rw name string +--rw name string
+--rw rib-family rib-family-def +--rw rib-family rib-family-def
+--rw ip-rpf-check? boolean +--rw ip-rpf-check? boolean
+--rw route-list* [route-index] +--rw route-list* [route-index]
+--rw route-index uint64 +--rw route-index uint64
+--rw match +--rw match
| +--rw (route-type)? | +--rw (route-type)?
| +--:(ipv4) | +--:(ipv4)
| | ... | | ...
| +--:(ipv6) | +--:(ipv6)
| | ... | | ...
| +--:(mpls-route) | +--:(mpls-route)
| | ... | | ...
| +--:(mac-route) | +--:(mac-route)
| | ... | | ...
| +--:(interface-route) | +--:(interface-route)
| ... | ...
+--rw nexthop +--rw nexthop
| +--rw nexthop-id uint32 | +--rw nexthop-id? uint32
| +--rw sharing-flag boolean | +--rw sharing-flag? boolean
| +--rw (nexthop-type)? | +--rw (nexthop-type)?
| +--:(nexthop-base) | +--:(nexthop-base)
| | ... | | ...
| +--:(nexthop-chain) {nexthop-chain}? | +--:(nexthop-chain) {nexthop-chain}?
| | ... | | ...
| +--:(nexthop-replicates) {nexthop-replicates}? | +--:(nexthop-replicates) {nexthop-replicates}?
| | ... | | ...
| +--:(nexthop-protection) {nexthop-protection}? | +--:(nexthop-protection) {nexthop-protection}?
| | ... | | ...
| +--:(nexthop-load-balance) {nexthop-load-balance}? | +--:(nexthop-load-balance) {nexthop-load-balance}?
| ... | ...
+--rw route-statistic +--rw route-statistic
| ... | ...
+--rw route-attributes +--rw route-attributes
| ... | ...
+--rw route-vendor-attributes +--rw route-vendor-attributes
rpcs: rpcs:
+---x rib-add +---x rib-add
| +--ro input | +---w input
| | +--ro rib-name string | | +---w rib-name string
| | +--ro rib-family rib-family-def | | +---w rib-family rib-family-def
| | +--ro ip-rpf-check? boolean | | +---w ip-rpf-check? boolean
| +--ro output | +--ro output
| +--ro result boolean | +--ro result uint32
+---x rib-delete | +--ro reason? string
| +--ro input +---x rib-delete
| | +--ro rib-name string | +---w input
| +--ro output | | +---w rib-name string
| +--ro result boolean | +--ro output
+---x route-add | +--ro result uint32
| +--ro input | +--ro reason? string
| | +--ro rib-name string +---x route-add
| | +--ro routes | +---w input
| | +--ro route-list* [route-index] | | +---w return-failure-detail? boolean
| | ... | | +---w rib-name string
| +--ro output | | +---w routes
| +--ro result boolean | | +---w route-list* [route-index]
+---x route-delete | | ...
| +--ro input | +--ro output
| | +--ro rib-name string | +--ro success-count uint32
| | +--ro routes | +--ro failed-count uint32
| | +--ro route-list* [route-index] | +--ro failure-detail
| | ... | +--ro failed-routes* [route-index]
| +--ro output | +--ro route-index uint32
| +--ro result boolean | +--ro error-code? uint32
+---x route-update +---x route-delete
| +--ro input | +---w input
| | +--ro rib-name string | | +---w return-failure-detail? boolean
| | +--ro (match-conditions)? | | +---w rib-name string
| | +--:(match-route-prefix) | | +---w routes
| | | ... | | +---w route-list* [route-index]
| | +--:(match-route-attributes) | | ...
| | | ... | +--ro output
| | +--:(match-route-vendor-attributes) {...vendor-attributes}? | +--ro success-count uint32
| | | ... | +--ro failed-count uint32
| | +--:(match-nexthop) | +--ro failure-detail
| | ... | +--ro failed-routes* [route-index]
| +--ro output | +--ro route-index uint32
| +--ro result boolean | +--ro error-code? uint32
+---x nh-add +---x route-update
| +--ro input | +---w input
| | +--ro rib-name string | | +---w return-failure-detail? boolean
| | +--ro nexthop-id uint32 | | +---w rib-name string
| | +--ro sharing-flag boolean | | +---w (match-options)?
| | +--ro (nexthop-type)? | | +--:(match-route-prefix)
| | +--:(nexthop-base) | | | ...
| | | ... | | +--:(match-route-attributes)
| | +--:(nexthop-chain) {nexthop-chain}? | | | ...
| | | ... | | +--:(match-route-vendor-attributes) {...}?
| | +--:(nexthop-replicates) {nexthop-replicates}? | | | ...
| | | ... | | +--:(match-nexthop)
| | +--:(nexthop-protection) {nexthop-protection}? | | ...
| | | ... | +--ro output
| | +--:(nexthop-load-balance) {nexthop-load-balance}? | +--ro success-count uint32
| | ... | +--ro failed-count uint32
| +--ro output | +--ro failure-detail
| +--ro result boolean | +--ro failed-routes* [route-index]
| +--ro nexthop-id uint32 | +--ro route-index uint32
+---x nh-delete | +--ro error-code? uint32
+--ro input +---x nh-add
| +--ro rib-name string | +---w input
| +--ro nexthop-id uint32 | | +---w rib-name string
| +--ro sharing-flag boolean | | +---w nexthop-id? uint32
| +--ro (nexthop-type)? | | +---w sharing-flag? boolean
| +--:(nexthop-base) | | +---w (nexthop-type)?
| | ... | | +--:(nexthop-base)
| +--:(nexthop-chain) {nexthop-chain}? | | | ...
| | ... | | +--:(nexthop-chain) {nexthop-chain}?
| +--:(nexthop-replicates) {nexthop-replicates}? | | | ...
| | ... | | +--:(nexthop-replicates) {nexthop-replicates}?
| +--:(nexthop-protection) {nexthop-protection}? | | | ...
| | ... | | +--:(nexthop-protection) {nexthop-protection}?
| +--:(nexthop-load-balance) {nexthop-load-balance}? | | | ...
| ... | | +--:(nexthop-load-balance) {nexthop-load-balance}?
+--ro output | | ...
+--ro result boolean | +--ro output
notifications: | +--ro result uint32
+---n nexthop-resolution-status-change | +--ro reason? string
| +--ro nexthop | +--ro nexthop-id? uint32
| | +--ro nexthop-id uint32 +---x nh-delete
| | +--ro sharing-flag boolean +---w input
| | +--ro (nexthop-type)? | +---w rib-name string
| | +--:(nexthop-base) | +---w nexthop-id? uint32
| | | ... | +---w sharing-flag? boolean
| | +--:(nexthop-chain) {nexthop-chain}? | +---w (nexthop-type)?
| | | ... | +--:(nexthop-base)
| | +--:(nexthop-replicates) {nexthop-replicates}? | | ...
| | | ... | +--:(nexthop-chain) {nexthop-chain}?
| | +--:(nexthop-protection) {nexthop-protection}? | | ...
| | | ... | +--:(nexthop-replicates) {nexthop-replicates}?
| | +--:(nexthop-load-balance) {nexthop-load-balance}? | | ...
| | ... | +--:(nexthop-protection) {nexthop-protection}?
| +--ro nexthop-state nexthop-state-def | | ...
+---n route-change | +--:(nexthop-load-balance) {nexthop-load-balance}?
+--ro rib-name string | ...
+--ro rib-family rib-family-def +--ro output
+--ro route-index uint64 +--ro result uint32
+--ro match +--ro reason? string
| +--ro (route-type)? notifications:
| +--:(ipv4) +---n nexthop-resolution-status-change
| | ... | +--ro nexthop
| +--:(ipv6) | | +--ro nexthop-id? uint32
| | ... | | +--ro sharing-flag? boolean
| +--:(mpls-route) | | +--ro (nexthop-type)?
| | ... | | +--:(nexthop-base)
| +--:(mac-route) | | | ...
| | ...
| +--:(interface-route)
| ...
+--ro route-installed-state route-installed-state-def
+--ro route-state route-state-def
+--ro route-change-reason route-reason-def
Figure 1: Overview of I2RS Rib Module Structure | | +--:(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
+--ro rib-name string
+--ro rib-family rib-family-def
+--ro route-index uint64
+--ro match
| +--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-change-reason route-reason-def
Figure 1: Overview of I2RS Rib Module Structure
2.1. RIB Capability 2.1. RIB Capability
RIB capability negotiation is very important because not all of the RIB capability negotiation is very important because not all of the
hardware will be able to support all kinds of nexthops and there hardware will be able to support all kinds of nexthops and there
should be a limitation on how many levels of lookup can be should be a limitation on how many levels of lookup can be
practically performed. Therefore, a RIB data model MUST specify a practically performed. Therefore, a RIB data model MUST specify a
way for an external entity to learn about the functional capabilities way for an external entity to learn about the functional capabilities
of a network device. of a network device.
skipping to change at page 7, line 43 skipping to change at page 8, line 19
A routing instance, in the context of the RIB information model, is a A routing instance, in the context of the RIB information model, is a
collection of RIBs, interfaces, and routing protocol parameters. A collection of RIBs, interfaces, and routing protocol parameters. A
routing instance creates a logical slice of the router and can allow routing instance creates a logical slice of the router and can allow
multiple different logical slices; across a set of routers; to multiple different logical slices; across a set of routers; to
communicate with each other. And the routing protocol parameters communicate with each other. And the routing protocol parameters
control the information available in the RIBs. More detail about control the information available in the RIBs. More detail about
routing instance can be found in Section 2.2 of routing instance can be found in Section 2.2 of
[I-D.ietf-i2rs-rib-info-model]. [I-D.ietf-i2rs-rib-info-model].
As described in [I-D.ietf-i2rs-rib-info-model], there will be For a routing instance, there will be multiple RIBs. Therefore, this
multiple routing instances for a router. At the same time, for a model uses "list" to express the RIBs. The structure tree is shown
routing instance, there would be multiple RIBs as well. Therefore, as following figure.
this model uses "list" to express the RIBs. The structure tree is
shown as following figure.
+--rw routing-instance +--rw routing-instance
+--rw name string +--rw name string
+--rw interface-list* [name] +--rw interface-list* [name]
| +--rw name if:interface-ref | +--rw name if:interface-ref
+--rw router-id? yang:dotted-quad +--rw router-id? yang:dotted-quad
+--rw lookup-limit? uint8 +--rw lookup-limit? uint8
+--rw rib-list* [name] +--rw rib-list* [name]
+--rw name string +--rw name string
+--rw rib-family rib-family-def +--rw rib-family rib-family-def
+--rw ip-rpf-check? boolean +--rw ip-rpf-check? boolean
+--rw route-list* [route-index] +--rw route-list* [route-index]
... (refer to Section 2.3) ... (refer to Section 2.3)
Figure 2: Routing Instance Stuture Figure 2: Routing Instance Structure
2.3. Route 2.3. Route
A route is essentially a match condition and an action following that A route is essentially a match condition and an action following that
match. The match condition specifies the kind of route (e.g., IPv4, match. The match condition specifies the kind of route (e.g., IPv4,
MPLS, MAC, Interface etc.) and the set of fields to match on. 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 According to the definition in [I-D.ietf-i2rs-rib-info-model], a
route MUST associate with the following attributes: route MUST associate with the following attributes:
skipping to change at page 8, line 41 skipping to change at page 9, line 11
o ACTIVE: Indicates whether a route is fully resolved and is a o ACTIVE: Indicates whether a route is fully resolved and is a
candidate for selection. candidate for selection.
o INSTALLED: Indicates whether the route got installed in the FIB. o INSTALLED: Indicates whether the route got installed in the FIB.
In addition, a route can associate with one or more optional route In addition, a route can associate with one or more optional route
attributes(e.g., route-vendor-attributes). attributes(e.g., route-vendor-attributes).
For a RIB, there will have a number of routes, so the routes are 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-list* [route-index]
+--rw route-index uint64 +--rw route-index uint64
+--rw match +--rw match
| +--rw (route-type)? | +--rw (route-type)?
| +--:(ipv4) | +--:(ipv4)
| | +--rw ipv4 | | +--rw ipv4
| | +--rw (ip-route-match-type)? | | +--rw (ip-route-match-type)?
| | +--:(dest-ipv4-address) | | +--:(dest-ipv4-address)
| | | ... | | | ...
skipping to change at page 9, line 47 skipping to change at page 10, line 7
2.4. Nexthop 2.4. Nexthop
A nexthop represents an object resulting from a route lookup. As 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 illustrated in Section 2.4 of [I-D.ietf-i2rs-rib-info-model], to
support various of use cases (e.g., load balance, protection, support various of use cases (e.g., load balance, protection,
multicast or the combination of them), the nexthop is modelled as a multicast or the combination of them), the nexthop is modelled as a
multi-level structure and supports recursion. The first level of the multi-level structure and supports recursion. The first level of the
nexthop includes the following four types: nexthop includes the following four types:
o Base: The "base" nexthop itself is a hierarchical structure, it is o Base: The "base" nexthop is the foundation of all other nexthop
the base of all other nexthop types. The first level of the base types. It includes the follow basic nexthops:
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.
* nexthop-id * nexthop-id
* IPv4 address
* IPv6 address
* egress-interface * egress-interface
* egress-interface with IPv4 address
* egress-interface with IPv6 address
* egress-interface with MAC address
* logical-tunnel * logical-tunnel
* tunnel-encap * 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 o Load-balance: Designed for load-balance case where it normally
will have multiple weighted nexthops. will have multiple weighted nexthops.
o Protection: Designed for protection scenario where it normally o Protection: Designed for protection scenario where it normally
will have primary and standby nexthop. will have primary and standby nexthop.
o Replicate: Designed for multiple destinations forwarding. o Replicate: Designed for multiple destinations forwarding.
The structure tree of nexthop is shown in the following figures. The structure tree of nexthop is shown in the following figures.
+--rw nexthop +--rw nexthop
| +--rw nexthop-id uint32 | +--rw nexthop-id? uint32
| +--rw sharing-flag boolean | +--rw sharing-flag? boolean
| +--rw (nexthop-type)? | +--rw (nexthop-type)?
| +--:(nexthop-base) | +--:(nexthop-base)
| | ...(refer to Figure 5) | | ...(refer to Figure 5)
| +--:(nexthop-chain) {nexthop-chain}? | +--:(nexthop-chain) {nexthop-chain}?
| | +--rw nexthop-chain | | +--rw nexthop-chain
| | +--rw nexthop-list* [nexthop-member-id] | | +--rw nexthop-list* [nexthop-member-id]
| | +--rw nexthop-member-id uint32 | | +--rw nexthop-member-id uint32
| +--:(nexthop-replicates) {nexthop-replicates}? | +--:(nexthop-replicates) {nexthop-replicates}?
| | +--rw nexthop-replicates | | +--rw nexthop-replicates
| | +--rw nexthop-list* [nexthop-member-id] | | +--rw nexthop-list* [nexthop-member-id]
| | +--rw nexthop-member-id uint32 | | +--rw nexthop-member-id uint32
| +--:(nexthop-protection) {nexthop-protection}? | +--:(nexthop-protection) {nexthop-protection}?
| | +--rw nexthop-protection | | +--rw nexthop-protection
| | +--rw nexthop-list* [nexthop-member-id] | | +--rw nexthop-list* [nexthop-member-id]
| | +--rw nexthop-member-id uint32 | | +--rw nexthop-member-id uint32
| | +--rw nexthop-preference nexthop-preference-def | | +--rw nexthop-preference nexthop-preference-def
| +--:(nexthop-load-balance) {nexthop-load-balance}? | +--:(nexthop-load-balance) {nexthop-load-balance}?
| +--rw nexthop-lbs | +--rw nexthop-lbs
| +--rw nexthop-list* [nexthop-member-id] | +--rw nexthop-list* [nexthop-member-id]
| +--rw nexthop-member-id uint32 | +--rw nexthop-member-id uint32
| +--rw nexthop-lb-weight nexthop-lb-weight-def | +--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 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) +--:(nexthop-base)
| +--rw nexthop-base | +--rw nexthop-base
| +--rw (nexthop-base-type)? | +--rw (nexthop-base-type)?
| +--:(special-nexthop) | +--:(special-nexthop)
| | +--rw special? special-nexthop-def | | +--rw special? special-nexthop-def
| +--:(egress-interface-nexthop) | +--:(egress-interface-nexthop)
| | +--rw outgoing-interface if:interface-ref | | +--rw outgoing-interface if:interface-ref
| +--:(ipv4-address-nexthop) | +--:(ipv4-address-nexthop)
| | +--rw ipv4-address inet:ipv4-address | | +--rw ipv4-address inet:ipv4-address
| +--:(ipv6-address-nexthop) | +--:(ipv6-address-nexthop)
| | +--rw ipv6-address inet:ipv6-address | | +--rw ipv6-address inet:ipv6-address
| +--:(egress-interface-ipv4-nexthop) | +--:(egress-interface-ipv4-nexthop)
| | +--rw egress-interface-ipv4-address | | +--rw egress-interface-ipv4-address
| | +--rw outgoing-interface if:interface-ref | | +--rw outgoing-interface if:interface-ref
| | +--rw ipv4-address inet:ipv4-address | | +--rw ipv4-address inet:ipv4-address
| +--:(egress-interface-ipv6-nexthop) | +--:(egress-interface-ipv6-nexthop)
| | +--rw egress-interface-ipv6-address | | +--rw egress-interface-ipv6-address
| | +--rw outgoing-interface if:interface-ref | | +--rw outgoing-interface if:interface-ref
| | +--rw ipv6-address inet:ipv6-address | | +--rw ipv6-address inet:ipv6-address
| +--:(egress-interface-mac-nexthop) | +--:(egress-interface-mac-nexthop)
| | +--rw egress-interface-mac-address | | +--rw egress-interface-mac-address
| | +--rw outgoing-interface if:interface-ref | | +--rw outgoing-interface if:interface-ref
| | +--rw ieee-mac-address uint32 | | +--rw ieee-mac-address uint32
| +--:(tunnel-encap-nexthop) {nexthop-tunnel}? | +--:(tunnel-encap-nexthop) {nexthop-tunnel}?
| | +--rw tunnel-encap | | +--rw tunnel-encap
| | +--rw (tunnel-type)? | | +--rw (tunnel-type)?
| | +--:(ipv4) {ipv4-tunnel}? | | +--:(ipv4) {ipv4-tunnel}?
| | | +--rw src-ipv4-address inet:ipv4-address | | | +--rw ipv4-header
| | | +--rw dest-ipv4-address inet:ipv4-address | | | +--rw src-ipv4-address inet:ipv4-address
| | | +--rw protocol uint8 | | | +--rw dest-ipv4-address inet:ipv4-address
| | | +--rw ttl? uint8 | | | +--rw protocol uint8
| | | +--rw dscp? uint8 | | | +--rw ttl? uint8
| | | +--rw dscp? uint8
| | +--:(ipv6) {ipv6-tunnel}? | | +--:(ipv6) {ipv6-tunnel}?
| | | +--rw src-ipv6-address inet:ipv6-address | | | +--rw ipv6-header
| | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw src-ipv6-address inet:ipv6-address
| | | +--rw next-header uint8 | | | +--rw dest-ipv6-address inet:ipv6-address
| | | +--rw traffic-class? uint8 | | | +--rw next-header uint8
| | | +--rw flow-label? uint16 | | | +--rw traffic-class? uint8
| | | +--rw hop-limit? uint8 | | | +--rw flow-label? uint16
| | | +--rw hop-limit? uint8
| | +--:(mpls) {mpls-tunnel}? | | +--:(mpls) {mpls-tunnel}?
| | | +--rw label-operations* [label-oper-id] | | | +--rw mpls-header
| | | +--rw label-oper-id uint32 | | | +--rw label-operations* [label-oper-id]
| | | +--rw (label-actions)? | | | +--rw label-oper-id uint32
| | | +--:(label-push) | | | +--rw (label-actions)?
| | | | +--rw label-push | | | +--:(label-push)
| | | | +--rw label uint32 | | | | +--rw label-push
| | | | +--rw s-bit? boolean | | | | +--rw label uint32
| | | | +--rw tc-value? uint8 | | | | +--rw s-bit? boolean
| | | | +--rw ttl-value? uint8 | | | | +--rw tc-value? uint8
| | | +--:(label-swap) | | | | +--rw ttl-value? uint8
| | | +--rw label-swap | | | +--:(label-swap)
| | | +--rw in-label uint32 | | | +--rw label-swap
| | | +--rw out-label uint32 | | | +--rw in-label uint32
| | | +--rw ttl-action? ttl-action-def | | | +--rw out-label uint32
| | | +--rw ttl-action? ttl-action-def
| | +--:(gre) {gre-tunnel}? | | +--:(gre) {gre-tunnel}?
| | | +--rw (dest-address-type)? | | | +--rw gre-header
| | | | +--:(ipv4) | | | +--rw (dest-address-type)?
| | | | | +--rw ipv4-dest inet:ipv4-address | | | | +--:(ipv4)
| | | | +--:(ipv6) | | | | | +--rw ipv4-dest inet:ipv4-address
| | | | +--rw ipv6-dest inet:ipv6-address | | | | +--:(ipv6)
| | | +--rw protocol-type uint16 | | | | +--rw ipv6-dest inet:ipv6-address
| | | +--rw key? uint64 | | | +--rw protocol-type uint16
| | | +--rw key? uint64
| | +--:(nvgre) {nvgre-tunnel}? | | +--:(nvgre) {nvgre-tunnel}?
| | | +--rw (nvgre-type)? | | | +--rw nvgre-header
| | | | +--:(ipv4) | | | +--rw (nvgre-type)?
| | | | | +--rw src-ipv4-address inet:ipv4-address | | | | +--:(ipv4)
| | | | | +--rw dest-ipv4-address inet:ipv4-address | | | | | +--rw src-ipv4-address inet:ipv4-address
| | | | | +--rw protocol uint8 | | | | | +--rw dest-ipv4-address inet:ipv4-address
| | | | | +--rw ttl? uint8 | | | | | +--rw protocol uint8
| | | | | +--rw dscp? uint8 | | | | | +--rw ttl? uint8
| | | | +--:(ipv6) | | | | | +--rw dscp? uint8
| | | | +--rw src-ipv6-address inet:ipv6-address | | | | +--:(ipv6)
| | | | +--rw dest-ipv6-address inet:ipv6-address | | | | +--rw src-ipv6-address inet:ipv6-address
| | | | +--rw next-header uint8 | | | | +--rw dest-ipv6-address inet:ipv6-address
| | | | +--rw traffic-class? uint8 | | | | +--rw next-header uint8
| | | | +--rw flow-label? uint16 | | | | +--rw traffic-class? uint8
| | | | +--rw hop-limit? uint8 | | | | +--rw flow-label? uint16
| | | +--rw virtual-subnet-id uint32 | | | | +--rw hop-limit? uint8
| | | +--rw flow-id? uint16 | | | +--rw virtual-subnet-id uint32
| | | +--rw flow-id? uint16
| | +--:(vxlan) {vxlan-tunnel}? | | +--:(vxlan) {vxlan-tunnel}?
| | +--rw (vxlan-type)? | | +--rw vxlan-header
| | | +--:(ipv4) | | +--rw (vxlan-type)?
| | | | +--rw src-ipv4-address inet:ipv4-address | | | +--:(ipv4)
| | | | +--rw dest-ipv4-address inet:ipv4-address | | | | +--rw src-ipv4-address inet:ipv4-address
| | | | +--rw protocol uint8 | | | | +--rw dest-ipv4-address inet:ipv4-address
| | | | +--rw ttl? uint8 | | | | +--rw protocol uint8
| | | | +--rw dscp? uint8 | | | | +--rw ttl? uint8
| | | +--:(ipv6) | | | | +--rw dscp? uint8
| | | +--rw src-ipv6-address inet:ipv6-address | | | +--:(ipv6)
| | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw src-ipv6-address inet:ipv6-address
| | | +--rw next-header uint8 | | | +--rw dest-ipv6-address inet:ipv6-address
| | | +--rw traffic-class? uint8 | | | +--rw next-header uint8
| | | +--rw flow-label? uint16 | | | +--rw traffic-class? uint8
| | | +--rw hop-limit? uint8 | | | +--rw flow-label? uint16
| | +--rw vxlan-identifier uint32 | | | +--rw hop-limit? uint8
| +--:(tunnel-decap-nexthp) {nexthop-tunnel}? | | +--rw vxlan-identifier uint32
| +--:(tunnel-decap-nexthop) {nexthop-tunnel}?
| | +--rw tunnel-decap | | +--rw tunnel-decap
| | +--rw (tunnel-type)? | | +--rw (tunnel-type)?
| | +--:(ipv4) {ipv4-tunnel}? | | +--:(ipv4) {ipv4-tunnel}?
| | | +--rw ipv4-decap | | | +--rw ipv4-decap
| | | +--rw ipv4-decap tunnel-decap-action-def | | | +--rw ipv4-decap tunnel-decap-action-def
| | | +--rw ttl-action? ttl-action-def | | | +--rw ttl-action? ttl-action-def
| | +--:(ipv6) {ipv6-tunnel}? | | +--:(ipv6) {ipv6-tunnel}?
| | | +--rw ipv6-decap | | | +--rw ipv6-decap
| | | +--rw ipv6-decap tunnel-decap-action-def | | | +--rw ipv6-decap tunnel-decap-action-def
| | | +--rw hop-limit-action? hop-limit-action-def | | | +--rw hop-limit-action? hop-limit-action-def
| | +--:(mpls) {mpls-tunnel}? | | +--:(mpls) {mpls-tunnel}?
| | +--rw label-pop | | +--rw label-pop
| | +--rw label-pop mpls-label-action-def | | +--rw label-pop mpls-label-action-def
| | +--rw ttl-action? ttl-action-def | | +--rw ttl-action? ttl-action-def
| +--:(logical-tunnel-nexthop) {nexthop-tunnel}? | +--:(logical-tunnel-nexthop) {nexthop-tunnel}?
| | +--rw logical-tunnel | | +--rw logical-tunnel
| | +--rw tunnel-type tunnel-type-def | | +--rw tunnel-type tunnel-type-def
| | +--rw tunnel-name string | | +--rw tunnel-name string
| +--:(rib-name-nexthop) | +--:(rib-name-nexthop)
| +--rw rib-name? string | | +--rw rib-name? string
Figure 5: Nexthop Base Structure | +--:(nexthop-identifier)
| +--rw nexthop-ref nexthop-ref
Figure 5: Nexthop Base Structure
2.5. RPC Operations 2.5. RPC Operations
This module defines the following 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 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 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 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. 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 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 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 output is the result of the delete operation:
0 means failed.
* 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 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 rib. A rib name, the route prefix(es), route attributes, route
vendor attributes and nexthop are passed as the input parameters. vendor attributes, nexthop and whether return failure detail are
The output is the result of the add operation: 1 means success, passed as the input parameters. Before calling the route-add rpc,
and 0 means failed. Before calling the route-add rpc, it is it is required to call the nh-add rpc to create and/or return the
required to call the nh-add rpc to create and/or return the nexthop identifier. The output is a combination of the route
nexthop identifier. 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 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 from a rib. A name of the rib, the route prefix(es) and whether
as the input parameters. The output is the result of the delete return failure detail are passed as the input parameters. The
operation: 1 means success, and 0 means failed. 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. 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 A rib name, the route prefix(es), or route attributes, or route
vendor attributes, or nexthop are passed as the input parameters. vendor attributes, or nexthop are passed as the input parameters.
The match conditions can be either route prefix(es), or route The match conditions can be either route prefix(es), or route
attributes, or route vendor attributes, or nexthop. The update attributes, or route vendor attributes, or nexthop. The update
actions include: update the nexthop, update the route attributes, actions include: update the nexthop, update the route attributes,
update the route vendor attributes. The output is the result of update the route vendor attributes. The output is combination of
the update operation: 1 means success, and 0 means failed. 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 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 rib and a nexthop are passed as the input parameters. The network
node is required to allocate a nexhop identifier to the nexthop. node is required to allocate a nexthop identifier to the nexthop.
The outputs include the result of the update operation (1 means The outputs include the result of the nexthop add operation.
success, and 0 means failed ) and the nexthop identifier that is
allocated to the nexthop. * 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 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 of a rib and a nexthop or nexthop identifier are passed as the
input parameters. The output is the result of the delete 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. The structure tree of rpcs is showing in following figure.
rpcs: rpcs:
+---x rib-add +---x rib-add
| +--ro input | +---w input
| | +--ro rib-name string | | +---w rib-name string
| | +--ro rib-family rib-family-def | | +---w rib-family rib-family-def
| | +--ro ip-rpf-check? boolean | | +---w ip-rpf-check? boolean
| +--ro output | +--ro output
| +--ro result boolean | +--ro result uint32
+---x rib-delete | +--ro reason? string
| +--ro input +---x rib-delete
| | +--ro rib-name string | +---w input
| +--ro output | | +---w rib-name string
| +--ro result boolean | +--ro output
+---x route-add | +--ro result uint32
| +--ro input | +--ro reason? string
| | +--ro rib-name string +---x route-add
| | +--ro routes | +---w input
| | +--ro route-list* [route-index] | | +---w return-failure-detail? boolean
| | ... | | +---w rib-name string
| +--ro output | | +---w routes
| +--ro result boolean | | +---w route-list* [route-index]
+---x route-delete | | ...
| +--ro input | +--ro output
| | +--ro rib-name string | +--ro success-count uint32
| | +--ro routes | +--ro failed-count uint32
| | +--ro route-list* [route-index] | +--ro failure-detail
| | ... | +--ro failed-routes* [route-index]
| +--ro output | +--ro route-index uint32
| +--ro result boolean | +--ro error-code? uint32
+---x route-update +---x route-delete
| +--ro input | +---w input
| | +--ro rib-name string | | +---w return-failure-detail? boolean
| | +--ro (match-conditions)? | | +---w rib-name string
| | +--:(match-route-prefix) | | +---w routes
| | | ... | | +---w route-list* [route-index]
| | +--:(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)?
| | ...
| +--ro output
| +--ro result boolean
| +--ro nexthop-id uint32
+---x nh-delete
+--ro input
| +--ro rib-name string
| +--ro nexthop-id uint32
| +--ro sharing-flag boolean
| +--ro (nexthop-type)?
| ...
+--ro output
+--ro result boolean
Figure 6: RPCs Structure | +--ro output
| +--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
| +---w input
| | +---w return-failure-detail? boolean
| | +---w rib-name string
| | +---w (match-options)?
| | +--:(match-route-prefix)
| | | ...
| | +--:(match-route-attributes)
| | | ...
| | +--:(match-route-vendor-attributes) {...}?
| | | ...
| | +--:(match-nexthop)
| | ...
| +--ro output
| +--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
| +---w input
| | +---w rib-name string
| | +---w nexthop-id? uint32
| | +---w sharing-flag? boolean
| | +---w (nexthop-type)?
| | ...
| +--ro output
| +--ro result uint32
| +--ro reason? string
| +--ro nexthop-id? uint32
+---x nh-delete
+---w input
| +---w rib-name string
| +---w nexthop-id? uint32
| +---w sharing-flag? boolean
| +---w (nexthop-type)?
| ...
+--ro output
+--ro result uint32
+--ro reason? string
Figure 6: RPCs Structure
2.6. Notifications 2.6. Notifications
Asynchronous notifications are sent by the RIB manager of a network Asynchronous notifications are sent by the RIB manager of a network
device to an external entity when some event triggers on the 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 device. A RIB data-model MUST support sending 2 kind of asynchronous
notifications. notifications.
1. Route change notification: 1. Route change notification:
skipping to change at page 17, line 46 skipping to change at page 19, line 46
| +--:(interface-route) | +--:(interface-route)
| ... | ...
+--ro route-installed-state route-installed-state-def +--ro route-installed-state route-installed-state-def
+--ro route-state route-state-def +--ro route-state route-state-def
+--ro route-change-reason route-reason-def +--ro route-change-reason route-reason-def
Figure 7: Notifications Structure Figure 7: Notifications Structure
3. YANG Modules 3. YANG Modules
//<CODE BEGINS> file "ietf i2rs rib@2015-10-28.yang" <CODE BEGINS> file "ietf-i2rs-rib@2015-11-20.yang"
module ietf-i2rs-rib { module ietf-i2rs-rib {
namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib";
// replace with iana namespace when assigned // replace with iana namespace when assigned
prefix "iir"; prefix "iir";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
//rfc6991 //rfc6991
} }
skipping to change at page 18, line 50 skipping to change at page 20, line 50
Editor: Sriganesh Kini Editor: Sriganesh Kini
<mailto:sriganesh.kini@ericsson.com> <mailto:sriganesh.kini@ericsson.com>
Editor: Nitin Bahadur Editor: Nitin Bahadur
<mailto:nitin_bahadur@yahoo.com>"; <mailto:nitin_bahadur@yahoo.com>";
description description
"This module defines a YANG data model for "This module defines a YANG data model for
Routing Information Base (RIB) that aligns Routing Information Base (RIB) that aligns
with the I2RS RIB information model."; with the I2RS RIB information model.";
revision "2015-10-28" { revision "2015-11-20" {
description "initial revision"; description "initial revision";
reference "draft-ietf-i2rs-rib-info-model-08"; reference "draft-ietf-i2rs-data-model-04";
} }
//Features //Features
feature nexthop-tunnel { feature nexthop-tunnel {
description description
"This feature means that a node support "This feature means that a node support
tunnel nexhtop capability."; tunnel nexthop capability.";
} }
feature nexthop-chain { feature nexthop-chain {
description description
"This feature means that a node support "This feature means that a node support
chain nexhtop capability."; chain nexthop capability.";
} }
feature nexthop-protection { feature nexthop-protection {
description description
"This feature means that a node support "This feature means that a node support
protection nexhtop capability."; protection nexthop capability.";
} }
feature nexthop-replicates { feature nexthop-replicates {
description description
"This feature means that a node support "This feature means that a node support
relicates nexhtop capability."; relicates nexthop capability.";
} }
feature nexthop-load-balance { feature nexthop-load-balance {
description description
"This feature means that a node support "This feature means that a node support
load balance nexhtop capability."; load balance nexthop capability.";
} }
feature ipv4-tunnel { feature ipv4-tunnel {
description description
"This feature means that a node support "This feature means that a node support
IPv4 tunnel encapsulation capability."; IPv4 tunnel encapsulation capability.";
} }
feature ipv6-tunnel { feature ipv6-tunnel {
description description
skipping to change at page 22, line 6 skipping to change at page 24, line 6
type identityref { type identityref {
base "tunnel-decap-action"; base "tunnel-decap-action";
} }
description description
"Tunnel decap def."; "Tunnel decap def.";
} }
identity ttl-action { identity ttl-action {
description description
"Base identify from which all TTL "Base identify from which all TTL
actions are derived. 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.";
} }
identity no-action { identity no-action {
base "ttl-action"; base "ttl-action";
description description
"Do nothing regarding the TTL."; "Do nothing regarding the TTL.";
} }
identity copy-to-inner { identity copy-to-inner {
base "ttl-action"; base "ttl-action";
skipping to change at page 30, line 29 skipping to change at page 32, line 23
"Route reason def."; "Route reason def.";
} }
typedef nexthop-preference-def { typedef nexthop-preference-def {
type uint8 { type uint8 {
range "1..99"; range "1..99";
} }
description description
"Nexthop-preference is used for protection schemes. "Nexthop-preference is used for protection schemes.
It is an integer value between 1 and 99. A lower It is an integer value between 1 and 99. A lower
value indicates higher preference. To download a value indicates higher preference. To download N
primary/standby/tertiary group to the FIB, the nexthops to the FIB, the N nexthops with the lowest
nexthops that are resolved and have two highest value are selected.";
preferences are selected.";
} }
typedef nexthop-lb-weight-def { typedef nexthop-lb-weight-def {
type uint8 { type uint8 {
range "1..99"; range "1..99";
} }
description description
"Nhop-lb-weight is a number between 1 and 99."; "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 //Groupings
grouping route-prefix { grouping route-prefix {
description description
"The common attributes used for all types of route prefix."; "The common attributes used for all types of route prefix.";
leaf route-index { leaf route-index {
type uint64 ; type uint64 ;
mandatory true; mandatory true;
description description
"Route index."; "Route index.";
} }
skipping to change at page 33, line 29 skipping to change at page 35, line 35
"MPLS route case."; "MPLS route case.";
leaf mpls-label { leaf mpls-label {
type uint32 ; type uint32 ;
mandatory true; mandatory true;
description description
"The label used for matching."; "The label used for matching.";
} }
} }
case mac-route { case mac-route {
description description
"MAC rib case."; "MAC route case.";
leaf mac-address { leaf mac-address {
type uint32 ; type uint32 ;
mandatory true; mandatory true;
description description
"The MAC address used for matching."; "The MAC address used for matching.";
} }
} }
case interface-route { case interface-route {
description description
"Interface route case."; "Interface route case.";
skipping to change at page 33, line 46 skipping to change at page 36, line 4
} }
case interface-route { case interface-route {
description description
"Interface route case."; "Interface route case.";
leaf interface-identifier { leaf interface-identifier {
type if:interface-ref; type if:interface-ref;
mandatory true; mandatory true;
description description
"The interface used for matching."; "The interface used for matching.";
} }
} }
} }
} }
} }
grouping route { grouping route {
description description
"The common attributes usesd for all types of route."; "The common attributes used for all types of route.";
uses route-prefix; uses route-prefix;
container nexthop { container nexthop {
description description
"The nexthop of the route."; "The nexthop of the route.";
uses nexthop; uses nexthop;
} }
container route-statistic { container route-statistic {
description description
"The statistic information of the route."; "The statistic information of the route.";
leaf route-state { leaf route-state {
skipping to change at page 36, line 28 skipping to change at page 38, line 33
the load balance nexthops."; the load balance nexthops.";
} }
} }
} }
grouping nexthop { grouping nexthop {
description description
"The nexthop structure."; "The nexthop structure.";
leaf nexthop-id { leaf nexthop-id {
type uint32; type uint32;
mandatory true;
description description
"The nexthop identifier of a nexthop."; "An identifier that refers to a nexthop.";
} }
leaf sharing-flag { leaf sharing-flag {
type boolean; type boolean;
mandatory true;
description description
"To indicate whether a nexthop is sharable "To indicate whether a nexthop is sharable
or non-sharable. or non-sharable.
true - sharable, means the nexthop can be shared true - sharable, means the nexthop can be shared
with other routes with other routes
false - non-sharable, means the nexthop can not false - non-sharable, means the nexthop can not
be shared with other routes."; be shared with other routes.";
} }
choice nexthop-type { choice nexthop-type {
description description
skipping to change at page 38, line 45 skipping to change at page 40, line 49
} }
leaf ipv4-address { leaf ipv4-address {
type inet:ipv4-address; type inet:ipv4-address;
mandatory true; mandatory true;
description description
"The nexthop points to an interface with "The nexthop points to an interface with
an IPv4 address."; an IPv4 address.";
} }
description description
"The nexthop is an Egress-interface and an ip "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."; the ip address is a link-local address.";
} }
} }
case egress-interface-ipv6-nexthop { case egress-interface-ipv6-nexthop {
container egress-interface-ipv6-address { container egress-interface-ipv6-address {
leaf outgoing-interface { leaf outgoing-interface {
type if:interface-ref; type if:interface-ref;
mandatory true; mandatory true;
description description
"Name of the outgoing interface."; "Name of the outgoing interface.";
} }
leaf ipv6-address { leaf ipv6-address {
skipping to change at page 39, line 18 skipping to change at page 41, line 23
} }
leaf ipv6-address { leaf ipv6-address {
type inet:ipv6-address; type inet:ipv6-address;
mandatory true; mandatory true;
description description
"The nexthop points to an interface with "The nexthop points to an interface with
an IPv6 address."; an IPv6 address.";
} }
description description
"The nexthop is an Egress-interface and an ip "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."; the ip address is a link-local address.";
} }
} }
case egress-interface-mac-nexthop { case egress-interface-mac-nexthop {
container egress-interface-mac-address { container egress-interface-mac-address {
leaf outgoing-interface { leaf outgoing-interface {
type if:interface-ref; type if:interface-ref;
mandatory true; mandatory true;
description description
"Name of the outgoing interface."; "Name of the outgoing interface.";
skipping to change at page 40, line 10 skipping to change at page 42, line 14
"This can be an encap representing an IP tunnel or "This can be an encap representing an IP tunnel or
MPLS tunnel or others as defined in info model. MPLS tunnel or others as defined in info model.
An optional egress interface can be chained to the An optional egress interface can be chained to the
tunnel encap to indicate which interface to send tunnel encap to indicate which interface to send
the packet out on. The egress interface is useful the packet out on. The egress interface is useful
when the network device contains Ethernet interfaces when the network device contains Ethernet interfaces
and one needs to perform address resolution for the and one needs to perform address resolution for the
IP packet."; IP packet.";
} }
} }
case tunnel-decap-nexthp { case tunnel-decap-nexthop {
if-feature nexthop-tunnel; if-feature nexthop-tunnel;
container tunnel-decap { container tunnel-decap {
uses tunnel-decap; uses tunnel-decap;
description description
"This is to specify decapsulating a tunnel header."; "This is to specify decapsulating a tunnel header.";
} }
} }
case logical-tunnel-nexthop { case logical-tunnel-nexthop {
if-feature nexthop-tunnel; if-feature nexthop-tunnel;
container logical-tunnel { container logical-tunnel {
skipping to change at page 40, line 37 skipping to change at page 42, line 41
} }
case rib-name-nexthop { case rib-name-nexthop {
leaf rib-name { leaf rib-name {
type string; type string;
description description
"A nexthop pointing to a rib indicates that the "A nexthop pointing to a rib indicates that the
route lookup needs to continue in The specified route lookup needs to continue in The specified
rib. This is a way to perform chained lookups."; 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 { grouping route-vendor-attributes {
description description
"Route vendor attributes."; "Route vendor attributes.";
} }
grouping logical-tunnel { grouping logical-tunnel {
description description
"A logical tunnel that is identified "A logical tunnel that is identified
by a type and a tunnel name."; by a type and a tunnel name.";
leaf tunnel-type { leaf tunnel-type {
skipping to change at page 46, line 4 skipping to change at page 48, line 16
- No-action, or - No-action, or
- Copy to inner label,or - Copy to inner label,or
- Decrease (the in label) by 1 and - Decrease (the in label) by 1 and
copy to the out label."; copy to the out label.";
} }
} }
} }
} }
} }
} }
grouping tunnel-encap{ grouping tunnel-encap{
description description
"Tunnel encapsulation inforamtion."; "Tunnel encapsulation inforamtion.";
choice tunnel-type { choice tunnel-type {
description description
"Tunnel options for next-hops."; "Tunnel options for next-hops.";
case ipv4 { case ipv4 {
if-feature ipv4-tunnel; if-feature ipv4-tunnel;
uses ipv4-header; container ipv4-header {
uses ipv4-header;
description
"IPv4 header.";
}
} }
case ipv6 { case ipv6 {
if-feature ipv6-tunnel; if-feature ipv6-tunnel;
uses ipv6-header; container ipv6-header {
uses ipv6-header;
description
"IPv6 header.";
}
} }
case mpls { case mpls {
if-feature mpls-tunnel; if-feature mpls-tunnel;
uses mpls-header; container mpls-header {
uses mpls-header;
description
"MPLS header.";
}
} }
case gre { case gre {
if-feature gre-tunnel; if-feature gre-tunnel;
uses gre-header; container gre-header {
uses gre-header;
description
"GRE header.";
}
} }
case nvgre { case nvgre {
if-feature nvgre-tunnel; if-feature nvgre-tunnel;
uses nvgre-header; container nvgre-header {
uses nvgre-header;
description
"NvGRE header.";
}
} }
case vxlan { case vxlan {
if-feature vxlan-tunnel; if-feature vxlan-tunnel;
uses vxlan-header; container vxlan-header {
uses vxlan-header;
description
"VxLAN header.";
}
} }
} }
} }
grouping tunnel-decap { grouping tunnel-decap {
description description
"Tunnel decapsulation inforamtion."; "Tunnel decapsulation inforamtion.";
choice tunnel-type { choice tunnel-type {
description description
"Nexthop tunnel type options."; "Nexthop tunnel type options.";
case ipv4 { case ipv4 {
if-feature ipv4-tunnel; if-feature ipv4-tunnel;
container ipv4-decap { container ipv4-decap {
description description
"IPv4 decap."; "IPv4 decap.";
leaf ipv4-decap { leaf ipv4-decap {
type tunnel-decap-action-def; type tunnel-decap-action-def;
mandatory true; mandatory true;
description description
"IPv4 decap operations."; "IPv4 decap operations.";
} }
leaf ttl-action { leaf ttl-action {
type ttl-action-def; type ttl-action-def;
description description
"The ttl actions: "The ttl actions:
no-action or copy to inner header."; no-action or copy to inner header.";
skipping to change at page 51, line 7 skipping to change at page 53, line 44
RIB. Reverse path forwarding (RPF) check is used to RIB. Reverse path forwarding (RPF) check is used to
prevent spoofing and limit malicious traffic."; prevent spoofing and limit malicious traffic.";
} }
} }
output { output {
leaf result { leaf result {
type boolean; type boolean;
mandatory true; mandatory true;
description description
"Return the result of the rib-add operation. "Return the result of the rib-add operation.
true - success; true - success;
false - failed."; false - failed";
}
leaf reason {
type string;
description
"The specific reason that causes the failure.";
} }
} }
} }
rpc rib-delete { rpc rib-delete {
description description
"To delete a rib from a routing instance. "To delete a rib from a routing instance.
After deleting the rib, all routes installed After deleting the rib, all routes installed
in the rib will be deleted as well."; in the rib will be deleted as well.";
input { input {
leaf rib-name { leaf rib-name {
skipping to change at page 51, line 33 skipping to change at page 54, line 28
"A reference to the name of the rib "A reference to the name of the rib
that is to be deleted."; that is to be deleted.";
} }
} }
output { output {
leaf result { leaf result {
type boolean; type boolean;
mandatory true; mandatory true;
description description
"Return the result of the rib-delete operation. "Return the result of the rib-delete operation.
true - success; 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 { rpc route-add {
description description
"To add a route or a list of route to a rib"; "To add a route or a list of route to a rib";
input { 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 { leaf rib-name {
type string; type string;
mandatory true; mandatory true;
description description
"A reference to the name of a rib."; "A reference to the name of a rib.";
} }
container routes { container routes {
description description
"The routes to be added to the rib."; "The routes to be added to the rib.";
list route-list { list route-list {
key "route-index"; key "route-index";
description description
"The list of routes to be added."; "The list of routes to be added.";
uses route-prefix; uses route-prefix;
container route-attributes { container route-attributes {
uses route-attributes; uses route-attributes;
description description
"Route attributes."; "The route attributes.";
} }
container route-vendor-attributes { container route-vendor-attributes {
if-feature route-vendor-attributes; if-feature route-vendor-attributes;
uses route-vendor-attributes; uses route-vendor-attributes;
description description
"Route vendor attributes."; "The route vendor attributes.";
} }
container nexthop { container nexthop {
uses nexthop; uses nexthop;
description description
"Nexthop."; "The nexthop of the added route.";
} }
} }
} }
} }
output { output {
leaf result { uses route-operation-state;
type boolean;
mandatory true;
description
"Return the result of the route-add operation.
true - success;
false - failed.";
}
} }
} }
rpc route-delete { rpc route-delete {
description description
"To delete a route or a list of route from a rib"; "To delete a route or a list of route from a rib";
input { 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 { leaf rib-name {
type string; type string;
mandatory true; mandatory true;
description description
"A reference to the name of a rib."; "A reference to the name of a rib.";
} }
container routes { container routes {
description description
"The routes to be added to the rib."; "The routes to be added to the rib.";
list route-list{ list route-list{
key "route-index"; key "route-index";
description description
"The list of routes to be deleted."; "The list of routes to be deleted.";
uses route-prefix; uses route-prefix;
} }
} }
} }
output { output {
leaf result { uses route-operation-state;
type boolean ; }
mandatory true; }
description
"Return the result of the route-delete operation. grouping route-update-options {
true - success; description
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 { rpc route-update {
description description
"To update a route or a list of route of a rib. "To update a route or a list of route of a rib.
The inputs: The inputs:
1. The match conditions, could be: 1. The match conditions, could be:
a. route prefix, or a. route prefix, or
b. route attribtes, or b. route attributes, or
c. nexthop; c. nexthop;
2. The update parameters to be used: 2. The update parameters to be used:
a. new nexhop; a. new nexthop;
b. new route attributes; b. new route attributes;nexthop
Actions: Actions:
1. update the nexthop 1. update the nexthop
2. update the route attributes 2. update the route attributes
The outputs: The outputs:
true - success; success-count - the number of routes updated;
false - failed. failed-count - the number of routes fail to update
failure-detail - the detail failure info.
"; ";
input { 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 { leaf rib-name {
type string; type string;
mandatory true; mandatory true;
description description
"A reference to the name of a rib."; "A reference to the name of a rib.";
} }
choice match-options {
choice match-conditions {
description description
"Match options."; "Match options.";
case match-route-prefix { case match-route-prefix {
description description
"Update the routes that match route "Update the routes that match route
prefix(es) condition."; prefix(es) condition.";
container input-routes { container input-routes {
description description
"The matched routes to be updated."; "The matched routes to be updated.";
list route-list { list route-list {
key "route-index"; key "route-index";
description description
"The list of routes to be updated."; "The list of routes to be updated.";
uses route-prefix; uses route-prefix;
choice update-actions-prefix { uses route-update-options;
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;
}
}
} }
} }
} }
case match-route-attributes { case match-route-attributes {
description description
"Update the routes that match the "Update the routes that match the
route attributes condition."; route attributes condition.";
container input-route-attributes { container input-route-attributes {
description description
"The route attributes are used for matching."; "The route attributes are used for matching.";
uses route-attributes; uses route-attributes;
} }
choice update-actions-attributes { container update-parametors {
description description
"Update actions: "Update options:
1. update the nexthop 1. update the nexthop
2. update the route attributes 2. update the route attributes
3. update the route-vendor-attributes."; 3. update the route-vendor-attributes.";
case update-nexthop { uses route-update-options;
uses nexthop;
}
case update-route-attributes {
uses route-attributes;
}
case update-route-vendor-attributes {
if-feature route-vendor-attributes;
uses route-vendor-attributes;
}
} }
} }
case match-route-vendor-attributes { case match-route-vendor-attributes {
if-feature route-vendor-attributes; if-feature route-vendor-attributes;
description description
"Update the routes that match the "Update the routes that match the
vendor attributes condition"; vendor attributes condition";
container input-route-vendor-attributes { container input-route-vendor-attributes {
description description
"The vendor route attributes are used for matching."; "The vendor route attributes are used for matching.";
uses route-vendor-attributes; uses route-vendor-attributes;
} }
choice update-actions-vendor-attributes { container update-parameters-vendor {
description description
"Update actions: "Update options:
1. update the nexthop 1. update the nexthop
2. update the route attributes 2. update the route attributes
3. update the route-vendor-attributes."; 3. update the route-vendor-attributes.";
case update-nexthop { uses route-update-options;
uses nexthop;
}
case update-route-attributes {
uses route-attributes;
}
case update-route-vendor-attributes {
uses route-vendor-attributes;
}
} }
} }
case match-nexthop { case match-nexthop {
description description
"Update the routes that match the nexthop."; "Update the routes that match the nexthop.";
container input-nexthop { container input-nexthop {
description description
"The nexthop used for matching."; "The nexthop used for matching.";
uses nexthop; uses nexthop;
} }
container update-parameters-nexthop {
choice update-actions-nexthop {
description description
"Update actions: "Update options:
1. update nexthop 1. update the nexthop
2. update route attributes 2. update the route attributes
3. update route-vendor-attributes."; 3. update the route-vendor-attributes.";
case update-nexthop { uses route-update-options;
uses nexthop;
}
case update-route-attributes {
uses route-attributes;
}
case update-route-vendor-attributes {
if-feature route-vendor-attributes;
uses route-vendor-attributes;
}
} }
} }
} }
} }
output { output {
leaf result { uses route-operation-state;
type boolean ;
mandatory true;
description
"Return the result of the route-update operation.
true - success;
false - failed.";
}
} }
} }
rpc nh-add { rpc nh-add {
description description
"To add a nexthop to a rib. "To add a nexthop to a rib.
Inputs parameters: Inputs parameters:
1. rib name 1. rib name
2. nexthop; 2. nexthop;
Actions: Actions:
Add the nexthop to the rib Add the nexthop to the rib
Outputs: Outputs:
1.Operation result: 1.Operation result:
true - success true - success
false - failed; false - failed;
2. nexthop identifier."; 2. nexthop identifier.";
input { input {
leaf rib-name { leaf rib-name {
type string; type string;
mandatory true; mandatory true;
description description
"A reference to the name of a rib."; "A reference to the name of a rib.";
} }
uses nexthop; uses nexthop;
} }
output { output {
leaf result { leaf result {
type boolean ; type boolean;
mandatory true; mandatory true;
description description
"Return the result of the nh-add operation. "Return the result of the rib-add operation.
true - success; true - success;
false - failed."; false - failed;";
}
leaf reason {
type string;
description
"The specific reason that causes the failure.";
} }
leaf nexthop-id { leaf nexthop-id {
type uint32; type uint32;
mandatory true;
description description
"A nexthop identifer that is allocated to the nexthop."; "A nexthop identifer that is allocated to the nexthop.";
} }
} }
} }
rpc nh-delete { rpc nh-delete {
description description
"To delete a nexthop from a rib"; "To delete a nexthop from a rib";
input { input {
leaf rib-name { leaf rib-name {
type string; type string;
mandatory true; mandatory true;
description description
"A reference to the name of a rib."; "A reference to the name of a rib.";
} }
uses nexthop; uses nexthop;
} }
output { output {
leaf result { leaf result {
type boolean ; type boolean;
mandatory true; mandatory true;
description description
"Return the result of the nh-delete operation. "Return the result of the rib-add operation.
true - success; true - success;
false - failed."; false - failed.";
} }
leaf reason {
type string;
description
"The specific reason that causes the failure.";
}
} }
} }
/*Notifications*/ /*Notifications*/
notification nexthop-resolution-status-change { notification nexthop-resolution-status-change {
description description
"Nexthop resolution status (resolved/unresolved) "Nexthop resolution status (resolved/unresolved)
notification."; notification.";
container nexthop{ container nexthop{
description description
"The nexthop."; "The nexthop.";
uses nexthop; uses nexthop;
} }
skipping to change at page 59, line 15 skipping to change at page 63, line 13
} }
leaf route-change-reason { leaf route-change-reason {
type route-reason-def; type route-reason-def;
mandatory true; mandatory true;
description description
"Return the reason that causes the route change."; "Return the reason that causes the route change.";
} }
} }
} }
//<CODE ENDS> <CODE ENDS>
4. IANA Considerations 4. IANA Considerations
This document requests to register a URI in the "IETF XML registry" This document requests to register a URI in the "IETF XML registry"
[RFC3688]: [RFC3688]:
-------------------------------------------------------------------- --------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib URI: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib
Registrant Contact: The IESG.XML: Registrant Contact: The IESG.XML:
N/A, the requested URI is an XML namespace. N/A, the requested URI is an XML namespace.
 End of changes. 112 change blocks. 
498 lines changed or deleted 701 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/