draft-ietf-i2rs-rib-data-model-09.txt   draft-ietf-i2rs-rib-data-model-10.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 M. Chen
Expires: June 9, 2018 Packet Design Expires: August 15, 2018 Huawei
M. Chen
Huawei
A. Dass A. Dass
Ericsson Ericsson
H. Ananthakrishnan
Packet Design
S. Kini S. Kini
Individual Individual
N. Bahadur N. Bahadur
Bracket Computing Bracket Computing
December 6, 2017 February 11, 2018
A YANG Data Model for Routing Information Base (RIB) A YANG Data Model for Routing Information Base (RIB)
draft-ietf-i2rs-rib-data-model-09 draft-ietf-i2rs-rib-data-model-10
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 46 skipping to change at page 1, line 46
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 https://datatracker.ietf.org/drafts/current/. Drafts is at https://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 June 9, 2018. This Internet-Draft will expire on August 15, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
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 . . . . . . . . . . . . . . . . 8 2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 7
2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 14 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 14
2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 18 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 18
3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 20 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 20
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 64 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 64
5. Security Considerations . . . . . . . . . . . . . . . . . . . 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 64
6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 65 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 65
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 66 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 66
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 66 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.1. Normative References . . . . . . . . . . . . . . . . . . 66 8.1. Normative References . . . . . . . . . . . . . . . . . . 66
8.2. Informative References . . . . . . . . . . . . . . . . . 67 8.2. Informative References . . . . . . . . . . . . . . . . . 67
skipping to change at page 3, line 18 skipping to change at page 3, line 18
1.1. Definitions and Acronyms 1.1. Definitions and Acronyms
RIB: Routing Information Base RIB: Routing Information Base
Information Model (IM): An abstract model of a conceptual domain, Information Model (IM): An abstract model of a conceptual domain,
independent of a specific implementation or data representation. independent of a specific implementation or data representation.
1.2. Tree Diagrams 1.2. Tree Diagrams
A simplified graphical representation of the data model is used in YANG tree diagrams provide a concise representation of a YANG module,
this document. The meaning of the symbols in these diagrams is as and SHOULD be included to help readers understand YANG module
follows: structure. Guidelines on tree diagrams can be found in Section 3 of
[I-D.ietf-netmod-yang-tree-diagrams].
o Brackets "[" and "]" enclose list keys.
o Curly braces "{" and "}" contain names of optional features that
make the corresponding node conditional.
o Abbreviations before data node names: "rw" means configuration
(read-write) and "ro" state data (read-only).
o Symbols after data node names: "?" means an optional node and "*"
denotes a "list" and "leaf-list".
o Parentheses enclose choice and case nodes, and case nodes are also
marked with a colon (":").
o Ellipsis ("...") stands for contents of subtrees that are not
shown.
2. Model Structure 2. Model Structure
The following figure shows an overview of structure tree of the ietf- The following figure shows an overview of structure tree of the ietf-
i2rs-rib module. To give a whole view of the structure tree, some i2rs-rib module. To give a whole view of the structure tree, some
details of the tree are omitted. The relevant details are introduced details of the tree are omitted. The relevant details are introduced
in the subsequent sub-sections. in the subsequent 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 address-family rib-family-def +--rw address-family rib-family-definition
+--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)
skipping to change at page 4, line 47 skipping to change at page 4, line 32
| | ... | | ...
| +--rw route-attributes | +--rw route-attributes
| | ... | | ...
| +--rw route-vendor-attributes | +--rw route-vendor-attributes
+--rw nexthop-list* [nexthop-member-id] +--rw nexthop-list* [nexthop-member-id]
+--rw nexthop-member-id uint32 +--rw nexthop-member-id uint32
rpcs: rpcs:
+---x rib-add +---x rib-add
| +---w input | +---w input
| | +---w name string | | +---w name string
| | +---w address-family rib-family-def | | +---w address-family rib-family-definition
| | +---w ip-rpf-check? boolean | | +---w ip-rpf-check? boolean
| +--ro output | +--ro output
| +--ro result uint32 | +--ro result uint32
| +--ro reason? string | +--ro reason? string
+---x rib-delete +---x rib-delete
| +---w input | +---w input
| | +---w name string | | +---w name string
| +--ro output | +--ro output
| +--ro result uint32 | +--ro result uint32
| +--ro reason? string | +--ro reason? string
skipping to change at page 7, line 17 skipping to change at page 6, line 50
| | +--:(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}?
| | ... | | ...
| +--ro nexthop-state nexthop-state-def | +--ro nexthop-state nexthop-state-definition
+---n route-change +---n route-change
+--ro rib-name string +--ro rib-name string
+--ro address-family rib-family-def +--ro address-family rib-family-definition
+--ro route-index uint64 +--ro route-index uint64
+--ro match +--ro match
| +--ro (route-type)? | +--ro (route-type)?
| +--:(ipv4) | +--:(ipv4)
| | ... | | ...
| +--:(ipv6) | +--:(ipv6)
| | ... | | ...
| +--:(mpls-route) | +--:(mpls-route)
| | ... | | ...
| +--:(mac-route) | +--:(mac-route)
| | ... | | ...
| +--:(interface-route) | +--:(interface-route)
| ... | ...
+--ro route-installed-state route-installed-state-def +--ro route-installed-state route-installed-state-definition
+--ro route-state route-state-def +--ro route-state route-state-definition
+--ro route-change-reason route-reason-def +--ro route-change-reason route-reason-definition
Figure 1: Overview of I2RS RIB Module Structure 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
might be a limitation on how many levels of lookup can be practically might be a limitation on how many levels of lookup can be practically
performed. Therefore, a RIB data model MUST specify a way for an performed. Therefore, a RIB data model MUST specify a way for an
external entity to learn about the functional capabilities of a external entity to learn about the functional capabilities of a
skipping to change at page 8, line 34 skipping to change at page 8, line 19
below: below:
+--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 address-family rib-family-def +--rw address-family rib-family-definition
+--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 Structure 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,
skipping to change at page 9, line 14 skipping to change at page 8, line 47
o ACTIVE: Indicates whether a route has at least one fully resolved o ACTIVE: Indicates whether a route has at least one fully resolved
nexthop and is therefore eligible for installation in the FIB. nexthop and is therefore eligible for installation in the FIB.
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 be associated with one or more optional In addition, a route can be associated with one or more optional
route attributes (e.g., route-vendor-attributes). route attributes (e.g., route-vendor-attributes).
A RIB will have a number of routes, so the routes are expressed as a A RIB will have a number of routes, so the routes are expressed as a
list under a specific rib. Each RIB has its own route list. 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 10, line 33 skipping to change at page 10, line 16
* egress-interface * egress-interface
* egress-interface with IPv4 address * egress-interface with IPv4 address
* egress-interface with IPv6 address * egress-interface with IPv6 address
* egress-interface with MAC address * egress-interface with MAC address
* logical-tunnel * logical-tunnel
* tunnel-encap * tunnel-encapsulation
* tunnel-decap * tunnel-decapsulation
* rib-name * rib-name
o Chain: Provide a way to perform multiple operations on a packet by o Chain: Provide a way to perform multiple operations on a packet by
logically combining them. 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
skipping to change at page 11, line 23 skipping to change at page 11, line 23
| | +--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-definition
| +--:(nexthop-load-balance) {nexthop-load-balance}? | +--:(nexthop-load-balance) {nexthop-load-balance}?
| +--rw nexthop-lb | +--rw nexthop-lb
| +--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-definition
Figure 4: Nexthop 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 and shows that structure of the "base" nexthop. 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-definition
| +--:(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 ipv4-header | | | +--rw ipv4-header
| | | +--rw src-ipv4-address inet:ipv4-address | | | +--rw src-ipv4-address inet:ipv4-address
| | | +--rw dest-ipv4-address inet:ipv4-address | | | +--rw dest-ipv4-address inet:ipv4-address
| | | +--rw protocol uint8 | | | +--rw protocol uint8
| | | +--rw ttl? uint8 | | | +--rw ttl? uint8
| | | +--rw dscp? uint8 | | | +--rw dscp? uint8
| | +--:(ipv6) {ipv6-tunnel}? | | +--:(ipv6) {ipv6-tunnel}?
| | | +--rw ipv6-header | | | +--rw ipv6-header
| | | +--rw src-ipv6-address inet:ipv6-address | | | +--rw src-ipv6-address inet:ipv6-address
| | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw dest-ipv6-address inet:ipv6-address
| | | +--rw next-header uint8 | | | +--rw next-header uint8
| | | +--rw traffic-class? uint8 | | | +--rw traffic-class? uint8
| | | +--rw flow-label? uint16 | | | +--rw flow-label? uint16
| | | +--rw hop-limit? uint8 | | | +--rw hop-limit? uint8
| | +--:(mpls) {mpls-tunnel}? | | +--:(mpls) {mpls-tunnel}?
| | | +--rw mpls-header | | | +--rw mpls-header
| | | +--rw label-operations* [label-oper-id] | | | +--rw label-operations* [label-oper-id]
| | | +--rw label-oper-id uint32 | | | +--rw label-oper-id uint32
| | | +--rw (label-actions)? | | | +--rw (label-actions)?
| | | +--:(label-push) | | | +--:(label-push)
| | | | +--rw label-push | | | | +--rw label-push
| | | | +--rw label uint32 | | | | +--rw label uint32
| | | | +--rw s-bit? boolean | | | | +--rw s-bit? boolean
| | | | +--rw tc-value? uint8 | | | | +--rw tc-value? uint8
| | | | +--rw ttl-value? uint8 | | | | +--rw ttl-value? uint8
| | | +--:(label-swap) | | | +--:(label-swap)
| | | +--rw label-swap | | | +--rw label-swap
| | | +--rw in-label uint32 | | | +--rw in-label uint32
| | | +--rw out-label uint32 | | | +--rw out-label uint32
| | | +--rw ttl-action? ttl-action-def | | | +--rw ttl-action? ttl-action-definition
| | +--:(gre) {gre-tunnel}? | | +--:(gre) {gre-tunnel}?
| | | +--rw gre-header | | | +--rw gre-header
| | | +--rw (dest-address-type)? | | | +--rw (dest-address-type)?
| | | | +--:(ipv4) | | | | +--:(ipv4)
| | | | | +--rw ipv4-dest inet:ipv4-address | | | | | +--rw ipv4-dest inet:ipv4-address
| | | | +--:(ipv6) | | | | +--:(ipv6)
| | | | +--rw ipv6-dest inet:ipv6-address | | | | +--rw ipv6-dest inet:ipv6-address
| | | +--rw protocol-type uint16 | | | +--rw protocol-type uint16
| | | +--rw key? uint64 | | | +--rw key? uint64
| | +--:(nvgre) {nvgre-tunnel}? | | +--:(nvgre) {nvgre-tunnel}?
| | | +--rw nvgre-header | | | +--rw nvgre-header
| | | +--rw (nvgre-type)? | | | +--rw (nvgre-type)?
| | | | +--:(ipv4) | | | | +--:(ipv4)
| | | | | +--rw src-ipv4-address inet:ipv4-address | | | | | +--rw src-ipv4-address inet:ipv4-address
| | | | | +--rw dest-ipv4-address inet:ipv4-address | | | | | +--rw dest-ipv4-address inet:ipv4-address
| | | | | +--rw protocol uint8 | | | | | +--rw protocol uint8
| | | | | +--rw ttl? uint8 | | | | | +--rw ttl? uint8
| | | | | +--rw dscp? uint8 | | | | | +--rw dscp? uint8
| | | | +--:(ipv6) | | | | +--:(ipv6)
| | | | +--rw src-ipv6-address inet:ipv6-address | | | | +--rw src-ipv6-address inet:ipv6-address
| | | | +--rw dest-ipv6-address inet:ipv6-address | | | | +--rw dest-ipv6-address inet:ipv6-address
| | | | +--rw next-header uint8 | | | | +--rw next-header uint8
| | | | +--rw traffic-class? uint8 | | | | +--rw traffic-class? uint8
| | | | +--rw flow-label? uint16 | | | | +--rw flow-label? uint16
| | | | +--rw hop-limit? uint8 | | | | +--rw hop-limit? uint8
| | | +--rw virtual-subnet-id uint32 | | | +--rw virtual-subnet-id uint32
| | | +--rw flow-id? uint16 | | | +--rw flow-id? uint16
| | +--:(vxlan) {vxlan-tunnel}? | | +--:(vxlan) {vxlan-tunnel}?
| | +--rw vxlan-header | | +--rw vxlan-header
| | +--rw (vxlan-type)? | | +--rw (vxlan-type)?
| | | +--:(ipv4) | | | +--:(ipv4)
| | | | +--rw src-ipv4-address inet:ipv4-address | | | | +--rw src-ipv4-address inet:ipv4-address
| | | | +--rw dest-ipv4-address inet:ipv4-address | | | | +--rw dest-ipv4-address inet:ipv4-address
| | | | +--rw protocol uint8 | | | | +--rw protocol uint8
| | | | +--rw ttl? uint8 | | | | +--rw ttl? uint8
| | | | +--rw dscp? uint8 | | | | +--rw dscp? uint8
| | | +--:(ipv6) | | | +--:(ipv6)
| | | +--rw src-ipv6-address inet:ipv6-address | | | +--rw src-ipv6-address inet:ipv6-address
| | | +--rw dest-ipv6-address inet:ipv6-address | | | +--rw dest-ipv6-address inet:ipv6-address
| | | +--rw next-header uint8 | | | +--rw next-header uint8
| | | +--rw traffic-class? uint8 | | | +--rw traffic-class? uint8
| | | +--rw flow-label? uint16 | | | +--rw flow-label? uint16
| | | +--rw hop-limit? uint8 | | | +--rw hop-limit? uint8
| | +--rw vxlan-identifier uint32 | | +--rw vxlan-identifier uint32
| +--:(tunnel-decap-nexthop) {nexthop-tunnel}? | +--:(tunnel-decapsulation-nexthop) {nexthop-tunnel}?
| | +--rw tunnel-decap | | +--rw tunnel-decapsulation
| | +--rw (tunnel-type)? | | +--rw (tunnel-type)?
| | +--:(ipv4) {ipv4-tunnel}? | | +--:(ipv4) {ipv4-tunnel}?
| | | +--rw ipv4-decap | | | +--rw ipv4-decapsulation
| | | +--rw ipv4-decap tunnel-decap-action-def | | | +--rw ipv4-decapsulation tunnel-decapsulation-action-definition
| | | +--rw ttl-action? ttl-action-def | | | +--rw ttl-action? ttl-action-definition
| | +--:(ipv6) {ipv6-tunnel}? | | +--:(ipv6) {ipv6-tunnel}?
| | | +--rw ipv6-decap | | | +--rw ipv6-decapsulation
| | | +--rw ipv6-decap tunnel-decap-action-def | | | +--rw ipv6-decapsulation tunnel-decapsulation-action-definition
| | | +--rw hop-limit-action? hop-limit-action-def | | | +--rw hop-limit-action? hop-limit-action-definition
| | +--:(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-definition
| | +--rw ttl-action? ttl-action-def | | +--rw ttl-action? ttl-action-definition
| +--:(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-definition
| | +--rw tunnel-name string | | +--rw tunnel-name string
| +--:(rib-name-nexthop) | +--:(rib-name-nexthop)
| | +--rw rib-name? string | | +--rw rib-name? string
| +--:(nexthop-identifier) | +--:(nexthop-identifier)
| +--rw nexthop-ref nexthop-ref | +--rw nexthop-ref nexthop-ref
Figure 5: Nexthop Base Structure 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: Add a RIB to a routing instance. A name of the rib, o rib-add: Add a RIB to a routing instance. A name of the RIB,
address family of the RIB and (optionally) whether the RPF check address family of the RIB and (optionally) whether the RPF check
is enabled are passed as the input parameters. The output is the is enabled are passed as the input parameters. The output is the
result of the add operation: result of the add operation:
* true - success; * true - success;
* false - failed; when failed, the i2rs agent may return the * false - failed; when failed, the i2rs agent may return the
specific reason that causes the failure. specific reason that causes the failure.
o rib-delete: Delete a RIB from a routing instance. When a RIB is o rib-delete: Delete a RIB from a routing instance. When a RIB is
deleted, all routes installed in the RIB will be deleted. A name deleted, all routes installed in the RIB will be deleted. A name
of the RIB is passed as the input parameter. The output is the of the RIB is passed as the input parameter. The output is the
result of the delete operation: result of the delete operation:
* true - success; * true - success;
* false - failed; when failed, the i2rs agent may return the * false - failed; when failed, the i2rs agent may return the
specific reason that causes the failure. specific reason that causes the failure.
o route-add: Add a route or a set of routes to a rib. A RIB name, o route-add: Add a route or a set of routes to a RIB. A RIB name,
the route prefix(es), route attributes, route vendor attributes, the route prefix(es), route attributes, route vendor attributes,
nexthop and whether return failure detail are passed as the input nexthop and whether return failure detail are passed as the input
parameters. Before calling the route-add rpc, it is required to parameters. Before calling the route-add rpc, it is required to
call the nh-add rpc to create and/or return the nexthop call the nh-add rpc to create and/or return the nexthop identifier
identifier. The output is a combination of the route operation but during situations when the nexthop already exists and the
states that include: nexthop-id is known, this action is not expected.. The output is a
combination of the route operation states while querying the
appropriate node in the data tree that include:
* success-count: the number of routes that were successfully * success-count: the number of routes that were successfully
added; added;
* failed-count: the number of the routes that failed to be added; * failed-count: the number of the routes that failed to be added;
* failure-detail: shows the specific routes that failed to be * failure-detail: shows the specific routes that failed to be
added. added.
o route-delete: Delete a route or a set of routes from a rib. A o route-delete: Delete a route or a set of routes from a RIB. A
name of the rib, the route prefix(es) and whether to return name of the RIB, the route prefix(es) and whether to return
failure detail are passed as the input parameters. The output is failure detail are passed as the input parameters. The output is
a combination of route operation states that include: a combination of route operation states that include:
* success-count: the number of routes that were successfully * success-count: the number of routes that were successfully
deleted; deleted;
* failed-count: the number of the routes that failed to be * failed-count: the number of the routes that failed to be
deleted; deleted;
* failure-detail: shows the specific routes that failed to be * failure-detail: shows the specific routes that failed to be
skipping to change at page 15, line 42 skipping to change at page 15, line 45
* success-count: the number of routes that were successfully * success-count: the number of routes that were successfully
updated; updated;
* failed-count: the number of the routes that failed to be * failed-count: the number of the routes that failed to be
updated; updated;
* failure-detail: shows the specific routes that failed to be * failure-detail: shows the specific routes that failed to be
updated. updated.
o nh-add: Add a nexthop to a rib. A name of the RIB and a nexthop o nh-add: Add a nexthop to a RIB. A name of the RIB and a nexthop
are passed as the input parameters. The network node is required are passed as the input parameters. The network node is required
to allocate a nexthop identifier to the nexthop. The outputs to allocate a nexthop identifier to the nexthop. The outputs
include the result of the nexthop add operation. include the result of the nexthop add operation.
* true - success; when success, a nexthop identifier will be * true - success; when success, a nexthop identifier will be
returned to the i2rs client. returned to the i2rs client.
* false - failed; when failed, the i2rs agent may return the * false - failed; when failed, the i2rs agent may return the
specific reason that causes the failure. specific reason that causes the failure.
o nh-delete: Delete a nexthop from a rib. A name of a RIB and a o nh-delete: Delete a nexthop from a RIB. A name of a RIB and a
nexthop or nexthop identifier are passed as the input parameters. nexthop or nexthop identifier are passed as the input parameters.
The output is the result of the delete operation: The output is the result of the delete operation:
* true - success; * true - success;
* false - failed; when failed, the i2rs agent may return the * false - failed; when failed, the i2rs agent may return the
specific reason that causes the failure. specific reason that causes the failure.
The structure tree of rpcs is shown in following figure. The structure tree of rpcs is shown in following figure.
rpcs: rpcs:
+---x rib-add +---x rib-add
| +---w input | +---w input
| | +---w rib-name string | | +---w rib-name string
| | +---w address-family rib-family-def | | +---w address-family rib-family-definition
| | +---w ip-rpf-check? boolean | | +---w ip-rpf-check? boolean
| +--ro output | +--ro output
| +--ro result uint32 | +--ro result uint32
| +--ro reason? string | +--ro reason? string
+---x rib-delete +---x rib-delete
| +---w input | +---w input
| | +---w rib-name string | | +---w rib-name string
| +--ro output | +--ro output
| +--ro result uint32 | +--ro result uint32
| +--ro reason? string | +--ro reason? string
skipping to change at page 18, line 48 skipping to change at page 19, line 4
An implementation of this RIB data model MUST support sending route- An implementation of this RIB data model MUST support sending route-
change notifications whenever a route transitions between the change notifications whenever a route transitions between the
following states: following states:
o from the active state to the inactive state o from the active state to the inactive state
o from the inactive state to the active state o from the inactive state to the active state
o from the installed state to the uninstalled state o from the installed state to the uninstalled state
o from the uninstalled state to the installed state o from the uninstalled state to the installed state
A single notification MAY be used when a route transitions from A single notification MAY be used when a route transitions from
inactive/uninstalled to active/installed or in the other direction. inactive/uninstalled to active/installed or in the other direction.
The structure tree of notifications is shown in the following figure. The structure tree of notifications is shown in the following figure.
notifications: notifications:
+---n nexthop-resolution-status-change +---n nexthop-resolution-status-change
| +--ro nexthop | +--ro nexthop
| | +--ro nexthop-id uint32 | | +--ro nexthop-id uint32
| | +--ro sharing-flag boolean | | +--ro sharing-flag boolean
| | +--ro (nexthop-type)? | | +--ro (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}?
| | ... | | ...
| +--ro nexthop-state nexthop-state-def | +--ro nexthop-state nexthop-state-definition
+---n route-change +---n route-change
+--ro rib-name string +--ro rib-name string
+--ro address-family rib-family-def +--ro address-family rib-family-definition
+--ro route-index uint64 +--ro route-index uint64
+--ro match +--ro match
| +--ro (route-type)? | +--ro (route-type)?
| +--:(ipv4) | +--:(ipv4)
| | ... | | ...
| +--:(ipv6) | +--:(ipv6)
| | ... | | ...
| +--:(mpls-route) | +--:(mpls-route)
| | ... | | ...
| +--:(mac-route) | +--:(mac-route)
| | ... | | ...
| +--:(interface-route) | +--:(interface-route)
| ... | ...
+--ro route-installed-state route-installed-state-def +--ro route-installed-state route-installed-state-definition
+--ro route-state route-state-def +--ro route-state route-state-definition
+--ro route-change-reason route-change-reason-def +--ro route-change-reason route-change-reason-definition
Figure 7: Notifications Structure Figure 7: Notifications Structure
3. YANG Modules 3. YANG Modules
<CODE BEGINS> file "ietf-i2rs-rib@2017-12-05.yang" <CODE BEGINS> file "ietf-i2rs-rib@2017-12-05.yang"
module ietf-i2rs-rib { module ietf-i2rs-rib {
namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; yang-version 1.1;
// replace with iana namespace when assigned namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib";
prefix "iir"; // replace with iana namespace when assigned
prefix "iir";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
//rfc6991 reference "RFC 6991";
} }
import ietf-interfaces { import ietf-interfaces {
prefix "if"; prefix if;
} reference "RFC 7223";
}
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
} reference "RFC 6991";
}
organization organization
"IETF I2RS (Interface to Routing System) Working Group"; "IETF I2RS (Interface to Routing System) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/i2rs/> "WG Web: <http://tools.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org> WG List: <mailto:i2rs@ietf.org>
WG Chair: Susan Hares Editor: Lixing Wang
<mailto:shares@ndzh.com> <mailto:wang_little_star@sina.com>
WG Chair: Russ White Editor: Mach(Guoyi) Chen
<mailto:russ@riw.us> <mailto:mach.chen@huawei.com>
Editor: Lixing Wang Editor: Amit Dass
<mailto:wang_little_star@sina.com> <mailto:amit.dass@ericsson.com>
Editor: Hariharan Ananthakrishnan Editor: Hariharan Ananthakrishnan
<mailto:hari@packetdesign.com> <mailto:hari@packetdesign.com>
Editor: Mach(Guoyi) Chen Editor: Sriganesh Kini
<mailto:mach.chen@huawei.com> <mailto:sriganesh.kini@ericsson.com>
Editor: Amit Dass Editor: Nitin Bahadur
<mailto:amit.dass@ericsson.com> <mailto:nitin_bahadur@yahoo.com>";
Editor: Sriganesh Kini description
<mailto:sriganesh.kini@ericsson.com> "This module defines a YANG data model for
Routing Information Base (RIB) that aligns
with the I2RS RIB information model.
Copyright (c) <2018> IETF Trust and the persons
identified as authors of the code. All rights reserved.";
revision "2018-02-12" {
description "initial revision";
reference "draft-ietf-i2rs-data-model-10";
Editor: Nitin Bahadur // RFC Ed.: replace XXXX with actual RFC number and remove
<mailto:nitin_bahadur@yahoo.com>"; // this note
}
//Features
feature nexthop-tunnel {
description description
"This module defines a YANG data model for "This feature means that a node supports
Routing Information Base (RIB) that aligns tunnel nexthop capability.";
with the I2RS RIB information model."; }
revision "2017-12-05" {
description "initial revision";
reference "draft-ietf-i2rs-data-model-09";
}
//Features feature nexthop-chain {
feature nexthop-tunnel { description
description "This feature means that a node supports
"This feature means that a node supports chain nexthop capability.";
tunnel nexthop capability."; }
}
feature nexthop-chain { feature nexthop-protection {
description description
"This feature means that a node supports "This feature means that a node supports
chain nexthop capability."; protection nexthop capability.";
} }
feature nexthop-protection { feature nexthop-replicates {
description description
"This feature means that a node supports "This feature means that a node supports
protection nexthop capability."; replicates nexthop capability.";
} }
feature nexthop-replicates { feature nexthop-load-balance {
description description
"This feature means that a node supports "This feature means that a node supports
replicates nexthop capability."; load balance nexthop capability.";
} }
feature ipv4-tunnel {
description
"This feature means that a node supports
IPv4 tunnel encapsulation capability.";
}
feature nexthop-load-balance { feature ipv6-tunnel {
description description
"This feature means that a node supports "This feature means that a node supports
load balance nexthop capability."; IPv6 tunnel encapsulation capability.";
} }
feature ipv4-tunnel { feature mpls-tunnel {
description description
"This feature means that a node supports "This feature means that a node supports
IPv4 tunnel encapsulation capability."; MPLS tunnel encapsulation capability.";
} }
feature ipv6-tunnel {
description
"This feature means that a node supports
IPv6 tunnel encapsulation capability.";
}
feature mpls-tunnel { feature vxlan-tunnel {
description description
"This feature means that a node supports "This feature means that a node supports
MPLS tunnel encapsulation capability."; VxLAN tunnel encapsulation capability.";
} }
feature vxlan-tunnel { feature gre-tunnel {
description description
"This feature means that a node supports "This feature means that a node supports
VxLAN tunnel encapsulation capability."; GRE tunnel encapsulation capability.";
} }
feature gre-tunnel { feature nvgre-tunnel {
description description
"This feature means that a node supports "This feature means that a node supports
GRE tunnel encapsulation capability."; NvGRE tunnel encapsulation capability.";
} }
feature nvgre-tunnel { feature route-vendor-attributes {
description description
"This feature means that a node supports "This feature means that a node supports
NvGRE tunnel encapsulation capability."; route vendor attributes.";
} }
feature route-vendor-attributes { //Identities and Type Definitions
description identity mpls-label-action {
"This feature means that a node supports description
route vendor attributes."; "Base identity from which all MPLS label
} operations are derived.
The MPLS label stack operations include:
//Identities and Type Definitions push - to add a new label to a label stack,
identity mpls-label-action { pop - to pop the top label from a label stack,
description swap - to exchange the top label of a label
"Base identity from which all MPLS label stack with new 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 exchange the top label of a label
stack with new label.";
}
identity label-push {
base "mpls-label-action";
description
"MPLS label stack operation: push.";
}
identity label-pop { identity label-push {
base "mpls-label-action"; base "mpls-label-action";
description description
"MPLS label stack operation: pop."; "MPLS label stack operation: push.";
} }
identity label-swap { identity label-pop {
base "mpls-label-action"; base "mpls-label-action";
description description
"MPLS label stack operation: swap."; "MPLS label stack operation: pop.";
} }
typedef mpls-label-action-def { identity label-swap {
type identityref { base "mpls-label-action";
base "mpls-label-action"; description
} "MPLS label stack operation: swap.";
description }
"MPLS label action def.";
}
identity tunnel-decap-action { typedef mpls-label-action-definition {
description type identityref {
"Base identity from which all tunnel decap base "mpls-label-action";
actions are derived.
Tunnel decap actions include:
ipv4-decap - to decap an IPv4 tunnel,
ipv6-decap - to decap an IPv6 tunnel.";
} }
description
"MPLS label action definition.";
}
identity ipv4-decap { identity tunnel-decapsulation-action {
base "tunnel-decap-action"; description
description "Base identity from which all tunnel decapsulation
"IPv4 tunnel decap."; actions are derived.
} Tunnel decapsulation actions include:
ipv4-decapsulation - to decapsulate an IPv4 tunnel,
ipv6-decapsulation - to decapsulate an IPv6 tunnel.";
}
identity ipv6-decap { identity ipv4-decapsulation {
base "tunnel-decap-action"; base "tunnel-decapsulation-action";
description description
"IPv4 tunnel decap."; "IPv4 tunnel decapsulation.";
} }
typedef tunnel-decap-action-def { identity ipv6-decapsulation {
type identityref { base "tunnel-decapsulation-action";
base "tunnel-decap-action"; description
} "IPv4 tunnel decapsulation.";
description }
"Tunnel decap def.";
}
identity ttl-action { typedef tunnel-decapsulation-action-definition {
description type identityref {
"Base identity from which all TTL base "tunnel-decapsulation-action";
actions are derived.";
} }
description
"Tunnel decapsulation definition.";
}
identity no-action { identity ttl-action {
base "ttl-action"; description
description "Base identity from which all TTL
"Do nothing regarding the TTL."; actions are derived.";
} }
identity copy-to-inner { identity no-action {
base "ttl-action"; base "ttl-action";
description description
"Copy the TTL of the outer header "Do nothing regarding the TTL.";
to the inner header."; }
}
identity decrease-and-copy-to-inner { identity copy-to-inner {
base "ttl-action"; base "ttl-action";
description description
"Decrease TTL by one and copy the TTL "Copy the TTL of the outer header
to the inner header."; to the inner header.";
} }
identity decrease-and-copy-to-next { identity decrease-and-copy-to-inner {
base "ttl-action";
description
"Decrease TTL by one and copy the TTL
to the 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 inner label and copy it to the
outer label.";
}
typedef ttl-action-definition {
type identityref {
base "ttl-action"; 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 inner label and copy it to the
outer label.";
} }
description
"TTL action definition.";
}
typedef ttl-action-def { identity hop-limit-action {
type identityref { description
base "ttl-action"; "Base identity from which all hop limit
} actions are derived.";
description }
"TTL action def.";
}
identity hop-limit-action { identity hop-limit-no-action {
description base "hop-limit-action";
"Base identity from which all hop limit description
actions are derived."; "Do nothing regarding the hop limit.";
} }
identity hop-limit-no-action { identity hop-limit-copy-to-inner {
base "hop-limit-action"; base "hop-limit-action";
description description
"Do nothing regarding the hop limit."; "Copy the hop limit of the outer header
} to the inner header.";
}
identity hop-limit-copy-to-inner { typedef hop-limit-action-definition {
type identityref {
base "hop-limit-action"; base "hop-limit-action";
description
"Copy the hop limit of the outer header
to the inner header.";
}
typedef hop-limit-action-def {
type identityref {
base "hop-limit-action";
}
description
"IPv6 hop limit action def.";
} }
description
"IPv6 hop limit action definition.";
}
identity special-nexthop { identity special-nexthop {
description description
"Base identity from which all special "Base identity from which all special
nexthops are derived."; nexthops are derived.";
} }
identity discard { identity discard {
base "special-nexthop"; base "special-nexthop";
description description
"This indicates that the network "This indicates that the network
device should drop the packet and device should drop the packet and
increment a drop counter."; increment a drop counter.";
} }
identity discard-with-error {
base "special-nexthop";
description
"This indicates that the network
device should drop the packet,
increment a drop counter and send
back an appropriate error message
(like ICMP error).";
}
identity discard-with-error { identity receive {
base "special-nexthop"; base "special-nexthop";
description description
"This indicates that the network "This indicates that the traffic is
device should drop the packet, destined for the network device. For
increment a drop counter and send example, protocol packets or OAM packets.
back an appropriate error message All locally destined traffic SHOULD be
(like ICMP error)."; throttled to avoid a denial of service
} attack on the router's control plane. An
optional rate-limiter can be specified
to indicate how to throttle traffic
destined for the control plane.";
}
identity receive { identity cos-value {
base "special-nexthop"; base "special-nexthop";
description description
"This indicates that the traffic is "Cos-value special nexthop.";
destined for the network device. For }
example, protocol packets or OAM packets.
All locally destined traffic SHOULD be
throttled to avoid a denial of service
attack on the router's control plane. An
optional rate-limiter can be specified
to indicate how to throttle traffic
destined for the control plane.";
}
identity cos-value { typedef special-nexthop-definition {
type identityref {
base "special-nexthop"; base "special-nexthop";
description
"Cos-value special nexthop.";
}
typedef special-nexthop-def {
type identityref {
base "special-nexthop";
}
description
"Special nexthop def.";
}
identity ip-route-match-type {
description
"Base identity from which all route
match types are derived.
Route match type could be:
match source, or
match destination, or
match source and destination.";
} }
description
"Special nexthop definition.";
}
identity match-ip-src { identity ip-route-match-type {
base "ip-route-match-type"; description
description "Base identity from which all route
"Source route match type."; match types are derived.
Route match type could be:
match source, or
match destination, or
match source and destination.";
}
identity match-ip-src {
base "ip-route-match-type";
description
"Source route match type.";
}
identity match-ip-dest {
base "ip-route-match-type";
description
"Destination route match type";
}
identity match-ip-src-dest {
base "ip-route-match-type";
description
"Source and Destination route match type";
}
} typedef ip-route-match-type-definition {
identity match-ip-dest { type identityref {
base "ip-route-match-type";
description
"Destination route match type";
}
identity match-ip-src-dest {
base "ip-route-match-type"; base "ip-route-match-type";
description
"Source and Destination route match type";
} }
description
"IP route match type definition.";
}
typedef ip-route-match-type-def { identity rib-family {
type identityref { description
base "ip-route-match-type"; "Base identity from which all RIB
} address families are derived.";
description }
"IP route match type def.";
}
identity rib-family { identity ipv4-rib-family {
description base "rib-family";
"Base identity from which all RIB description
address families are derived."; "IPv4 RIB address family.";
} }
identity ipv4-rib-family { identity ipv6-rib-family {
base "rib-family"; base "rib-family";
description description
"IPv4 RIB address family."; "IPv6 RIB address family.";
} }
identity ipv6-rib-family { identity mpls-rib-family {
base "rib-family"; base "rib-family";
description description
"IPv6 RIB address family."; "MPLS RIB address family.";
} }
identity ieee-mac-rib-family {
base "rib-family";
description
"MAC RIB address family.";
}
identity mpls-rib-family { typedef rib-family-definition {
type identityref {
base "rib-family"; base "rib-family";
description
"MPLS RIB address family.";
} }
description
"RIB address family definition.";
}
identity ieee-mac-rib-family { identity route-type {
base "rib-family"; description
description "Base identity from which all route types
"MAC RIB address family."; are derived.";
}
} identity ipv4-route {
base "route-type";
description
"IPv4 route type.";
}
typedef rib-family-def { identity ipv6-route {
type identityref { base "route-type";
base "rib-family"; description
} "IPv6 route type.";
description }
"Rib address family def.";
}
identity route-type { identity mpls-route {
description base "route-type";
"Base identity from which all route types description
are derived."; "MPLS route type.";
} }
identity ipv4-route { identity ieee-mac {
base "route-type"; base "route-type";
description description
"IPv4 route type."; "MAC route type.";
} }
identity ipv6-route { identity interface {
base "route-type"; base "route-type";
description description
"IPv6 route type."; "Interface route type.";
}
identity mpls-route { }
base "route-type";
description
"MPLS route type.";
}
identity ieee-mac { typedef route-type-definition {
type identityref {
base "route-type"; base "route-type";
description
"MAC route type.";
} }
description
"Route type definition.";
}
identity interface { identity tunnel-type {
base "route-type"; description
description "Base identity from which all tunnel
"Interface route type."; types are derived.";
} }
typedef route-type-def { identity ipv4-tunnel {
type identityref { base "tunnel-type";
base "route-type"; description
} "IPv4 tunnel type";
description }
"Route type def.";
}
identity tunnel-type { identity ipv6-tunnel {
description base "tunnel-type";
"Base identity from which all tunnel description
types are derived."; "IPv6 Tunnel type";
} }
identity ipv4-tunnel { identity mpls-tunnel {
base "tunnel-type"; base "tunnel-type";
description description
"IPv4 tunnel type"; "MPLS tunnel type";
} }
identity ipv6-tunnel { identity gre-tunnel {
base "tunnel-type"; base "tunnel-type";
description description
"IPv6 Tunnel type"; "GRE tunnel type";
} }
identity mpls-tunnel { identity vxlan-tunnel {
base "tunnel-type"; base "tunnel-type";
description description
"MPLS tunnel type"; "VxLAN tunnel type";
} }
identity gre-tunnel { identity nvgre-tunnel {
base "tunnel-type"; base "tunnel-type";
description description
"GRE tunnel type"; "NVGRE tunnel type";
} }
identity vxlan-tunnel { typedef tunnel-type-definition {
type identityref {
base "tunnel-type"; base "tunnel-type";
description
"VxLAN tunnel type";
} }
description
"Tunnel type definition.";
}
identity nvgre-tunnel { identity route-state {
base "tunnel-type"; description
description "Base identity from which all route
"NVGRE tunnel type"; states are derived.";
} }
typedef tunnel-type-def {
type identityref {
base "tunnel-type";
}
description
"Tunnel type def.";
}
identity route-state { identity active {
description base "route-state";
"Base identity from which all route description
states are derived."; "Active state.";
} }
identity active { identity inactive {
base "route-state"; base "route-state";
description description
"Active state."; "Inactive state.";
} }
identity inactive { typedef route-state-definition {
type identityref {
base "route-state"; base "route-state";
description
"Inactive state.";
} }
description
"Route state definition.";
}
typedef route-state-def { identity nexthop-state {
type identityref { description
base "route-state"; "Base identity from which all nexthop
} states are derived.";
description }
"Route state def.";
}
identity nexthop-state { identity resolved {
description base "nexthop-state";
"Base identity from which all nexthop description
states are derived."; "Reolved nexthop state.";
}
identity resolved { }
base "nexthop-state";
description
"Reolved nexthop state.";
}
identity unresolved { identity unresolved {
base "nexthop-state";
description
"Unresolved nexthop state.";
}
typedef nexthop-state-definition {
type identityref {
base "nexthop-state"; base "nexthop-state";
description
"Unresolved nexthop state.";
} }
description
"Nexthop state definition.";
}
typedef nexthop-state-def { identity route-installed-state {
type identityref { description
base "nexthop-state"; "Base identity from which all route
} installed states are derived.";
description }
"Nexthop state def.";
}
identity route-installed-state { identity uninstalled {
description base "route-installed-state";
"Base identity from which all route description
installed states are derived."; "Uninstalled state.";
} }
identity uninstalled { identity installed {
base "route-installed-state"; base "route-installed-state";
description description
"Uninstalled state."; "Installed state.";
} }
identity installed { typedef route-installed-state-definition {
type identityref {
base "route-installed-state"; base "route-installed-state";
description
"Installed state.";
} }
description
"Route installed state definition.";
}
typedef route-installed-state-def { //Route change reason identities
type identityref {
base "route-installed-state";
}
description
"Route installed state def.";
}
//Route change reason identities identity route-change-reason {
description
"Base identity from which all route change
reasons are derived.";
identity route-change-reason { }
description
"Base identity from which all route change
reasons are derived.";
}
identity lower-route-preference { identity lower-route-preference {
base "route-change-reason"; base "route-change-reason";
description description
"This route was installed in the FIB because it had "This route was installed in the FIB because it had
a lower route preference value (and thus was more a lower route preference value (and thus was more
preferred) than the route it replaced."; preferred) than the route it replaced.";
} }
identity higher-route-preference { identity higher-route-preference {
base "route-change-reason"; base "route-change-reason";
description description
"This route was uninstalled from the FIB because it had "This route was uninstalled from the FIB because it had
a higher route preference value (and thus was less a higher route preference value (and thus was less
preferred) than the route that replaced it."; preferred) than the route that replaced it.";
} }
identity resolved-nexthop { identity resolved-nexthop {
base "route-change-reason"; base "route-change-reason";
description description
"This route was made active because at least "This route was made active because at least
one of its nexthops was resolved."; one of its nexthops was resolved.";
} }
identity unresolved-nexthop { identity unresolved-nexthop {
base "route-change-reason";
description
"This route was made inactive because all of
its nexthops are unresolved.";
}
typedef route-change-reason-definition {
type identityref {
base "route-change-reason"; base "route-change-reason";
description
"This route was made inactive because all of
its nexthops are unresolved.";
} }
description
"Route change reason definition.";
}
typedef route-change-reason-def { typedef nexthop-preference-definition {
type identityref { type uint8 {
base "route-change-reason"; range "1..99";
}
description
"Route change reason def.";
} }
description
typedef nexthop-preference-def { "Nexthop-preference is used for protection schemes.
type uint8 { It is an integer value between 1 and 99. Lower
range "1..99"; values are more preferred. To download N
} nexthops to the FIB, the N nexthops with the lowest
description value are selected. If there are more than N
"Nexthop-preference is used for protection schemes. nexthops that have the same preference, an
It is an integer value between 1 and 99. Lower implementation of i2rs client should select N
values are more preferred. To download N nexthops and download them, as for how to select
nexthops to the FIB, the N nexthops with the lowest the nexthops is left to the implementations.";
value are selected. If there are more than N }
nexthops that have the same preference, an typedef nexthop-lb-weight-definition {
implementation of i2rs client should select N type uint8 {
nexthops and download them, as for how to select range "1..99";
the nexthops is left to the implementations.";
} }
typedef nexthop-lb-weight-def { description
type uint8 { "Nexthop-lb-weight is used for load-balancing.
range "1..99"; Each list member MUST be assigned a weight
} between 1 and 99. The weight determines the
description proportion of traffic to be sent over a nexthop
"Nexthop-lb-weight is used for load-balancing. used for forwarding as a ratio of the weight of
Each list member MUST be assigned a weight this nexthop divided by the weights of all the
between 1 and 99. The weight determines the nexthops of this route that are used for forwarding.
proportion of traffic to be sent over a nexthop To perform equal load-balancing, one MAY specify
used for forwarding as a ratio of the weight of a weight of 0 for all the member nexthops. The
this nexthop divided by the weights of all the value 0 is reserved for equal load-balancing
nexthops of this route that are used for forwarding. and if applied, MUST be applied to all member nexthops.";
To perform equal load-balancing, one MAY specify }
a weight of 0 for all the member nexthops. The
value 0 is reserved for equal load-balancing typedef nexthop-ref {
and if applied, MUST be applied to all member nexthops."; 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.";
}
typedef nexthop-ref { //Groupings
type leafref { grouping route-prefix {
path "/iir:routing-instance" + description
"/iir:rib-list" + "The common attributes used for all types of route prefix.";
"/iir:route-list" + leaf route-index {
"/iir:nexthop" + type uint64 ;
"/iir:nexthop-id"; mandatory true;
}
description description
"A nexthop reference that provides "Route index.";
an indirection reference to a nexthop.";
}
//Groupings }
grouping route-prefix { container match {
description description
"The common attributes used for all types of route prefix."; "The match condition specifies the
leaf route-index { kind of route (IPv4, MPLS, etc.)
type uint64 ; and the set of fields to match on.";
mandatory true; choice route-type {
description
"Route index.";
}
container match {
description description
"The match condition specifies the "Route types: IPv4, IPv6, MPLS, MAC etc.";
kind of route (IPv4, MPLS, etc.) case ipv4 {
and the set of fields to match on.";
choice route-type {
description description
"Route types: IPv4, IPv6, MPLS, MAC etc."; "IPv4 route case.";
case ipv4 { container ipv4 {
description description
"IPv4 route case."; "IPv4 route match.";
container ipv4 { choice ip-route-match-type {
description description
"IPv4 route match."; "IP route match type options:
choice ip-route-match-type { match source, or
description match destination, or
"IP route match type options: match source and destination.";
match source, or case dest-ipv4-address {
match destination, or leaf dest-ipv4-prefix {
match source and destination."; type inet:ipv4-prefix;
case dest-ipv4-address { mandatory true;
description
"An IPv4 destination address as the match.";
}
}
case src-ipv4-address {
leaf src-ipv4-prefix {
type inet:ipv4-prefix;
mandatory true;
description
"An IPv4 source address as the match.";
}
}
case dest-src-ipv4-address {
container dest-src-ipv4-address {
description
"A combination of an IPv4 source and
an IPv4 destination address as the match.";
leaf dest-ipv4-prefix { leaf dest-ipv4-prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
mandatory true; mandatory true;
description description
"An IPv4 destination address as the match."; "The IPv4 destination address of the match.";
} }
}
case src-ipv4-address {
leaf src-ipv4-prefix { leaf src-ipv4-prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
mandatory true; mandatory true;
description description
"An IPv4 source address as the match."; "The IPv4 source address of the match";
}
}
case dest-src-ipv4-address {
container dest-src-ipv4-address {
description
"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.";
}
leaf src-ipv4-prefix {
type inet:ipv4-prefix;
mandatory true;
description
"The IPv4 source address of the match";
}
} }
} }
} }
} }
} }
case ipv6 { }
case ipv6 {
description
"IPv6 route case.";
container ipv6 {
description description
"IPv6 route case."; "IPv6 route match.";
container ipv6 { choice ip-route-match-type {
description description
"IPv6 route match."; "IP route match type options:
choice ip-route-match-type { match source, or
description match destination, or
"IP route match type options: match source and destination.";
match source, or case dest-ipv6-address {
match destination, or leaf dest-ipv6-prefix {
match source and destination."; type inet:ipv6-prefix;
case dest-ipv6-address { mandatory true;
description
"An IPv6 destination address as the match.";
}
}
case src-ipv6-address {
leaf src-ipv6-prefix {
type inet:ipv6-prefix;
mandatory true;
description
"An IPv6 source address as the match.";
}
}
case dest-src-ipv6-address {
container dest-src-ipv6-address {
description
"A combination of an IPv6 source and
an IPv6 destination address as the match.";
leaf dest-ipv6-prefix { leaf dest-ipv6-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"An IPv6 destination address as the match."; "The IPv6 destination address of the match";
} }
}
case src-ipv6-address {
leaf src-ipv6-prefix { leaf src-ipv6-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"An IPv6 source address as the match."; "The IPv6 source address of the match.";
}
}
case dest-src-ipv6-address {
container dest-src-ipv6-address {
description
"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";
}
leaf src-ipv6-prefix {
type inet:ipv6-prefix;
mandatory true;
description
"The IPv6 source address of the match.";
}
} }
} }
} }
} }
} }
case mpls-route { }
case mpls-route {
description
"MPLS route case.";
leaf mpls-label {
type uint32 ;
mandatory true;
description description
"MPLS route case."; "The label used for matching.";
leaf mpls-label {
type uint32 ;
mandatory true;
description
"The label used for matching.";
}
} }
case mac-route { }
case mac-route {
description
"MAC route case.";
leaf mac-address {
type uint32 ;
mandatory true;
description description
"MAC route case."; "The MAC address used for matching.";
leaf mac-address {
type uint32 ;
mandatory true;
description
"The MAC address used for matching.";
}
} }
case interface-route { }
case interface-route {
description
"Interface route case.";
leaf interface-identifier {
type if:interface-ref;
mandatory true;
description description
"Interface route case."; "The interface used for matching.";
leaf interface-identifier {
type if:interface-ref;
mandatory true;
description
"The interface used for matching.";
}
} }
} }
} }
} }
}
grouping route { grouping route {
description
"The common attributes used for all types of routes.";
uses route-prefix;
container nexthop {
description description
"The common attributes used for all types of routes."; "The nexthop of the route.";
uses route-prefix; uses nexthop;
container nexthop { }
description //In the information model, it is called route-statistic
"The nexthop of the route."; container route-status {
uses nexthop; description
} "The status information of the route.";
//In the information model, it is called route-statistic leaf route-state {
container route-status { type route-state-definition;
config false;
description description
"The status information of the route."; "Indicate a route's state: Active or Inactive.";
leaf route-state {
type route-state-def;
config false;
description
"Indicate a route's state: Active or Inactive.";
}
leaf route-installed-state {
type route-installed-state-def;
config false;
description
"Indicate that a route's installed states:
Installed or uninstalled.";
}
leaf route-reason {
type route-change-reason-def;
config false;
description
"Indicate the reason that causes the route change.";
}
} }
container route-attributes { leaf route-installed-state {
type route-installed-state-definition;
config false;
description description
"Route attributes."; "Indicate that a route's installed states:
uses route-attributes; Installed or uninstalled.";
} }
container route-vendor-attributes { leaf route-reason {
type route-change-reason-definition;
config false;
description description
"Route vendor attributes."; "Indicate the reason that causes the route change.";
uses route-vendor-attributes;
} }
} }
container route-attributes {
grouping nexthop-list {
description description
"A generic nexthop list."; "Route attributes.";
list nexthop-list { uses route-attributes;
key "nexthop-member-id";
description
"A list of nexthops.";
leaf nexthop-member-id {
type uint32;
mandatory true;
description
"A nexthop identifier that points
to a nexthop list member.
A nexthop list member is a nexthop.";
}
}
} }
container route-vendor-attributes {
description
"Route vendor attributes.";
uses route-vendor-attributes;
}
}
grouping nexthop-list-p { grouping nexthop-list {
description
"A generic nexthop list.";
list nexthop-list {
key "nexthop-member-id";
description description
"A nexthop list with preference parameter."; "A list of nexthops.";
list nexthop-list { leaf nexthop-member-id {
key "nexthop-member-id"; type uint32;
mandatory true;
description description
"A list of nexthop."; "A nexthop identifier that points
leaf nexthop-member-id { to a nexthop list member.
type uint32; A nexthop list member is a nexthop.";
mandatory true;
description
"A nexthop identifier that points
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. Lower
values are more preferred. To download a
primary/standby/tertiary group to the FIB, the
nexthops that are resolved and are most preferred
are selected.";
}
} }
} }
}
grouping nexthop-list-w { grouping nexthop-list-p {
description
"A nexthop list with preference parameter.";
list nexthop-list {
key "nexthop-member-id";
description description
"A nexthop list with weight parameter."; "A list of nexthop.";
list nexthop-list { leaf nexthop-member-id {
key "nexthop-member-id"; type uint32;
mandatory true;
description description
"A list of nexthop."; "A nexthop identifier that points
leaf nexthop-member-id { to a nexthop list member.
type uint32; A nexthop list member is a nexthop.";
mandatory true; }
description leaf nexthop-preference {
"A nexthop identifier that points type nexthop-preference-definition;
to a nexthop list member. mandatory true;
A nexthop list member is a nexthop."; description
} "Nexthop-preference is used for protection schemes.
leaf nexthop-lb-weight { It is an integer value between 1 and 99. Lower
type nexthop-lb-weight-def; values are more preferred. To download a
mandatory true; primary/standby/tertiary group to the FIB, the
description nexthops that are resolved and are most preferred
"The weight of a nexthop of are selected.";
the load balance nexthops.";
}
} }
} }
}
grouping nexthop { grouping nexthop-list-w {
description
"A nexthop list with weight parameter.";
list nexthop-list {
key "nexthop-member-id";
description description
"The nexthop structure."; "A list of nexthop.";
leaf nexthop-id { leaf nexthop-member-id {
type uint32; type uint32;
mandatory true;
description description
"An identifier that refers to a nexthop."; "A nexthop identifier that points
to a nexthop list member.
A nexthop list member is a nexthop.";
} }
leaf sharing-flag { leaf nexthop-lb-weight {
type boolean; type nexthop-lb-weight-definition;
mandatory true;
description description
"To indicate whether a nexthop is sharable "The weight of a nexthop of
or non-sharable. the load balance nexthops.";
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 { grouping nexthop {
container nexthop-base { description
description "The nexthop structure.";
"The base nexthop."; leaf nexthop-id {
uses nexthop-base; type uint32;
} description
"An identifier that refers to a nexthop.";
}
leaf sharing-flag {
type boolean;
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; case nexthop-chain {
container nexthop-chain { if-feature nexthop-chain;
description container nexthop-chain {
"A chain nexthop."; description
uses nexthop-list; "A chain nexthop.";
} uses nexthop-list;
} }
case nexthop-replicates { }
if-feature nexthop-replicates; case nexthop-replicates {
container nexthop-replicates { if-feature nexthop-replicates;
description container nexthop-replicates {
"A replicates nexthop."; description
uses nexthop-list; "A replicates nexthop.";
} uses nexthop-list;
} }
case nexthop-protection { }
if-feature nexthop-protection; case nexthop-protection {
container nexthop-protection { if-feature nexthop-protection;
description container nexthop-protection {
"A protection nexthop."; description
uses nexthop-list-p; "A protection nexthop.";
} uses nexthop-list-p;
} }
case nexthop-load-balance { }
if-feature nexthop-load-balance; case nexthop-load-balance {
container nexthop-lb { if-feature nexthop-load-balance;
description container nexthop-lb {
"A load balance nexthop."; description
uses nexthop-list-w; "A load balance nexthop.";
} uses nexthop-list-w;
} }
} }
} }
}
grouping nexthop-base { grouping nexthop-base {
description
"The base nexthop.";
choice nexthop-base-type {
description description
"The base nexthop."; "Nexthop base type options.";
choice nexthop-base-type { case special-nexthop {
description leaf special {
"Nexthop base type options."; type special-nexthop-definition;
case special-nexthop { description
leaf special { "A special nexthop.";
type special-nexthop-def;
description
"A special nexthop.";
}
} }
case egress-interface-nexthop { }
leaf outgoing-interface { case egress-interface-nexthop {
type if:interface-ref; leaf outgoing-interface {
mandatory true; type if:interface-ref;
description mandatory true;
"The nexthop is an outgoing interface."; description
} "The nexthop is an outgoing interface.";
}
}
case ipv4-address-nexthop {
leaf ipv4-address {
type inet:ipv4-address;
mandatory true;
description
"The nexthop is an IPv4 address.";
} }
case ipv4-address-nexthop { }
case ipv6-address-nexthop {
leaf ipv6-address {
type inet:ipv6-address;
mandatory true;
description
"The nexthop is an IPv6 address.";
}
}
case egress-interface-ipv4-nexthop {
container egress-interface-ipv4-address{
leaf outgoing-interface {
type if:interface-ref;
mandatory true;
description
"Name of the outgoing interface.";
}
leaf ipv4-address { leaf ipv4-address {
type inet:ipv4-address; type inet:ipv4-address;
mandatory true; mandatory true;
description description
"The nexthop is an IPv4 address."; "The nexthop points to an interface with
an IPv4 address.";
} }
description
"The nexthop is an egress-interface and an IP
address. This can be used in cases e.g. where
the IP address is a link-local address.";
} }
case ipv6-address-nexthop { }
leaf ipv6-address { case egress-interface-ipv6-nexthop {
type inet:ipv6-address; container egress-interface-ipv6-address {
leaf outgoing-interface {
type if:interface-ref;
mandatory true; mandatory true;
description description
"The nexthop is an IPv6 address."; "Name of the outgoing interface.";
} }
} leaf ipv6-address {
case egress-interface-ipv4-nexthop { type inet:ipv6-address;
container egress-interface-ipv4-address{ mandatory true;
leaf outgoing-interface {
type if:interface-ref;
mandatory true;
description
"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 description
"The nexthop is an egress-interface and an IP "The nexthop points to an interface with
address. This can be used in cases e.g. where an IPv6 address.";
the IP address is a link-local address.";
} }
description
"The nexthop is an egress-interface and an IP
address. This can be used in cases e.g. where
the IP address is a link-local address.";
} }
case egress-interface-ipv6-nexthop { }
container egress-interface-ipv6-address { case egress-interface-mac-nexthop {
leaf outgoing-interface { container egress-interface-mac-address {
type if:interface-ref; leaf outgoing-interface {
mandatory true; type if:interface-ref;
description mandatory true;
"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 description
"The nexthop is an egress-interface and an IP "Name of the outgoing interface.";
address. This can be used in cases e.g. where
the IP address is a link-local address.";
} }
} leaf ieee-mac-address {
case egress-interface-mac-nexthop { type uint32;
container egress-interface-mac-address { mandatory true;
leaf outgoing-interface {
type if:interface-ref;
mandatory true;
description
"Name of the outgoing interface.";
}
leaf ieee-mac-address {
type uint32;
mandatory true;
description
"The nexthop points to an interface with
a specific mac-address.";
}
description description
"The egress interface must be an Ethernet "The nexthop points to an interface with
interface. Address resolution is not required a specific mac-address.";
for this nexthop.";
} }
description
"The egress interface must be an Ethernet
interface. Address resolution is not required
for this nexthop.";
} }
case tunnel-encap-nexthop { }
if-feature nexthop-tunnel; case tunnel-encap-nexthop {
container tunnel-encap { if-feature nexthop-tunnel;
uses tunnel-encap; container tunnel-encap {
description uses tunnel-encap;
"This can be an encap representing an IP tunnel or description
MPLS tunnel or others as defined in info model. "This can be an encap representing an IP tunnel or
An optional egress interface can be chained to the MPLS tunnel or others as defined in info model.
tunnel encap to indicate which interface to send An optional egress interface can be chained to the
the packet out on. The egress interface is useful tunnel encap to indicate which interface to send
when the network device contains Ethernet interfaces the packet out on. The egress interface is useful
and one needs to perform address resolution for the when the network device contains Ethernet interfaces
IP packet."; and one needs to perform address resolution for the
IP packet.";
}
} }
case tunnel-decap-nexthop { }
if-feature nexthop-tunnel; case tunnel-decapsulation-nexthop {
container tunnel-decap { if-feature nexthop-tunnel;
uses tunnel-decap; container tunnel-decapsulation {
description uses tunnel-decapsulation;
"This is to specify decapsulating a tunnel header."; description
} "This is to specify the decapsulation of a tunnel header.";
} }
case logical-tunnel-nexthop { }
if-feature nexthop-tunnel; case logical-tunnel-nexthop {
container logical-tunnel { if-feature nexthop-tunnel;
uses logical-tunnel; container logical-tunnel {
description uses logical-tunnel;
"This can be a MPLS LSP or a GRE tunnel (or others description
as defined in this document), that is represented "This can be a MPLS LSP or a GRE tunnel (or others
by a unique identifier (e.g. name)."; as defined in this document), that is represented
} by a unique identifier (e.g. name).";
} }
case rib-name-nexthop { }
leaf rib-name { case rib-name-nexthop {
type string; leaf rib-name {
description type string;
"A nexthop pointing to a RIB indicates that the description
route lookup needs to continue in the specified "A nexthop pointing to a RIB indicates that the
rib. This is a way to perform chained lookups."; route lookup needs to continue in the specified
} RIB. This is a way to perform chained lookups.";
} }
case nexthop-identifier { }
leaf nexthop-ref { case nexthop-identifier {
type nexthop-ref; leaf nexthop-ref {
mandatory true; type nexthop-ref;
description mandatory true;
"A nexthop reference that points to a nexthop."; description
} "A nexthop reference that points to a nexthop.";
} }
} }
} }
}
grouping route-vendor-attributes { grouping route-vendor-attributes {
description
"Route vendor attributes.";
}
grouping logical-tunnel {
description
"A logical tunnel that is identified
by a type and a tunnel name.";
leaf tunnel-type {
type tunnel-type-definition;
mandatory true;
description description
"Route vendor attributes."; "A tunnel type.";
} }
leaf tunnel-name {
type string;
mandatory true;
description
"A tunnel name that points to a logical tunnel.";
}
}
grouping logical-tunnel { grouping ipv4-header {
description
"The IPv4 header encapsulation information.";
leaf src-ipv4-address {
type inet:ipv4-address;
mandatory true;
description description
"A logical tunnel that is identified "The source IP address of the header.";
by a type and a tunnel name.";
leaf tunnel-type {
type tunnel-type-def;
mandatory true;
description
"A tunnel type.";
}
leaf tunnel-name {
type string;
mandatory true;
description
"A tunnel name that points to a logical tunnel.";
}
} }
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.";
}
leaf ttl {
type uint8;
description
"The TTL of the header.";
}
leaf dscp {
type uint8;
description
"The DSCP field of the header.";
grouping ipv4-header { }
}
grouping ipv6-header {
description
"The IPv6 header encapsulation information.";
leaf src-ipv6-address {
type inet:ipv6-address;
mandatory true;
description description
"The IPv4 header encapsulation information."; "The source IP address of the header.";
leaf src-ipv4-address {
type inet:ipv4-address;
mandatory true;
description
"The source IP address of the header.";
}
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.";
}
leaf ttl {
type uint8;
description
"The TTL of the header.";
}
leaf dscp {
type uint8;
description
"The DSCP field of the header.";
}
} }
grouping ipv6-header { leaf dest-ipv6-address {
type inet:ipv6-address;
mandatory true;
description description
"The IPv6 header encapsulation information."; "The destination IP address of the header.";
leaf src-ipv6-address { }
type inet:ipv6-address; leaf next-header {
mandatory true; type uint8;
description mandatory true;
"The source IP address of the header."; description
} "The next header of the IPv6 header.";
leaf dest-ipv6-address { }
type inet:ipv6-address; leaf traffic-class {
mandatory true; type uint8;
description description
"The destination IP address of the header."; "The traffic class value of the header.";
} }
leaf next-header { leaf flow-label {
type uint8; type uint16;
mandatory true; description
description "The flow label of the header.";
"The next header of the IPv6 header."; }
} leaf hop-limit {
leaf traffic-class { type uint8;
type uint8; description
description "The hop limit the header.";
"The traffic class value of the header."; }
} }
leaf flow-label {
type uint16; grouping nvgre-header {
description description
"The flow label of the header."; "The NvGRE header encapsulation information.";
choice nvgre-type {
description
"NvGRE can use eigher IPv4
or IPv6 header for encapsulation.";
case ipv4 {
uses ipv4-header;
} }
leaf hop-limit { case ipv6 {
type uint8; uses ipv6-header;
description
"The hop limit the header.";
} }
} }
leaf virtual-subnet-id {
type uint32;
mandatory true;
description
"The subnet identifier of the NvGRE header.";
}
leaf flow-id {
type uint16;
description
"The flow identifier of the NvGRE header.";
}
}
grouping nvgre-header { grouping vxlan-header {
description
"The VxLAN encapsulation header information.";
choice vxlan-type {
description description
"The NvGRE header encapsulation information."; "NvGRE can use either IPv4
choice nvgre-type { or IPv6 header for encapsulation.";
description case ipv4 {
"NvGRE can use eigher IPv4 uses ipv4-header;
or IPv6 header for encapsulation.";
case ipv4 {
uses ipv4-header;
}
case ipv6 {
uses ipv6-header;
}
}
leaf virtual-subnet-id {
type uint32;
mandatory true;
description
"The subnet identifier of the NvGRE header.";
} }
leaf flow-id { case ipv6 {
type uint16; uses ipv6-header;
description
"The flow identifier of the NvGRE header.";
} }
} }
leaf vxlan-identifier {
type uint32;
mandatory true;
description
"The VxLAN identifier of the VxLAN header.";
}
}
grouping vxlan-header { grouping gre-header {
description
"The GRE encapsulation header information.";
choice dest-address-type {
description description
"The VxLAN encapsulation header information."; "GRE options: IPv4 and IPv6";
choice vxlan-type {
description case ipv4 {
"NvGRE can use either IPv4 leaf ipv4-dest {
or IPv6 header for encapsulation."; type inet:ipv4-address;
case ipv4 { mandatory true;
uses ipv4-header; description
} "The destination IP address of the GRE header.";
case ipv6 {
uses ipv6-header;
} }
} }
leaf vxlan-identifier { case ipv6 {
type uint32; leaf ipv6-dest {
mandatory true; type inet:ipv6-address;
description mandatory true;
"The VxLAN identifier of the VxLAN header."; 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 key {
type uint64;
description
"The GRE key of the GRE header.";
}
}
grouping gre-header { grouping mpls-header {
description
"The MPLS encapsulation header information.";
list label-operations {
key "label-oper-id";
description description
"The GRE encapsulation header information."; "Label operations.";
choice dest-address-type { leaf label-oper-id {
type uint32;
description description
"GRE options: IPv4 and IPv6"; "An optional identifier that points
case ipv4 { to a label operation.";
leaf ipv4-dest { }
type inet:ipv4-address; choice label-actions {
mandatory true; description
"Label action options.";
case label-push {
container label-push {
description description
"The destination IP address of the GRE header."; "Label push operation.";
leaf label {
type uint32;
mandatory true;
description
"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 be pushed.";
}
} }
} }
case ipv6 { case label-swap {
leaf ipv6-dest { container label-swap {
type inet:ipv6-address;
mandatory true;
description description
"The destination IP address of the GRE header."; "Label swap operation.";
leaf in-label {
type uint32;
mandatory true;
description
"The label to be swapped.";
}
leaf out-label {
type uint32;
mandatory true;
description
"The out MPLS label.";
}
leaf ttl-action {
type ttl-action-definition;
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.";
}
} }
} }
} }
leaf protocol-type {
type uint16;
mandatory true;
description
"The protocol type of the GRE header.";
}
leaf key {
type uint64;
description
"The GRE key of the GRE header.";
}
} }
}
grouping mpls-header { grouping tunnel-encap{
description
"Tunnel encapsulation information.";
choice tunnel-type {
description description
"The MPLS encapsulation header information."; "Tunnel options for next-hops.";
list label-operations { case ipv4 {
key "label-oper-id"; if-feature ipv4-tunnel;
description container ipv4-header {
"Label operations."; uses ipv4-header;
leaf label-oper-id {
type uint32;
description description
"An optional identifier that points "IPv4 header.";
to a label operation.";
} }
choice label-actions { }
case ipv6 {
if-feature ipv6-tunnel;
container ipv6-header {
uses ipv6-header;
description description
"Label action options."; "IPv6 header.";
case label-push { }
container label-push { }
description case mpls {
"Label push operation."; if-feature mpls-tunnel;
leaf label { container mpls-header {
type uint32; uses mpls-header;
mandatory true; description
description "MPLS header.";
"The label to be pushed."; }
} }
leaf s-bit { case gre {
type boolean; if-feature gre-tunnel;
description container gre-header {
"The s-bit of the label to be pushed. "; uses gre-header;
} description
leaf tc-value { "GRE header.";
type uint8; }
description }
"The traffic class value of the label to be pushed."; case nvgre {
} if-feature nvgre-tunnel;
leaf ttl-value { container nvgre-header {
type uint8; uses nvgre-header;
description description
"The TTL value of the label to be pushed."; "NvGRE header.";
} }
} }
} case vxlan {
case label-swap { if-feature vxlan-tunnel;
container label-swap { container vxlan-header {
description uses vxlan-header;
"Label swap operation."; description
leaf in-label { "VxLAN header.";
type uint32;
mandatory true;
description
"The label to be swapped.";
}
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{ grouping tunnel-decapsulation {
description
"Tunnel decapsulation information.";
choice tunnel-type {
description description
"Tunnel encapsulation information."; "Nexthop tunnel type options.";
choice tunnel-type { case ipv4 {
description if-feature ipv4-tunnel;
"Tunnel options for next-hops."; container ipv4-decapsulation {
case ipv4 { description
if-feature ipv4-tunnel; "IPv4 decapsulation.";
container ipv4-header { leaf ipv4-decapsulation {
uses ipv4-header; type tunnel-decapsulation-action-definition;
mandatory true;
description description
"IPv4 header."; "IPv4 decapsulation operations.";
} }
} leaf ttl-action {
case ipv6 { type ttl-action-definition;
if-feature ipv6-tunnel;
container ipv6-header {
uses ipv6-header;
description description
"IPv6 header."; "The ttl actions:
no-action or copy to inner header.";
} }
} }
case mpls { }
if-feature mpls-tunnel; case ipv6 {
container mpls-header { if-feature ipv6-tunnel;
uses mpls-header; container ipv6-decapsulation {
description
"IPv6 decapsulation.";
leaf ipv6-decapsulation {
type tunnel-decapsulation-action-definition;
mandatory true;
description description
"MPLS header."; "IPv6 decapsulation operations.";
} }
} leaf hop-limit-action {
case gre { type hop-limit-action-definition;
if-feature gre-tunnel;
container gre-header {
uses gre-header;
description description
"GRE header."; "The hop limit actions:
no-action or copy to inner header.";
} }
} }
case nvgre { }
if-feature nvgre-tunnel; case mpls {
container nvgre-header { if-feature mpls-tunnel;
uses nvgre-header; container label-pop {
description
"MPLS decapsulation.";
leaf label-pop {
type mpls-label-action-definition;
mandatory true;
description description
"NvGRE header."; "Pop a label from the label stack.";
} }
} leaf ttl-action {
case vxlan { type ttl-action-definition;
if-feature vxlan-tunnel;
container vxlan-header {
uses vxlan-header;
description description
"VxLAN header."; "The label ttl action.";
} }
} }
} }
} }
}
grouping tunnel-decap { grouping route-attributes {
description
"Route attributes.";
leaf route-preference {
type uint32;
mandatory true;
description description
"Tunnel decapsulation information."; "ROUTE_PREFERENCE: This is a numerical value that
choice tunnel-type { allows for comparing routes from different
protocols. Static configuration is also
considered a protocol for the purpose of this
field. It is also known as administrative-distance.
The lower the value, the higher the preference.";
}
leaf local-only {
type boolean ;
mandatory true;
description
"Indicate whether the attributes is local only.";
}
container address-family-route-attributes{
description
"Address family related route attributes.";
choice route-type {
description description
"Nexthop tunnel type options."; "Address family related route attributes.";
case ipv4 { case ip-route-attributes {
if-feature ipv4-tunnel;
container ipv4-decap {
description
"IPv4 decap.";
leaf ipv4-decap {
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.";
}
}
} }
case ipv6 { case mpls-route-attributes {
if-feature ipv6-tunnel;
container ipv6-decap {
description
"IPv6 decap.";
leaf ipv6-decap {
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.";
}
}
} }
case mpls { case ethernet-route-attributes {
if-feature mpls-tunnel;
container label-pop {
description
"MPLS decap.";
leaf label-pop {
type mpls-label-action-def;
mandatory true;
description
"Pop a label from the label stack.";
}
leaf ttl-action {
type ttl-action-def;
description
"The label ttl action.";
}
}
} }
} }
} }
}
grouping route-attributes { container routing-instance {
description
"A routing instance, in the context of
the RIB information model, is a collection
of RIBs, interfaces, and routing parameters";
leaf name {
type string;
description description
"Route attributes."; "The name of the routing instance. This MUST
leaf route-preference { be unique across all routing instances in
type uint32; 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 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
"A list of RIBs that are associated with the routing
instance.";
leaf name {
type string;
mandatory true; mandatory true;
description description
"ROUTE_PREFERENCE: This is a numerical value that "A reference to the name of each RIB.";
allows for comparing routes from different
protocols. Static configuration is also
considered a protocol for the purpose of this
field. It is also known as administrative-distance.
The lower the value, the higher the preference.";
} }
leaf local-only { leaf address-family {
type boolean ; type rib-family-definition;
mandatory true; mandatory true;
description description
"Indicate whether the attributes is local only."; "The address family of a RIB.";
} }
container address-family-route-attributes{ leaf ip-rpf-check {
type boolean;
description description
"Address family related route attributes."; "Each RIB can be optionally associated with a
choice route-type { ENABLE_IP_RPF_CHECK attribute that enables Reverse
description path forwarding (RPF) checks on all IP routes in that
"Address family related route attributes."; RIB. Reverse path forwarding (RPF) check is used to
case ip-route-attributes { prevent spoofing and limit malicious traffic.";
} }
case mpls-route-attributes { list route-list {
} key "route-index";
case ethernet-route-attributes { description
} "A list of routes of a RIB.";
} uses route;
} }
// This is a list that maintains the nexthops added to the RIB.
uses nexthop-list;
} }
}
container routing-instance { //RPC Operations
description rpc rib-add {
"A routing instance, in the context of description
the RIB information model, is a collection "To add a RIB to a instance";
of RIBs, interfaces, and routing parameters"; input {
leaf name { leaf name {
type string; type string;
mandatory true;
description description
"The name of the routing instance. This MUST "A reference to the name of the RIB
be unique across all routing instances in that is to be added.";
a given network device.";
} }
list interface-list { leaf address-family {
key "name"; type rib-family-definition;
mandatory true;
description description
"This represents the list of interfaces associated "The address family of the RIB.";
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 network layer interface.";
}
} }
leaf router-id { leaf ip-rpf-check {
type yang:dotted-quad; type boolean;
description description
"Router ID - 32-bit number in the form of a dotted quad."; "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.";
} }
leaf lookup-limit { }
type uint8; output {
leaf result {
type boolean;
mandatory true;
description description
"A limit on how many levels of a lookup can be performed."; "Return the result of the rib-add operation.
true - success;
false - failed";
} }
list rib-list { leaf reason {
key "name"; type string;
description description
"A list of RIBs that are associated with the routing "The specific reason that causes the failure.";
instance.";
leaf name {
type string;
mandatory true;
description
"A reference to the name of each rib.";
}
leaf address-family {
type rib-family-def;
mandatory true;
description
"The address family of a rib.";
}
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 list of routes of a rib.";
uses route;
}
// This is a list that maintains the nexthops added to the rib.
uses nexthop-list;
} }
} }
}
//RPC Operations rpc rib-delete {
rpc rib-add { description
description "To delete a RIB from a routing instance.
"To add a RIB to a instance";
input { After deleting the RIB, all routes installed
leaf name { in the RIB will be deleted as well.";
type string; input {
mandatory true; leaf name {
description type string;
"A reference to the name of the RIB mandatory true;
that is to be added."; description
} "A reference to the name of the RIB
leaf address-family { that is to be deleted.";
type rib-family-def;
mandatory true;
description
"The address family of the rib.";
}
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 { output {
type boolean; leaf result {
mandatory true; type boolean;
description mandatory true;
"Return the result of the rib-add operation. description
true - success; "Return the result of the rib-delete operation.
false - failed"; true - success;
} false - failed";
leaf reason { }
type string; leaf reason {
description type string;
"The specific reason that causes the failure."; description
} "The specific reason that causes failure.";
} }
} }
}
rpc rib-delete { grouping route-operation-state {
description
"Route operation state.";
leaf success-count {
type uint32;
mandatory true;
description description
"To delete a RIB from a routing instance. "The numbers of routes that are successfully
After deleting the rib, all routes installed added/deleted/updated.";
in the RIB will be deleted as well."; }
leaf failed-count {
input { type uint32;
leaf name { mandatory true;
type string; description
mandatory true; "The numbers of the routes that are failed
description to be added/deleted/updated.";
"A reference to the name of the RIB }
that is to be deleted."; container failure-detail {
} description
} "The failure detail reflects the reason why a route
output { operation fails. It is a array that includes the route
leaf result { index and error code of the failed route.";
type boolean; list failed-routes {
mandatory true; key "route-index";
description
"The list of failed routes.";
leaf route-index {
type uint32;
description description
"Return the result of the rib-delete operation. "The route index of the failed route.";
true - success;
false - failed";
} }
leaf reason { leaf error-code {
type string; type uint32;
description description
"The specific reason that causes failure."; "The error code that reflects the failure reason.";
} }
} }
} }
}
grouping route-operation-state { rpc route-add {
description description
"Route operation state."; "To add a route or a list of route to a RIB";
leaf success-count { input {
type uint32; leaf return-failure-detail {
mandatory true; type boolean;
default false;
description description
"The numbers of routes that are successfully "Whether return the failure detail.
added/deleted/updated."; true - return the failure detail;
false - do not return the failure detail;
the default is false.";
} }
leaf failed-count { leaf rib-name {
type uint32; type string;
mandatory true; mandatory true;
description description
"The numbers of the routes that are failed "A reference to the name of a RIB.";
to be added/deleted/updated.";
} }
container failure-detail { container routes {
description description
"The failure detail reflects the reason why a route "The routes to be added to the RIB.";
operation fails. It is a array that includes the route list route-list {
index and error code of the failed route."; key "route-index";
description
list failed-routes { "The list of routes to be added.";
key "route-index"; uses route-prefix;
description container route-attributes {
"The list of failed routes."; uses route-attributes;
leaf route-index {
type uint32;
description description
"The route index of the failed route."; "The route attributes.";
} }
leaf error-code { container route-vendor-attributes {
type uint32; if-feature route-vendor-attributes;
uses route-vendor-attributes;
description description
"The error code that reflects the failure reason."; "The route vendor attributes.";
}
container nexthop {
uses nexthop;
description
"The nexthop of the added route.";
} }
} }
} }
} }
output {
uses route-operation-state;
}
}
rpc route-add { rpc route-delete {
description description
"To add a route or a list of route to a rib"; "To delete a route or a list of route from a RIB";
input { input {
leaf return-failure-detail { leaf return-failure-detail {
type boolean; type boolean;
default false; default false;
description description
"Whether return the failure detail. "Whether return the failure detail.
true - return the failure detail; true - return the failure detail;
false - do not return the failure detail; false - do not return the failure detail;
the default is false."; 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
"The routes to be added to the RIB.";
list route-list{
key "route-index";
description description
"The routes to be added to the rib."; "The list of routes to be deleted.";
list route-list { uses route-prefix;
key "route-index";
description
"The list of routes to be added.";
uses route-prefix;
container route-attributes {
uses route-attributes;
description
"The route attributes.";
}
container route-vendor-attributes {
if-feature route-vendor-attributes;
uses route-vendor-attributes;
description
"The route vendor attributes.";
}
container nexthop {
uses nexthop;
description
"The nexthop of the added route.";
}
}
} }
} }
output {
uses route-operation-state;
}
} }
output {
uses route-operation-state;
}
}
rpc route-delete { grouping route-update-options {
description
"Update options:
1. update the nexthop
2. update the route attributes
3. update the route-vendor-attributes.";
choice update-options {
description description
"To delete a route or a list of route from a rib"; "Update options:
input { 1. update the nexthop
leaf return-failure-detail { 2. update the route attributes
type boolean; 3. update the route-vendor-attributes.";
default false; case update-nexthop {
container updated-nexthop {
uses nexthop;
description description
"Whether return the failure detail. "The nexthop used for updating.";
true - return the failure detail;
false - do not return the failure detail;
the default is false.";
} }
leaf rib-name { }
type string; case update-route-attributes {
mandatory true; container updated-route-attr {
uses route-attributes;
description description
"A reference to the name of a rib."; "The route attributes used for updating.";
} }
container routes { }
case update-route-vendor-attributes {
container updated-route-vendor-attr {
uses route-vendor-attributes;
description description
"The routes to be added to the rib."; "The vendor route attributes used for updating.";
list route-list{
key "route-index";
description
"The list of routes to be deleted.";
uses route-prefix;
}
} }
} }
output {
uses route-operation-state;
}
} }
}
grouping route-update-options { rpc route-update {
description description
"Update options: "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 attributes, or
c. nexthop;
2. The update parameters to be used:
a. new nexthop;
b. new route attributes;nexthop
Actions:
1. update the nexthop 1. update the nexthop
2. update the route attributes 2. update the route attributes
3. update the route-vendor-attributes."; The outputs:
choice update-options { success-count - the number of routes updated;
failed-count - the number of routes fail to update
failure-detail - the detail failure info.
";
input {
leaf return-failure-detail {
type boolean;
default false;
description description
"Update options: "Whether return the failure detail.
1. update the nexthop true - return the failure detail;
2. update the route attributes false - do not return the failure detail;
3. update the route-vendor-attributes."; the default is false.";
case update-nexthop { }
container updated-nexthop { leaf rib-name {
uses nexthop; type string;
mandatory true;
description
"A reference to the name of a RIB.";
}
choice match-options {
description
"Match options.";
case match-route-prefix {
description
"Update the routes that match route
prefix(es) condition.";
container input-routes {
description description
"The nexthop used for updating."; "The matched routes to be updated.";
list route-list {
key "route-index";
description
"The list of routes to be updated.";
uses route-prefix;
uses route-update-options;
}
} }
} }
case update-route-attributes { case match-route-attributes {
container updated-route-attr { description
uses route-attributes; "Update the routes that match the
route attributes condition.";
container input-route-attributes {
description description
"The route attributes used for updating."; "The route attributes are used for matching.";
uses route-attributes;
} }
} container update-parametors {
case update-route-vendor-attributes {
container updated-route-vendor-attr {
uses route-vendor-attributes;
description description
"The vendor route attributes used for updating."; "Update options:
1. update the nexthop
2. update the route attributes
3. update the route-vendor-attributes.";
uses route-update-options;
} }
} }
} case match-route-vendor-attributes {
} if-feature route-vendor-attributes;
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 attributes, or
c. nexthop;
2. The update parameters to be used:
a. new nexthop;
b. new route attributes;nexthop
Actions:
1. update the nexthop
2. update the route attributes
The outputs:
success-count - the number of routes updated;
failed-count - the number of routes fail to update
failure-detail - the detail failure info.
";
input {
leaf return-failure-detail {
type boolean;
default false;
description
"Whether return the failure detail.
true - return the failure detail;
false - do not return the failure detail;
the default is false.";
}
leaf rib-name {
type string;
mandatory true;
description
"A reference to the name of a rib.";
}
choice match-options {
description description
"Match options."; "Update the routes that match the
case match-route-prefix { vendor attributes condition";
container input-route-vendor-attributes {
description description
"Update the routes that match route "The vendor route attributes are used for matching.";
prefix(es) condition."; uses route-vendor-attributes;
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;
uses route-update-options;
}
}
} }
case match-route-attributes { container update-parameters-vendor {
description description
"Update the routes that match the "Update options:
route attributes condition."; 1. update the nexthop
container input-route-attributes { 2. update the route attributes
description 3. update the route-vendor-attributes.";
"The route attributes are used for matching."; uses route-update-options;
uses route-attributes;
}
container update-parametors {
description
"Update options:
1. update the nexthop
2. update the route attributes
3. update the route-vendor-attributes.";
uses route-update-options;
}
} }
case match-route-vendor-attributes { }
if-feature route-vendor-attributes; case match-nexthop {
description
"Update the routes that match the nexthop.";
container input-nexthop {
description description
"Update the routes that match the "The nexthop used for matching.";
vendor attributes condition"; uses nexthop;
container input-route-vendor-attributes {
description
"The vendor route attributes are used for matching.";
uses route-vendor-attributes;
}
container update-parameters-vendor {
description
"Update options:
1. update the nexthop
2. update the route attributes
3. update the route-vendor-attributes.";
uses route-update-options;
}
} }
case match-nexthop { container update-parameters-nexthop {
description description
"Update the routes that match the nexthop."; "Update options:
container input-nexthop { 1. update the nexthop
description 2. update the route attributes
"The nexthop used for matching."; 3. update the route-vendor-attributes.";
uses nexthop; uses route-update-options;
}
container update-parameters-nexthop {
description
"Update options:
1. update the nexthop
2. update the route attributes
3. update the route-vendor-attributes.";
uses route-update-options;
}
} }
} }
} }
output {
uses route-operation-state;
}
} }
output {
rpc nh-add { uses route-operation-state;
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:
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;
}
output {
leaf result {
type boolean;
mandatory true;
description
"Return the result of the rib-add operation.
true - success;
false - failed;";
}
leaf reason {
type string;
description
"The specific reason that causes the failure.";
}
leaf nexthop-id {
type uint32;
description
"A nexthop identifier that is allocated to the nexthop.";
}
}
} }
}
rpc nh-delete { rpc nh-add {
description description
"To delete a nexthop from a rib"; "To add a nexthop to a RIB.
input { Inputs parameters:
leaf rib-name { 1. RIB name
type string; 2. nexthop;
mandatory true; Actions:
description Add the nexthop to the RIB
"A reference to the name of a rib."; Outputs:
} 1.Operation result:
uses nexthop; true - success
} false - failed;
output { 2. nexthop identifier.";
leaf result { input {
type boolean; leaf rib-name {
mandatory true; type string;
description mandatory true;
"Return the result of the rib-add operation. description
true - success; "A reference to the name of a RIB.";
false - failed.";
}
leaf reason {
type string;
description
"The specific reason that causes the failure.";
}
} }
uses nexthop;
} }
output {
/*Notifications*/ leaf result {
notification nexthop-resolution-status-change { type boolean;
description mandatory true;
"Nexthop resolution status (resolved/unresolved)
notification.";
container nexthop{
description description
"The nexthop."; "Return the result of the rib-add operation.
true - success;
uses nexthop; false - failed;";
} }
leaf nexthop-state { leaf reason {
type nexthop-state-def; type string;
mandatory true;
description description
"Nexthop resolution status (resolved/unresolved) "The specific reason that causes the failure.";
notification."; }
leaf nexthop-id {
type uint32;
description
"A nexthop identifier that is allocated to the nexthop.";
} }
} }
}
notification route-change { rpc nh-delete {
description description
"Route change notification."; "To delete a nexthop from a RIB";
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.";
} }
leaf address-family { uses nexthop;
type rib-family-def; }
output {
leaf result {
type boolean;
mandatory true; mandatory true;
description description
"The address family of a rib."; "Return the result of the rib-add operation.
true - success;
false - failed.";
} }
uses route-prefix; leaf reason {
leaf route-installed-state { type string;
type route-installed-state-def;
mandatory true;
description description
"Indicates whether the route got installed in the FIB."; "The specific reason that causes the failure.";
} }
leaf route-state { }
type route-state-def; }
/*Notifications*/
notification nexthop-resolution-status-change {
description
"Nexthop resolution status (resolved/unresolved)
notification.";
container nexthop{
description
"The nexthop.";
uses nexthop;
}
leaf nexthop-state {
type nexthop-state-definition;
mandatory true;
description
"Nexthop resolution status (resolved/unresolved)
notification.";
}
}
notification route-change {
description
"Route change notification.";
leaf rib-name {
type string;
mandatory true;
description
"A reference to the name of a RIB.";
}
leaf address-family {
type rib-family-definition;
mandatory true;
description
"The address family of a RIB.";
}
uses route-prefix;
leaf route-installed-state {
type route-installed-state-definition;
mandatory true;
description
"Indicates whether the route got installed in the FIB.";
}
leaf route-state {
type route-state-definition;
mandatory true;
description
"Indicates whether a route is active or inactive.";
}
list route-change-reasons {
key "route-change-reason";
description
"The reasons that cause the route change. A route
change that may result from several reasons. For
example, a nexthop becoming resolved will make a
route A active which is of better preference than
a currently active route B, which results in the
route A being installed";
leaf route-change-reason {
type route-change-reason-definition;
mandatory true; mandatory true;
description description
"Indicates whether a route is active or inactive."; "The reason that causes the route change.";
}
list route-change-reasons {
key "route-change-reason";
description
"The reasons that cause the route change. A route
change that may result from several reasons. For
example, a nexthop becoming resolved will make a
route A active which is of better preference than
a currently active route B, which results in the
route A being installed";
leaf route-change-reason {
type route-change-reason-def;
mandatory true;
description
"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 "ns" registry with This document registers a URI in the "ns" registry with the "IETF XML
the "IETF XML registry" [RFC3688]: registry" [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. Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
-------------------------------------------------------------------- --------------------------------------------------------------------
This document requests to register a YANG module in the "YANG Module This document requests to register a YANG module in the "YANG Module
Names registry" [RFC6020]: Names registry" [RFC6020]:
-------------------------------------------------------------------- --------------------------------------------------------------------
name: ietf-i2rs-rib name: ietf-i2rs-rib
namespace: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib namespace: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib
prefix: iir prefix: iir
reference: RFC XXXX reference: RFC XXXX
-------------------------------------------------------------------- --------------------------------------------------------------------
5. Security Considerations 5. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module specified in this document defines a schema for data
via network management protocols such as NETCONF [RFC6241] or that is designed to be accessed via network management protocols such
RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
layer, and the mandatory-to-implement secure transport is Secure is the secure transport layer, and the mandatory-to-implement secure
Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
mandatory-to-implement secure transport is TLS [RFC5246]. is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC5246].
The NETCONF access control model [RFC6536] provides the means to The NETCONF access control model [RFC6536] provides the means to
restrict access for particular NETCONF or RESTCONF users to a restrict access for particular NETCONF or RESTCONF users to a
preconfigured subset of all available NETCONF or RESTCONF protocol preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content. operations and content.
The YANG modules define information that can be configurable in The YANG modules define information that can be configurable in
certain instances, for example, a rib, a route, a nexthop can be certain instances, for example, a RIB, a route, a nexthop can be
created or deleted by client applications, the YANG modules also created or deleted by client applications, the YANG modules also
define RPCs that can be used by client applications to add/delete define RPCs that can be used by client applications to add/delete
ribs, routes and nexthops. In such cases, a malicious client could RIBs, routes and nexthops. In such cases, a malicious client could
attempt to remove, add or update a rib, a route, a nexthop, by attempt to remove, add or update a RIB, a route, a nexthop, by
creating or deleting corresponding elements in the rib, route and creating or deleting corresponding elements in the RIB, route and
nexthop lists, respectively. Removing a rib or a route could lead to nexthop lists, respectively. Removing a RIB or a route could lead to
disruption or impact in performance of a service, updating a route disruption or impact in performance of a service, updating a route
may lead to suboptimal path and degradation of service levels as well may lead to suboptimal path and degradation of service levels as well
as possibly disruption of service. For those reasons, it is as possibly disruption of service. For those reasons, it is
important that the NETCONF access control model is vigorously applied important that the NETCONF access control model is vigorously applied
to prevent misconfiguration by unauthorized clients. to prevent misconfiguration by unauthorized clients.
Specifically, there are a number of data nodes defined in the YANG There are a number of data nodes defined in this YANG module that are
module that are writable/creatable/deletable (i.e., config true, writable/creatable/deletable (i.e., config true, which is the
which is the default). These data nodes may be considered sensitive default). These data nodes may be considered sensitive or vulnerable
or vulnerable in some network environments. Write operations (e.g., in some network environments. Write operations (e.g., edit-config)
edit-config) to these data nodes without proper protection can have a to these data nodes without proper protection can have a negative
negative effect on network operations. These are the subtrees and effect on network operations. These are the subtrees and data nodes
data nodes and their sensitivity/vulnerability in the ietf-i2rs-rib and their sensitivity/vulnerability in the ietf-i2rs-rib module:
module:
o rib: A malicious client could attempt to remove a rib from a o RIB: A malicious client could attempt to remove a RIB from a
routing instance, for example in order to sabotage the services routing instance, for example in order to sabotage the services
provided by the rib, or to add a rib to a routing instance, hence provided by the RIB, or to add a RIB to a routing instance, hence
to inject unauthorized traffic into the nexthop. to inject unauthorized traffic into the nexthop.
o route:A malicious client could attempt to remove or add a route o route:A malicious client could attempt to remove or add a route
from/to a rib, for example in order to sabotage the services from/to a RIB, for example in order to sabotage the services
provided by the rib. provided by the RIB.
o nexthop: A malicious client could attempt to remove or add a o nexthop: A malicious client could attempt to remove or add a
nexthop from/to rib, which may lead to suboptimal path and nexthop from/to RIB, which may lead to suboptimal path and
degradation of service levels as well as possibly disruption of degradation of service levels as well as possibly disruption of
service. service.
6. Contributors 6. Contributors
The following individuals also contribute to this document. The following individuals also contribute to this document.
o Zekun He, Tencent Holdings Ltd o Zekun He, Tencent Holdings Ltd
o Sujian Lu, Tencent Holdings Ltd o Sujian Lu, Tencent Holdings Ltd
skipping to change at page 66, line 14 skipping to change at page 66, line 14
7. Acknowledgements 7. Acknowledgements
The authors would like to thank Chris Bowers and John Scudder for his The authors would like to thank Chris Bowers and John Scudder for his
review, suggestion and comments to this document. review, suggestion and comments to this document.
8. References 8. References
8.1. Normative References 8.1. Normative References
[I-D.ietf-netmod-yang-tree-diagrams]
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft-
ietf-netmod-yang-tree-diagrams-04 (work in progress),
December 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
skipping to change at page 67, line 13 skipping to change at page 67, line 17
<https://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
8.2. Informative References 8.2. Informative References
[I-D.ietf-i2rs-rib-info-model] [I-D.ietf-i2rs-rib-info-model]
Bahadur, N., Kini, S., and J. Medved, "Routing Information Bahadur, N., Kini, S., and J. Medved, "Routing Information
Base Info Model", draft-ietf-i2rs-rib-info-model-12 (work Base Info Model", draft-ietf-i2rs-rib-info-model-13 (work
in progress), November 2017. in progress), January 2018.
[I-D.ietf-i2rs-usecase-reqs-summary] [I-D.ietf-i2rs-usecase-reqs-summary]
Hares, S. and M. Chen, "Summary of I2RS Use Case Hares, S. and M. Chen, "Summary of I2RS Use Case
Requirements", draft-ietf-i2rs-usecase-reqs-summary-03 Requirements", draft-ietf-i2rs-usecase-reqs-summary-03
(work in progress), November 2016. (work in progress), November 2016.
[RFC7921] Atlas, A., Halpern, J., Hares, S., Ward, D., and T. [RFC7921] Atlas, A., Halpern, J., Hares, S., Ward, D., and T.
Nadeau, "An Architecture for the Interface to the Routing Nadeau, "An Architecture for the Interface to the Routing
System", RFC 7921, DOI 10.17487/RFC7921, June 2016, System", RFC 7921, DOI 10.17487/RFC7921, June 2016,
<https://www.rfc-editor.org/info/rfc7921>. <https://www.rfc-editor.org/info/rfc7921>.
Authors' Addresses Authors' Addresses
Lixing Wang Lixing Wang
Individual Individual
Email: wang_little_star@sina.com Email: wang_little_star@sina.com
Hariharan Ananthakrishnan
Packet Design
Email: hari@packetdesign.com
Mach(Guoyi) Chen Mach(Guoyi) Chen
Huawei Huawei
Email: mach.chen@huawei.com Email: mach.chen@huawei.com
Amit Dass Amit Dass
Ericsson Ericsson
Email: amit.dass@ericsson.com Email: amit.dass@ericsson.com
Hariharan Ananthakrishnan
Packet Design
Email: hari@packetdesign.com
Sriganesh Kini Sriganesh Kini
Individual Individual
Email: sriganeshkini@gmail.com Email: sriganeshkini@gmail.com
Nitin Bahadur Nitin Bahadur
Bracket Computing Bracket Computing
Email: nitin_bahadur@yahoo.com Email: nitin_bahadur@yahoo.com
 End of changes. 383 change blocks. 
1966 lines changed or deleted 1957 lines changed or added

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