idnits 2.17.1 draft-ietf-i2rs-rib-data-model-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 1, 2015) is 3098 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-15) exists of draft-ietf-i2rs-architecture-09 == Outdated reference: A later version (-17) exists of draft-ietf-i2rs-rib-info-model-08 == Outdated reference: A later version (-03) exists of draft-ietf-i2rs-usecase-reqs-summary-01 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group L. Wang 3 Internet-Draft Individual 4 Intended status: Standards Track H. Ananthakrishnan 5 Expires: May 4, 2016 Packet Design 6 M. Chen 7 Huawei 8 A. Dass 9 S. Kini 10 Ericsson 11 N. Bahadur 12 Bracket Computing 13 November 1, 2015 15 A YANG Data Model for Routing Information Base (RIB) 16 draft-ietf-i2rs-rib-data-model-03 18 Abstract 20 This document defines a YANG data model for Routing Information Base 21 (RIB) that aligns with the I2RS RIB information model. 23 Requirements Language 25 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 26 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 27 document are to be interpreted as described in RFC 2119 [RFC2119]. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on May 4, 2016. 46 Copyright Notice 48 Copyright (c) 2015 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 64 1.1. Definitions and Acronyms . . . . . . . . . . . . . . . . 3 65 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Model Structure . . . . . . . . . . . . . . . . . . . . . . . 3 67 2.1. RIB Capability . . . . . . . . . . . . . . . . . . . . . 7 68 2.2. Routing Instance and Rib . . . . . . . . . . . . . . . . 7 69 2.3. Route . . . . . . . . . . . . . . . . . . . . . . . . . . 8 70 2.4. Nexthop . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 2.5. RPC Operations . . . . . . . . . . . . . . . . . . . . . 13 72 2.6. Notifications . . . . . . . . . . . . . . . . . . . . . . 16 73 3. YANG Modules . . . . . . . . . . . . . . . . . . . . . . . . 17 74 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 59 75 5. Security Considerations . . . . . . . . . . . . . . . . . . . 59 76 6. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 59 77 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 60 78 7.1. Normative References . . . . . . . . . . . . . . . . . . 60 79 7.2. Informative References . . . . . . . . . . . . . . . . . 60 80 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 82 1. Introduction 84 The Interface to the Routing System (I2RS) 85 [I-D.ietf-i2rs-architecture] provides read and write access to the 86 information and state within the routing process that exists inside 87 the routing elements, this is achieved via the protocol message 88 exchange between I2RS clients and I2RS agents associated with the 89 routing system. One of the functions of I2RS is to read and write 90 data of Routing Information Base (RIB). 91 [I-D.ietf-i2rs-usecase-reqs-summary] introduces a set of RIB use 92 cases and the RIB information model is defined in 93 [I-D.ietf-i2rs-rib-info-model]. 95 This document defines a YANG [RFC6020][RFC6991] data model for the 96 RIB that satisfies the RIB use cases and aligns with the RIB 97 information model. 99 1.1. Definitions and Acronyms 101 RIB: Routing Information Base 103 Information Model (IM): An abstract model of a conceptual domain, 104 independent of a specific implementation or data representation. 106 1.2. Tree Diagrams 108 A simplified graphical representation of the data model is used in 109 this document. The meaning of the symbols in these diagrams is as 110 follows: 112 o Brackets "[" and "]" enclose list keys. 114 o Abbreviations before data node names: "rw" means configuration 115 (read-write) and "ro" state data (read-only). 117 o Symbols after data node names: "?" means an optional node and "*" 118 denotes a "list" and "leaf-list". 120 o Parentheses enclose choice and case nodes, and case nodes are also 121 marked with a colon (":"). 123 o Ellipsis ("...") stands for contents of subtrees that are not 124 shown. 126 2. Model Structure 128 The following figure shows an overview of structure tree of the i2rs- 129 rib module. To give a whole view of the structure tree, some details 130 of the tree are omitted. The detail are introduced in the following 131 sub-sections. 133 module: ietf-i2rs-rib 134 +--rw routing-instance 135 +--rw name string 136 +--rw interface-list* [name] 137 | +--rw name if:interface-ref 138 +--rw router-id? yang:dotted-quad 139 +--rw lookup-limit? uint8 140 +--rw rib-list* [name] 141 +--rw name string 142 +--rw rib-family rib-family-def 143 +--rw ip-rpf-check? boolean 144 +--rw route-list* [route-index] 145 +--rw route-index uint64 146 +--rw match 147 | +--rw (route-type)? 148 | +--:(ipv4) 149 | | ... 150 | +--:(ipv6) 151 | | ... 152 | +--:(mpls-route) 153 | | ... 154 | +--:(mac-route) 155 | | ... 156 | +--:(interface-route) 157 | ... 158 +--rw nexthop 159 | +--rw nexthop-id uint32 160 | +--rw sharing-flag boolean 161 | +--rw (nexthop-type)? 162 | +--:(nexthop-base) 163 | | ... 164 | +--:(nexthop-chain) {nexthop-chain}? 165 | | ... 166 | +--:(nexthop-replicates) {nexthop-replicates}? 167 | | ... 168 | +--:(nexthop-protection) {nexthop-protection}? 169 | | ... 170 | +--:(nexthop-load-balance) {nexthop-load-balance}? 171 | ... 172 +--rw route-statistic 173 | ... 174 +--rw route-attributes 175 | ... 176 +--rw route-vendor-attributes 177 rpcs: 178 +---x rib-add 179 | +--ro input 180 | | +--ro rib-name string 181 | | +--ro rib-family rib-family-def 182 | | +--ro ip-rpf-check? boolean 183 | +--ro output 184 | +--ro result boolean 185 +---x rib-delete 186 | +--ro input 187 | | +--ro rib-name string 188 | +--ro output 189 | +--ro result boolean 190 +---x route-add 191 | +--ro input 192 | | +--ro rib-name string 193 | | +--ro routes 194 | | +--ro route-list* [route-index] 195 | | ... 196 | +--ro output 197 | +--ro result boolean 198 +---x route-delete 199 | +--ro input 200 | | +--ro rib-name string 201 | | +--ro routes 202 | | +--ro route-list* [route-index] 203 | | ... 204 | +--ro output 205 | +--ro result boolean 206 +---x route-update 207 | +--ro input 208 | | +--ro rib-name string 209 | | +--ro (match-conditions)? 210 | | +--:(match-route-prefix) 211 | | | ... 212 | | +--:(match-route-attributes) 213 | | | ... 214 | | +--:(match-route-vendor-attributes) {...vendor-attributes}? 215 | | | ... 216 | | +--:(match-nexthop) 217 | | ... 218 | +--ro output 219 | +--ro result boolean 220 +---x nh-add 221 | +--ro input 222 | | +--ro rib-name string 223 | | +--ro nexthop-id uint32 224 | | +--ro sharing-flag boolean 225 | | +--ro (nexthop-type)? 226 | | +--:(nexthop-base) 227 | | | ... 228 | | +--:(nexthop-chain) {nexthop-chain}? 229 | | | ... 230 | | +--:(nexthop-replicates) {nexthop-replicates}? 231 | | | ... 232 | | +--:(nexthop-protection) {nexthop-protection}? 233 | | | ... 234 | | +--:(nexthop-load-balance) {nexthop-load-balance}? 235 | | ... 236 | +--ro output 237 | +--ro result boolean 238 | +--ro nexthop-id uint32 239 +---x nh-delete 240 +--ro input 241 | +--ro rib-name string 242 | +--ro nexthop-id uint32 243 | +--ro sharing-flag boolean 244 | +--ro (nexthop-type)? 245 | +--:(nexthop-base) 246 | | ... 247 | +--:(nexthop-chain) {nexthop-chain}? 248 | | ... 249 | +--:(nexthop-replicates) {nexthop-replicates}? 250 | | ... 251 | +--:(nexthop-protection) {nexthop-protection}? 252 | | ... 253 | +--:(nexthop-load-balance) {nexthop-load-balance}? 254 | ... 255 +--ro output 256 +--ro result boolean 257 notifications: 258 +---n nexthop-resolution-status-change 259 | +--ro nexthop 260 | | +--ro nexthop-id uint32 261 | | +--ro sharing-flag boolean 262 | | +--ro (nexthop-type)? 263 | | +--:(nexthop-base) 264 | | | ... 265 | | +--:(nexthop-chain) {nexthop-chain}? 266 | | | ... 267 | | +--:(nexthop-replicates) {nexthop-replicates}? 268 | | | ... 269 | | +--:(nexthop-protection) {nexthop-protection}? 270 | | | ... 271 | | +--:(nexthop-load-balance) {nexthop-load-balance}? 272 | | ... 273 | +--ro nexthop-state nexthop-state-def 274 +---n route-change 275 +--ro rib-name string 276 +--ro rib-family rib-family-def 277 +--ro route-index uint64 278 +--ro match 279 | +--ro (route-type)? 280 | +--:(ipv4) 281 | | ... 282 | +--:(ipv6) 283 | | ... 284 | +--:(mpls-route) 285 | | ... 286 | +--:(mac-route) 287 | | ... 288 | +--:(interface-route) 289 | ... 290 +--ro route-installed-state route-installed-state-def 291 +--ro route-state route-state-def 292 +--ro route-change-reason route-reason-def 294 Figure 1: Overview of I2RS Rib Module Structure 296 2.1. RIB Capability 298 RIB capability negotiation is very important because not all of the 299 hardware will be able to support all kinds of nexthops and there 300 should be a limitation on how many levels of lookup can be 301 practically performed. Therefore, a RIB data model MUST specify a 302 way for an external entity to learn about the functional capabilities 303 of a network device. 305 At the same time, nexthop chains can be used to specify multiple 306 headers over a packet, before that particular packet is forwarded. 307 Not every network device will be able to support all kinds of nexthop 308 chains along with the arbitrary number of headers which are chained 309 together. The RIB data model MUST provide a way to expose the 310 nexthop chaining capability supported by a given network device. 312 This module uses the feature and if-feature statements to achieve 313 above capability negotiation. 315 2.2. Routing Instance and Rib 317 A routing instance, in the context of the RIB information model, is a 318 collection of RIBs, interfaces, and routing protocol parameters. A 319 routing instance creates a logical slice of the router and can allow 320 multiple different logical slices; across a set of routers; to 321 communicate with each other. And the routing protocol parameters 322 control the information available in the RIBs. More detail about 323 routing instance can be found in Section 2.2 of 324 [I-D.ietf-i2rs-rib-info-model]. 326 As described in [I-D.ietf-i2rs-rib-info-model], there will be 327 multiple routing instances for a router. At the same time, for a 328 routing instance, there would be multiple RIBs as well. Therefore, 329 this model uses "list" to express the RIBs. The structure tree is 330 shown as following figure. 332 +--rw routing-instance 333 +--rw name string 334 +--rw interface-list* [name] 335 | +--rw name if:interface-ref 336 +--rw router-id? yang:dotted-quad 337 +--rw lookup-limit? uint8 338 +--rw rib-list* [name] 339 +--rw name string 340 +--rw rib-family rib-family-def 341 +--rw ip-rpf-check? boolean 342 +--rw route-list* [route-index] 343 ... (refer to Section 2.3) 345 Figure 2: Routing Instance Stuture 347 2.3. Route 349 A route is essentially a match condition and an action following that 350 match. The match condition specifies the kind of route (e.g., IPv4, 351 MPLS, MAC, Interface etc.) and the set of fields to match on. 353 According to the definition in [I-D.ietf-i2rs-rib-info-model], a 354 route MUST associate with the following attributes: 356 o ROUTE_PREFERENCE: See Section 2.3 of 357 [I-D.ietf-i2rs-rib-info-model]. 359 o ACTIVE: Indicates whether a route is fully resolved and is a 360 candidate for selection. 362 o INSTALLED: Indicates whether the route got installed in the FIB. 364 In addition, a route can associate with one or more optional route 365 attributes(e.g., route-vendor-attributes). 367 For a RIB, there will have a number of routes, so the routes are 368 expressed as a list under the rib list. 370 +--rw route-list* [route-index] 371 +--rw route-index uint64 372 +--rw match 373 | +--rw (route-type)? 374 | +--:(ipv4) 375 | | +--rw ipv4 376 | | +--rw (ip-route-match-type)? 377 | | +--:(dest-ipv4-address) 378 | | | ... 379 | | +--:(src-ipv4-address) 380 | | | ... 381 | | +--:(dest-src-ipv4-address) 382 | | ... 383 | +--:(ipv6) 384 | | +--rw ipv6 385 | | +--rw (ip-route-match-type)? 386 | | +--:(dest-ipv6-address) 387 | | | ... 388 | | +--:(src-ipv6-address) 389 | | | ... 390 | | +--:(dest-src-ipv6-address) 391 | | ... 392 | +--:(mpls-route) 393 | | +--rw mpls-label uint32 394 | +--:(mac-route) 395 | | +--rw mac-address uint32 396 | +--:(interface-route) 397 | +--rw interface-identifier if:interface-ref 398 +--rw nexthop 399 | ...(refer to Section 2.4) 401 Figure 3: Routes Structure 403 2.4. Nexthop 405 A nexthop represents an object resulting from a route lookup. As 406 illustrated in Section 2.4 of [I-D.ietf-i2rs-rib-info-model], to 407 support various of use cases (e.g., load balance, protection, 408 multicast or the combination of them), the nexthop is modelled as a 409 multi-level structure and supports recursion. The first level of the 410 nexthop includes the following four types: 412 o Base: The "base" nexthop itself is a hierarchical structure, it is 413 the base of all other nexthop types. The first level of the base 414 nexthop includes special-nexthop and nexthop-chain. The nexthop- 415 chain can have one or more nexthop chain members, each member is 416 one of the four types (as listed below) of specific nexthop. 418 Other first level nexthop (e.g., load-balance, protection and 419 replicate) will finally be iterated to a "base" nexthop. 421 * nexthop-id 423 * egress-interface 425 * logical-tunnel 427 * tunnel-encap 429 o Load-balance: Designed for load-balance case where it normally 430 will have multiple weighted nexthops. 432 o Protection: Designed for protection scenario where it normally 433 will have primary and standby nexthop. 435 o Replicate: Designed for multiple destinations forwarding. 437 The structure tree of nexthop is shown in the following figures. 439 +--rw nexthop 440 | +--rw nexthop-id uint32 441 | +--rw sharing-flag boolean 442 | +--rw (nexthop-type)? 443 | +--:(nexthop-base) 444 | | ...(refer to Figure 5) 445 | +--:(nexthop-chain) {nexthop-chain}? 446 | | +--rw nexthop-chain 447 | | +--rw nexthop-list* [nexthop-member-id] 448 | | +--rw nexthop-member-id uint32 449 | +--:(nexthop-replicates) {nexthop-replicates}? 450 | | +--rw nexthop-replicates 451 | | +--rw nexthop-list* [nexthop-member-id] 452 | | +--rw nexthop-member-id uint32 453 | +--:(nexthop-protection) {nexthop-protection}? 454 | | +--rw nexthop-protection 455 | | +--rw nexthop-list* [nexthop-member-id] 456 | | +--rw nexthop-member-id uint32 457 | | +--rw nexthop-preference nexthop-preference-def 458 | +--:(nexthop-load-balance) {nexthop-load-balance}? 459 | +--rw nexthop-lbs 460 | +--rw nexthop-list* [nexthop-member-id] 461 | +--rw nexthop-member-id uint32 462 | +--rw nexthop-lb-weight nexthop-lb-weight-def 464 Figure 4: Nexhop Structure 466 Figure 5 (as shown blow) is a sub-tree of nexthop, it's under the 467 nexthop base node. 469 +--:(nexthop-base) 470 | +--rw nexthop-base 471 | +--rw (nexthop-base-type)? 472 | +--:(special-nexthop) 473 | | +--rw special? special-nexthop-def 474 | +--:(egress-interface-nexthop) 475 | | +--rw outgoing-interface if:interface-ref 476 | +--:(ipv4-address-nexthop) 477 | | +--rw ipv4-address inet:ipv4-address 478 | +--:(ipv6-address-nexthop) 479 | | +--rw ipv6-address inet:ipv6-address 480 | +--:(egress-interface-ipv4-nexthop) 481 | | +--rw egress-interface-ipv4-address 482 | | +--rw outgoing-interface if:interface-ref 483 | | +--rw ipv4-address inet:ipv4-address 484 | +--:(egress-interface-ipv6-nexthop) 485 | | +--rw egress-interface-ipv6-address 486 | | +--rw outgoing-interface if:interface-ref 487 | | +--rw ipv6-address inet:ipv6-address 488 | +--:(egress-interface-mac-nexthop) 489 | | +--rw egress-interface-mac-address 490 | | +--rw outgoing-interface if:interface-ref 491 | | +--rw ieee-mac-address uint32 492 | +--:(tunnel-encap-nexthop) {nexthop-tunnel}? 493 | | +--rw tunnel-encap 494 | | +--rw (tunnel-type)? 495 | | +--:(ipv4) {ipv4-tunnel}? 496 | | | +--rw src-ipv4-address inet:ipv4-address 497 | | | +--rw dest-ipv4-address inet:ipv4-address 498 | | | +--rw protocol uint8 499 | | | +--rw ttl? uint8 500 | | | +--rw dscp? uint8 501 | | +--:(ipv6) {ipv6-tunnel}? 502 | | | +--rw src-ipv6-address inet:ipv6-address 503 | | | +--rw dest-ipv6-address inet:ipv6-address 504 | | | +--rw next-header uint8 505 | | | +--rw traffic-class? uint8 506 | | | +--rw flow-label? uint16 507 | | | +--rw hop-limit? uint8 508 | | +--:(mpls) {mpls-tunnel}? 509 | | | +--rw label-operations* [label-oper-id] 510 | | | +--rw label-oper-id uint32 511 | | | +--rw (label-actions)? 512 | | | +--:(label-push) 513 | | | | +--rw label-push 514 | | | | +--rw label uint32 515 | | | | +--rw s-bit? boolean 516 | | | | +--rw tc-value? uint8 517 | | | | +--rw ttl-value? uint8 518 | | | +--:(label-swap) 519 | | | +--rw label-swap 520 | | | +--rw in-label uint32 521 | | | +--rw out-label uint32 522 | | | +--rw ttl-action? ttl-action-def 523 | | +--:(gre) {gre-tunnel}? 524 | | | +--rw (dest-address-type)? 525 | | | | +--:(ipv4) 526 | | | | | +--rw ipv4-dest inet:ipv4-address 527 | | | | +--:(ipv6) 528 | | | | +--rw ipv6-dest inet:ipv6-address 529 | | | +--rw protocol-type uint16 530 | | | +--rw key? uint64 531 | | +--:(nvgre) {nvgre-tunnel}? 532 | | | +--rw (nvgre-type)? 533 | | | | +--:(ipv4) 534 | | | | | +--rw src-ipv4-address inet:ipv4-address 535 | | | | | +--rw dest-ipv4-address inet:ipv4-address 536 | | | | | +--rw protocol uint8 537 | | | | | +--rw ttl? uint8 538 | | | | | +--rw dscp? uint8 539 | | | | +--:(ipv6) 540 | | | | +--rw src-ipv6-address inet:ipv6-address 541 | | | | +--rw dest-ipv6-address inet:ipv6-address 542 | | | | +--rw next-header uint8 543 | | | | +--rw traffic-class? uint8 544 | | | | +--rw flow-label? uint16 545 | | | | +--rw hop-limit? uint8 546 | | | +--rw virtual-subnet-id uint32 547 | | | +--rw flow-id? uint16 548 | | +--:(vxlan) {vxlan-tunnel}? 549 | | +--rw (vxlan-type)? 550 | | | +--:(ipv4) 551 | | | | +--rw src-ipv4-address inet:ipv4-address 552 | | | | +--rw dest-ipv4-address inet:ipv4-address 553 | | | | +--rw protocol uint8 554 | | | | +--rw ttl? uint8 555 | | | | +--rw dscp? uint8 556 | | | +--:(ipv6) 557 | | | +--rw src-ipv6-address inet:ipv6-address 558 | | | +--rw dest-ipv6-address inet:ipv6-address 559 | | | +--rw next-header uint8 560 | | | +--rw traffic-class? uint8 561 | | | +--rw flow-label? uint16 562 | | | +--rw hop-limit? uint8 563 | | +--rw vxlan-identifier uint32 564 | +--:(tunnel-decap-nexthp) {nexthop-tunnel}? 565 | | +--rw tunnel-decap 566 | | +--rw (tunnel-type)? 567 | | +--:(ipv4) {ipv4-tunnel}? 568 | | | +--rw ipv4-decap 569 | | | +--rw ipv4-decap tunnel-decap-action-def 570 | | | +--rw ttl-action? ttl-action-def 571 | | +--:(ipv6) {ipv6-tunnel}? 572 | | | +--rw ipv6-decap 573 | | | +--rw ipv6-decap tunnel-decap-action-def 574 | | | +--rw hop-limit-action? hop-limit-action-def 575 | | +--:(mpls) {mpls-tunnel}? 576 | | +--rw label-pop 577 | | +--rw label-pop mpls-label-action-def 578 | | +--rw ttl-action? ttl-action-def 579 | +--:(logical-tunnel-nexthop) {nexthop-tunnel}? 580 | | +--rw logical-tunnel 581 | | +--rw tunnel-type tunnel-type-def 582 | | +--rw tunnel-name string 583 | +--:(rib-name-nexthop) 584 | +--rw rib-name? string 585 Figure 5: Nexthop Base Structure 587 2.5. RPC Operations 589 This module defines the following RPC operations: 591 o rib-add: It is defined to add a rib to a routing instance. A name 592 of the rib, address family of the rib and whether the RPF check is 593 enabled are passed as the input parameters. The output is the 594 result of the add operation: 1 means success, and 0 means failed. 596 o rib-delete: It is defined to delete a rib from a routing instance. 597 When a rib is deleted, all routes installed in the rib will be 598 deleted. A name of the rib is passed as the input parameter. The 599 output is the result of the delete operation: 1 means success, and 600 0 means failed. 602 o route-add: It is defined to add a route or a set of routes to a 603 rib. A rib name, the route prefix(es), route attributes, route 604 vendor attributes and nexthop are passed as the input parameters. 605 The output is the result of the add operation: 1 means success, 606 and 0 means failed. Before calling the route-add rpc, it is 607 required to call the nh-add rpc to create and/or return the 608 nexthop identifier. 610 o route-delete: It is defined to delete a route or a set of routes 611 from a rib. A name of the rib and the route prefix(es) are passed 612 as the input parameters. The output is the result of the delete 613 operation: 1 means success, and 0 means failed. 615 o route-update: It is defined to update a route or a set of routes. 616 A rib name, the route prefix(es), or route attributes, or route 617 vendor attributes, or nexthop are passed as the input parameters. 618 The match conditions can be either route prefix(es), or route 619 attributes, or route vendor attributes, or nexthop. The update 620 actions include: update the nexthop, update the route attributes, 621 update the route vendor attributes. The output is the result of 622 the update operation: 1 means success, and 0 means failed. 624 o nh-add: It is defined to add a nexthop to a rib. A name of the 625 rib and a nexthop are passed as the input parameters. The network 626 node is required to allocate a nexhop identifier to the nexthop. 627 The outputs include the result of the update operation (1 means 628 success, and 0 means failed ) and the nexthop identifier that is 629 allocated to the nexthop. 631 o nh-delete: It is defined to delete a nexthop from a rib. A name 632 of a rib and a nexthop or nexthop identifier are passed as the 633 input parameters. The output is the result of the delete 634 operation: 1 means success, 0 means failed. 636 The structure tree of rpcs is showing in following figure. 638 rpcs: 639 +---x rib-add 640 | +--ro input 641 | | +--ro rib-name string 642 | | +--ro rib-family rib-family-def 643 | | +--ro ip-rpf-check? boolean 644 | +--ro output 645 | +--ro result boolean 646 +---x rib-delete 647 | +--ro input 648 | | +--ro rib-name string 649 | +--ro output 650 | +--ro result boolean 651 +---x route-add 652 | +--ro input 653 | | +--ro rib-name string 654 | | +--ro routes 655 | | +--ro route-list* [route-index] 656 | | ... 657 | +--ro output 658 | +--ro result boolean 659 +---x route-delete 660 | +--ro input 661 | | +--ro rib-name string 662 | | +--ro routes 663 | | +--ro route-list* [route-index] 664 | | ... 665 | +--ro output 666 | +--ro result boolean 667 +---x route-update 668 | +--ro input 669 | | +--ro rib-name string 670 | | +--ro (match-conditions)? 671 | | +--:(match-route-prefix) 672 | | | ... 673 | | +--:(match-route-attributes) 674 | | | ... 675 | | +--:(match-route-vendor-attributes) {..vendor-attributes}? 676 | | | ... 677 | | +--:(match-nexthop) 678 | | ... 679 | +--ro output 680 | +--ro result boolean 681 +---x nh-add 682 | +--ro input 683 | | +--ro rib-name string 684 | | +--ro nexthop-id uint32 685 | | +--ro sharing-flag boolean 686 | | +--ro (nexthop-type)? 687 | | ... 688 | +--ro output 689 | +--ro result boolean 690 | +--ro nexthop-id uint32 691 +---x nh-delete 692 +--ro input 693 | +--ro rib-name string 694 | +--ro nexthop-id uint32 695 | +--ro sharing-flag boolean 696 | +--ro (nexthop-type)? 697 | ... 698 +--ro output 699 +--ro result boolean 701 Figure 6: RPCs Structure 703 2.6. Notifications 705 Asynchronous notifications are sent by the RIB manager of a network 706 device to an external entity when some event triggers on the network 707 device. A RIB data-model MUST support sending 2 kind of asynchronous 708 notifications. 710 1. Route change notification: 712 o Installed (Indicates whether the route got installed in the FIB) ; 714 o Active (Indicates whether a route is fully resolved and is a 715 candidate for selection) ; 717 o Reason - E.g. Not authorized 719 2. Nexthop resolution status notification 721 Nexthops can be fully resolved nexthops or an unresolved nexthop. 723 A resolved nexthop has adequate level of information to send the 724 outgoing packet towards the destination by forwarding it on an 725 interface of a directly connected neighbor. 727 An unresolved nexthop is something that requires the RIB manager to 728 determine the final resolved nexthop. For example, in a case when a 729 nexthop could be an IP address. The RIB manager would resolve how to 730 reach that IP address, e.g. by checking if that particular IP is 731 address reachable by regular IP forwarding or by a MPLS tunnel or by 732 both. If the RIB manager cannot resolve the nexthop, then the 733 nexthop remains in an unresolved state and is NOT a suitable 734 candidate for installation in the FIB. 736 The structure tree of notifications is shown in the following figure. 738 notifications: 739 +---n nexthop-resolution-status-change 740 | +--ro nexthop 741 | | +--ro nexthop-id uint32 742 | | +--ro sharing-flag boolean 743 | | +--ro (nexthop-type)? 744 | | +--:(nexthop-base) 745 | | | ... 746 | | +--:(nexthop-chain) {nexthop-chain}? 747 | | | ... 748 | | +--:(nexthop-replicates) {nexthop-replicates}? 749 | | | ... 750 | | +--:(nexthop-protection) {nexthop-protection}? 751 | | | ... 752 | | +--:(nexthop-load-balance) {nexthop-load-balance}? 753 | | ... 754 | +--ro nexthop-state nexthop-state-def 755 +---n route-change 756 +--ro rib-name string 757 +--ro rib-family rib-family-def 758 +--ro route-index uint64 759 +--ro match 760 | +--ro (route-type)? 761 | +--:(ipv4) 762 | | ... 763 | +--:(ipv6) 764 | | ... 765 | +--:(mpls-route) 766 | | ... 767 | +--:(mac-route) 768 | | ... 769 | +--:(interface-route) 770 | ... 771 +--ro route-installed-state route-installed-state-def 772 +--ro route-state route-state-def 773 +--ro route-change-reason route-reason-def 775 Figure 7: Notifications Structure 777 3. YANG Modules 779 // file "ietf i2rs rib@2015-10-28.yang" 781 module ietf-i2rs-rib { 782 namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-rib"; 783 // replace with iana namespace when assigned 784 prefix "iir"; 785 import ietf-inet-types { 786 prefix inet; 787 //rfc6991 788 } 790 import ietf-interfaces { 791 prefix "if"; 792 } 794 import ietf-yang-types { 795 prefix yang; 796 } 798 organization 799 "IETF I2RS (Interface to Routing System) Working Group"; 800 contact 801 "WG Web: 802 WG List: 804 WG Chair: Susan Hares 805 807 WG Chair: Jeffrey Haas 808 810 Editor: Lixing Wang 811 813 Editor: Hariharan Ananthakrishnan 814 816 Editor: Mach(Guoyi) Chen 817 819 Editor: Amit Dass 820 822 Editor: Sriganesh Kini 823 825 Editor: Nitin Bahadur 826 "; 827 description 828 "This module defines a YANG data model for 829 Routing Information Base (RIB) that aligns 830 with the I2RS RIB information model."; 831 revision "2015-10-28" { 832 description "initial revision"; 833 reference "draft-ietf-i2rs-rib-info-model-08"; 834 } 836 //Features 837 feature nexthop-tunnel { 838 description 839 "This feature means that a node support 840 tunnel nexhtop capability."; 841 } 843 feature nexthop-chain { 844 description 845 "This feature means that a node support 846 chain nexhtop capability."; 847 } 849 feature nexthop-protection { 850 description 851 "This feature means that a node support 852 protection nexhtop capability."; 853 } 855 feature nexthop-replicates { 856 description 857 "This feature means that a node support 858 relicates nexhtop capability."; 859 } 861 feature nexthop-load-balance { 862 description 863 "This feature means that a node support 864 load balance nexhtop capability."; 865 } 867 feature ipv4-tunnel { 868 description 869 "This feature means that a node support 870 IPv4 tunnel encapsulation capability."; 871 } 873 feature ipv6-tunnel { 874 description 875 "This feature means that a node support 876 IPv6 tunnel encapsulation capability."; 877 } 879 feature mpls-tunnel { 880 description 881 "This feature means that a node support 882 MPLS tunnel encapsulation capability."; 883 } 885 feature vxlan-tunnel { 886 description 887 "This feature means that a node support 888 VxLAN tunnel encapsulation capability."; 889 } 891 feature gre-tunnel { 892 description 893 "This feature means that a node support 894 GRE tunnel encapsulation capability."; 895 } 897 feature nvgre-tunnel { 898 description 899 "This feature means that a node support 900 NvGRE tunnel encapsulation capability."; 901 } 903 feature route-vendor-attributes { 904 description 905 "This feature means that a node support 906 route vendor attributes."; 907 } 909 //Identities and Type Definitions 910 identity mpls-label-action { 911 description 912 "Base identify from which all mpls label 913 operations are derived. 914 The MPLS label stack operations include: 915 push - to add a new label to a label stack, 916 pop - to pop the top label from a label stack, 917 swap - to change the top label of a label 918 stack with new label."; 919 } 921 identity label-push { 922 base "mpls-label-action"; 923 description 924 "MPLS label stack operation: push."; 925 } 927 identity label-pop { 928 base "mpls-label-action"; 929 description 930 "MPLS label stack operation: pop."; 931 } 933 identity label-swap { 934 base "mpls-label-action"; 935 description 936 "MPLS label stack operation: swap."; 937 } 939 typedef mpls-label-action-def { 940 type identityref { 941 base "mpls-label-action"; 942 } 943 description 944 "MPLS label action def."; 945 } 947 identity tunnel-decap-action { 948 description 949 "Base identify from which all tunnel decap 950 actions are derived. 951 Tunnel decap actions include: 952 ipv4-decap - to decap an IPv4 tunnel, 953 ipv6-decap - to decap an IPv6 tunnel."; 954 } 956 identity ipv4-decap { 957 base "tunnel-decap-action"; 958 description 959 "IPv4 tunnel decap."; 960 } 962 identity ipv6-decap { 963 base "tunnel-decap-action"; 964 description 965 "IPv4 tunnel decap."; 966 } 968 typedef tunnel-decap-action-def { 969 type identityref { 970 base "tunnel-decap-action"; 971 } 972 description 973 "Tunnel decap def."; 974 } 976 identity ttl-action { 977 description 978 "Base identify from which all TTL 979 actions are derived. 980 The tll actions include: 981 - ttl-no-action: do nothing regarding the TTL, or 982 - ttl-copy-to-inner: copy the TTL of the outer 983 header to inner header, or 984 - ttl-decrease-and-copy-to-inner: Decrease the TTL 985 by one and copy it to inner header."; 986 } 988 identity no-action { 989 base "ttl-action"; 990 description 991 "Do nothing regarding the TTL."; 992 } 994 identity copy-to-inner { 995 base "ttl-action"; 996 description 997 "Copy the TTL of the outer header 998 to inner header."; 999 } 1001 identity decrease-and-copy-to-inner { 1002 base "ttl-action"; 1003 description 1004 "Decrease TTL by one and copy the TTL 1005 to inner header."; 1006 } 1008 identity decrease-and-copy-to-next { 1009 base "ttl-action"; 1010 description 1011 "Decrease TTL by one and copy the TTL 1012 to the next header.For example: when 1013 MPLS label swapping, decrease the TTL 1014 of the in label and copy it to the out 1015 label."; 1016 } 1018 typedef ttl-action-def { 1019 type identityref { 1020 base "ttl-action"; 1021 } 1022 description 1023 "TTL action def."; 1024 } 1025 identity hop-limit-action { 1026 description 1027 "Base identify from which all hop limit 1028 actions are derived."; 1029 } 1031 identity hop-limit-no-action { 1032 base "hop-limit-action"; 1033 description 1034 "Do nothing regarding the hop limit."; 1035 } 1037 identity hop-limit-copy-to-inner { 1038 base "hop-limit-action"; 1039 description 1040 "Copy the hop limit of the outer header 1041 to inner header."; 1042 } 1044 typedef hop-limit-action-def { 1045 type identityref { 1046 base "hop-limit-action"; 1047 } 1048 description 1049 "IPv6 hop limit action def."; 1050 } 1052 identity special-nexthop { 1053 description 1054 "Base identify from which all special 1055 nexthops are derived."; 1056 } 1058 identity discard { 1059 base "special-nexthop"; 1060 description 1061 "This indicates that the network 1062 device should drop the packet and 1063 increment a drop counter."; 1064 } 1066 identity discard-with-error { 1067 base "special-nexthop"; 1068 description 1069 "This indicates that the network 1070 device should drop the packet, 1071 increment a drop counter and send 1072 back an appropriate error message 1073 (like ICMP error)."; 1074 } 1076 identity receive { 1077 base "special-nexthop"; 1078 description 1079 "This indicates that that the traffic is 1080 destined for the network device. For 1081 example, protocol packets or OAM packets. 1082 All locally destined traffic SHOULD be 1083 throttled to avoid a denial of service 1084 attack on the router's control plane. An 1085 optional rate-limiter can be specified 1086 to indicate how to throttle traffic 1087 destined for the control plane."; 1088 } 1090 identity cos-value { 1091 base "special-nexthop"; 1092 description 1093 "Cos-value special nexthop."; 1094 } 1096 typedef special-nexthop-def { 1097 type identityref { 1098 base "special-nexthop"; 1099 } 1100 description 1101 "Special nexthop def."; 1102 } 1104 identity ip-route-match-type { 1105 description 1106 "Base identify from which all route 1107 match types are derived. 1108 Route match type could be: 1109 match source, or 1110 match destination, or 1111 match source and destination."; 1112 } 1114 identity match-ip-src { 1115 base "ip-route-match-type"; 1116 description 1117 "Source route match type."; 1118 } 1119 identity match-ip-dest { 1120 base "ip-route-match-type"; 1121 description 1122 "Destination route match type"; 1123 } 1124 identity match-ip-src-dest { 1125 base "ip-route-match-type"; 1126 description 1127 "Src and Dest route match type"; 1128 } 1130 typedef ip-route-match-type-def { 1131 type identityref { 1132 base "ip-route-match-type"; 1133 } 1134 description 1135 "IP route match type def."; 1136 } 1138 identity rib-family { 1139 description 1140 "Base identify from which all rib 1141 address families are derived."; 1142 } 1144 identity ipv4-rib-family { 1145 base "rib-family"; 1146 description 1147 "IPv4 rib address family."; 1148 } 1150 identity ipv6-rib-family { 1151 base "rib-family"; 1152 description 1153 "IPv6 rib address family."; 1154 } 1156 identity mpls-rib-family { 1157 base "rib-family"; 1158 description 1159 "MPLS rib address family."; 1160 } 1162 identity ieee-mac-rib-family { 1163 base "rib-family"; 1164 description 1165 "MAC rib address family."; 1166 } 1168 typedef rib-family-def { 1169 type identityref { 1170 base "rib-family"; 1171 } 1172 description 1173 "Rib address family def."; 1174 } 1176 identity route-type { 1177 description 1178 "Base identify from which all route types 1179 are derived."; 1180 } 1182 identity ipv4-route { 1183 base "route-type"; 1184 description 1185 "IPv4 route type."; 1186 } 1188 identity ipv6-route { 1189 base "route-type"; 1190 description 1191 "IPv6 route type."; 1192 } 1194 identity mpls-route { 1195 base "route-type"; 1196 description 1197 "MPLS route type."; 1198 } 1200 identity ieee-mac { 1201 base "route-type"; 1202 description 1203 "MAC route type."; 1204 } 1206 identity interface { 1207 base "route-type"; 1208 description 1209 "Interface route type."; 1210 } 1212 typedef route-type-def { 1213 type identityref { 1214 base "route-type"; 1215 } 1216 description 1217 "Route type def."; 1218 } 1220 identity tunnel-type { 1221 description 1222 "Base identify from which all tunnel 1223 types are derived."; 1224 } 1226 identity ipv4-tunnel { 1227 base "tunnel-type"; 1228 description 1229 "IPv4 tunnel type"; 1230 } 1232 identity ipv6-tunnel { 1233 base "tunnel-type"; 1234 description 1235 "IPv6 Tunnel type"; 1236 } 1238 identity mpls-tunnel { 1239 base "tunnel-type"; 1240 description 1241 "MPLS tunnel type"; 1242 } 1244 identity gre-tunnel { 1245 base "tunnel-type"; 1246 description 1247 "GRE tunnel type"; 1248 } 1250 identity vxlan-tunnel { 1251 base "tunnel-type"; 1252 description 1253 "VxLAN tunnel type"; 1254 } 1256 identity nvgre-tunnel { 1257 base "tunnel-type"; 1258 description 1259 "NVGRE tunnel type"; 1260 } 1262 typedef tunnel-type-def { 1263 type identityref { 1264 base "tunnel-type"; 1266 } 1267 description 1268 "Tunnel type def."; 1269 } 1271 identity route-state { 1272 description 1273 "Base identify from which all route 1274 states are derived."; 1275 } 1277 identity active { 1278 base "route-state"; 1279 description 1280 "Active state."; 1281 } 1283 identity inactive { 1284 base "route-state"; 1285 description 1286 "Inactive state."; 1287 } 1289 typedef route-state-def { 1290 type identityref { 1291 base "route-state"; 1292 } 1293 description 1294 "Route state def."; 1295 } 1297 identity nexthop-state { 1298 description 1299 "Base identify from which all nexthop 1300 states are derived."; 1301 } 1303 identity resolved { 1304 base "nexthop-state"; 1305 description 1306 "Reolved nexthop state."; 1307 } 1309 identity unresolved { 1310 base "nexthop-state"; 1311 description 1312 "Unresolved nexthop state."; 1313 } 1314 typedef nexthop-state-def { 1315 type identityref { 1316 base "nexthop-state"; 1317 } 1318 description 1319 "Nexthop state def."; 1320 } 1322 identity route-installed-state { 1323 description 1324 "Base identify from which all route 1325 installed states are derived."; 1326 } 1328 identity uninstalled { 1329 base "route-installed-state"; 1330 description 1331 "Uninstalled state."; 1332 } 1334 identity installed { 1335 base "route-installed-state"; 1336 description 1337 "Installed state."; 1338 } 1340 typedef route-installed-state-def { 1341 type identityref { 1342 base "route-installed-state"; 1343 } 1344 description 1345 "Route installed state def."; 1346 } 1348 identity route-reason { 1349 description 1350 "Base identify from which all route 1351 reasons are derived."; 1352 } 1354 identity low-preference { 1355 base "route-reason"; 1356 description 1357 "Low preference"; 1358 } 1360 identity unresolved-nexthop { 1361 base "route-reason"; 1362 description 1363 "Unresolved nexthop"; 1364 } 1366 identity higher-metric { 1367 base "route-reason"; 1368 description 1369 "Higher metric"; 1370 } 1372 typedef route-reason-def { 1373 type identityref { 1374 base "route-reason"; 1375 } 1376 description 1377 "Route reason def."; 1378 } 1380 typedef nexthop-preference-def { 1381 type uint8 { 1382 range "1..99"; 1383 } 1384 description 1385 "Nexthop-preference is used for protection schemes. 1386 It is an integer value between 1 and 99. A lower 1387 value indicates higher preference. To download a 1388 primary/standby/tertiary group to the FIB, the 1389 nexthops that are resolved and have two highest 1390 preferences are selected."; 1391 } 1392 typedef nexthop-lb-weight-def { 1393 type uint8 { 1394 range "1..99"; 1395 } 1396 description 1397 "Nhop-lb-weight is a number between 1 and 99."; 1398 } 1400 //Groupings 1401 grouping route-prefix { 1402 description 1403 "The common attributes used for all types of route prefix."; 1404 leaf route-index { 1405 type uint64 ; 1406 mandatory true; 1407 description 1408 "Route index."; 1409 } 1410 container match { 1411 description 1412 "The match condition specifies the 1413 kind of route (IPv4, MPLS, etc.) 1414 and the set of fields to match on."; 1415 choice route-type { 1416 description 1417 "Route types: IPv4, IPv6, MPLS, MAC etc."; 1418 case ipv4 { 1419 description 1420 "IPv4 route case."; 1421 container ipv4 { 1422 description 1423 "IPv4 route match."; 1424 choice ip-route-match-type { 1425 description 1426 "IP route match type options: 1427 match source, or 1428 match destination, or 1429 match source and destination."; 1430 case dest-ipv4-address { 1431 leaf dest-ipv4-prefix { 1432 type inet:ipv4-prefix; 1433 mandatory true; 1434 description 1435 "An IPv4 destination address as the match."; 1436 } 1437 } 1438 case src-ipv4-address { 1439 leaf src-ipv4-prefix { 1440 type inet:ipv4-prefix; 1441 mandatory true; 1442 description 1443 "An IPv4 source address as the match."; 1444 } 1445 } 1446 case dest-src-ipv4-address { 1447 container dest-src-ipv4-address { 1448 description 1449 "A combination of an IPv4 source and 1450 an IPv4 destination address as the match."; 1451 leaf dest-ipv4-prefix { 1452 type inet:ipv4-prefix; 1453 mandatory true; 1454 description 1455 "The IPv4 destination address of the match."; 1456 } 1457 leaf src-ipv4-prefix { 1458 type inet:ipv4-prefix; 1459 mandatory true; 1460 description 1461 "The IPv4 source address of the match"; 1462 } 1463 } 1464 } 1465 } 1466 } 1467 } 1468 case ipv6 { 1469 description 1470 "IPv6 route case."; 1471 container ipv6 { 1472 description 1473 "IPv6 route match."; 1474 choice ip-route-match-type { 1475 description 1476 "IP route match type options: 1477 match source, or 1478 match destination, or 1479 match source and destination."; 1480 case dest-ipv6-address { 1481 leaf dest-ipv6-prefix { 1482 type inet:ipv6-prefix; 1483 mandatory true; 1484 description 1485 "An IPv6 destination address as the match."; 1486 } 1487 } 1488 case src-ipv6-address { 1489 leaf src-ipv6-prefix { 1490 type inet:ipv6-prefix; 1491 mandatory true; 1492 description 1493 "An IPv6 source address as the match."; 1494 } 1495 } 1496 case dest-src-ipv6-address { 1497 container dest-src-ipv6-address { 1498 description 1499 "A combination of an IPv6 source and 1500 an IPv6 destination address as the match."; 1501 leaf dest-ipv6-prefix { 1502 type inet:ipv6-prefix; 1503 mandatory true; 1504 description 1505 "The IPv6 destination address of the match"; 1507 } 1508 leaf src-ipv6-prefix { 1509 type inet:ipv6-prefix; 1510 mandatory true; 1511 description 1512 "The IPv6 source address of the match."; 1513 } 1514 } 1515 } 1516 } 1517 } 1518 } 1519 case mpls-route { 1520 description 1521 "MPLS route case."; 1522 leaf mpls-label { 1523 type uint32 ; 1524 mandatory true; 1525 description 1526 "The label used for matching."; 1527 } 1528 } 1529 case mac-route { 1530 description 1531 "MAC rib case."; 1532 leaf mac-address { 1533 type uint32 ; 1534 mandatory true; 1535 description 1536 "The MAC address used for matching."; 1537 } 1538 } 1539 case interface-route { 1540 description 1541 "Interface route case."; 1542 leaf interface-identifier { 1543 type if:interface-ref; 1544 mandatory true; 1545 description 1546 "The interface used for matching."; 1547 } 1548 } 1549 } 1550 } 1551 } 1553 grouping route { 1554 description 1555 "The common attributes usesd for all types of route."; 1556 uses route-prefix; 1557 container nexthop { 1558 description 1559 "The nexthop of the route."; 1560 uses nexthop; 1561 } 1562 container route-statistic { 1563 description 1564 "The statistic information of the route."; 1565 leaf route-state { 1566 type route-state-def; 1567 config false; 1568 description 1569 "Indicate a route's state: Active or Inactive."; 1570 } 1571 leaf route-installed-state { 1572 type route-installed-state-def; 1573 config false; 1574 description 1575 "Indicate that a route's installed states: 1576 Installed or uninstalled."; 1577 } 1578 leaf route-reason { 1579 type route-reason-def; 1580 config false; 1581 description 1582 "Indicate the route reason."; 1583 } 1584 } 1585 container route-attributes { 1586 description 1587 "Route attributes."; 1588 uses route-attributes; 1589 } 1590 container route-vendor-attributes { 1591 description 1592 "Route vendor attributes."; 1593 uses route-vendor-attributes; 1594 } 1595 } 1597 grouping nexthop-list { 1598 description 1599 "A generic nexthop list."; 1600 list nexthop-list { 1601 key "nexthop-member-id"; 1602 description 1603 "A list of nexthop."; 1604 leaf nexthop-member-id { 1605 type uint32; 1606 mandatory true; 1607 description 1608 "A nexthop identifier that points 1609 to a nexthop list member. 1610 A nexthop list member is a nexthop."; 1611 } 1612 } 1613 } 1615 grouping nexthop-list-p { 1616 description 1617 "A nexthop list with preference parameter."; 1618 list nexthop-list { 1619 key "nexthop-member-id"; 1620 description 1621 "A list of nexthop."; 1622 leaf nexthop-member-id { 1623 type uint32; 1624 mandatory true; 1625 description 1626 "A nexthop identifier that points 1627 to a nexthop list member. 1628 A nexthop list member is a nexthop."; 1629 } 1630 leaf nexthop-preference { 1631 type nexthop-preference-def; 1632 mandatory true; 1633 description 1634 "Nexthop-preference is used for protection schemes. 1635 It is an integer value between 1 and 99. A lower 1636 value indicates higher preference. To download a 1637 primary/standby/tertiary group to the FIB, the 1638 nexthops that are resolved and have two highest 1639 preferences are selected."; 1640 } 1641 } 1642 } 1644 grouping nexthop-list-w { 1645 description 1646 "A nexthop list with weight parameter."; 1647 list nexthop-list { 1648 key "nexthop-member-id"; 1649 description 1650 "A list of nexthop."; 1652 leaf nexthop-member-id { 1653 type uint32; 1654 mandatory true; 1655 description 1656 "A nexthop identifier that points 1657 to a nexthop list member. 1658 A nexthop list member is a nexthop."; 1659 } 1660 leaf nexthop-lb-weight { 1661 type nexthop-lb-weight-def; 1662 mandatory true; 1663 description 1664 "The weight of a nexthop of 1665 the load balance nexthops."; 1666 } 1667 } 1668 } 1670 grouping nexthop { 1671 description 1672 "The nexthop structure."; 1673 leaf nexthop-id { 1674 type uint32; 1675 mandatory true; 1676 description 1677 "The nexthop identifier of a nexthop."; 1678 } 1679 leaf sharing-flag { 1680 type boolean; 1681 mandatory true; 1682 description 1683 "To indicate whether a nexthop is sharable 1684 or non-sharable. 1685 true - sharable, means the nexthop can be shared 1686 with other routes 1687 false - non-sharable, means the nexthop can not 1688 be shared with other routes."; 1689 } 1690 choice nexthop-type { 1691 description 1692 "Nexthop type options."; 1693 case nexthop-base { 1694 container nexthop-base { 1695 description 1696 "The base nexthop."; 1697 uses nexthop-base; 1698 } 1699 } 1700 case nexthop-chain { 1701 if-feature nexthop-chain; 1702 container nexthop-chain { 1703 description 1704 "A chain nexthop."; 1705 uses nexthop-list; 1706 } 1707 } 1708 case nexthop-replicates { 1709 if-feature nexthop-replicates; 1710 container nexthop-replicates { 1711 description 1712 "A replicates nexthop."; 1713 uses nexthop-list; 1714 } 1715 } 1716 case nexthop-protection { 1717 if-feature nexthop-protection; 1718 container nexthop-protection { 1719 description 1720 "A protection nexthop."; 1721 uses nexthop-list-p; 1722 } 1723 } 1724 case nexthop-load-balance { 1725 if-feature nexthop-load-balance; 1726 container nexthop-lbs { 1727 description 1728 "A load balance nexthop."; 1729 uses nexthop-list-w; 1730 } 1731 } 1732 } 1733 } 1735 grouping nexthop-base { 1736 description 1737 "The base nexthop."; 1738 choice nexthop-base-type { 1739 description 1740 "Nexthop base type options."; 1741 case special-nexthop { 1742 leaf special { 1743 type special-nexthop-def; 1744 description 1745 "A special nexthop."; 1746 } 1747 } 1748 case egress-interface-nexthop { 1749 leaf outgoing-interface { 1750 type if:interface-ref; 1751 mandatory true; 1752 description 1753 "The nexthop is an outgoing interface."; 1754 } 1755 } 1756 case ipv4-address-nexthop { 1757 leaf ipv4-address { 1758 type inet:ipv4-address; 1759 mandatory true; 1760 description 1761 "The nexthop is an IPv4 address."; 1762 } 1763 } 1764 case ipv6-address-nexthop { 1765 leaf ipv6-address { 1766 type inet:ipv6-address; 1767 mandatory true; 1768 description 1769 "The nexthop is an IPv6 address."; 1770 } 1771 } 1772 case egress-interface-ipv4-nexthop { 1773 container egress-interface-ipv4-address{ 1774 leaf outgoing-interface { 1775 type if:interface-ref; 1776 mandatory true; 1777 description 1778 "Name of the outgoing interface."; 1779 } 1780 leaf ipv4-address { 1781 type inet:ipv4-address; 1782 mandatory true; 1783 description 1784 "The nexthop points to an interface with 1785 an IPv4 address."; 1786 } 1787 description 1788 "The nexthop is an Egress-interface and an ip 1789 address.This can be usesd in cases e.g.where 1790 the ip address is a link-local address."; 1791 } 1792 } 1793 case egress-interface-ipv6-nexthop { 1794 container egress-interface-ipv6-address { 1795 leaf outgoing-interface { 1796 type if:interface-ref; 1797 mandatory true; 1798 description 1799 "Name of the outgoing interface."; 1800 } 1801 leaf ipv6-address { 1802 type inet:ipv6-address; 1803 mandatory true; 1804 description 1805 "The nexthop points to an interface with 1806 an IPv6 address."; 1807 } 1808 description 1809 "The nexthop is an Egress-interface and an ip 1810 address.This can be usesd in cases e.g.where 1811 the ip address is a link-local address."; 1812 } 1813 } 1814 case egress-interface-mac-nexthop { 1815 container egress-interface-mac-address { 1816 leaf outgoing-interface { 1817 type if:interface-ref; 1818 mandatory true; 1819 description 1820 "Name of the outgoing interface."; 1821 } 1822 leaf ieee-mac-address { 1823 type uint32; 1824 mandatory true; 1825 description 1826 "The nexthop points to an interface with 1827 a specific mac-address."; 1828 } 1829 description 1830 "The egress interface must be an ethernet 1831 interface. Address resolution is not required 1832 for this nexthop."; 1833 } 1834 } 1835 case tunnel-encap-nexthop { 1836 if-feature nexthop-tunnel; 1837 container tunnel-encap { 1838 uses tunnel-encap; 1839 description 1840 "This can be an encap representing an IP tunnel or 1841 MPLS tunnel or others as defined in info model. 1842 An optional egress interface can be chained to the 1843 tunnel encap to indicate which interface to send 1844 the packet out on. The egress interface is useful 1845 when the network device contains Ethernet interfaces 1846 and one needs to perform address resolution for the 1847 IP packet."; 1848 } 1849 } 1850 case tunnel-decap-nexthp { 1851 if-feature nexthop-tunnel; 1852 container tunnel-decap { 1853 uses tunnel-decap; 1854 description 1855 "This is to specify decapsulating a tunnel header."; 1856 } 1857 } 1858 case logical-tunnel-nexthop { 1859 if-feature nexthop-tunnel; 1860 container logical-tunnel { 1861 uses logical-tunnel; 1862 description 1863 "This can be a MPLS LSP or a GRE tunnel (or others 1864 as defined in This document), that is represented 1865 by a unique identifier (e.g. name)."; 1866 } 1867 } 1868 case rib-name-nexthop { 1869 leaf rib-name { 1870 type string; 1871 description 1872 "A nexthop pointing to a rib indicates that the 1873 route lookup needs to continue in The specified 1874 rib. This is a way to perform chained lookups."; 1875 } 1876 } 1877 } 1878 } 1880 grouping route-vendor-attributes { 1881 description 1882 "Route vendor attributes."; 1883 } 1885 grouping logical-tunnel { 1886 description 1887 "A logical tunnel that is identified 1888 by a type and a tunnel name."; 1889 leaf tunnel-type { 1890 type tunnel-type-def; 1891 mandatory true; 1892 description 1893 "A tunnel type."; 1894 } 1895 leaf tunnel-name { 1896 type string; 1897 mandatory true; 1898 description 1899 "A tunnel name that points to a logical tunnel."; 1900 } 1901 } 1903 grouping ipv4-header { 1904 description 1905 "The IPv4 header encapsulation information."; 1906 leaf src-ipv4-address { 1907 type inet:ipv4-address; 1908 mandatory true; 1909 description 1910 "The source ip address of the header."; 1911 } 1912 leaf dest-ipv4-address { 1913 type inet:ipv4-address; 1914 mandatory true; 1915 description 1916 "The destination ip address of the header."; 1917 } 1918 leaf protocol { 1919 type uint8; 1920 mandatory true; 1921 description 1922 "The protocol id of the header."; 1923 } 1924 leaf ttl { 1925 type uint8; 1926 description 1927 "The TTL of the header."; 1928 } 1929 leaf dscp { 1930 type uint8; 1931 description 1932 "The DSCP field of the header."; 1933 } 1934 } 1936 grouping ipv6-header { 1937 description 1938 "The IPv6 header encapsulation information."; 1939 leaf src-ipv6-address { 1940 type inet:ipv6-address; 1941 mandatory true; 1942 description 1943 "The source ip address of the header."; 1944 } 1945 leaf dest-ipv6-address { 1946 type inet:ipv6-address; 1947 mandatory true; 1948 description 1949 "The destination ip address of the header."; 1950 } 1951 leaf next-header { 1952 type uint8; 1953 mandatory true; 1954 description 1955 "The next header of the IPv6 header."; 1956 } 1957 leaf traffic-class { 1958 type uint8; 1959 description 1960 "The traffic class value of the header."; 1961 } 1962 leaf flow-label { 1963 type uint16; 1964 description 1965 "The flow label of the header."; 1966 } 1967 leaf hop-limit { 1968 type uint8; 1969 description 1970 "The hop limit the header."; 1971 } 1972 } 1974 grouping nvgre-header { 1975 description 1976 "The NvGRE header encapsulation information."; 1977 choice nvgre-type { 1978 description 1979 "NvGRE can use eigher IPv4 1980 or IPv6 header for encapsulation."; 1981 case ipv4 { 1982 uses ipv4-header; 1983 } 1984 case ipv6 { 1985 uses ipv6-header; 1986 } 1987 } 1988 leaf virtual-subnet-id { 1989 type uint32; 1990 mandatory true; 1991 description 1992 "The subnet identifier of the NvGRE header."; 1993 } 1994 leaf flow-id { 1995 type uint16; 1996 description 1997 "The flow identifier of the NvGRE header."; 1998 } 1999 } 2001 grouping vxlan-header { 2002 description 2003 "The VxLAN encapsulation header information."; 2004 choice vxlan-type { 2005 description 2006 "NvGRE can use eigher IPv4 2007 or IPv6 header for encapsulation."; 2008 case ipv4 { 2009 uses ipv4-header; 2010 } 2011 case ipv6 { 2012 uses ipv6-header; 2013 } 2014 } 2015 leaf vxlan-identifier { 2016 type uint32; 2017 mandatory true; 2018 description 2019 "The VxLAN identifier of the VxLAN header."; 2020 } 2021 } 2023 grouping gre-header { 2024 description 2025 "The GRE encapsulation header information."; 2026 choice dest-address-type { 2027 description 2028 "GRE options: IPv4 and IPv6"; 2029 case ipv4 { 2030 leaf ipv4-dest { 2031 type inet:ipv4-address; 2032 mandatory true; 2033 description 2034 "The destination ip address of the GRE header."; 2035 } 2037 } 2038 case ipv6 { 2039 leaf ipv6-dest { 2040 type inet:ipv6-address; 2041 mandatory true; 2042 description 2043 "The destination ip address of the GRE header."; 2044 } 2045 } 2046 } 2047 leaf protocol-type { 2048 type uint16; 2049 mandatory true; 2050 description 2051 "The protocol type of the GRE header."; 2052 } 2053 leaf key { 2054 type uint64; 2055 description 2056 "The GRE key of the GRE header."; 2057 } 2058 } 2060 grouping mpls-header { 2061 description 2062 "The MPLS encapsulation header information."; 2063 list label-operations { 2064 key "label-oper-id"; 2065 description 2066 "Label operations."; 2067 leaf label-oper-id { 2068 type uint32; 2069 description 2070 "An optional identifier that points 2071 to a label operation."; 2072 } 2073 choice label-actions { 2074 description 2075 "Label action options."; 2076 case label-push { 2077 container label-push { 2078 description 2079 "Label push operation."; 2080 leaf label { 2081 type uint32; 2082 mandatory true; 2083 description 2084 "The label to be pushed."; 2086 } 2087 leaf s-bit { 2088 type boolean; 2089 description 2090 "The s-bit of the label to be pushed. "; 2091 } 2092 leaf tc-value { 2093 type uint8; 2094 description 2095 "The traffic class value of the label to be pushed."; 2096 } 2097 leaf ttl-value { 2098 type uint8; 2099 description 2100 "The TTL value of the label to to be pushed."; 2101 } 2102 } 2103 } 2104 case label-swap { 2105 container label-swap { 2106 description 2107 "Label swap operation."; 2108 leaf in-label { 2109 type uint32; 2110 mandatory true; 2111 description 2112 "The label to be swapped."; 2113 } 2114 leaf out-label { 2115 type uint32; 2116 mandatory true; 2117 description 2118 "The out MPLS label."; 2119 } 2120 leaf ttl-action { 2121 type ttl-action-def; 2122 description 2123 "The label ttl actions: 2124 - No-action, or 2125 - Copy to inner label,or 2126 - Decrease (the in label) by 1 and 2127 copy to the out label."; 2128 } 2129 } 2130 } 2131 } 2132 } 2133 } 2134 grouping tunnel-encap{ 2135 description 2136 "Tunnel encapsulation inforamtion."; 2137 choice tunnel-type { 2138 description 2139 "Tunnel options for next-hops."; 2140 case ipv4 { 2141 if-feature ipv4-tunnel; 2142 uses ipv4-header; 2143 } 2144 case ipv6 { 2145 if-feature ipv6-tunnel; 2146 uses ipv6-header; 2147 } 2148 case mpls { 2149 if-feature mpls-tunnel; 2150 uses mpls-header; 2151 } 2152 case gre { 2153 if-feature gre-tunnel; 2154 uses gre-header; 2155 } 2156 case nvgre { 2157 if-feature nvgre-tunnel; 2158 uses nvgre-header; 2159 } 2160 case vxlan { 2161 if-feature vxlan-tunnel; 2162 uses vxlan-header; 2163 } 2164 } 2165 } 2167 grouping tunnel-decap { 2168 description 2169 "Tunnel decapsulation inforamtion."; 2170 choice tunnel-type { 2171 description 2172 "Nexthop tunnel type options."; 2173 case ipv4 { 2174 if-feature ipv4-tunnel; 2175 container ipv4-decap { 2176 description 2177 "IPv4 decap."; 2178 leaf ipv4-decap { 2179 type tunnel-decap-action-def; 2180 mandatory true; 2181 description 2182 "IPv4 decap operations."; 2183 } 2184 leaf ttl-action { 2185 type ttl-action-def; 2186 description 2187 "The ttl actions: 2188 no-action or copy to inner header."; 2189 } 2190 } 2191 } 2192 case ipv6 { 2193 if-feature ipv6-tunnel; 2194 container ipv6-decap { 2195 description 2196 "IPv6 decap."; 2197 leaf ipv6-decap { 2198 type tunnel-decap-action-def; 2199 mandatory true; 2200 description 2201 "IPv6 decap operations."; 2202 } 2203 leaf hop-limit-action { 2204 type hop-limit-action-def; 2205 description 2206 "The hop limit actions: 2207 no-action or copy to inner header."; 2208 } 2209 } 2210 } 2211 case mpls { 2212 if-feature mpls-tunnel; 2213 container label-pop { 2214 description 2215 "MPLS decap."; 2216 leaf label-pop { 2217 type mpls-label-action-def; 2218 mandatory true; 2219 description 2220 "Pop a label from the label stack."; 2221 } 2222 leaf ttl-action { 2223 type ttl-action-def; 2224 description 2225 "The label ttl actions: 2226 no-action or copy to inner label"; 2227 } 2228 } 2229 } 2231 } 2232 } 2234 grouping route-attributes { 2235 description 2236 "Route attributes."; 2237 leaf route-preference { 2238 type uint32; 2239 mandatory true; 2240 description 2241 "ROUTE_PREFERENCE: This is a numerical value that 2242 allows for comparing routes from different 2243 protocols. Static configuration is also 2244 considered a protocol for the purpose of this 2245 field. It iss also known as administrative-distance. 2246 The lower the value, the higher the preference."; 2247 } 2248 leaf local-only { 2249 type boolean ; 2250 mandatory true; 2251 description 2252 "Indicate whether the attributes is local only."; 2253 } 2254 container address-family-route-attributes{ 2255 description 2256 "Address family related route attributes."; 2257 choice route-type { 2258 description 2259 "Address family related route attributes."; 2260 case ip-route-attributes { 2261 } 2262 case mpls-route-attributes { 2263 } 2264 case ethernet-route-attributes { 2265 } 2266 } 2267 } 2268 } 2270 container routing-instance { 2271 description 2272 "A routing instance, in the context of 2273 the RIB information model, is a collection 2274 of RIBs, interfaces, and routing parameters"; 2275 leaf name { 2276 type string; 2277 mandatory true; 2278 description 2279 "The name of the routing instance.This MUST 2280 be unique across all routing instances in 2281 a given network device."; 2282 } 2283 list interface-list { 2284 key "name"; 2285 description 2286 "This represents the list of interfaces associated 2287 with this routing instance. The interface list helps 2288 constrain the boundaries of packet forwarding. 2289 Packets coming on these interfaces are directly 2290 associated with the given routing instance. The 2291 interface list contains a list of identifiers, with 2292 each identifier uniquely identifying an interface."; 2293 leaf name { 2294 type if:interface-ref; 2295 description 2296 "A reference to the name of a network layer interface."; 2297 } 2298 } 2299 leaf router-id { 2300 type yang:dotted-quad; 2301 description 2302 "Router ID - 32-bit number in the form of a dotted quad."; 2303 } 2304 leaf lookup-limit { 2305 type uint8; 2306 description 2307 "A limit on how many levels of a lookup can be performed."; 2308 } 2309 list rib-list { 2310 key "name"; 2311 description 2312 "A list of RIBs that are associated with the routing 2313 instance."; 2314 leaf name { 2315 type string; 2316 mandatory true; 2317 description 2318 "A reference to the name of each rib."; 2319 } 2320 leaf rib-family { 2321 type rib-family-def; 2322 mandatory true; 2323 description 2324 "The address family of a rib."; 2325 } 2326 leaf ip-rpf-check { 2327 type boolean; 2328 description 2329 "Each RIB can be optionally associated with a 2330 ENABLE_IP_RPF_CHECK attribute that enables Reverse 2331 path forwarding (RPF) checks on all IP routes in that 2332 RIB. Reverse path forwarding (RPF) check is used to 2333 prevent spoofing and limit malicious traffic."; 2334 } 2335 list route-list { 2336 key "route-index"; 2337 description 2338 "A list of routes of a rib."; 2339 uses route; 2340 } 2341 } 2342 } 2344 /*RPC Operations*/ 2345 rpc rib-add { 2346 description 2347 "To add a rib to a instance"; 2348 input { 2349 leaf rib-name { 2350 type string; 2351 mandatory true; 2352 description 2353 "A reference to the name of the rib 2354 that is to be added."; 2355 } 2356 leaf rib-family { 2357 type rib-family-def; 2358 mandatory true; 2359 description 2360 "The address family of the rib."; 2361 } 2362 leaf ip-rpf-check { 2363 type boolean; 2364 description 2365 "Each RIB can be optionally associated with a 2366 ENABLE_IP_RPF_CHECK attribute that enables Reverse 2367 path forwarding (RPF) checks on all IP routes in that 2368 RIB. Reverse path forwarding (RPF) check is used to 2369 prevent spoofing and limit malicious traffic."; 2370 } 2371 } 2372 output { 2373 leaf result { 2374 type boolean; 2375 mandatory true; 2376 description 2377 "Return the result of the rib-add operation. 2378 true - success; 2379 false - failed."; 2380 } 2381 } 2382 } 2384 rpc rib-delete { 2385 description 2386 "To delete a rib from a routing instance. 2387 After deleting the rib, all routes installed 2388 in the rib will be deleted as well."; 2389 input { 2390 leaf rib-name { 2391 type string; 2392 mandatory true; 2393 description 2394 "A reference to the name of the rib 2395 that is to be deleted."; 2396 } 2397 } 2398 output { 2399 leaf result { 2400 type boolean; 2401 mandatory true; 2402 description 2403 "Return the result of the rib-delete operation. 2404 true - success; 2405 false - failed."; 2406 } 2407 } 2408 } 2410 rpc route-add { 2411 description 2412 "To add a route or a list of route to a rib"; 2413 input { 2414 leaf rib-name { 2415 type string; 2416 mandatory true; 2417 description 2418 "A reference to the name of a rib."; 2419 } 2420 container routes { 2421 description 2422 "The routes to be added to the rib."; 2424 list route-list { 2425 key "route-index"; 2426 description 2427 "The list of routes to be added."; 2428 uses route-prefix; 2429 container route-attributes { 2430 uses route-attributes; 2431 description 2432 "Route attributes."; 2433 } 2434 container route-vendor-attributes { 2435 if-feature route-vendor-attributes; 2436 uses route-vendor-attributes; 2437 description 2438 "Route vendor attributes."; 2439 } 2440 container nexthop { 2441 uses nexthop; 2442 description 2443 "Nexthop."; 2444 } 2445 } 2446 } 2447 } 2448 output { 2449 leaf result { 2450 type boolean; 2451 mandatory true; 2452 description 2453 "Return the result of the route-add operation. 2454 true - success; 2455 false - failed."; 2456 } 2457 } 2458 } 2460 rpc route-delete { 2461 description 2462 "To delete a route or a list of route from a rib"; 2463 input { 2464 leaf rib-name { 2465 type string; 2466 mandatory true; 2467 description 2468 "A reference to the name of a rib."; 2469 } 2470 container routes { 2471 description 2472 "The routes to be added to the rib."; 2473 list route-list{ 2474 key "route-index"; 2475 description 2476 "The list of routes to be deleted."; 2477 uses route-prefix; 2478 } 2479 } 2480 } 2481 output { 2482 leaf result { 2483 type boolean ; 2484 mandatory true; 2485 description 2486 "Return the result of the route-delete operation. 2487 true - success; 2488 false - failed."; 2489 } 2490 } 2491 } 2493 rpc route-update { 2494 description 2495 "To update a route or a list of route of a rib. 2496 The inputs: 2497 1. The match conditions, could be: 2498 a. route prefix, or 2499 b. route attribtes, or 2500 c. nexthop; 2501 2. The update parameters to be used: 2502 a. new nexhop; 2503 b. new route attributes; 2504 Actions: 2505 1. update the nexthop 2506 2. update the route attributes 2507 The outputs: 2508 true - success; 2509 false - failed. 2510 "; 2511 input { 2512 leaf rib-name { 2513 type string; 2514 mandatory true; 2515 description 2516 "A reference to the name of a rib."; 2517 } 2519 choice match-conditions { 2520 description 2521 "Match options."; 2522 case match-route-prefix { 2523 description 2524 "Update the routes that match route 2525 prefix(es) condition."; 2526 container input-routes { 2527 description 2528 "The matched routes to be updated."; 2529 list route-list { 2530 key "route-index"; 2531 description 2532 "The list of routes to be updated."; 2533 uses route-prefix; 2534 choice update-actions-prefix { 2535 description 2536 "Update actions: 2537 1. update the nexthop 2538 2. update the route attributes 2539 3. update the route-vendor-attributes. 2540 "; 2541 case update-nexthop { 2542 uses nexthop; 2543 } 2544 case update-route-attributes { 2545 uses route-attributes; 2546 } 2547 case update-route-vendor-attributes { 2548 if-feature route-vendor-attributes; 2549 uses route-vendor-attributes; 2550 } 2551 } 2552 } 2553 } 2554 } 2555 case match-route-attributes { 2556 description 2557 "Update the routes that match the 2558 route attributes condition."; 2559 container input-route-attributes { 2560 description 2561 "The route attributes are used for matching."; 2562 uses route-attributes; 2563 } 2564 choice update-actions-attributes { 2565 description 2566 "Update actions: 2567 1. update the nexthop 2568 2. update the route attributes 2569 3. update the route-vendor-attributes."; 2570 case update-nexthop { 2571 uses nexthop; 2572 } 2573 case update-route-attributes { 2574 uses route-attributes; 2575 } 2576 case update-route-vendor-attributes { 2577 if-feature route-vendor-attributes; 2578 uses route-vendor-attributes; 2579 } 2580 } 2581 } 2582 case match-route-vendor-attributes { 2583 if-feature route-vendor-attributes; 2584 description 2585 "Update the routes that match the 2586 vendor attributes condition"; 2587 container input-route-vendor-attributes { 2588 description 2589 "The vendor route attributes are used for matching."; 2590 uses route-vendor-attributes; 2591 } 2592 choice update-actions-vendor-attributes { 2593 description 2594 "Update actions: 2595 1. update the nexthop 2596 2. update the route attributes 2597 3. update the route-vendor-attributes."; 2598 case update-nexthop { 2599 uses nexthop; 2600 } 2601 case update-route-attributes { 2602 uses route-attributes; 2603 } 2604 case update-route-vendor-attributes { 2605 uses route-vendor-attributes; 2606 } 2607 } 2608 } 2609 case match-nexthop { 2610 description 2611 "Update the routes that match the nexthop."; 2612 container input-nexthop { 2613 description 2614 "The nexthop used for matching."; 2615 uses nexthop; 2617 } 2619 choice update-actions-nexthop { 2620 description 2621 "Update actions: 2622 1. update nexthop 2623 2. update route attributes 2624 3. update route-vendor-attributes."; 2625 case update-nexthop { 2626 uses nexthop; 2627 } 2628 case update-route-attributes { 2629 uses route-attributes; 2630 } 2631 case update-route-vendor-attributes { 2632 if-feature route-vendor-attributes; 2633 uses route-vendor-attributes; 2634 } 2635 } 2636 } 2637 } 2638 } 2639 output { 2640 leaf result { 2641 type boolean ; 2642 mandatory true; 2643 description 2644 "Return the result of the route-update operation. 2645 true - success; 2646 false - failed."; 2647 } 2648 } 2649 } 2651 rpc nh-add { 2652 description 2653 "To add a nexthop to a rib. 2654 Inputs parameters: 2655 1. rib name 2656 2. nexthop; 2657 Actions: 2658 Add the nexthop to the rib 2659 Outputs: 2660 1.Operation result: 2661 true - success 2662 false - failed; 2663 2. nexthop identifier."; 2664 input { 2665 leaf rib-name { 2666 type string; 2667 mandatory true; 2668 description 2669 "A reference to the name of a rib."; 2670 } 2671 uses nexthop; 2672 } 2673 output { 2674 leaf result { 2675 type boolean ; 2676 mandatory true; 2677 description 2678 "Return the result of the nh-add operation. 2679 true - success; 2680 false - failed."; 2681 } 2682 leaf nexthop-id { 2683 type uint32; 2684 mandatory true; 2685 description 2686 "A nexthop identifer that is allocated to the nexthop."; 2687 } 2688 } 2689 } 2691 rpc nh-delete { 2692 description 2693 "To delete a nexthop from a rib"; 2694 input { 2695 leaf rib-name { 2696 type string; 2697 mandatory true; 2698 description 2699 "A reference to the name of a rib."; 2700 } 2701 uses nexthop; 2702 } 2703 output { 2704 leaf result { 2705 type boolean ; 2706 mandatory true; 2707 description 2708 "Return the result of the nh-delete operation. 2709 true - success; 2710 false - failed."; 2711 } 2712 } 2714 } 2716 /*Notifications*/ 2717 notification nexthop-resolution-status-change { 2718 description 2719 "Nexthop resolution status (resolved/unresolved) 2720 notification."; 2721 container nexthop{ 2722 description 2723 "The nexthop."; 2724 uses nexthop; 2725 } 2726 leaf nexthop-state { 2727 type nexthop-state-def; 2728 mandatory true; 2729 description 2730 "Nexthop resolution status (resolved/unresolved) 2731 notification."; 2732 } 2733 } 2735 notification route-change { 2736 description 2737 "Route change notification."; 2738 leaf rib-name { 2739 type string; 2740 mandatory true; 2741 description 2742 "A reference to the name of a rib."; 2743 } 2744 leaf rib-family { 2745 type rib-family-def; 2746 mandatory true; 2747 description 2748 "A reference to address family of a rib."; 2749 } 2750 uses route-prefix; 2751 leaf route-installed-state { 2752 type route-installed-state-def; 2753 mandatory true; 2754 description 2755 "Indicates whether the route got installed in the FIB."; 2756 } 2757 leaf route-state { 2758 type route-state-def; 2759 mandatory true; 2760 description 2761 "Indicates whether a route is fully resolved and 2762 is a candidate for selection."; 2763 } 2764 leaf route-change-reason { 2765 type route-reason-def; 2766 mandatory true; 2767 description 2768 "Return the reason that causes the route change."; 2769 } 2770 } 2771 } 2773 // 2775 4. IANA Considerations 2777 This document requests to register a URI in the "IETF XML registry" 2778 [RFC3688]: 2780 -------------------------------------------------------------------- 2781 URI: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib 2782 Registrant Contact: The IESG.XML: 2783 N/A, the requested URI is an XML namespace. 2784 -------------------------------------------------------------------- 2786 This document requests to register a YANG module in the "YANG Module 2787 Names registry" [RFC6020]: 2789 -------------------------------------------------------------------- 2790 name: ietf-i2rs-rib 2791 namespace: urn:ietf:params:xml:ns:yang:ietf-i2rs-rib 2792 prefix: iir 2793 reference: RFC XXXX 2794 -------------------------------------------------------------------- 2796 5. Security Considerations 2798 This document introduces no extra new security threat and SHOULD 2799 follow the security requirements as stated in 2800 [I-D.ietf-i2rs-architecture]. 2802 6. Contributors 2804 The following individuals also contribute to this document. 2806 o Zekun He, Tencent Holdings Ltd 2808 o Sujian Lu, Tencent Holdings Ltd 2809 o Jeffery Zhang, Juniper Networks 2811 7. References 2813 7.1. Normative References 2815 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2816 Requirement Levels", BCP 14, RFC 2119, 2817 DOI 10.17487/RFC2119, March 1997, 2818 . 2820 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2821 DOI 10.17487/RFC3688, January 2004, 2822 . 2824 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 2825 the Network Configuration Protocol (NETCONF)", RFC 6020, 2826 DOI 10.17487/RFC6020, October 2010, 2827 . 2829 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 2830 RFC 6991, DOI 10.17487/RFC6991, July 2013, 2831 . 2833 7.2. Informative References 2835 [I-D.ietf-i2rs-architecture] 2836 Atlas, A., Halpern, J., Hares, S., Ward, D., and T. 2837 Nadeau, "An Architecture for the Interface to the Routing 2838 System", draft-ietf-i2rs-architecture-09 (work in 2839 progress), March 2015. 2841 [I-D.ietf-i2rs-rib-info-model] 2842 Bahadur, N., Kini, S., and J. Medved, "Routing Information 2843 Base Info Model", draft-ietf-i2rs-rib-info-model-08 (work 2844 in progress), October 2015. 2846 [I-D.ietf-i2rs-usecase-reqs-summary] 2847 Hares, S. and M. Chen, "Summary of I2RS Use Case 2848 Requirements", draft-ietf-i2rs-usecase-reqs-summary-01 2849 (work in progress), May 2015. 2851 Authors' Addresses 2853 Lixing Wang 2854 Individual 2856 Email: wang_little_star@sina.com 2857 Hariharan Ananthakrishnan 2858 Packet Design 2860 Email: hari@packetdesign.com 2862 Mach(Guoyi) Chen 2863 Huawei 2865 Email: mach.chen@huawei.com 2867 Amit Dass 2868 Ericsson 2869 Torshamnsgatan 48. 2870 Stockholm 16480 2871 Sweden 2873 Email: amit.dass@ericsson.com 2875 Sriganesh Kini 2876 Ericsson 2878 Email: sriganesh.kini@ericsson.com 2880 Nitin Bahadur 2881 Bracket Computing 2883 Email: nitin_bahadur@yahoo.com