idnits 2.17.1 draft-ietf-idr-bgp-model-05.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 : ---------------------------------------------------------------------------- ** There are 3 instances of too long lines in the document, the longest one being 11 characters in excess of 72. == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 410 has weird spacing: '...address ine...' == Line 426 has weird spacing: '...address ine...' == Line 442 has weird spacing: '...address ine...' == Line 458 has weird spacing: '...address ine...' == Line 1325 has weird spacing: '...unicast speci...' == (1 more instance...) -- The document date (March 25, 2019) is 1858 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 (-31) exists of draft-ietf-rtgwg-policy-model-06 Summary: 1 error (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Interdomain Routing M. Jethanandani 3 Internet-Draft VMware 4 Intended status: Standards Track K. Patel 5 Expires: September 26, 2019 Arrcus 6 S. Hares 7 Huawei 8 March 25, 2019 10 BGP YANG Model for Service Provider Networks 11 draft-ietf-idr-bgp-model-05 13 Abstract 15 This document defines a YANG data model for configuring and managing 16 BGP, including protocol, policy, and operational aspects, such as 17 RIB, based on data center, carrier and content provider operational 18 requirements. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on September 26, 2019. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 56 1.2. Note to RFC Editor . . . . . . . . . . . . . . . . . . . 4 57 1.3. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 4 58 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5 59 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6 60 2.2. Policy configuration overview . . . . . . . . . . . . . . 9 61 2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10 62 2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12 63 2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12 64 2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12 65 2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12 66 2.3.5. Post route advertisements per-neighbor . . . . . . . 12 67 3. Relation to other YANG data models . . . . . . . . . . . . . 13 68 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 69 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 70 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 13 71 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14 72 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14 73 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15 74 7.1. Main module and submodules for base items . . . . . . . . 15 75 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 55 76 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 66 77 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 77 78 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 126 79 8.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 126 80 8.2. Neighbor Address Family Configuration . . . . . . . . . . 127 81 9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 129 82 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 129 83 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 129 84 11.1. Normative references . . . . . . . . . . . . . . . . . . 129 85 11.2. Informative references . . . . . . . . . . . . . . . . . 131 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 131 88 1. Introduction 90 This document describes a YANG [RFC7950] data model for the BGP 91 [RFC4271] protocol, including various protocol extensions, policy 92 configuration, as well as defining key operational state data, 93 including Routing Information Base (RIB). The model is intended to 94 be vendor-neutral, in order to allow operators to manage BGP 95 configuration in heterogeneous environments with routers supplied by 96 multiple vendors. The model is also intended to be readily mapped to 97 existing implementations to facilitate support from as large a set of 98 routing hardware and software vendors as possible. 100 1.1. Goals and approach 102 The model covers the base BGP features that are deployed across major 103 implementations and the common BGP configurations in use across a 104 number of operator network deployments. In particular, this model 105 attempts to cover BGP features defined in BGP [RFC4271], BGP 106 Communities Attribute [RFC1997], BGP Route Reflection [RFC4456], 107 Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System 108 Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439], 109 Graceful Restart Mechanism for BGP [RFC4724], and BGP Prefix Origin 110 Validation [RFC6811]. 112 Along with configuration of base BGP features, this model also 113 addresses policy configuration, by providing "hooks" for applying 114 policies, and also defining BGP-specific policy features. The BGP 115 policy features are intended to be used with the general routing 116 policy model defined in A YANG Data Model for Routing Policy 117 Management [I-D.ietf-rtgwg-policy-model]. The model conforms to the 118 NMDA [RFC8342] architecture and has support for configuring 119 Bidirectional Forward Detection (BFD) [RFC5880] for fast next hop 120 liveliness check. 122 For the base BGP features, the focus of the model described in this 123 document is on providing configuration and operational state 124 information relating to: 126 o The global BGP instance, and neighbors whose configuration is 127 specified individually, or templated with the use of peer-groups. 129 o The address families that are supported by peers, and the global 130 configuration which relates to them. 132 o The policy configuration "hooks" and BGP-specific policy features 133 that relate to a neighbor - controlling the import and export of 134 NLRIs. 136 o RIB contents. 138 As mentioned earlier, any configuration items that are deemed to be 139 widely available in existing major BGP implementations are included 140 in the model. Additional, more esoteric, configuration items that 141 are not commonly used, or only available from a single 142 implementation, are omitted from the model with an expectation that 143 they will be available in companion modules that augment or extend 144 the current model. This allows clarity in identifying data that is 145 part of the vendor-neutral base model. 147 Where possible, naming in the model follows conventions used in 148 available standards documents, and otherwise tries to be self- 149 explanatory with sufficient descriptions of the intended behavior. 150 Similarly, configuration data value constraints and default values, 151 where used, are based on recommendations in current standards 152 documentation, or those commonly used in multiple implementations. 153 Since implementations can vary widely in this respect, this version 154 of the model specifies only a limited set of defaults and ranges with 155 the expectation of being more prescriptive in future versions based 156 on actual operator use. 158 1.2. Note to RFC Editor 160 This document uses several placeholder values throughout the 161 document. Please replace them as follows and remove this note before 162 publication. 164 RFC XXXX, where XXXX is the number assigned to this document at the 165 time of publication. 167 2019-03-21 with the actual date of the publication of this document. 169 RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for 170 Routing Policy Management [I-D.ietf-rtgwg-policy-model]. 172 RFC AAAA, where AAAA is the number assigned to BGP Monitoring 173 Protocol [I-D.ietf-grow-bmp]. 175 RFC BBBB, where BBBB is the number assigned to YANG Data Model for 176 Bidirectional Forward Detection [I-D.ietf-bfd-yang]. 178 1.3. Abbreviations 179 +--------------+-------------------------------------------+ 180 | Abbreviation | | 181 +--------------+-------------------------------------------+ 182 | AFI | Address Family Identifier | 183 | | | 184 | BFD | Bidirectional Forward Detection | 185 | | | 186 | NLRI | Network Layer Reachability Information | 187 | | | 188 | NMDA | Network Management Datastore Architecture | 189 | | | 190 | RIB | Routing Information Base | 191 | | | 192 | SAFI | Subsequent Address Family Identifier | 193 +--------------+-------------------------------------------+ 195 2. Model overview 197 The BGP model is defined across several YANG modules and submodules, 198 but at a high level is organized into six elements: 200 o base protocol configuration -- configuration affecting BGP 201 protocol-related operations, defined at various levels of 202 hierarchy. 204 o multiprotocol configuration -- configuration affecting individual 205 address-families within BGP Multiprotocol Extensions for BGP-4 206 [RFC4760]. 208 o neighbor configuration -- configuration affecting an individual 209 neighbor within BGP. 211 o neighbor multiprotocol configuration -- configuration affecting 212 individual address-families for a neighbor within BGP. 214 o policy configuration -- hooks for application of the policies 215 defined in A YANG Data Model for Routing Policy Management 216 [I-D.ietf-rtgwg-policy-model] that act on routes sent (received) 217 to (from) peers or other routing protocols and BGP-specific policy 218 features. 220 o operational state -- variables used for monitoring and management 221 of BGP operations. 223 These modules also make use of standard Internet types, such as IP 224 addresses and prefixes, autonomous system numbers, etc., defined in 225 Common YANG Data Types [RFC6991]. 227 2.1. BGP protocol configuration 229 The BGP protocol configuration model is organized hierarchically, 230 much like the majority of router implementations. That is, 231 configuration items can be specified at multiple levels, as shown 232 below. 234 module: ietf-bgp 235 augment /rt:routing/rt:control-plane-protocols 236 /rt:control-plane-protocol: 237 +--rw bgp 238 +--rw global! 239 | +--rw as inet:as-number 240 | +--rw router-id? yang:dotted-quad 241 | +--ro total-paths? uint32 242 | +--ro total-prefixes? uint32 243 | +--rw default-route-distance 244 | | ... 245 | +--rw confederation 246 | | ... 247 | +--rw graceful-restart 248 | | ... 249 | +--rw use-multiple-paths 250 | | ... 251 | +--rw route-selection-options 252 | | ... 253 | +--rw afi-safis 254 | | ... 255 | +--rw apply-policy 256 | ... 257 +--rw neighbors 258 | +--rw neighbor* [neighbor-address] 259 | ... 260 +--rw peer-groups 261 | +--rw peer-group* [peer-group-name] 262 | ... 263 +--rw interfaces 264 | +--rw interface* [name] 265 | ... 266 +--ro rib 267 +--ro attr-sets 268 | ... 269 +--ro communities 270 | ... 271 +--ro ext-communities 272 | ... 273 +--ro afi-safis 274 ... 276 Users may specify configuration at a higher level and have it apply 277 to all lower-level items, or provide overriding configuration at a 278 lower level of the hierarchy. Overriding configuration items are 279 optional, with neighbor specific configuration being the most 280 specific or lowest level, followed by peer-group, and finally global. 282 Global configuration options reflect a subset of the peer-group or 283 neighbor specific configuration options which are relevant to the 284 entire BGP instance. 286 The model makes the simplifying assumption that most of the 287 configuration items are available at all levels of the hierarchy. 288 That is, very little configuration is specific to a particular level 289 in the hierarchy, other than obvious items such as "group-name" only 290 being available for the peer group-level config. A notable exception 291 is for sub-address family configuration where some items are only 292 applicable for a given AFI-SAFI combination. 294 In order to allow common configuration to be applied to a set of 295 neighbors, all neighbor configuration options are available within a 296 peer-group. A neighbor is associated to a particular peer-group 297 through the use of a peer-group leaf (which provides a reference to a 298 configured item in the peer-group list). 300 Address-family configuration is made available in multiple points 301 within the model - primarily within the global container, where 302 instance-wide configuration can be set (for example, global protocol 303 parameters, the BGP best path route selection options, or global 304 policies relating to the address-family); and on a per-neighbor or 305 per-peer-group basis, where address-families can be enabled or 306 disabled, and policy associated with the parent entity applied. 307 Within the afi-safi container, generic configuration that applies to 308 all address-families (e.g., whether the AFI-SAFI is enabled) is 309 presented at the top-level, with address-family specific containers 310 made available for options relating to only that AFI-SAFI. Within 311 the current revision of the model a generic set of address-families, 312 and common configuration and state options are included - further 313 work is expected to add additional parameters to this area of the 314 model. 316 The following address-families are currently supported by the model: 318 +--rw bgp 319 +--rw global! 320 +--rw afi-safis 321 +--rw afi-safi* [afi-safi-name] 322 +--rw afi-safi-name identityref 323 | 324 +--rw ipv4-unicast 325 | ... 326 +--rw ipv6-unicast 327 | ... 328 +--rw ipv4-labeled-unicast 329 | ... 330 +--rw ipv6-labeled-unicast 331 | ... 332 +--rw l3vpn-ipv4-unicast 333 | ... 334 +--rw l3vpn-ipv6-unicast 335 | ... 336 +--rw l3vpn-ipv4-multicast 337 | ... 338 +--rw l3vpn-ipv6-multicast 339 | ... 340 +--rw l2vpn-vpls 341 | ... 342 +--rw l2vpn-evpn 343 | ... 345 2.2. Policy configuration overview 347 The BGP policy configuration model augments the generic YANG routing 348 policy model described in A YANG Data Model for Routing Policy 349 Management [I-D.ietf-rtgwg-policy-model], which represents a 350 condition-action policy framework for routing. This model adds BGP- 351 specific conditions (e.g., matching on the community attribute), and 352 actions (e.g., setting local preference) to the generic policy 353 framework. 355 Policies that are defined in the routing-policy model are referenced 356 in multiple places within the model: 358 o within the global instance, where a policy applies to all address- 359 families for all peers. 361 o on a global AFI-SAFI basis, where policies apply to all peers for 362 a particular address-family. 364 o on a per-peer-group or per-neighbor basis - where the policy 365 applies to all address-families for the particular group or 366 neighbor. 368 o on a per-afi-safi basis within a neighbor or peer-group context, 369 where the policy is specific to the AFI-SAFI for a a specific 370 neighbor or group. 372 module: ietf-bgp-policy 373 augment /rpol:routing-policy/rpol:defined-sets: 374 +--rw bgp-defined-sets 375 ... 376 augment /rpol:routing-policy/rpol:policy-definitions 377 /rpol:policy-definition/rpol:statements/rpol:statement 378 /rpol:conditions: 379 +--rw bgp-conditions 380 ... 381 augment /rpol:routing-policy/rpol:policy-definitions 382 /rpol:policy-definition/rpol:statements/rpol:statement 383 /rpol:actions: 384 +--rw bgp-actions 385 ... 387 2.3. BGP RIB overview 389 The RIB data model represents the BGP RIB contents. The model 390 supports five logical RIBs per address family. 392 A abridged version of the tree shows the RIB portion of the tree 393 diagram. 395 module: ietf-bgp 396 augment /rt:routing/rt:control-plane-protocols 397 /rt:control-plane-protocol: 398 +--rw bgp 399 +--ro rib 400 +--ro afi-safis 401 +--ro afi-safi* [afi-safi-name] 402 +--ro afi-safi-name identityref 403 +--ro ipv4-unicast 404 | +--ro loc-rib 405 | | +--ro routes 406 | | +--ro route* [prefix origin path-id] 407 | | ... 408 | +--ro neighbors 409 | +--ro neighbor* [neighbor-address] 410 | +--ro neighbor-address inet:ip-address 411 | +--ro adj-rib-in-pre 412 | | ... 413 | +--ro adj-rib-in-post 414 | | ... 415 | +--ro adj-rib-out-pre 416 | | ... 417 | +--ro adj-rib-out-post 418 | ... 419 +--ro ipv6-unicast 420 | +--ro loc-rib 421 | | +--ro routes 422 | | +--ro route* [prefix origin path-id] 423 | | ... 424 | +--ro neighbors 425 | +--ro neighbor* [neighbor-address] 426 | +--ro neighbor-address inet:ip-address 427 | +--ro adj-rib-in-pre 428 | | ... 429 | +--ro adj-rib-in-post 430 | | ... 431 | +--ro adj-rib-out-pre 432 | | ... 433 | +--ro adj-rib-out-post 434 | ... 435 +--ro ipv4-srte-policy 436 | +--ro loc-rib 437 | | +--ro routes 438 | | +--ro route* [path-id endpoint color] 439 | | ... 440 | +--ro neighbors 441 | +--ro neighbor* [neighbor-address] 442 | +--ro neighbor-address inet:ip-address 443 | +--ro adj-rib-in-pre 444 | | ... 445 | +--ro adj-rib-in-post 446 | | ... 447 | +--ro adj-rib-out-pre 448 | | ... 449 | +--ro adj-rib-out-post 450 | ... 451 +--ro ipv6-srte-policy 452 +--ro loc-rib 453 | +--ro routes 454 | +--ro route* [path-id endpoint color] 455 | ... 456 +--ro neighbors 457 +--ro neighbor* [neighbor-address] 458 +--ro neighbor-address inet:ip-address 459 +--ro adj-rib-in-pre 460 | ... 461 +--ro adj-rib-in-post 462 | ... 463 +--ro adj-rib-out-pre 464 | ... 465 +--ro adj-rib-out-post 466 ... 468 2.3.1. Local Routing 470 The loc-rib is the main BGP routing table for the local routing 471 instance, containing best-path selections for each prefix. The loc- 472 rib table may contain multiple routes for a given prefix, with an 473 attribute to indicate which was selected as the best path. Note that 474 multiple paths may be used or advertised even if only one path is 475 marked as best, e.g., when using BGP add-paths. An implementation 476 may choose to mark multiple paths in the RIB as best path by setting 477 the flag to true for multiple entries. 479 2.3.2. Pre updates per-neighbor 481 The adj-rib-in-pre table is a per-neighbor table containing the NLRI 482 updates received from the neighbor before any local input policy 483 rules or filters have been applied. This can be considered the 'raw' 484 updates from a given neighbor. 486 2.3.3. Post updates per-neighbor 488 The adj-rib-in-post table is a per-neighbor table containing the 489 routes received from the neighbor that are eligible for best-path 490 selection after local input policy rules have been applied. 492 2.3.4. Pre route advertisements per-neighbor 494 The adj-rib-out-pre table is a per-neighbor table containing routes 495 eligible for sending (advertising) to the neighbor before output 496 policy rules have been applied. 498 2.3.5. Post route advertisements per-neighbor 500 The adj-rib-out-post table is a per-neighbor table containing routes 501 eligible for sending (advertising) to the neighbor after output 502 policy rules have been applied 504 3. Relation to other YANG data models 506 The BGP model augments the Routing Management model A YANG Data Model 507 for Routing Management [RFC8349] which defines the notion of routing, 508 routing protocols, routing instances, or VRFs, and RIBs. 510 4. Security Considerations 512 The YANG module specified in this document defines a schema for data 513 that is designed to be accessed via network management protocols such 514 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 515 is the secure transport layer, and the mandatory-to-implement secure 516 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 517 is HTTPS, and the mandatory-to-implement secure transport is TLS 518 [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] 519 provides the means to restrict access for particular NETCONF or 520 RESTCONF users to a preconfigured subset of all available NETCONF or 521 RESTCONF protocol operations and content. 523 There are a number of data nodes defined in this YANG module that are 524 writable/creatable/deletable (i.e., config true, which is the 525 default). These data nodes may be considered sensitive or vulnerable 526 in some network environments. Write operations (e.g., edit-config) 527 to these data nodes without proper protection can have a negative 528 effect on network operations. These are the subtrees and data nodes 529 and their sensitivity/vulnerability: 531 Some of the readable data nodes in this YANG module may be considered 532 sensitive or vulnerable in some network environments. It is thus 533 important to control read access (e.g., via get, get-config, or 534 notification) to these data nodes. These are the subtrees and data 535 nodes and their sensitivity/vulnerability: 537 Some of the RPC operations in this YANG module may be considered 538 sensitive or vulnerable in some network environments. It is thus 539 important to control access to these operations. These are the 540 operations and their sensitivity/vulnerability: 542 5. IANA Considerations 544 This document registers three URIs and three YANG modules. 546 5.1. URI Registration 548 in the IETF XML registry [RFC3688] [RFC3688]. Following the format 549 in RFC 3688, the following registration is requested to be made: 551 URI: urn:ietf:params:xml:ns:yang:ietf-bgp 552 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 553 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types 555 Registrant Contact: The IESG. XML: N/A, the requested URI is an XML 556 namespace. 558 5.2. YANG Module Name Registration 560 This document registers three YANG module in the YANG Module Names 561 registry YANG [RFC6020]. 563 name: ietf-bgp 564 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp 565 prefix: bgp 566 reference: RFC XXXX 568 name: ietf-bgp-policy 569 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 570 prefix: bp 571 reference: RFC XXXX 573 name: ietf-bgp-types 574 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-types 575 prefix: bt 576 reference: RFC XXXX 578 6. YANG modules 580 The modules comprising the BGP configuration and operational model 581 are described by the YANG modules and submodules in the sections 582 below. 584 The main module, ietf-bgp.yang, includes the following submodules: 586 o ietf-bgp-common - defines the groupings that are common across 587 more than one context (where contexts are neighbor, group, global) 589 o ietf-bgp-common-multiprotocol - defines the groupings that are 590 common across more than one context, and relate to multiprotocol 591 BGP 593 o ietf-bgp-common-structure - defines groupings that are shared by 594 multiple contexts, but are used only to create structural 595 elements, i.e., containers (leaf nodes are defined in separate 596 groupings) 598 o ietf-bgp-global - groupings with data specific to the global 599 context 601 o ietf-bgp-peer-group - groupings with data specific to the peer 602 group context 604 o ietf-bgp-neighbor - groupings with data specific to the neighbor 605 context 607 o ietf-bgp-rib - grouping for representing BGP RIB. 609 Additionally, modules include: 611 o ietf-bgp-types - common type and identity definitions for BGP, 612 including BGP policy 614 o ietf-bgp-policy - BGP-specific policy data definitions for use 615 with [I-D.ietf-rtgwg-policy-model] (described in more detail 616 Section 2.2) 618 7. Structure of the YANG modules 620 The YANG model can be subdivided between the main module for base 621 items, types, policy data, and the RIB module. 623 7.1. Main module and submodules for base items 625 file "ietf-bgp@2019-03-21.yang" 626 module ietf-bgp { 627 yang-version "1.1"; 628 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; 629 prefix "bgp"; 631 /* 632 * Import and Include 633 */ 634 import ietf-routing { 635 prefix "rt"; 636 reference 637 "RFC 8349, A YANG Data Model for Routing Management 638 (NMDA Version)"; 639 } 641 import ietf-routing-policy { 642 prefix rpol; 643 reference 644 "RFC ZZZZ, A YANG Data Model for Routing Policy Management"; 645 } 646 import ietf-interfaces { 647 prefix if; 648 reference 649 "RFC 8343, A YANG Data Model for Interface Management."; 650 } 652 import ietf-bgp-types { 653 prefix bt; 654 reference 655 "RFC XXXX, BGP YANG Model for Service Provider Network."; 656 } 658 import ietf-bfd-types { 659 prefix bfd; 660 reference 661 "RFC BBBB, YANG Data Model for Bidirectional Forward Detection."; 662 } 664 include ietf-bgp-common; 665 include ietf-bgp-common-multiprotocol; 666 include ietf-bgp-common-structure; 667 include ietf-bgp-neighbor; 668 include ietf-bgp-global; 669 include ietf-bgp-peer-group; 670 include ietf-bgp-rib-types; 671 include ietf-bgp-rib; 672 include ietf-bgp-rib-ext; 673 include ietf-bgp-rib-shared-attributes; 674 include ietf-bgp-rib-attributes; 675 include ietf-bgp-rib-table-attributes; 676 include ietf-bgp-rib-tables; 678 organization 679 "IETF IDR Working Group"; 681 contact 682 "WG Web: 683 WG List: 685 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 686 Keyur Patel (keyur at arrcus.com), 687 Susan Hares (shares at ndzh.com"; 689 description 690 "This module describes a YANG model for BGP protocol 691 configuration. It is a limited subset of all of the configuration 692 parameters available in the variety of vendor implementations, 693 hence it is expected that it would be augmented with vendor- 694 specific configuration data as needed. Additional modules or 695 submodules to handle other aspects of BGP configuration, 696 including policy, VRFs, VPNs, and additional address families 697 are also expected. 699 This model supports the following BGP configuration level 700 hierarchy: 702 BGP 703 | 704 +-> [ global BGP configuration ] 705 +-> AFI / SAFI global 706 +-> peer group 707 +-> [ peer group config ] 708 +-> AFI / SAFI [ per-AFI overrides ] 709 +-> neighbor 710 +-> [ neighbor config ] 711 +-> [ optional pointer to peer-group ] 712 +-> AFI / SAFI [ per-AFI overrides ]"; 714 revision "2019-03-21" { 715 description 716 "Initial Version"; 717 reference 718 "RFC XXXX, BGP Model for Service Provider Network "; 719 } 721 /* 722 * Identity 723 */ 724 identity bgp { 725 base "rt:routing-protocol"; 726 description 727 "BGP protocol."; 728 } 730 /* 731 * Containers 732 */ 733 augment "/rt:routing/rt:control-plane-protocols/" + 734 "rt:control-plane-protocol" { 735 when "derived-from-or-self(rt:type, 'bgp')" { 736 description 737 "This augmentation is valid for a routing protocol 738 instance of BGP."; 739 } 740 description 741 "BGP protocol augmentation of ietf-routing module 742 control-plane-protocol."; 744 container bgp { 745 description 746 "Top-level configuration for the BGP router"; 748 container global { 749 presence "Enables global configuration of BGP"; 750 description 751 "Global configuration for the BGP router"; 752 uses bgp-global-base; 753 uses rpol:apply-policy-group; 754 } 756 container neighbors { 757 description 758 "Configuration for BGP neighbors"; 759 uses bgp-neighbor-list; 760 } 762 container peer-groups { 763 description 764 "Configuration for BGP peer-groups"; 765 uses bgp-peer-group-list; 766 } 768 container interfaces { 769 list interface { 770 key "name"; 772 leaf name { 773 type if:interface-ref; 774 description 775 "Reference to the interface within the routing instance."; 776 } 778 container bfd { 779 if-feature bt:bfd; 780 uses bfd:client-cfg-parms; 781 description 782 "BFD client configuration."; 783 reference 784 "RFC BBBB - YANG Data Model for Bidirectional Forwarding 785 Detection."; 786 } 787 description 788 "List of interfaces within the routing instance."; 789 } 790 description 791 "Interface specific parameters."; 792 } 793 uses rib; 794 } 795 } 796 } 797 799 file "ietf-bgp-common@2019-03-21.yang" 800 submodule ietf-bgp-common { 801 yang-version "1.1"; 802 belongs-to ietf-bgp { 803 prefix "bgp"; 804 } 806 import ietf-bgp-types { 807 prefix bt; 808 } 809 import ietf-inet-types { 810 prefix inet; 811 } 813 organization 814 "IETF IDR Working Group"; 816 contact 817 "WG Web: 818 WG List: 820 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 821 Keyur Patel (keyur at arrcus.com), 822 Susan Hares (shares at ndzh.com"; 824 description 825 "This sub-module contains common groupings that are common across 826 multiple contexts within the BGP module. That is to say that 827 they may be application to a subset of global, peer-group or 828 neighbor contexts."; 830 revision "2019-03-21" { 831 description 832 "Initial Version"; 833 reference 834 "RFC XXXX, BGP Model for Service Provider Network."; 835 } 836 grouping neighbor-group-timers-config { 837 description 838 "Config parameters related to timers associated with the BGP 839 peer"; 841 leaf connect-retry { 842 type decimal64 { 843 fraction-digits 2; 844 } 845 default 30; 846 description 847 "Time interval in seconds between attempts to establish a 848 session with the peer."; 849 } 851 leaf hold-time { 852 type decimal64 { 853 fraction-digits 2; 854 } 855 default 90; 856 description 857 "Time interval in seconds that a BGP session will be 858 considered active in the absence of keepalive or other 859 messages from the peer. The hold-time is typically set to 860 3x the keepalive-interval."; 861 reference 862 "RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; 863 } 865 leaf keepalive-interval { 866 type decimal64 { 867 fraction-digits 2; 868 } 869 default 30; 870 description 871 "Time interval in seconds between transmission of keepalive 872 messages to the neighbor. Typically set to 1/3 the 873 hold-time."; 874 } 876 leaf minimum-advertisement-interval { 877 type decimal64 { 878 fraction-digits 2; 879 } 880 default 30; 881 description 882 "Minimum time which must elapse between subsequent UPDATE 883 messages relating to a common set of NLRI being transmitted 884 to a peer. This timer is referred to as 885 MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to 886 reduce the number of UPDATE messages transmitted when a 887 particular set of NLRI exhibit instability."; 888 reference 889 "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; 890 } 891 } 893 grouping neighbor-group-config { 894 description 895 "Neighbor level configuration items."; 897 leaf peer-as { 898 type inet:as-number; 899 description 900 "AS number of the peer."; 901 } 903 leaf local-as { 904 type inet:as-number; 905 description 906 "The local autonomous system number that is to be used when 907 establishing sessions with the remote peer or peer group, if 908 this differs from the global BGP router autonomous system 909 number."; 910 } 912 leaf peer-type { 913 type bt:peer-type; 914 description 915 "Explicitly designate the peer or peer group as internal 916 (iBGP) or external (eBGP)."; 917 } 919 leaf auth-password { 920 type string; 921 description 922 "Configures an MD5 authentication password for use with 923 neighboring devices."; 924 } 926 leaf remove-private-as { 927 // could also make this a container with a flag to enable 928 // remove-private and separate option. here, option implies 929 // remove-private is enabled. 930 type bt:remove-private-as-option; 931 description 932 "Remove private AS numbers from updates sent to peers - when 933 this leaf is not specified, the AS_PATH attribute should be 934 sent to the peer unchanged"; 935 } 937 leaf route-flap-damping { 938 type boolean; 939 default false; 940 description 941 "Enable route flap damping."; 942 } 944 leaf send-community { 945 type bt:community-type; 946 default "NONE"; 947 description 948 "Specify which types of community should be sent to the 949 neighbor or group. The default is to not send the community 950 attribute"; 951 } 953 leaf description { 954 type string; 955 description 956 "An optional textual description (intended primarily for use 957 with a peer or group"; 958 } 959 } 961 grouping neighbor-group-transport-config { 962 description 963 "Configuration parameters relating to the transport protocol 964 used by the BGP session to the peer"; 966 leaf tcp-mss { 967 type uint16; 968 description 969 "Sets the max segment size for BGP TCP sessions."; 970 } 972 leaf mtu-discovery { 973 type boolean; 974 default false; 975 description 976 "Turns path mtu discovery for BGP TCP sessions on (true) or 977 off (false)"; 978 } 979 leaf passive-mode { 980 type boolean; 981 default false; 982 description 983 "Wait for peers to issue requests to open a BGP session, 984 rather than initiating sessions from the local router."; 985 } 987 leaf local-address { 988 type union { 989 type inet:ip-address; 990 type leafref { 991 path "../../../../interfaces/interface/name"; 992 } 993 } 994 description 995 "Set the local IP (either IPv4 or IPv6) address to use for 996 the session when sending BGP update messages. This may be 997 expressed as either an IP address or reference to the name 998 of an interface."; 999 } 1000 } 1002 grouping neighbor-group-error-handling-config { 1003 description 1004 "Configuration parameters relating to enhanced error handling 1005 behaviors for BGP"; 1007 leaf treat-as-withdraw { 1008 type boolean; 1009 default "false"; 1010 description 1011 "Specify whether erroneous UPDATE messages for which the NLRI 1012 can be extracted are treated as though the NLRI is withdrawn 1013 - avoiding session reset"; 1014 reference "draft-ietf-idr-error-handling-16"; 1015 } 1016 } 1018 grouping graceful-restart-config { 1019 description 1020 "Configuration parameters relating to BGP graceful restart."; 1022 leaf enabled { 1023 type boolean; 1024 description 1025 "Enable or disable the graceful-restart capability."; 1026 } 1027 leaf restart-time { 1028 type uint16 { 1029 range 0..4096; 1030 } 1031 description 1032 "Estimated time (in seconds) for the local BGP speaker to 1033 restart a session. This value is advertise in the graceful 1034 restart BGP capability. This is a 12-bit value, referred to 1035 as Restart Time in RFC4724. Per RFC4724, the suggested 1036 default value is <= the hold-time value."; 1037 } 1039 leaf stale-routes-time { 1040 type decimal64 { 1041 fraction-digits 2; 1042 } 1043 description 1044 "An upper-bound on the time that stale routes will be 1045 retained by a router after a session is restarted. If an 1046 End-of-RIB (EOR) marker is received prior to this timer 1047 expiring stale-routes will be flushed upon its receipt - if 1048 no EOR is received, then when this timer expires stale paths 1049 will be purged. This timer is referred to as the 1050 Selection_Deferral_Timer in RFC4724"; 1051 } 1053 leaf helper-only { 1054 type boolean; 1055 description 1056 "Enable graceful-restart in helper mode only. When this leaf 1057 is set, the local system does not retain forwarding its own 1058 state during a restart, but supports procedures for the 1059 receiving speaker, as defined in RFC4724."; 1060 } 1061 } 1063 grouping use-multiple-paths-config { 1064 description 1065 "Generic configuration options relating to use of multiple 1066 paths for a referenced AFI-SAFI, group or neighbor"; 1068 leaf enabled { 1069 type boolean; 1070 default false; 1071 description 1072 "Whether the use of multiple paths for the same NLRI is 1073 enabled for the neighbor. This value is overridden by any 1074 more specific configuration value."; 1076 } 1077 } 1079 grouping use-multiple-paths-ebgp-as-options-config { 1080 description 1081 "Configuration parameters specific to eBGP multi-path applicable 1082 to all contexts"; 1084 leaf allow-multiple-as { 1085 type boolean; 1086 default "false"; 1087 description 1088 "Allow multi-path to use paths from different neighboring ASes. 1089 The default is to only consider multiple paths from the same 1090 neighboring AS."; 1091 } 1092 } 1094 grouping global-group-use-multiple-paths { 1095 description 1096 "Common grouping used for both global and groups which provides 1097 configuration and state parameters relating to use of multiple 1098 paths"; 1100 container use-multiple-paths { 1101 description 1102 "Parameters related to the use of multiple paths for the 1103 same NLRI"; 1105 uses use-multiple-paths-config; 1107 container ebgp { 1108 description 1109 "Multi-Path parameters for eBGP"; 1111 leaf allow-multiple-as { 1112 type boolean; 1113 default "false"; 1114 description 1115 "Allow multi-path to use paths from different neighboring 1116 ASes. The default is to only consider multiple paths 1117 from the same neighboring AS."; 1118 } 1120 leaf maximum-paths { 1121 type uint32; 1122 default 1; 1123 description 1124 "Maximum number of parallel paths to consider when using 1125 BGP multi-path. The default is use a single path."; 1126 } 1127 } 1129 container ibgp { 1130 description 1131 "Multi-Path parameters for iBGP"; 1133 leaf maximum-paths { 1134 type uint32; 1135 default 1; 1136 description 1137 "Maximum number of parallel paths to consider when using 1138 iBGP multi-path. The default is to use a single path"; 1139 } 1140 } 1141 } 1142 } 1144 grouping route-selection-options { 1145 description 1146 "Configuration and state relating to route selection options"; 1148 container route-selection-options { 1149 description 1150 "Parameters relating to options for route selection"; 1152 leaf always-compare-med { 1153 type boolean; 1154 default "false"; 1155 description 1156 "Compare multi-exit discriminator (MED) value from 1157 different ASes when selecting the best route. The default 1158 behavior is to only compare MEDs for paths received from 1159 the same AS."; 1160 } 1162 leaf ignore-as-path-length { 1163 type boolean; 1164 default "false"; 1165 description 1166 "Ignore the AS path length when selecting the best path. 1167 The default is to use the AS path length and prefer paths 1168 with shorter length."; 1169 } 1171 leaf external-compare-router-id { 1172 type boolean; 1173 default "true"; 1174 description 1175 "When comparing similar routes received from external BGP 1176 peers, use the router-id as a criterion to select the 1177 active path."; 1178 } 1180 leaf advertise-inactive-routes { 1181 type boolean; 1182 default "false"; 1183 description 1184 "Advertise inactive routes to external peers. The default 1185 is to only advertise active routes."; 1186 } 1188 leaf enable-aigp { 1189 type boolean; 1190 default false; 1191 description 1192 "Flag to enable sending / receiving accumulated IGP 1193 attribute in routing updates"; 1194 } 1196 leaf ignore-next-hop-igp-metric { 1197 type boolean; 1198 default "false"; 1199 description 1200 "Ignore the IGP metric to the next-hop when calculating BGP 1201 best-path. The default is to select the route for which 1202 the metric to the next-hop is lowest"; 1203 } 1204 } 1205 } 1207 grouping state { 1208 description 1209 "Grouping containing common counters relating to prefixes and 1210 paths"; 1212 leaf total-paths { 1213 type uint32; 1214 config false; 1215 description 1216 "Total number of BGP paths within the context"; 1217 } 1219 leaf total-prefixes { 1220 type uint32; 1221 config false; 1222 description 1223 "Total number of BGP prefixes received within the context"; 1224 } 1225 } 1226 } 1227 1229 file "ietf-bgp-common-multiprotocol@2019-03-21.yang" 1230 submodule ietf-bgp-common-multiprotocol { 1231 yang-version "1.1"; 1232 belongs-to ietf-bgp { 1233 prefix "bgp"; 1234 } 1236 import ietf-bgp-types { 1237 prefix bt; 1238 } 1239 import ietf-routing-policy { 1240 prefix rpol; 1241 } 1243 include ietf-bgp-common; 1245 // meta 1246 organization 1247 "IETF IDR Working Group"; 1249 contact 1250 "WG Web: 1251 WG List: 1253 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1254 Keyur Patel (keyur at arrcus.com), 1255 Susan Hares (shares at ndzh.com"; 1257 description 1258 "This sub-module contains groupings that are related to support 1259 for multiple protocols in BGP. The groupings are common across 1260 multiple contexts."; 1262 revision "2019-03-21" { 1263 description 1264 "Initial Version"; 1265 reference 1266 "RFC XXX, BGP Model for Service Provider Network."; 1268 } 1270 grouping mp-afi-safi-graceful-restart-config { 1271 description 1272 "BGP graceful restart parameters that apply on a per-AFI-SAFI 1273 basis"; 1275 leaf enabled { 1276 type boolean; 1277 default false; 1278 description 1279 "This leaf indicates whether graceful-restart is enabled for 1280 this AFI-SAFI"; 1281 } 1282 } 1284 grouping mp-afi-safi-config { 1285 description 1286 "Configuration parameters used for all BGP AFI-SAFIs"; 1288 leaf afi-safi-name { 1289 type identityref { 1290 base "bt:afi-safi-type"; 1291 } 1292 description "AFI,SAFI"; 1293 } 1295 leaf enabled { 1296 type boolean; 1297 default false; 1298 description 1299 "This leaf indicates whether the IPv4 Unicast AFI,SAFI is 1300 enabled for the neighbour or group"; 1301 } 1302 } 1304 grouping mp-all-afi-safi-list-contents { 1305 description 1306 "A common grouping used for contents of the list that is used 1307 for AFI-SAFI entries"; 1309 // import and export policy included for the afi/safi 1310 uses rpol:apply-policy-group; 1312 container ipv4-unicast { 1313 when "../afi-safi-name = 'bt:IPV4_UNICAST'" { 1314 description 1315 "Include this container for IPv4 Unicast specific 1316 configuration"; 1317 } 1319 description 1320 "IPv4 unicast configuration options"; 1322 // include common IPv[46] unicast options 1323 uses mp-ipv4-ipv6-unicast-common; 1325 // placeholder for IPv4 unicast specific configuration 1326 } 1328 container ipv6-unicast { 1329 when "../afi-safi-name = 'bt:IPV6_UNICAST'" { 1330 description 1331 "Include this container for IPv6 Unicast specific 1332 configuration"; 1333 } 1335 description 1336 "IPv6 unicast configuration options"; 1338 // include common IPv[46] unicast options 1339 uses mp-ipv4-ipv6-unicast-common; 1341 // placeholder for IPv6 unicast specific configuration 1342 // options 1343 } 1345 container ipv4-labeled-unicast { 1346 when "../afi-safi-name = 'bt:IPV4_LABELED_UNICAST'" { 1347 description 1348 "Include this container for IPv4 Labeled Unicast specific 1349 configuration"; 1350 } 1352 description 1353 "IPv4 Labeled Unicast configuration options"; 1355 uses mp-all-afi-safi-common; 1357 // placeholder for IPv4 Labeled Unicast specific config 1358 // options 1359 } 1361 container ipv6-labeled-unicast { 1362 when "../afi-safi-name = 'bt:IPV6_LABELED_UNICAST'" { 1363 description 1364 "Include this container for IPv6 Labeled Unicast specific 1365 configuration"; 1366 } 1368 description 1369 "IPv6 Labeled Unicast configuration options"; 1371 uses mp-all-afi-safi-common; 1373 // placeholder for IPv6 Labeled Unicast specific config 1374 // options. 1375 } 1377 container l3vpn-ipv4-unicast { 1378 when "../afi-safi-name = 'bt:L3VPN_IPV4_UNICAST'" { 1379 description 1380 "Include this container for IPv4 Unicast L3VPN specific 1381 configuration"; 1382 } 1384 description 1385 "Unicast IPv4 L3VPN configuration options"; 1387 // include common L3VPN configuration options 1388 uses mp-l3vpn-ipv4-ipv6-unicast-common; 1390 // placeholder for IPv4 Unicast L3VPN specific config options. 1391 } 1393 container l3vpn-ipv6-unicast { 1394 when "../afi-safi-name = 'bt:L3VPN_IPV6_UNICAST'" { 1395 description 1396 "Include this container for unicast IPv6 L3VPN specific 1397 configuration"; 1398 } 1400 description 1401 "Unicast IPv6 L3VPN configuration options"; 1403 // include common L3VPN configuration options 1404 uses mp-l3vpn-ipv4-ipv6-unicast-common; 1406 // placeholder for IPv6 Unicast L3VPN specific configuration 1407 // options 1408 } 1410 container l3vpn-ipv4-multicast { 1411 when "../afi-safi-name = 'bt:L3VPN_IPV4_MULTICAST'" { 1412 description 1413 "Include this container for multicast IPv6 L3VPN specific 1414 configuration"; 1415 } 1417 description 1418 "Multicast IPv4 L3VPN configuration options"; 1420 // include common L3VPN multicast options 1421 uses mp-l3vpn-ipv4-ipv6-multicast-common; 1423 // placeholder for IPv4 Multicast L3VPN specific configuration 1424 // options 1425 } 1427 container l3vpn-ipv6-multicast { 1428 when "../afi-safi-name = 'bt:L3VPN_IPV6_MULTICAST'" { 1429 description 1430 "Include this container for multicast IPv6 L3VPN specific 1431 configuration"; 1432 } 1433 description 1434 "Multicast IPv6 L3VPN configuration options"; 1436 // include common L3VPN multicast options 1437 uses mp-l3vpn-ipv4-ipv6-multicast-common; 1439 // placeholder for IPv6 Multicast L3VPN specific configuration 1440 // options 1441 } 1443 container l2vpn-vpls { 1444 when "../afi-safi-name = 'bt:L2VPN_VPLS'" { 1445 description 1446 "Include this container for BGP-signalled VPLS specific 1447 configuration"; 1448 } 1450 description 1451 "BGP-signalled VPLS configuration options"; 1453 // include common L2VPN options 1454 uses mp-l2vpn-common; 1456 // placeholder for BGP-signalled VPLS specific configuration 1457 // options 1458 } 1459 container l2vpn-evpn { 1460 when "../afi-safi-name = 'bt:L2VPN_EVPN'" { 1461 description 1462 "Include this container for BGP EVPN specific 1463 configuration"; 1464 } 1466 description 1467 "BGP EVPN configuration options"; 1469 // include common L2VPN options 1470 uses mp-l2vpn-common; 1472 // placeholder for BGP EVPN specific configuration options 1473 } 1474 } 1476 // Common groupings across multiple AFI,SAFIs 1477 grouping mp-all-afi-safi-common { 1478 description 1479 "Grouping for configuration common to all AFI,SAFI"; 1481 container prefix-limit { 1482 description 1483 "Parameters relating to the prefix limit for the AFI-SAFI"; 1484 leaf max-prefixes { 1485 type uint32; 1486 description 1487 "Maximum number of prefixes that will be accepted from the 1488 neighbour"; 1489 } 1490 leaf shutdown-threshold-pct { 1491 type bt:percentage; 1492 description 1493 "Threshold on number of prefixes that can be received from 1494 a neighbour before generation of warning messages or log 1495 entries. Expressed as a percentage of max-prefixes"; 1496 } 1498 leaf restart-timer { 1499 type decimal64 { 1500 fraction-digits 2; 1501 } 1502 units "seconds"; 1503 description 1504 "Time interval in seconds after which the BGP session is 1505 re-established after being torn down due to exceeding the 1506 max-prefix limit."; 1508 } 1509 } 1510 } 1512 grouping mp-ipv4-ipv6-unicast-common { 1513 description 1514 "Common configuration that is applicable for IPv4 and IPv6 1515 unicast"; 1517 // include common afi-safi options. 1518 uses mp-all-afi-safi-common; 1520 // configuration options that are specific to IPv[46] unicast 1521 leaf send-default-route { 1522 type boolean; 1523 default "false"; 1524 description 1525 "If set to true, send the default-route to the neighbour(s)"; 1526 } 1527 } 1529 grouping mp-l3vpn-ipv4-ipv6-unicast-common { 1530 description 1531 "Common configuration applied across L3VPN for IPv4 1532 and IPv6"; 1534 // placeholder -- specific configuration options that are generic 1535 // across IPv[46] unicast address families. 1536 uses mp-all-afi-safi-common; 1537 } 1539 grouping mp-l3vpn-ipv4-ipv6-multicast-common { 1540 description 1541 "Common configuration applied across L3VPN for IPv4 1542 and IPv6"; 1544 // placeholder -- specific configuration options that are 1545 // generic across IPv[46] multicast address families. 1546 uses mp-all-afi-safi-common; 1547 } 1549 grouping mp-l2vpn-common { 1550 description 1551 "Common configuration applied across L2VPN address 1552 families"; 1554 // placeholder -- specific configuration options that are 1555 // generic across L2VPN address families 1556 uses mp-all-afi-safi-common; 1557 } 1559 // Config groupings for common groups 1560 grouping mp-all-afi-safi-common-prefix-limit-config { 1561 description 1562 "Configuration parameters relating to prefix-limits for an 1563 AFI-SAFI"; 1565 } 1566 } 1567 1569 file "ietf-bgp-common-structure@2019-03-21.yang" 1570 submodule ietf-bgp-common-structure { 1571 yang-version "1.1"; 1572 belongs-to ietf-bgp { 1573 prefix "bgp"; 1574 } 1576 import ietf-bgp-types { prefix bt; } 1577 import ietf-routing-policy { prefix rpol; } 1578 include ietf-bgp-common-multiprotocol; 1579 include ietf-bgp-common; 1581 // meta 1582 organization 1583 "IETF IDR Working Group"; 1585 contact 1586 "WG Web: 1587 WG List: 1589 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1590 Keyur Patel (keyur at arrcus.com), 1591 Susan Hares (shares at ndzh.com"; 1593 description 1594 "This sub-module contains groupings that are common across 1595 multiple BGP contexts and provide structure around other 1596 primitive groupings."; 1598 revision "2019-03-21" { 1599 description 1600 "Initial Version"; 1601 reference 1602 "RFC XXX, BGP Model for Service Provider Network."; 1603 } 1605 grouping structure-neighbor-group-logging-options { 1606 description 1607 "Structural grouping used to include error handling 1608 configuration and state for both BGP neighbors and groups"; 1610 container logging-options { 1611 description 1612 "Logging options for events related to the BGP neighbor or 1613 group"; 1615 leaf log-neighbor-state-changes { 1616 type boolean; 1617 default "true"; 1618 description 1619 "Configure logging of peer state changes. Default is to 1620 enable logging of peer state changes."; 1621 } 1622 } 1623 } 1624 grouping structure-neighbor-group-ebgp-multihop { 1625 description 1626 "Structural grouping used to include eBGP multi-hop 1627 configuration and state for both BGP neighbors and peer 1628 groups"; 1630 container ebgp-multihop { 1631 description 1632 "eBGP multi-hop parameters for the BGPgroup"; 1634 leaf enabled { 1635 type boolean; 1636 default "false"; 1637 description 1638 "When enabled the referenced group or neighbors are 1639 permitted to be indirectly connected - including cases 1640 where the TTL can be decremented between the BGP peers"; 1641 } 1643 leaf multihop-ttl { 1644 type uint8; 1645 description 1646 "Time-to-live value to use when packets are sent to the 1647 referenced group or neighbors and ebgp-multihop is 1648 enabled"; 1649 } 1651 } 1652 } 1654 grouping structure-neighbor-group-route-reflector { 1655 description 1656 "Structural grouping used to include route reflector 1657 configuration and state for both BGP neighbors and peer 1658 groups"; 1660 container route-reflector { 1661 description 1662 "Route reflector parameters for the BGPgroup"; 1664 leaf route-reflector-cluster-id { 1665 type bt:rr-cluster-id-type; 1666 description 1667 "route-reflector cluster id to use when local router is 1668 configured as a route reflector. Commonly set at the 1669 group level, but allows a different cluster id to be set 1670 for each neighbor."; 1671 } 1673 leaf route-reflector-client { 1674 type boolean; 1675 default "false"; 1676 description 1677 "Configure the neighbor as a route reflector client."; 1678 } 1679 } 1680 } 1682 grouping structure-neighbor-group-as-path-options { 1683 description 1684 "Structural grouping used to include AS_PATH manipulation 1685 configuration and state for both BGP neighbors and peer 1686 groups"; 1688 container as-path-options { 1689 description 1690 "AS_PATH manipulation parameters for the BGP neighbor or 1691 group"; 1692 leaf allow-own-as { 1693 type uint8; 1694 default 0; 1695 description 1696 "Specify the number of occurrences of the local BGP 1697 speaker's AS that can occur within the AS_PATH before it 1698 is rejected."; 1700 } 1702 leaf replace-peer-as { 1703 type boolean; 1704 default "false"; 1705 description 1706 "Replace occurrences of the peer's AS in the AS_PATH with 1707 the local autonomous system number"; 1708 } 1709 } 1710 } 1712 grouping structure-neighbor-group-add-paths { 1713 description 1714 "Structural grouping used to include ADD-PATHs configuration 1715 and state for both BGP neighbors and peer groups"; 1717 container add-paths { 1718 description 1719 "Parameters relating to the advertisement and receipt of 1720 multiple paths for a single NLRI (add-paths)"; 1722 leaf receive { 1723 type boolean; 1724 default false; 1725 description 1726 "Enable ability to receive multiple path advertisements for 1727 an NLRI from the neighbor or group"; 1728 } 1730 leaf send-max { 1731 type uint8; 1732 description 1733 "The maximum number of paths to advertise to neighbors for 1734 a single NLRI"; 1735 } 1736 leaf eligible-prefix-policy { 1737 type leafref { 1738 path "/rpol:routing-policy/rpol:policy-definitions/" + 1739 "rpol:policy-definition/rpol:name"; 1740 } 1741 description 1742 "A reference to a routing policy which can be used to 1743 restrict the prefixes for which add-paths is enabled"; 1744 } 1745 } 1746 } 1747 } 1748 1750 file "ietf-bgp-peer-group@2019-03-21.yang" 1751 submodule ietf-bgp-peer-group { 1752 yang-version "1.1"; 1753 belongs-to ietf-bgp { 1754 prefix "bgp"; 1755 } 1757 import ietf-routing-policy { 1758 prefix rpol; 1759 } 1761 // Include the common submodule 1762 include ietf-bgp-common; 1763 include ietf-bgp-common-multiprotocol; 1764 include ietf-bgp-common-structure; 1766 // meta 1767 organization 1768 "IETF IDR Working Group"; 1770 contact 1771 "WG Web: 1772 WG List: 1774 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1775 Keyur Patel (keyur at arrcus.com), 1776 Susan Hares (shares at ndzh.com"; 1778 description 1779 "This sub-module contains groupings that are specific to the 1780 peer-group context of the OpenConfig BGP module."; 1782 revision "2019-03-21" { 1783 description 1784 "Initial Version"; 1785 reference 1786 "RFC XXX, BGP Model for Service Provider Network."; 1787 } 1789 grouping bgp-peer-group-config { 1790 description 1791 "Configuration parameters relating to a base BGP peer group 1792 that are not also applicable to any other context (e.g., 1793 neighbor)"; 1795 leaf peer-group-name { 1796 type string; 1797 description 1798 "Name of the BGP peer-group"; 1799 } 1801 } 1803 grouping bgp-peer-group-afi-safi-list { 1804 description 1805 "List of address-families associated with the BGP peer-group"; 1807 list afi-safi { 1808 key "afi-safi-name"; 1810 description 1811 "AFI,SAFI configuration available for the 1812 neighbour or group"; 1814 uses mp-afi-safi-config; 1816 container graceful-restart { 1817 description 1818 "Parameters relating to BGP graceful-restart"; 1820 uses mp-afi-safi-graceful-restart-config; 1821 } 1823 uses route-selection-options; 1824 uses global-group-use-multiple-paths; 1825 uses mp-all-afi-safi-list-contents; 1826 } 1827 } 1829 grouping bgp-peer-group-base { 1830 description 1831 "Parameters related to a BGP group"; 1833 uses bgp-peer-group-config; 1834 uses neighbor-group-config; 1835 uses state; 1837 container timers { 1838 description 1839 "Timers related to a BGP peer-group"; 1841 uses neighbor-group-timers-config; 1842 } 1843 container transport { 1844 description 1845 "Transport session parameters for the BGP peer-group"; 1847 uses neighbor-group-transport-config; 1848 } 1850 container error-handling { 1851 description 1852 "Error handling parameters used for the BGP peer-group"; 1854 uses neighbor-group-error-handling-config; 1855 } 1857 container graceful-restart { 1858 description 1859 "Parameters relating the graceful restart mechanism for BGP"; 1861 uses graceful-restart-config; 1862 } 1864 uses structure-neighbor-group-logging-options; 1865 uses structure-neighbor-group-ebgp-multihop; 1866 uses structure-neighbor-group-route-reflector; 1867 uses structure-neighbor-group-as-path-options; 1868 uses structure-neighbor-group-add-paths; 1869 uses global-group-use-multiple-paths; 1870 uses rpol:apply-policy-group; 1872 container afi-safis { 1873 description 1874 "Per-address-family configuration parameters associated with 1875 thegroup"; 1876 uses bgp-peer-group-afi-safi-list; 1877 } 1878 } 1880 grouping bgp-peer-group-list { 1881 description 1882 "The list of BGP peer groups"; 1884 list peer-group { 1885 key "peer-group-name"; 1886 description 1887 "List of BGP peer-groups configured on the local system - 1888 uniquely identified by peer-group name"; 1890 uses bgp-peer-group-base; 1892 } 1893 } 1894 } 1895 1897 file "ietf-bgp-neighbor@2019-03-21.yang" 1898 submodule ietf-bgp-neighbor { 1899 yang-version "1.1"; 1900 belongs-to ietf-bgp { 1901 prefix "bgp"; 1902 } 1904 import ietf-routing-policy { 1905 prefix rpol; 1906 } 1907 import ietf-bgp-types { 1908 prefix bt; 1909 } 1910 import ietf-inet-types { 1911 prefix inet; 1912 } 1913 import ietf-yang-types { 1914 prefix yang; 1915 } 1917 // Include the common submodule 1918 include ietf-bgp-common; 1919 include ietf-bgp-common-multiprotocol; 1920 include ietf-bgp-peer-group; 1921 include ietf-bgp-common-structure; 1923 // meta 1924 organization 1925 "IETF IDR Working Group"; 1927 contact 1928 "WG Web: 1929 WG List: 1931 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1932 Keyur Patel (keyur at arrcus.com), 1933 Susan Hares (shares at ndzh.com"; 1935 description 1936 "This sub-module contains groupings that are specific to the 1937 neighbor context of the OpenConfig BGP module."; 1939 revision "2019-03-21" { 1940 description 1941 "Initial Version"; 1942 reference 1943 "RFC XXX, BGP Model for Service Provider Network."; 1944 } 1946 grouping bgp-neighbor-use-multiple-paths { 1947 description 1948 "Multi-path configuration and state applicable to a BGP 1949 neighbor"; 1951 container use-multiple-paths { 1952 description 1953 "Parameters related to the use of multiple-paths for the same 1954 NLRI when they are received only from this neighbor"; 1956 uses use-multiple-paths-config; 1958 container ebgp { 1959 description 1960 "Multi-path configuration for eBGP"; 1961 uses use-multiple-paths-ebgp-as-options-config; 1962 } 1963 } 1964 } 1966 grouping bgp-neighbor-counters-message-types-state { 1967 description 1968 "Grouping of BGP message types, included for re-use across 1969 counters"; 1971 leaf UPDATE { 1972 type uint64; 1973 description 1974 "Number of BGP UPDATE messages announcing, withdrawing or 1975 modifying paths exchanged."; 1976 } 1978 leaf NOTIFICATION { 1979 type uint64; 1980 description 1981 "Number of BGP NOTIFICATION messages indicating an error 1982 condition has occurred exchanged."; 1983 } 1984 } 1986 grouping bgp-neighbor-afi-safi-list { 1987 description 1988 "List of address-families associated with the BGP neighbor"; 1990 list afi-safi { 1991 key "afi-safi-name"; 1993 description 1994 "AFI,SAFI configuration available for the neighbour or 1995 group"; 1997 uses mp-afi-safi-config; 1999 leaf active { 2000 type boolean; 2001 config false; 2002 description 2003 "This value indicates whether a particular AFI-SAFI has 2004 been successfully negotiated with the peer. An AFI-SAFI may 2005 be enabled in the current running configuration, but a 2006 session restart may be required in order to negotiate the 2007 new capability."; 2008 } 2010 container prefixes { 2011 config false; 2012 description "Prefix counters for the BGP session"; 2013 leaf received { 2014 type uint32; 2015 description 2016 "The number of prefixes received from the neighbor"; 2017 } 2019 leaf sent { 2020 type uint32; 2021 description 2022 "The number of prefixes advertised to the neighbor"; 2023 } 2025 leaf installed { 2026 type uint32; 2027 description 2028 "The number of advertised prefixes installed in the 2029 Loc-RIB"; 2030 } 2031 } 2033 container graceful-restart { 2034 description 2035 "Parameters relating to BGP graceful-restart"; 2037 uses mp-afi-safi-graceful-restart-config; 2039 leaf received { 2040 type boolean; 2041 config false; 2042 description 2043 "This leaf indicates whether the neighbor advertised the 2044 ability to support graceful-restart for this AFI-SAFI"; 2045 } 2047 leaf advertised { 2048 type boolean; 2049 config false; 2050 description 2051 "This leaf indicates whether the ability to support 2052 graceful-restart has been advertised to the peer"; 2053 } 2054 } 2056 uses mp-all-afi-safi-list-contents; 2057 uses bgp-neighbor-use-multiple-paths; 2058 } 2059 } 2061 grouping bgp-neighbor-base { 2062 description 2063 "Parameters related to a BGP neighbor"; 2065 leaf peer-group { 2066 type leafref { 2067 path "../../../peer-groups/peer-group/peer-group-name"; 2068 } 2069 description 2070 "The peer-group with which this neighbor is associated"; 2071 } 2073 leaf neighbor-address { 2074 type inet:ip-address; 2075 description 2076 "Address of the BGP peer, either in IPv4 or IPv6"; 2077 } 2079 leaf enabled { 2080 type boolean; 2081 default true; 2082 description 2083 "Whether the BGP peer is enabled. In cases where the enabled 2084 leaf is set to false, the local system should not initiate 2085 connections to the neighbor, and should not respond to TCP 2086 connections attempts from the neighbor. If the state of the 2087 BGP session is ESTABLISHED at the time that this leaf is set 2088 to false, the BGP session should be ceased."; 2089 } 2091 uses neighbor-group-config; 2093 leaf session-state { 2094 type enumeration { 2095 enum IDLE { 2096 description 2097 "neighbor is down, and in the Idle state of the FSM"; 2098 } 2099 enum CONNECT { 2100 description 2101 "neighbor is down, and the session is waiting for the 2102 underlying transport session to be established"; 2103 } 2104 enum ACTIVE { 2105 description 2106 "neighbor is down, and the local system is awaiting a 2107 connection from the remote peer"; 2108 } 2109 enum OPENSENT { 2110 description 2111 "neighbor is in the process of being established. The 2112 local system has sent an OPEN message"; 2113 } 2114 enum OPENCONFIRM { 2115 description 2116 "neighbor is in the process of being established. The 2117 local system is awaiting a NOTIFICATION or KEEPALIVE 2118 message"; 2119 } 2120 enum ESTABLISHED { 2121 description 2122 "neighbor is up - the BGP session with the peer is 2123 established"; 2124 } 2125 } 2126 config false; 2127 description 2128 "Operational state of the BGP peer"; 2129 } 2130 leaf last-established { 2131 // Was oc-types:timeticks64 2132 type uint64; 2133 config false; 2134 description 2135 "This timestamp indicates the time that the BGP session last 2136 transitioned in or out of the Established state. The value 2137 is the timestamp in seconds relative to the Unix Epoch (Jan 2138 1, 1970 00:00:00 UTC). 2140 The BGP session uptime can be computed by clients as the 2141 difference between this value and the current time in UTC 2142 (assuming the session is in the ESTABLISHED state, per the 2143 session-state leaf)."; 2144 } 2146 leaf established-transitions { 2147 type yang:counter64; 2148 config false; 2149 description 2150 "Number of transitions to the Established state for the 2151 neighbor session. This value is analogous to the 2152 bgpPeerFsmEstablishedTransitions object from the standard 2153 BGP-4 MIB"; 2154 reference 2155 "RFC 4273 - Definitions of Managed Objects for BGP-4"; 2156 } 2158 leaf-list supported-capabilities { 2159 type identityref { 2160 base bt:BGP_CAPABILITY; 2161 } 2162 config false; 2163 description 2164 "BGP capabilities negotiated as supported with the peer"; 2165 } 2167 container messages { 2168 config false; 2169 description 2170 "Counters for BGP messages sent and received from the 2171 neighbor"; 2172 container sent { 2173 description 2174 "Counters relating to BGP messages sent to the neighbor"; 2175 uses bgp-neighbor-counters-message-types-state; 2176 } 2178 container received { 2179 description 2180 "Counters for BGP messages received from the neighbor"; 2181 uses bgp-neighbor-counters-message-types-state; 2182 } 2183 } 2185 container queues { 2186 config false; 2187 description 2188 "Counters related to queued messages associated with the BGP 2189 neighbor"; 2191 leaf input { 2192 type uint32; 2193 description 2194 "The number of messages received from the peer currently 2195 queued"; 2196 } 2198 leaf output { 2199 type uint32; 2200 description 2201 "The number of messages queued to be sent to the peer"; 2202 } 2203 } 2205 container timers { 2206 description 2207 "Timers related to a BGP neighbor"; 2209 uses neighbor-group-timers-config; 2211 leaf negotiated-hold-time { 2212 type decimal64 { 2213 fraction-digits 2; 2214 } 2215 config false; 2216 description 2217 "The negotiated hold-time for the BGP session"; 2218 } 2219 } 2221 container transport { 2222 description 2223 "Transport session parameters for the BGP neighbor"; 2225 uses neighbor-group-transport-config; 2226 leaf local-port { 2227 type inet:port-number; 2228 config false; 2229 description 2230 "Local TCP port being used for the TCP session supporting 2231 the BGP session"; 2232 } 2234 leaf remote-address { 2235 type inet:ip-address; 2236 config false; 2237 description 2238 "Remote address to which the BGP session has been 2239 established"; 2240 } 2242 leaf remote-port { 2243 type inet:port-number; 2244 config false; 2245 description 2246 "Remote port being used by the peer for the TCP session 2247 supporting the BGP session"; 2248 } 2249 } 2251 container error-handling { 2252 description 2253 "Error handling parameters used for the BGP neighbor or 2254 group"; 2255 uses neighbor-group-error-handling-config; 2257 leaf erroneous-update-messages { 2258 type uint32; 2259 config false; 2260 description 2261 "The number of BGP UPDATE messages for which the 2262 treat-as-withdraw mechanism has been applied based on 2263 erroneous message contents"; 2264 } 2265 } 2267 container graceful-restart { 2268 description 2269 "Parameters relating the graceful restart mechanism for BGP"; 2271 uses graceful-restart-config; 2273 leaf peer-restart-time { 2274 type uint16 { 2275 range 0..4096; 2276 } 2277 config false; 2278 description 2279 "The period of time (advertised by the peer) that the peer 2280 expects a restart of a BGP session to take"; 2281 } 2283 leaf peer-restarting { 2284 type boolean; 2285 config false; 2286 description 2287 "This flag indicates whether the remote neighbor is 2288 currently in the process of restarting, and hence received 2289 routes are currently stale"; 2290 } 2292 leaf local-restarting { 2293 type boolean; 2294 config false; 2295 description 2296 "This flag indicates whether the local neighbor is 2297 currently restarting. The flag is unset after all NLRI 2298 have been advertised to the peer, and the End-of-RIB (EOR) 2299 marker has been unset"; 2300 } 2302 leaf mode { 2303 type enumeration { 2304 enum HELPER_ONLY { 2305 description 2306 "The local router is operating in helper-only mode, and 2307 hence will not retain forwarding state during a local 2308 session restart, but will do so during a restart of 2309 the remote peer"; 2310 } 2311 enum BILATERAL { 2312 description 2313 "The local router is operating in both helper mode, and 2314 hence retains forwarding state during a remote 2315 restart, and also maintains forwarding state during 2316 local session restart"; 2317 } 2318 enum REMOTE_HELPER { 2319 description 2320 "The local system is able to retain routes during 2321 restart but the remote system is only able to act as a 2322 helper"; 2323 } 2324 } 2325 config false; 2326 description 2327 "This leaf indicates the mode of operation of BGP graceful 2328 restart with the peer"; 2329 } 2330 } 2332 uses structure-neighbor-group-logging-options; 2333 uses structure-neighbor-group-ebgp-multihop; 2334 uses structure-neighbor-group-route-reflector; 2335 uses structure-neighbor-group-as-path-options; 2336 uses structure-neighbor-group-add-paths; 2337 uses bgp-neighbor-use-multiple-paths; 2338 uses rpol:apply-policy-group; 2340 container afi-safis { 2341 description 2342 "Per-address-family configuration parameters associated with 2343 the neighbor"; 2344 uses bgp-neighbor-afi-safi-list; 2345 } 2346 } 2348 grouping bgp-neighbor-list { 2349 description 2350 "The list of BGP neighbors"; 2352 list neighbor { 2353 key "neighbor-address"; 2354 description 2355 "List of BGP neighbors configured on the local system, 2356 uniquely identified by peer IPv[46] address"; 2358 uses bgp-neighbor-base; 2359 } 2360 } 2361 } 2362 2364 file "ietf-bgp-global@2019-03-21.yang" 2365 submodule ietf-bgp-global { 2366 yang-version "1.1"; 2367 belongs-to ietf-bgp { 2368 prefix bgp; 2370 } 2372 import ietf-inet-types { 2373 prefix inet; 2374 } 2375 import ietf-yang-types { 2376 prefix yang; 2377 } 2379 include ietf-bgp-common; 2380 include ietf-bgp-common-multiprotocol; 2382 organization 2383 "IETF IDR Working Group"; 2385 contact 2386 "WG Web: 2387 WG List: 2389 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2390 Keyur Patel (keyur at arrcus.com), 2391 Susan Hares (shares at ndzh.com"; 2393 description 2394 "This sub-module contains groupings that are specific to the 2395 global context of the BGP module"; 2397 revision "2019-03-21" { 2398 description 2399 "Initial Version"; 2400 reference 2401 "RFC XXX, BGP Model for Service Provider Network."; 2402 } 2404 grouping bgp-global-config { 2405 description 2406 "Global configuration options for the BGP router."; 2408 leaf as { 2409 type inet:as-number; 2410 mandatory true; 2411 description 2412 "Local autonomous system number of the router. Uses 2413 the 32-bit as-number type from the model in RFC 6991."; 2414 } 2416 leaf router-id { 2417 type yang:dotted-quad; 2418 description 2419 "Router id of the router - an unsigned 32-bit integer 2420 expressed in dotted quad notation."; 2421 reference 2422 "RFC4271 - A Border Gateway Protocol 4 (BGP-4), 2423 Section 4.2"; 2424 } 2425 } 2427 grouping bgp-global-state { 2428 description 2429 "Operational state parameters for the BGP neighbor"; 2431 uses state; 2432 } 2434 grouping bgp-global-default-route-distance-config { 2435 description 2436 "Configuration options relating to the administrative distance 2437 (or preference) assigned to routes received from different 2438 sources (external, internal, and local)."; 2440 leaf external-route-distance { 2441 type uint8 { 2442 range "1..255"; 2443 } 2444 description 2445 "Administrative distance for routes learned from external 2446 BGP (eBGP)."; 2447 } 2448 leaf internal-route-distance { 2449 type uint8 { 2450 range "1..255"; 2451 } 2452 description 2453 "Administrative distance for routes learned from internal 2454 BGP (iBGP)."; 2455 } 2456 } 2458 grouping bgp-global-confederation-config { 2459 description 2460 "Configuration options specifying parameters when the local 2461 router is within an autonomous system which is part of a BGP 2462 confederation."; 2464 leaf enabled { 2465 type boolean; 2466 description 2467 "When this leaf is set to true it indicates that 2468 the local-AS is part of a BGP confederation"; 2469 } 2471 leaf identifier { 2472 type inet:as-number; 2473 description 2474 "Confederation identifier for the autonomous system."; 2475 } 2477 leaf-list member-as { 2478 type inet:as-number; 2479 description 2480 "Remote autonomous systems that are to be treated 2481 as part of the local confederation."; 2482 } 2483 } 2485 grouping bgp-global-afi-safi-list { 2486 description 2487 "List of address-families associated with the BGP instance"; 2489 list afi-safi { 2490 key "afi-safi-name"; 2492 description 2493 "AFI,SAFI configuration available for the 2494 neighbour or group"; 2496 uses mp-afi-safi-config; 2497 uses state; 2499 container graceful-restart { 2500 description 2501 "Parameters relating to BGP graceful-restart"; 2503 uses mp-afi-safi-graceful-restart-config; 2504 } 2506 uses route-selection-options; 2507 uses global-group-use-multiple-paths; 2508 uses mp-all-afi-safi-list-contents; 2509 } 2510 } 2512 // Structural groupings 2513 grouping bgp-global-base { 2514 description 2515 "Global configuration parameters for the BGP router"; 2517 uses bgp-global-config; 2518 uses bgp-global-state; 2520 container default-route-distance { 2521 description 2522 "Administrative distance (or preference) assigned to 2523 routes received from different sources 2524 (external, internal, and local)."; 2526 uses bgp-global-default-route-distance-config; 2527 } 2529 container confederation { 2530 description 2531 "Parameters indicating whether the local system acts as part 2532 of a BGP confederation"; 2534 uses bgp-global-confederation-config; 2535 } 2537 container graceful-restart { 2538 description 2539 "Parameters relating the graceful restart mechanism for BGP"; 2540 uses graceful-restart-config; 2541 } 2543 uses global-group-use-multiple-paths; 2544 uses route-selection-options; 2546 container afi-safis { 2547 description 2548 "Address family specific configuration"; 2549 uses bgp-global-afi-safi-list; 2550 } 2551 } 2553 } 2554 2556 7.2. BGP types 2558 file "ietf-bgp-types@2019-03-21.yang" 2559 module ietf-bgp-types { 2560 yang-version "1.1"; 2561 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; 2563 prefix "bt"; 2565 import ietf-inet-types { 2566 prefix inet; 2567 } 2569 // meta 2570 organization 2571 "IETF IDR Working Group"; 2573 contact 2574 "WG Web: 2575 WG List: 2577 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2578 Keyur Patel (keyur at arrcus.com), 2579 Susan Hares (shares at ndzh.com"; 2581 description 2582 "This module contains general data definitions for use in BGP 2583 policy. It can be imported by modules that make use of BGP 2584 attributes"; 2586 revision "2019-03-21" { 2587 description 2588 "Initial Version"; 2589 reference 2590 "RFC XXX, BGP Model for Service Provider Network."; 2591 } 2593 identity BGP_CAPABILITY { 2594 description "Base identity for a BGP capability"; 2595 } 2597 identity MPBGP { 2598 base BGP_CAPABILITY; 2599 description 2600 "Multi-protocol extensions to BGP"; 2601 reference "RFC2858"; 2602 } 2604 identity ROUTE_REFRESH { 2605 base BGP_CAPABILITY; 2606 description 2607 "The BGP route-refresh functionality"; 2608 reference "RFC2918"; 2610 } 2612 identity ASN32 { 2613 base BGP_CAPABILITY; 2614 description 2615 "4-byte (32-bit) AS number functionality"; 2616 reference "RFC6793"; 2617 } 2619 identity GRACEFUL_RESTART { 2620 base BGP_CAPABILITY; 2621 description 2622 "Graceful restart functionality"; 2623 reference "RFC4724"; 2624 } 2626 identity ADD_PATHS { 2627 base BGP_CAPABILITY; 2628 description 2629 "BGP add-paths"; 2630 reference "draft-ietf-idr-add-paths"; 2631 } 2633 identity afi-safi-type { 2634 description 2635 "Base identity type for AFI,SAFI tuples for BGP-4"; 2636 reference "RFC4760 - multi-protocol extensions for BGP-4"; 2637 } 2639 identity ipv4-unicast { 2640 base afi-safi-type; 2641 description 2642 "IPv4 unicast (AFI,SAFI = 1,1)"; 2643 reference "RFC4760"; 2644 } 2646 identity ipv6-unicast { 2647 base afi-safi-type; 2648 description 2649 "IPv6 unicast (AFI,SAFI = 2,1)"; 2650 reference "RFC4760"; 2651 } 2653 identity IPV4_LABELED_UNICAST { 2654 base afi-safi-type; 2655 description 2656 "Labeled IPv4 unicast (AFI,SAFI = 1,4)"; 2657 reference "RFC3107"; 2659 } 2661 identity IPV6_LABELED_UNICAST { 2662 base afi-safi-type; 2663 description 2664 "Labeled IPv6 unicast (AFI,SAFI = 2,4)"; 2665 reference "RFC3107"; 2666 } 2668 identity L3VPN_IPV4_UNICAST { 2669 base afi-safi-type; 2670 description 2671 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 2672 reference "RFC4364"; 2673 } 2675 identity L3VPN_IPV6_UNICAST { 2676 base afi-safi-type; 2677 description 2678 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 2679 reference "RFC4659"; 2680 } 2682 identity L3VPN_IPV4_MULTICAST { 2683 base afi-safi-type; 2684 description 2685 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 2686 reference "RFC6514"; 2687 } 2689 identity L3VPN_IPV6_MULTICAST { 2690 base afi-safi-type; 2691 description 2692 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 2693 reference "RFC6514"; 2694 } 2696 identity L2VPN_VPLS { 2697 base afi-safi-type; 2698 description 2699 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 2700 reference "RFC4761"; 2701 } 2703 identity L2VPN_EVPN { 2704 base afi-safi-type; 2705 description 2706 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 2708 } 2710 identity BGP_WELL_KNOWN_STD_COMMUNITY { 2711 description 2712 "Reserved communities within the standard community space 2713 defined by RFC1997. These communities must fall within the 2714 range 0x00000000 to 0xFFFFFFFF"; 2715 reference "RFC1997"; 2716 } 2718 identity NO_EXPORT { 2719 base BGP_WELL_KNOWN_STD_COMMUNITY; 2720 description 2721 "Do not export NLRI received carrying this community outside 2722 the bounds of this autonomous system, or this confederation if 2723 the local autonomous system is a confederation member AS. This 2724 community has a value of 0xFFFFFF01."; 2725 reference "RFC1997"; 2726 } 2728 identity NO_ADVERTISE { 2729 base BGP_WELL_KNOWN_STD_COMMUNITY; 2730 description 2731 "All NLRI received carrying this community must not be 2732 advertised to other BGP peers. This community has a value of 2733 0xFFFFFF02."; 2734 reference "RFC1997"; 2735 } 2737 identity NO_EXPORT_SUBCONFED { 2738 base BGP_WELL_KNOWN_STD_COMMUNITY; 2739 description 2740 "All NLRI received carrying this community must not be 2741 advertised to external BGP peers - including over confederation 2742 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 2743 reference "RFC1997"; 2744 } 2746 identity NOPEER { 2747 base BGP_WELL_KNOWN_STD_COMMUNITY; 2748 description 2749 "An autonomous system receiving NLRI tagged with this community 2750 is advised not to re-advertise the NLRI to external bi-lateral 2751 peer autonomous systems. An AS may also filter received NLRI 2752 from bilateral peer sessions when they are tagged with this 2753 community value"; 2754 reference "RFC3765"; 2755 } 2756 identity as-path-segment-type { 2757 description 2758 "Base AS Path Segment Type. In [BGP-4], the path segment type 2759 is a 1-octet field with the following values defined."; 2760 reference 2761 "RFC 5065, Autonomous System Configuration for BGP."; 2762 } 2764 identity as-set { 2765 base as-path-segment-type; 2766 description 2767 "Unordered set of autonomous systems that a route in the UPDATE 2768 message has traversed."; 2769 reference 2770 "RFC 5065, Autonomous System Configuration for BGP."; 2771 } 2773 identity as-sequence { 2774 base as-path-segment-type; 2775 description 2776 "Ordered set of autonomous systems that a route in the UPDATE 2777 message has traversed."; 2778 reference 2779 "RFC 5065, Autonomous System Configuration for BGP."; 2780 } 2782 identity as-confed-sequence { 2783 base as-path-segment-type; 2784 description 2785 "Ordered set of Member Autonomous Systems in the local 2786 confederation that the UPDATE message has traversed."; 2787 reference 2788 "RFC 5065, Autonomous System Configuration for BGP."; 2789 } 2791 identity as-confed-set { 2792 base as-path-segment-type; 2793 description 2794 "Unordered set of Member Autonomous Systems in the local 2795 confederation that the UPDATE message has traversed."; 2796 reference 2797 "RFC 5065, Autonomous System Configuration for BGP."; 2798 } 2800 /* 2801 * Features. 2802 */ 2803 feature ttl-security { 2804 description 2805 "BGP Time To Live (TTL) security check support."; 2806 reference 2807 "RFC 5082, The Generalized TTL Security Mechanism (GTSM)"; 2808 } 2810 feature bfd { 2811 description 2812 "Support for BFD detection of BGP neighbor reachability."; 2813 reference 2814 "RFC 5880, Bidirectional Forward Detection (BFD), 2815 RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6 2816 (Single Hop)."; 2817 } 2819 typedef bgp-session-direction { 2820 type enumeration { 2821 enum INBOUND { 2822 description 2823 "Refers to all NLRI received from the BGP peer"; 2824 } 2825 enum OUTBOUND { 2826 description 2827 "Refers to all NLRI advertised to the BGP peer"; 2828 } 2829 } 2830 description 2831 "Type to describe the direction of NLRI transmission"; 2832 } 2834 typedef bgp-well-known-community-type { 2835 type identityref { 2836 base BGP_WELL_KNOWN_STD_COMMUNITY; 2837 } 2838 description 2839 "Type definition for well-known IETF community attribute 2840 values"; 2841 reference 2842 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 2843 } 2845 typedef bgp-std-community-type { 2846 // TODO: further refine restrictions and allowed patterns 2847 // 4-octet value: 2848 // 2 octets 2849 // 2 octets 2850 type union { 2851 type uint32 { 2852 // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - 2853 // 0xFFFFFFFF are reserved 2854 range "65536..4294901759"; // 0x00010000..0xFFFEFFFF 2855 } 2856 type string { 2857 pattern '([0-9]+:[0-9]+)'; 2858 } 2859 } 2860 description 2861 "Type definition for standard community attributes"; 2862 reference 2863 "RFC 1997 - BGP Communities Attribute"; 2864 } 2866 typedef bgp-ext-community-type { 2867 // TODO: needs more work to make this more precise given the 2868 // variability of extended community attribute specifications 2869 // 8-octet value: 2870 // 2 octects 2871 // 6 octets 2873 type union { 2874 type string { 2875 // Type 1: 2-octet global and 4-octet local 2876 // (AS number) (Integer) 2877 pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2878 '[1-9][0-9]{1,4}|[0-9]):' + 2879 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2880 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2881 } 2882 type string { 2883 // Type 2: 4-octet global and 2-octet local 2884 // (ipv4-address) (integer) 2885 pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2886 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2887 '2[0-4][0-9]|25[0-5]):' + 2888 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2889 '[1-9][0-9]{1,4}|[0-9])'; 2890 } 2891 type string { 2892 // route-target with Type 1 2893 // route-target:(ASN):(local-part) 2894 pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' + 2895 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 2896 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2897 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2898 } 2899 type string { 2900 // route-target with Type 2 2901 // route-target:(IPv4):(local-part) 2902 pattern 'route\-target:' + 2903 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2904 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2905 '2[0-4][0-9]|25[0-5]):' + 2906 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2907 '[1-9][0-9]{1,4}|[0-9])'; 2908 } 2909 type string { 2910 // route-origin with Type 1 2911 pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' + 2912 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 2913 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2914 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2915 } 2916 type string { 2917 // route-origin with Type 2 2918 pattern 'route\-origin:' + 2919 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2920 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2921 '2[0-4][0-9]|25[0-5]):' + 2922 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2923 '[1-9][0-9]{1,4}|[0-9])'; 2924 } 2925 } 2926 description 2927 "Type definition for extended community attributes"; 2928 reference 2929 "RFC 4360 - BGP Extended Communities Attribute"; 2930 } 2932 typedef bgp-community-regexp-type { 2933 // TODO: needs more work to decide what format these regexps can 2934 // take. 2935 type string; 2936 description 2937 "Type definition for communities specified as regular 2938 expression patterns"; 2939 } 2941 typedef bgp-origin-attr-type { 2942 type enumeration { 2943 enum IGP { 2944 description "Origin of the NLRI is internal"; 2945 } 2946 enum EGP { 2947 description "Origin of the NLRI is EGP"; 2948 } 2949 enum INCOMPLETE { 2950 description "Origin of the NLRI is neither IGP or EGP"; 2951 } 2952 } 2953 description 2954 "Type definition for standard BGP origin attribute"; 2955 reference 2956 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3"; 2957 } 2959 typedef peer-type { 2960 type enumeration { 2961 enum INTERNAL { 2962 description "internal (iBGP) peer"; 2963 } 2964 enum EXTERNAL { 2965 description "external (eBGP) peer"; 2966 } 2967 } 2968 description 2969 "labels a peer or peer group as explicitly internal or 2970 external"; 2971 } 2973 identity REMOVE_PRIVATE_AS_OPTION { 2974 description 2975 "Base identity for options for removing private autonomous 2976 system numbers from the AS_PATH attribute"; 2977 } 2979 identity PRIVATE_AS_REMOVE_ALL { 2980 base REMOVE_PRIVATE_AS_OPTION; 2981 description 2982 "Strip all private autonomous system numbers from the AS_PATH. 2983 This action is performed regardless of the other content of the 2984 AS_PATH attribute, and for all instances of private AS numbers 2985 within that attribute."; 2986 } 2988 identity PRIVATE_AS_REPLACE_ALL { 2989 base REMOVE_PRIVATE_AS_OPTION; 2990 description 2991 "Replace all instances of private autonomous system numbers in 2992 the AS_PATH with the local BGP speaker's autonomous system 2993 number. This action is performed regardless of the other 2994 content of the AS_PATH attribute, and for all instances of 2995 private AS number within that attribute."; 2996 } 2998 typedef remove-private-as-option { 2999 type identityref { 3000 base REMOVE_PRIVATE_AS_OPTION; 3001 } 3002 description 3003 "set of options for configuring how private AS path numbers 3004 are removed from advertisements"; 3005 } 3007 typedef percentage { 3008 type uint8 { 3009 range "0..100"; 3010 } 3011 description 3012 "Integer indicating a percentage value"; 3013 } 3015 typedef rr-cluster-id-type { 3016 type union { 3017 type uint32; 3018 type inet:ipv4-address; 3019 } 3020 description 3021 "union type for route reflector cluster ids: 3022 option 1: 4-byte number 3023 option 2: IP address"; 3024 } 3026 typedef community-type { 3027 type enumeration { 3028 enum STANDARD { 3029 description "send only standard communities"; 3030 } 3031 enum EXTENDED { 3032 description "send only extended communities"; 3033 } 3034 enum BOTH { 3035 description "send both standard and extended communities"; 3036 } 3037 enum NONE { 3038 description "do not send any community attribute"; 3039 } 3040 } 3041 description 3042 "type describing variations of community attributes: 3044 STANDARD: standard BGP community [rfc1997] 3045 EXTENDED: extended BGP community [rfc4360] 3046 BOTH: both standard and extended community"; 3047 } 3048 } 3049 3051 7.3. BGP policy data 3053 file "ietf-bgp-policy@2019-03-21.yang" 3054 module ietf-bgp-policy { 3055 yang-version "1.1"; 3056 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; 3057 prefix "bp"; 3059 // import some basic types 3060 import ietf-inet-types { 3061 prefix inet; 3062 } 3063 import ietf-routing-policy { 3064 prefix rpol; 3065 } 3066 import ietf-bgp-types { 3067 prefix bt; 3068 } 3070 import ietf-routing-types { 3071 prefix rt-types; 3072 } 3074 organization 3075 "IETF IDR Working Group"; 3077 contact 3078 "WG Web: 3079 WG List: 3081 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3082 Keyur Patel (keyur at arrcus.com), 3083 Susan Hares (shares at ndzh.com"; 3085 description 3086 "This module contains data definitions for BGP routing policy. 3087 It augments the base routing-policy module with BGP-specific 3088 options for conditions and actions."; 3090 revision "2019-03-21" { 3091 description 3092 "Initial Version"; 3093 reference 3094 "RFC XXX, BGP Model for Service Provider Network."; 3095 } 3097 // typedef statements 3099 typedef bgp-set-community-option-type { 3100 type enumeration { 3101 enum ADD { 3102 description 3103 "add the specified communities to the existing 3104 community attribute"; 3105 } 3106 enum REMOVE { 3107 description 3108 "remove the specified communities from the 3109 existing community attribute"; 3110 } 3111 enum REPLACE { 3112 description 3113 "replace the existing community attribute with 3114 the specified communities. If an empty set is 3115 specified, this removes the community attribute 3116 from the route."; 3117 } 3118 } 3119 description 3120 "Type definition for options when setting the community 3121 attribute in a policy action"; 3122 } 3124 typedef bgp-next-hop-type { 3125 type union { 3126 type inet:ip-address-no-zone; 3127 type enumeration { 3128 enum SELF { 3129 description "special designation for local router's own 3130 address, i.e., next-hop-self"; 3131 } 3132 } 3133 } 3134 description 3135 "type definition for specifying next-hop in policy actions"; 3136 } 3138 typedef bgp-set-med-type { 3139 type union { 3140 type uint32; 3141 type string { 3142 pattern "^[+-][0-9]+"; 3143 } 3144 type enumeration { 3145 enum IGP { 3146 description "set the MED value to the IGP cost toward the 3147 next hop for the route"; 3148 } 3149 } 3150 } 3151 description 3152 "Type definition for specifying how the BGP MED can 3153 be set in BGP policy actions. The three choices are to set 3154 the MED directly, increment/decrement using +/- notation, 3155 and setting it to the IGP cost (predefined value)."; 3156 } 3158 // augment statements 3160 augment "/rpol:routing-policy/rpol:defined-sets" { 3161 description 3162 "Adds BGP defined sets container to routing policy model."; 3164 container bgp-defined-sets { 3165 description 3166 "BGP-related set definitions for policy match conditions"; 3168 container community-sets { 3169 description 3170 "Enclosing container for list of defined BGP community sets"; 3172 list community-set { 3173 key "community-set-name"; 3174 description 3175 "List of defined BGP community sets"; 3177 leaf community-set-name { 3178 type string; 3179 mandatory true; 3180 description 3181 "name / label of the community set -- this is used to 3182 reference the set in match conditions"; 3183 } 3185 leaf-list community-member { 3186 type union { 3187 type bt:bgp-std-community-type; 3188 type bt:bgp-community-regexp-type; 3189 type bt:bgp-well-known-community-type; 3190 } 3191 description 3192 "members of the community set"; 3193 } 3194 } 3195 } 3197 container ext-community-sets { 3198 description 3199 "Enclosing container for list of extended BGP community 3200 sets"; 3201 list ext-community-set { 3202 key "ext-community-set-name"; 3203 description 3204 "List of defined extended BGP community sets"; 3206 leaf ext-community-set-name { 3207 type string; 3208 description 3209 "name / label of the extended community set -- this is 3210 used to reference the set in match conditions"; 3211 } 3213 leaf-list ext-community-member { 3214 type union { 3215 type rt-types:route-target; 3216 type bt:bgp-community-regexp-type; 3217 } 3218 description 3219 "members of the extended community set"; 3220 } 3221 } 3222 } 3224 container as-path-sets { 3225 description 3226 "Enclosing container for list of define AS path sets"; 3228 list as-path-set { 3229 key "as-path-set-name"; 3230 description 3231 "List of defined AS path sets"; 3233 leaf as-path-set-name { 3234 type string; 3235 description 3236 "name of the AS path set -- this is used to reference the 3237 set in match conditions"; 3238 } 3240 leaf-list as-path-set-member { 3241 // TODO: need to refine typedef for AS path expressions 3242 type string; 3243 description 3244 "AS path expression -- list of ASes in the set"; 3245 } 3246 } 3247 } 3248 } 3249 } 3251 grouping as-path-prepend-top { 3252 description 3253 "Top-level grouping for the AS path prepend action"; 3255 } 3257 grouping set-community-action-common { 3258 description 3259 "Common leaves for set-community and set-ext-community 3260 actions"; 3262 leaf method { 3263 type enumeration { 3264 enum INLINE { 3265 description 3266 "The extended communities are specified inline as a 3267 list"; 3268 } 3269 enum REFERENCE { 3270 description 3271 "The extended communities are specified by referencing a 3272 defined ext-community set"; 3273 } 3274 } 3275 description 3276 "Indicates the method used to specify the extended 3277 communities for the set-ext-community action"; 3278 } 3280 leaf options { 3281 type bgp-set-community-option-type; 3282 description 3283 "Options for modifying the community attribute with 3284 the specified values. These options apply to both 3285 methods of setting the community attribute."; 3286 } 3287 } 3289 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3290 "rpol:policy-definition/rpol:statements/rpol:statement/" + 3291 "rpol:conditions" { 3292 description 3293 "BGP policy conditions added to routing policy module"; 3295 container bgp-conditions { 3296 description 3297 "Top-level container for BGP specific policy conditions "; 3299 leaf med-eq { 3300 type uint32; 3301 description 3302 "Condition to check if the received MED value is equal to 3303 the specified value"; 3304 } 3306 leaf origin-eq { 3307 type bt:bgp-origin-attr-type; 3308 description 3309 "Condition to check if the route origin is equal to the 3310 specified value"; 3311 } 3313 leaf-list next-hop-in { 3314 type inet:ip-address-no-zone; 3315 description 3316 "List of next hop addresses to check for in the route 3317 update"; 3318 } 3320 leaf-list afi-safi-in { 3321 type identityref { 3322 base bt:afi-safi-type; 3323 } 3324 description 3325 "List of address families which the NLRI may be within"; 3326 } 3328 leaf local-pref-eq { 3329 type uint32; 3330 // TODO: add support for other comparisons if needed 3331 description 3332 "Condition to check if the local pref attribute is equal to 3333 the specified value"; 3334 } 3336 leaf route-type { 3337 // TODO: verify extent of vendor support for this comparison 3338 type enumeration { 3339 enum INTERNAL { 3340 description "route type is internal"; 3341 } 3342 enum EXTERNAL { 3343 description "route type is external"; 3344 } 3345 } 3346 description 3347 "Condition to check the route type in the route update"; 3348 } 3350 container community-count { 3351 description 3352 "Value and comparison operations for conditions based on the 3353 number of communities in the route update"; 3354 } 3356 container as-path-length { 3357 description 3358 "Value and comparison operations for conditions based on the 3359 length of the AS path in the route update"; 3360 } 3362 container match-community-set { 3363 description 3364 "Top-level container for match conditions on communities. 3365 Match a referenced community-set according to the logic 3366 defined in the match-set-options leaf"; 3368 leaf community-set { 3369 type leafref { 3370 path 3371 "/rpol:routing-policy/rpol:defined-sets/" + 3372 "bp:bgp-defined-sets/bp:community-sets/" + 3373 "bp:community-set/bp:community-set-name"; 3374 } 3375 description 3376 "References a defined community set"; 3377 } 3378 uses rpol:match-set-options-group; 3379 } 3381 container match-ext-community-set { 3382 description 3383 "Match a referenced extended community-set according to the 3384 logic defined in the match-set-options leaf"; 3386 leaf ext-community-set { 3387 type leafref { 3388 path 3389 "/rpol:routing-policy/rpol:defined-sets/" + 3390 "bp:bgp-defined-sets/bp:ext-community-sets/" + 3391 "bp:ext-community-set/" + 3392 "bp:ext-community-set-name"; 3393 } 3394 description "References a defined extended community set"; 3395 } 3397 uses rpol:match-set-options-group; 3398 } 3400 container match-as-path-set { 3401 description 3402 "Match a referenced as-path set according to the logic 3403 defined in the match-set-options leaf"; 3405 leaf as-path-set { 3406 type leafref { 3407 path "/rpol:routing-policy/rpol:defined-sets/" + 3408 "bp:bgp-defined-sets/bp:as-path-sets/" + 3409 "bp:as-path-set/bp:as-path-set-name"; 3410 } 3411 description 3412 "References a defined AS path set"; 3413 } 3414 uses rpol:match-set-options-group; 3415 } 3416 } 3417 } 3419 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3420 "rpol:policy-definition/rpol:statements/rpol:statement/" + 3421 "rpol:actions" { 3422 description 3423 "BGP policy actions added to routing policy module."; 3425 container bgp-actions { 3426 description 3427 "Top-level container for BGP-specific actions"; 3429 leaf set-route-origin { 3430 type bt:bgp-origin-attr-type; 3431 description 3432 "set the origin attribute to the specified value"; 3433 } 3435 leaf set-local-pref { 3436 type uint32; 3437 description 3438 "set the local pref attribute on the route update"; 3439 } 3441 leaf set-next-hop { 3442 type bgp-next-hop-type; 3443 description 3444 "set the next-hop attribute in the route update"; 3445 } 3447 leaf set-med { 3448 type bgp-set-med-type; 3449 description 3450 "set the med metric attribute in the route update"; 3451 } 3453 container set-as-path-prepend { 3454 description 3455 "action to prepend local AS number to the AS-path a 3456 specified number of times"; 3458 leaf repeat-n { 3459 type uint8 { 3460 range 1..max; 3461 } 3462 description 3463 "Number of times to prepend the local AS number to the AS 3464 path. The value should be between 1 and the maximum 3465 supported by the implementation."; 3466 } 3467 } 3469 container set-community { 3470 description 3471 "Action to set the community attributes of the route, along 3472 with options to modify how the community is modified. 3473 Communities may be set using an inline list OR 3474 reference to an existing defined set (not both)."; 3476 uses set-community-action-common; 3477 container inline { 3478 when "../config/method=INLINE" { 3479 description 3480 "Active only when the set-community method is INLINE"; 3481 } 3482 description 3483 "Set the community values for the action inline with 3484 a list."; 3486 leaf-list communities { 3487 type union { 3488 type bt:bgp-std-community-type; 3489 type bt:bgp-well-known-community-type; 3490 } 3491 description 3492 "Set the community values for the update inline with a 3493 list."; 3494 } 3495 } 3497 container reference { 3498 when "../config/method=REFERENCE" { 3499 description 3500 "Active only when the set-community method is REFERENCE"; 3501 } 3502 description 3503 "Provide a reference to a defined community set for the 3504 set-community action"; 3506 leaf community-set-ref { 3507 type leafref { 3508 path "/rpol:routing-policy/rpol:defined-sets/" + 3509 "bp:bgp-defined-sets/" + 3510 "bp:community-sets/bp:community-set/" + 3511 "bp:community-set-name"; 3512 } 3513 description 3514 "References a defined community set by name"; 3515 } 3516 } 3517 } 3519 container set-ext-community { 3520 description 3521 "Action to set the extended community attributes of the 3522 route, along with options to modify how the community is 3523 modified. Extended communities may be set using an inline 3524 list OR a reference to an existing defined set (but not 3525 both)."; 3527 uses set-community-action-common; 3528 container inline { 3529 when "../config/method=INLINE" { 3530 description 3531 "Active only when the set-community method is INLINE"; 3532 } 3533 description 3534 "Set the extended community values for the action inline 3535 with a list."; 3537 leaf-list communities { 3538 type union { 3539 type rt-types:route-target; 3540 type bt:bgp-well-known-community-type; 3541 } 3542 description 3543 "Set the extended community values for the update inline 3544 with a list."; 3545 } 3546 } 3548 container reference { 3549 when "../config/method=REFERENCE" { 3550 description 3551 "Active only when the set-community method is REFERENCE"; 3552 } 3553 description 3554 "Provide a reference to an extended community set for the 3555 set-ext-community action"; 3557 leaf ext-community-set-ref { 3558 type leafref { 3559 path 3560 "/rpol:routing-policy/rpol:defined-sets/" + 3561 "bp:bgp-defined-sets/bp:ext-community-sets/" + 3562 "bp:ext-community-set/" + 3563 "bp:ext-community-set-name"; 3564 } 3565 description 3566 "References a defined extended community set by name"; 3567 } 3568 } 3569 } 3571 } 3572 } 3574 // rpc statements 3576 // notification statements 3577 } 3578 3580 7.4. RIB modules 3582 file "ietf-bgp-rib@2019-03-21.yang" 3583 submodule ietf-bgp-rib { 3584 yang-version "1.1"; 3585 belongs-to ietf-bgp { 3586 prefix "br"; 3587 } 3589 /* 3590 * Import and Include 3591 */ 3592 import ietf-bgp-types { 3593 prefix "bt"; 3594 reference 3595 "RFC XXXX: BGP YANG Model for Service Provider Networks."; 3596 } 3598 include ietf-bgp-rib-types; 3599 include ietf-bgp-rib-tables; 3600 include ietf-bgp-rib-shared-attributes; 3602 // groupings of attributes in three categories: 3603 // - shared across multiple routes 3604 // - common to LOC-RIB and Adj-RIB, but not shared across routes 3605 // - specific to LOC-RIB or Adj-RIB 3606 include ietf-bgp-rib-attributes; 3608 // groupings of annotations for each route or table 3609 include ietf-bgp-rib-table-attributes; 3611 organization 3612 "IETF IDR Working Group"; 3614 contact 3615 "WG Web: 3616 WG List: 3618 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3619 Keyur Patel (keyur at arrcus.com), 3620 Susan Hares (shares at ndzh.com"; 3622 description 3623 "Defines a submodule for representing BGP routing table (RIB) 3624 contents. The submodule supports 5 logical RIBs per address 3625 family: 3627 loc-rib: This is the main BGP routing table for the local routing 3628 instance, containing best-path selections for each prefix. The 3629 loc-rib table may contain multiple routes for a given prefix, 3630 with an attribute to indicate which was selected as the best 3631 path. Note that multiple paths may be used or advertised even if 3632 only one path is marked as best, e.g., when using BGP 3633 add-paths. An implementation may choose to mark multiple 3634 paths in the RIB as best path by setting the flag to true for 3635 multiple entries. 3637 adj-rib-in-pre: This is a per-neighbor table containing the NLRI 3638 updates received from the neighbor before any local input policy 3639 rules or filters have been applied. This can be considered the 3640 'raw' updates from a given neighbor. 3642 adj-rib-in-post: This is a per-neighbor table containing the 3643 routes received from the neighbor that are eligible for 3644 best-path selection after local input policy rules have been 3645 applied. 3647 adj-rib-out-pre: This is a per-neighbor table containing routes 3648 eligible for sending (advertising) to the neighbor before output 3649 policy rules have been applied. 3651 adj-rib-out-post: This is a per-neighbor table containing routes 3652 eligible for sending (advertising) to the neighbor after output 3653 policy rules have been applied."; 3655 revision "2019-03-21" { 3656 description 3657 "Initial Version"; 3658 reference 3659 "RFC XXXX, BGP YANG Model for Service Provider Network."; 3660 } 3662 grouping rib { 3663 description 3664 "Grouping for rib."; 3666 container rib { 3667 config false; 3668 description 3669 "Top level container for BGP RIB"; 3671 uses attribute-sets; 3672 uses community-sets; 3673 uses ext-community-sets; 3675 container afi-safis { 3676 config false; 3677 description 3678 "Enclosing container for address family list"; 3680 list afi-safi { 3681 key "afi-safi-name"; 3682 description 3683 "List of afi-safi types."; 3685 leaf afi-safi-name { 3686 type identityref { 3687 base bt:afi-safi-type; 3688 } 3689 description "AFI,SAFI name."; 3690 } 3692 container ipv4-unicast { 3693 when "../afi-safi-name = 'bt:ipv4-unicast'" { 3694 description 3695 "Include this container for IPv4 unicast RIB"; 3696 } 3697 description 3698 "Routing tables for IPv4 unicast -- active when the 3699 afi-safi name is ipv4-unicast"; 3701 uses ipv4-loc-rib; 3702 uses ipv4-adj-rib; 3703 } 3705 container ipv6-unicast { 3706 when "../afi-safi-name = 'bt:ipv6-unicast'" { 3707 description 3708 "Include this container for IPv6 unicast RIB"; 3709 } 3710 description 3711 "Routing tables for IPv6 unicast -- active when the 3712 afi-safi name is ipv6-unicast"; 3714 uses ipv6-loc-rib; 3715 uses ipv6-adj-rib; 3716 } 3718 container ipv4-srte-policy { 3719 when "../afi-safi-name = 'srte-policy-ipv4'" { 3720 description 3721 "Include this container only for the IPv4 AFI, SR-TE 3722 Policy SAFI."; 3723 } 3724 description 3725 "Routing tables for the IPv4 Unicast, SR-TE Policy 3726 SAFI."; 3728 uses ipvX-srte-policy-locrib; 3729 uses ipvX-srte-policy-adjrib; 3730 } 3732 container ipv6-srte-policy { 3733 when "../afi-safi-name = 'srte-policy-ipv6'" { 3734 description 3735 "Include this container only for the IPv6 AFI, 3736 SR-TE Policy SAFI."; 3737 } 3738 description 3739 "Routing tables for the IPv6 Unicast, SR-TE Policy 3740 SAFI."; 3742 uses ipvX-srte-policy-locrib; 3743 uses ipvX-srte-policy-adjrib; 3744 } 3745 } 3746 } 3747 } 3748 } 3749 } 3750 3752 file "ietf-bgp-rib-ext@2019-03-21.yang" 3753 submodule ietf-bgp-rib-ext { 3754 yang-version "1.1"; 3755 belongs-to ietf-bgp { 3756 prefix "bre"; 3757 } 3759 include ietf-bgp-rib-types; 3761 organization 3762 "IETF IDR Working Group"; 3764 contact 3765 "WG Web: 3766 WG List: 3768 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3769 Keyur Patel (keyur at arrcus.com), 3770 Susan Hares (shares at ndzh.com"; 3772 description 3773 "Defines additional data nodes for the OpenConfig BGP RIB model. 3774 These items reflect extensions that are desirable features but 3775 are not currently supported in a majority of BGP 3776 implementations."; 3778 revision "2019-03-21" { 3779 description 3780 "Initial Revision."; 3781 reference 3782 "RFC XXXX: BGP YANG Model for Service Providers."; 3783 } 3785 grouping rib-ext-route-annotations { 3786 description 3787 "Extended annotations for routes in the routing tables"; 3789 leaf reject-reason { 3790 type union { 3791 type identityref { 3792 base bgp-not-selected-bestpath; 3793 } 3794 type identityref { 3795 base bgp-not-selected-policy; 3796 } 3797 } 3798 description 3799 "Indicates the reason the route is not used, either due to 3800 policy filtering or bestpath selection"; 3801 } 3802 } 3803 } 3804 3806 file "ietf-bgp-rib-types@2019-03-21.yang" 3807 submodule ietf-bgp-rib-types { 3808 yang-version "1.1"; 3809 belongs-to ietf-bgp { 3810 prefix "br"; 3811 } 3813 organization 3814 "IETF IDR Working Group"; 3816 contact 3817 "WG Web: 3818 WG List: 3820 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3821 Keyur Patel (keyur at arrcus.com), 3822 Susan Hares (shares at ndzh.com"; 3824 description 3825 "Defines identity and type definitions associated with 3826 the BGP RIB modules"; 3828 revision "2019-03-21" { 3829 description 3830 "Initial Version"; 3831 reference 3832 "RFC XXXX, BGP Model for Service Provider Network."; 3833 } 3835 identity invalid-route-reason { 3836 description 3837 "Base identity for reason code for routes that are rejected as 3838 invalid. Some derived entities are based on BMP v3"; 3839 reference 3840 "BGP Monitoring Protocol (draft-ietf-grow-bmp-07)"; 3841 } 3843 identity invalid-cluster-loop { 3844 base invalid-route-reason; 3845 description 3846 "Route was invalid due to CLUSTER_LIST loop"; 3847 } 3849 identity invalid-as-loop { 3850 base invalid-route-reason; 3851 description 3852 "Route was invalid due to AS_PATH loop"; 3853 } 3855 identity invalid-originator { 3856 base invalid-route-reason; 3857 description 3858 "Route was invalid due to ORIGINATOR_ID, e.g., update has 3859 local router as originator"; 3860 } 3862 identity invalid-confed { 3863 base invalid-route-reason; 3864 description 3865 "Route was invalid due to a loop in the AS_CONFED_SEQUENCE or 3866 AS_CONFED_SET attributes"; 3867 } 3869 identity bgp-not-selected-bestpath { 3870 description 3871 "Base identity for indicating reason a route was was not 3872 selected by BGP route selection algorithm"; 3873 reference 3874 "RFC 4271 - Section 9.1"; 3875 } 3877 identity local-pref-lower { 3878 base bgp-not-selected-bestpath; 3879 description 3880 "Route has a lower localpref attribute than current best path"; 3881 reference 3882 "RFC 4271 - Section 9.1.2"; 3883 } 3885 identity as-path-longer { 3886 base bgp-not-selected-bestpath; 3887 description 3888 "Route has a longer AS path attribute than current best path"; 3889 reference 3890 "RFC 4271 - Section 9.1.2.2 (a)"; 3891 } 3893 identity origin-type-higher { 3894 base bgp-not-selected-bestpath; 3895 description 3896 "Route has a higher origin type, i.e., IGP origin is preferred 3897 over EGP or incomplete"; 3898 reference 3899 "RFC 4271 - Section 9.1.2.2 (b)"; 3900 } 3902 identity med-higher { 3903 base bgp-not-selected-bestpath; 3904 description 3905 "Route has a higher MED, or metric, attribute than the current 3906 best path"; 3907 reference 3908 "RFC 4271 - Section 9.1.2.2 (c)"; 3909 } 3911 identity prefer-external { 3912 base bgp-not-selected-bestpath; 3913 description 3914 "Route source is via IGP, rather than EGP."; 3915 reference 3916 "RFC 4271 - Section 9.1.2.2 (d)"; 3917 } 3919 identity nexthop-cost-higher { 3920 base bgp-not-selected-bestpath; 3921 description 3922 "Route has a higher interior cost to the next hop."; 3923 reference 3924 "RFC 4271 - Section 9.1.2.2 (e)"; 3925 } 3927 identity higher-router-id { 3928 base bgp-not-selected-bestpath; 3929 description 3930 "Route was sent by a peer with a higher BGP Identifier value, 3931 or router id"; 3932 reference 3933 "RFC 4271 - Section 9.1.2.2 (f)"; 3934 } 3936 identity higher-peer-address { 3937 base bgp-not-selected-bestpath; 3938 description 3939 "Route was sent by a peer with a higher IP address"; 3940 reference 3941 "RFC 4271 - Section 9.1.2.2 (g)"; 3942 } 3944 identity bgp-not-selected-policy { 3945 description 3946 "Base identity for reason code for routes that are rejected 3947 due to policy"; 3948 } 3950 identity rejected-import-policy { 3951 base bgp-not-selected-policy; 3952 description 3953 "Route was rejected after apply import policies"; 3954 } 3956 identity tunnel-encapsulation-type { 3957 description 3958 "Types of tunnel encapsulation, as described by the Tunnel 3959 Encapsulation attribute"; 3960 reference 3961 "RFC5512"; 3962 } 3964 identity srte-policy { 3965 description 3966 "Segment Routing Traffic Engineering Policy."; 3967 reference 3968 "TODO: Insert reference here."; 3969 } 3971 identity srte-policy-ipv4 { 3972 base srte-policy; 3973 description 3974 "Segment Routing Traffice Engineering Policy for IPv4."; 3975 reference 3976 "TODO: Insert reference here."; 3977 } 3979 identity srte-policy-ipv6 { 3980 base srte-policy; 3981 description 3982 "Segment Routing Traffic Engineering Policy for IPv6."; 3983 reference 3984 "TODO: Insert reference here."; 3985 } 3987 identity srte-policy-tunnel { 3988 base tunnel-encapsulation-type; 3989 description 3990 "Segment Routing Traffic Engineering Policy tunnel."; 3991 reference 3992 "draft-previdi-idr-segment-routing-te-policy"; 3993 } 3995 identity tunnel-encapsulation-subtlv-type { 3996 description 3997 "SubTLVs of the Tunnel Encapsulation attribute"; 3998 reference 3999 "RFC5512"; 4000 } 4001 identity tunnel-remote-endpoint { 4002 base tunnel-encapsulation-subtlv-type; 4003 description 4004 "Remote endpoint of the tunnel."; 4005 reference 4006 "RFC5512"; 4007 } 4009 identity tunnel-color { 4010 base tunnel-encapsulation-subtlv-type; 4011 description 4012 "Colour of the tunnel"; 4013 reference 4014 "RFC5512"; 4015 } 4017 identity srte-preference { 4018 base tunnel-encapsulation-subtlv-type; 4019 description 4020 "Preference of the SR-TE policy entry described by 4021 the tunnel encapsulation attribute."; 4022 reference 4023 "draft-previdi-idr-segment-routing-te-policy"; 4024 } 4026 identity srte-binding-sid { 4027 base tunnel-encapsulation-subtlv-type; 4028 description 4029 "Binding SID to be used by the SR-TE policy described 4030 by the tunnel encapsulation attribute."; 4031 reference 4032 "draft-previdi-idr-segment-routing-te-policy"; 4033 } 4035 identity srte-segment-list { 4036 base tunnel-encapsulation-subtlv-type; 4037 description 4038 "Segment lists to be used by the SR-TE policy described 4039 by the tunnel encapsulation attribute."; 4040 reference 4041 "draft-previdi-idr-segment-routing-te-policy"; 4042 } 4044 identity srte-segment-list-subtlv { 4045 description 4046 "SubTLVs of the SR-TE Policy Segment List sub-TLV of the 4047 Tunnel Encapsulation attribute."; 4048 reference 4049 "draft-previdi-idr-segment-routing-te-policy"; 4050 } 4052 identity srte-segment-list-weight { 4053 base srte-segment-list-subtlv; 4054 description 4055 "Weight of the segment list within the SR-TE policy"; 4056 reference 4057 "draft-previdi-idr-segment-routing-te-policy"; 4058 } 4060 identity srte-segment-list-segment { 4061 base srte-segment-list-subtlv; 4062 description 4063 "An individual element within the SR-TE Policy Segment 4064 List."; 4065 } 4066 } 4067 4069 file "ietf-bgp-rib-attributes@2019-03-21.yang" 4070 submodule ietf-bgp-rib-attributes { 4071 yang-version "1.1"; 4072 belongs-to ietf-bgp { 4073 prefix "br"; 4074 } 4076 // import some basic types 4077 import ietf-bgp-types { 4078 prefix bgpt; 4079 } 4081 import ietf-inet-types { 4082 prefix inet; 4083 } 4085 include ietf-bgp-rib-types; 4087 // meta 4088 organization 4089 "IETF IDR Working Group"; 4091 contact 4092 "WG Web: 4093 WG List: 4095 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4096 Keyur Patel (keyur at arrcus.com), 4097 Susan Hares (shares at ndzh.com"; 4099 description 4100 "This submodule contains common data definitions for BGP 4101 attributes for use in BGP RIB tables."; 4103 revision "2019-03-21" { 4104 description 4105 "Initial version"; 4106 reference 4107 "RFC XXXX: BGP YANG Model for Service Provider Network"; 4108 } 4110 grouping bgp-as-path-attr { 4111 description 4112 "Data for representing BGP AS-PATH attribute"; 4114 leaf type { 4115 type identityref { 4116 base bgpt:as-path-segment-type; 4117 } 4118 description 4119 "The type of AS-PATH segment"; 4120 } 4122 leaf-list member { 4123 type inet:as-number; 4124 description 4125 "List of the AS numbers in the AS-PATH segment"; 4126 } 4127 } 4129 grouping bgp-as-path-attr-top { 4130 description 4131 "Top-level grouping for AS-PATH attribute data"; 4133 container as-path { 4134 description 4135 "Enclosing container for the list of AS path segments. 4137 In the Adj-RIB-In or Adj-RIB-Out, this list should show 4138 the received or sent AS_PATH, respectively. For 4139 example, if the local router is not 4-byte capable, this 4140 value should consist of 2-octet ASNs or the AS_TRANS 4141 (AS 23456) values received or sent in route updates. 4143 In the Loc-RIB, this list should reflect the effective 4144 AS path for the route, e.g., a 4-octet value if the 4145 local router is 4-octet capable."; 4146 reference 4147 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4) 4148 RFC 6793 - BGP Support for Four-octet AS Number Space 4149 RFC 5065 - Autonomous System Confederations for BGP"; 4151 list segment { 4152 key "type"; 4154 config false; 4155 uses bgp-as-path-attr; 4156 description 4157 "List of AS PATH segments"; 4158 } 4159 } 4160 } 4162 grouping bgp-as4-path-attr-top { 4163 description 4164 "Top-level grouping for AS4-PATH attribute data"; 4166 container as4-path { 4167 description 4168 "This is the path encoded with 4-octet 4169 AS numbers in the optional transitive AS4_PATH attribute. 4170 This value is populated with the received or sent attribute 4171 in Adj-RIB-In or Adj-RIB-Out, respectively. It should not 4172 be populated in Loc-RIB since the Loc-RIB is expected to 4173 store the effective AS-Path in the as-path leaf regardless 4174 of being 4-octet or 2-octet."; 4175 reference 4176 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4178 list segment { 4179 key "type"; 4181 config false; 4182 uses bgp-as-path-attr; 4183 description 4184 "List of AS PATH segments"; 4185 } 4186 } 4187 } 4189 grouping bgp-community-attr-state { 4190 description 4191 "Common definition of BGP community attributes"; 4193 leaf-list community { 4194 type union { 4195 type bgpt:bgp-well-known-community-type; 4196 type bgpt:bgp-std-community-type; 4197 } 4198 description 4199 "List of standard or well-known BGP community 4200 attributes."; 4201 } 4202 } 4204 grouping bgp-extended-community-attr-state { 4205 description 4206 "Common definition of BGP extended community attribute"; 4208 leaf-list ext-community { 4209 // type bgpt:bgp-ext-community-recv-type; 4210 type bgpt:bgp-ext-community-type; 4211 description 4212 "List of BGP extended community attributes. The received 4213 extended community may be an explicitly modeled 4214 type or unknown, represented by an 8-octet value 4215 formatted according to RFC 4360."; 4216 reference 4217 "RFC 4360 - BGP Extended Communities Attribute"; 4218 } 4220 } 4222 grouping bgp-aggregator-attr-top { 4223 description 4224 "Common definition of the BGP aggregator attribute"; 4226 container aggregator { 4227 config false; 4228 description 4229 "BGP attribute indicating the prefix has been aggregated by 4230 the specified AS and router."; 4232 leaf as { 4233 type inet:as-number; 4234 description 4235 "AS number of the autonomous system that performed the 4236 aggregation."; 4237 } 4238 leaf as4 { 4239 type inet:as-number; 4240 description 4241 "AS number of the autonomous system that performed the 4242 aggregation (4-octet representation). This value is 4243 populated if an upstream router is not 4-octet capable. 4244 Its semantics are similar to the AS4_PATH optional 4245 transitive attribute"; 4246 reference 4247 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4248 } 4250 leaf address { 4251 type inet:ipv4-address; 4252 description 4253 "IP address of the router that performed the 4254 aggregation."; 4255 } 4256 } 4257 } 4259 grouping bgp-shared-common-attr-state { 4260 description 4261 "Route attributes shared across route table entries, 4262 common to both LOC-Rib and Adj-RIB"; 4264 leaf origin { 4265 type bgpt:bgp-origin-attr-type; 4266 description 4267 "BGP attribute defining the origin of the path information."; 4268 } 4270 leaf atomic-aggregate { 4271 type boolean; 4272 description 4273 "BGP attribute indicating that the prefix is an atomic 4274 aggregate, i.e., the peer selected a less specific 4275 route without selecting a more specific route that is 4276 included in it."; 4277 } 4279 leaf next-hop { 4280 type inet:ip-address; 4281 description 4282 "BGP next hop attribute defining the IP address of the router 4283 that should be used as the next hop to the destination"; 4284 } 4285 leaf med { 4286 type uint32; 4287 description 4288 "BGP multi-exit discriminator attribute used in BGP route 4289 selection process"; 4290 } 4292 leaf local-pref { 4293 type uint32; 4294 description 4295 "BGP local preference attribute sent to internal peers to 4296 indicate the degree of preference for externally learned 4297 routes. The route with the highest local preference value 4298 is preferred."; 4299 } 4301 leaf originator-id { 4302 type inet:ipv4-address; 4303 description 4304 "BGP attribute that provides the id as an IPv4 address 4305 of the originator of the announcement."; 4306 reference 4307 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4308 Mesh Internal BGP (IBGP)"; 4309 } 4311 leaf-list cluster-list { 4312 type inet:ipv4-address; 4313 description 4314 "Represents the reflection path that the route has passed."; 4315 reference 4316 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4317 Mesh Internal BGP (IBGP)"; 4318 } 4320 leaf aigp { 4321 type uint64; 4322 description 4323 "BGP path attribute representing the accumulated IGP metric 4324 for the path"; 4325 reference 4326 "RFC 7311 - The Accumulated IGP Metric Attribute for BGP"; 4327 } 4328 } 4330 grouping bgp-unknown-attr-flags-state { 4331 description 4332 "Operational state data for path attribute flags"; 4334 leaf optional { 4335 type boolean; 4336 description 4337 "Defines whether the attribute is optional (if 4338 set to true) or well-known (if set to false). 4339 Set in the high-order bit of the BGP attribute 4340 flags octet."; 4341 reference 4342 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4343 } 4345 leaf transitive { 4346 type boolean; 4347 description 4348 "Defines whether an optional attribute is transitive 4349 (if set to true) or non-transitive (if set to false). For 4350 well-known attributes, the transitive flag must be set to 4351 true. Set in the second high-order bit of the BGP attribute 4352 flags octet."; 4353 reference 4354 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4355 } 4357 leaf partial { 4358 type boolean; 4359 description 4360 "Defines whether the information contained in the optional 4361 transitive attribute is partial (if set to true) or complete 4362 (if set to false). For well-known attributes and for 4363 optional non-transitive attributes, the partial flag 4364 must be set to false. Set in the third high-order bit of 4365 the BGP attribute flags octet."; 4366 reference 4367 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4368 } 4370 leaf extended { 4371 type boolean; 4372 description 4373 "Defines whether the attribute length is one octet 4374 (if set to false) or two octets (if set to true). Set in 4375 the fourth high-order bit of the BGP attribute flags 4376 octet."; 4377 reference 4378 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4379 } 4380 } 4381 grouping bgp-unknown-attr-state { 4382 description 4383 "Operational state data for path attributes not shared 4384 across route entries, common to LOC-RIB and Adj-RIB"; 4386 leaf attr-type { 4387 type uint8; 4388 description 4389 "1-octet value encoding the attribute type code"; 4390 reference 4391 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4392 } 4394 leaf attr-len { 4395 type uint16; 4396 description 4397 "One or two octet attribute length field indicating the 4398 length of the attribute data in octets. If the Extended 4399 Length attribute flag is set, the length field is 2 octets, 4400 otherwise it is 1 octet"; 4401 reference 4402 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4403 } 4405 leaf attr-value { 4406 type binary { 4407 length 1..65535; 4408 } 4409 description 4410 "Raw attribute value, not including the attribute 4411 flags, type, or length. The maximum length 4412 of the attribute value data is 2^16-1 per the max value 4413 of the attr-len field (2 octets)."; 4414 reference 4415 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4416 } 4417 } 4419 grouping bgp-unknown-attr-top { 4420 description 4421 "Unknown path attributes that are not expected to be shared 4422 across route entries, common to LOC-RIB and Adj-RIB"; 4424 container unknown-attributes { 4425 description 4426 "Unknown path attributes that were received in the UPDATE 4427 message which contained the prefix."; 4429 list unknown-attribute { 4430 key "attr-type"; 4431 description 4432 "This list contains received attributes that are unrecognized 4433 or unsupported by the local router. The list may be empty."; 4435 uses bgp-unknown-attr-flags-state; 4436 uses bgp-unknown-attr-state; 4437 } 4438 } 4439 } 4441 grouping bgp-loc-rib-attr-state { 4442 description 4443 "Path attributes that are not expected to be shared across 4444 route entries, specific to LOC-RIB"; 4446 } 4448 grouping bgp-adj-rib-attr-state { 4449 description 4450 "Path attributes that are not expected to be shared across 4451 route entries, specific to Adj-RIB"; 4453 leaf path-id { 4454 type uint32; 4455 description 4456 "When the BGP speaker supports advertisement of multiple 4457 paths for a prefix, the path identifier is used to 4458 uniquely identify a route based on the combination of the 4459 prefix and path id. In the Adj-RIB-In, the path-id value is 4460 the value received in the update message. In the Loc-RIB, 4461 if used, it should represent a locally generated path-id 4462 value for the corresponding route. In Adj-RIB-Out, it 4463 should be the value sent to a neighbor when add-paths is 4464 used, i.e., the capability has been negotiated."; 4465 reference 4466 "draft-ietf-idr-add-paths - Advertisement of Multiple Paths 4467 in BGP"; 4468 } 4469 } 4471 grouping bgp-tunnel-encapsulation-attr-top { 4472 description 4473 "Top-level definition of the BGP Tunnel encapsulation 4474 attribute."; 4476 container tunnel-encapsulation { 4477 config false; 4478 description 4479 "The Tunnel Encapsulation attribute specifies a set of 4480 tunnels to a remote destination. The attribute is TLV 4481 based and allows description of a tunnel type, and the 4482 relevant information to create the tunnel to the remote 4483 destination."; 4485 reference "RFC5512, draft-ietf-idr-tunnel-encaps"; 4487 container tunnels { 4488 description 4489 "Surrounding container for the set of tunnels included 4490 within the tunnel encapsulation attribute."; 4492 list tunnel { 4493 key "type"; 4494 description 4495 "List of the tunnels that are specified within the 4496 attribute. Keyed on the type of tunnel that the 4497 TLV describes."; 4499 leaf type { 4500 type identityref { 4501 base "tunnel-encapsulation-type"; 4502 } 4503 description 4504 "Type of the tunnel described within the tunnel 4505 encapsulation attribute."; 4506 } 4508 container subtlvs { 4509 description 4510 "Surrounding container for the list of sub-TLVs within 4511 the tunnel encapsulation attribute."; 4513 list subtlv { 4514 key "type"; 4515 description 4516 "List of the subTLVs that are specified within the 4517 TLV instance inside the tunnel encapsulation 4518 attribute."; 4520 leaf type { 4521 type identityref { 4522 base "tunnel-encapsulation-subtlv-type"; 4523 } 4524 description 4525 "Type of the sub-TLV within the tunnel encapsulation 4526 attribute"; 4527 } 4529 leaf-list colors { 4530 when "../type = 'tunnel-color'" { 4531 description 4532 "Only allow list of colors to be specified when 4533 the sub-TLV specifies colors associated with the 4534 tunnel encapsulation attribute."; 4535 } 4536 type uint32; 4537 description 4538 "The colors associated with the tunnel encapsulation 4539 attribute, as described by RFC5512."; 4540 } 4542 leaf preference { 4543 when "../type = 'srte-preference'" { 4544 description 4545 "Only allow the preference to be specified when the 4546 sub-TLV specifies the preference associated with 4547 the tunnel encapsulation attribute."; 4548 } 4549 type uint32; 4550 default 100; 4551 description 4552 "The preference of the SR-TE policy described by the 4553 tunnel encapsulation attribute. If unspecified, the 4554 preference defaults to 100."; 4555 } 4557 leaf binding-sid { 4558 when "../type = 'srte-binding-sid'" { 4559 description 4560 "Only allow the binding SID to be specified when the 4561 sub-TLV is specified to be the of the relevant 4562 type."; 4563 } 4564 // type sr:sr-sid-type; 4565 // defining it as string, till we figure what this 4566 // should be. 4567 type string; 4568 description 4569 "Binding SID associated with the SR-TE policy"; 4570 } 4572 container remote-endpoints { 4573 when "../type = 'tunnel-remote-endpoint'" { 4574 description 4575 "Only allow the remote endpoint to be specified 4576 when the subTLV is specified to describe remote 4577 endpoints."; 4578 } 4580 description 4581 "The remote endpoints associated with the tunnel 4582 described by the attribute."; 4584 list remote-endpoint { 4585 key "endpoint"; 4586 config false; 4587 description 4588 "List of the remote endpoints described within 4589 the TLV."; 4591 leaf as { 4592 type inet:as-number; 4593 description 4594 "The remote AS to which the IP address of the 4595 remote endpoint belongs."; 4596 } 4598 leaf endpoint { 4599 type inet:ip-address; 4600 description 4601 "IP address of the remote endpoint."; 4602 } 4603 } 4604 } 4606 container segment-lists { 4607 when "../type = 'srte-segment-list'" { 4608 description 4609 "Only allow the segment lists to be specified when 4610 the sub-TLV is of the relevant type."; 4611 } 4613 description 4614 "Surrounding container for the list of segment lists 4615 that are associated with a SR-TE Policy tunnel."; 4617 list segment-list { 4618 key "instance-id"; 4619 config false; 4620 description 4621 "List of segment lists that are specified within the 4622 tunnel encapsulation attribute."; 4624 leaf instance-id { 4625 type uint64; 4626 description 4627 "Instance of the segment list within the 4628 sub-TLV"; 4629 } 4631 leaf weight { 4632 type uint32; 4633 description 4634 "The weight given to the path within the set of 4635 segment lists that are included in the tunnel 4636 attribute sub-TLV."; 4637 } 4639 container segments { 4640 description 4641 "Surrounding container for the list of segments 4642 within the SR-TE segment list."; 4644 list segment { 4645 key "index"; 4647 config false; 4648 description 4649 "List of segments within the SR-TE segment 4650 list."; 4652 leaf index { 4653 type uint64; 4654 description 4655 "Index of the segment within the segment 4656 list. The segments are ordered in ascending 4657 order, beginning at 0."; 4658 } 4660 leaf type { 4661 type enumeration { 4662 enum MPLS_SID { 4663 value 1; 4664 description 4665 "The segment is specified as an MPLS 4666 label."; 4667 } 4668 enum IPV6_SID { 4669 value 2; 4670 description 4671 "The segment is specified as an IPv6 4672 address."; 4673 } 4674 enum IPV4_NODE_ADDRESS { 4675 value 3; 4676 description 4677 "The segment is specified as an IPv4 4678 node address with optional SID."; 4679 } 4680 enum IPV6_NODE_ADDRESS { 4681 value 4; 4682 description 4683 "The segment is specified as an IPv6 4684 node address with optional SID."; 4685 } 4686 enum IPV4_LOCAL_INTF_ID { 4687 value 5; 4688 description 4689 "The segment is specified as an IPv4 4690 address with a local interface 4691 identifier along with an ."; 4692 } 4693 enum IPV4_LOCAL_REMOTE_ADDR { 4694 value 6; 4695 description 4696 "The segment is specified as an IPv4 4697 local and remote address with an 4698 optional SID."; 4699 } 4700 enum IPV6_LOCAL_INTF_ID { 4701 value 7; 4702 description 4703 "The segment is specified as an IPv6 4704 address with an index, along with an 4705 optional SID."; 4706 } 4707 enum IPV6_LOCAL_REMOTE_ADDR { 4708 value 8; 4709 description 4710 "The segmetn is specified as an IPv6 4711 local and remote address with an 4712 optional SID."; 4713 } 4714 } 4715 description 4716 "The type of segment specified within the 4717 segment entry."; 4718 } 4720 leaf sid { 4721 // TODO: type sr:sr-sid-type; 4722 // using string till this is resolved. 4723 type string; 4724 description 4725 "SID value for the segment entry, specified 4726 as an MPLS label or IPv6 address."; 4727 } 4729 leaf mpls-tc { 4730 when "../type = 'MPLS_SID'" { 4731 description 4732 "The MPLS TC bits can only be specified 4733 when the segment time is an MPLS label."; 4734 } 4735 type uint8 { 4736 range "0..7"; 4737 } 4738 description 4739 "The MPLS TC bits used when the SID is 4740 specified as an MPLS label. If set to zero, 4741 the receiving system specifies the value of 4742 the TC bits."; 4743 } 4745 leaf mpls-bos { 4746 when "../type = 'MPLS_SID'" { 4747 description 4748 "The MPLS BoS bit can only be specified 4749 when the segment type is an MPLS label."; 4750 } 4751 type boolean; 4752 description 4753 "When this leaf is set to true the MPLS 4754 bottom-of-stack (BoS) bit is set in the 4755 MPLS segment. The BoS bit should always be 4756 set to zero by the sender."; 4757 } 4759 leaf mpls-ttl { 4760 when "../type = 'MPLS_SID'" { 4761 description 4762 "The MPLS TTL can only be set when the 4763 segment type is an MPLS label."; 4765 } 4766 type uint8; 4767 description 4768 "The MPLS time to live (TTL) to be set for 4769 the MPLS segment. If set to 255, the 4770 receiver specifies the TTL value that is 4771 used for packets sent with this segment in 4772 the stack."; 4773 } 4775 leaf remote-ipv4-address { 4776 when "../type = 'IPV4_NODE_ADDRESS' or" + 4777 // "../type='../IPV4_ADDRESS_INDEX' or" + 4778 "../type='IPV4_LOCAL_INTF_ID' or " + 4779 "../type='IPV4_LOCAL_REMOTE_ADDR'" { 4780 description 4781 "An IPv4 address can only be associated 4782 with the segment entry when the type of 4783 the SID is a node address, or an IPv6 4784 address with an index."; 4785 } 4786 type inet:ipv4-address; 4787 description 4788 "An IPv4 address specified as the remote 4789 node address. When the type of the segment 4790 specifies only the remote address, no other 4791 addresses are specified. When the type of 4792 the segment requires a local address, 4793 this leaf specifies the remote IPv4 4794 address."; 4795 } 4797 leaf local-ipv4-address { 4798 when "../type = 'IPV4_LOCAL_REMOTE_ADDR'" { 4799 description 4800 "A local IPv4 address can only be specified 4801 when the segment is specified by the 4802 local and remote IPv4 interface 4803 addresses."; 4804 } 4805 type inet:ipv4-address; 4806 description 4807 "An IPv4 address of a local adjacency that is 4808 used to identify the segment."; 4809 } 4811 leaf remote-ipv6-address { 4812 when "../type = 'IPV6_NODE_ADDRESS' or" + 4813 // "../type='IPV6_ADDRESS_INDEX' or" + 4814 "../type='IPV6_LOCAL_INTF_ID' or " + 4815 "../type='IPV6_LOCAL_REMOTE_ADDR'" { 4816 description 4817 "An IPv6 address can only be specified with 4818 a segment entry when the type of the SID 4819 is a node address, or an IPv6 address 4820 with an index."; 4821 } 4822 type inet:ipv6-address; 4823 description 4824 "An IPv6 address specified as the remote node 4825 address. When the type of the segment 4826 specifies only the remote address, no other 4827 addresses are specified. When the type of 4828 the segment requires a local address, 4829 this leaf specifies the remote IPv6 4830 address."; 4831 } 4833 leaf local-ipv6-address { 4834 when "../type = 'IPV6_LOCAL_REMOTE_ADDR'" { 4835 description 4836 "A local IPv6 address can only be 4837 specified when the segment is specified 4838 by the local and remote IPv6 interface 4839 addresses."; 4840 } 4841 type inet:ipv6-address; 4842 description 4843 "An IPv6 address of a local adjacency that is 4844 used to identify the segment."; 4845 } 4847 leaf local-interface-id { 4848 when "../type = 'IPV4_LOCAL_INTF_ID' or" + 4849 "../type='IPV6_LOCAL_INTF_ID'" { 4850 description 4851 "A local interface identifier can only be 4852 specified when the type of the segment 4853 is an IPv4 address with local interface 4854 ID, or IPv6 address with local interface 4855 ID."; 4856 } 4857 type uint32; 4858 description 4859 "The local interface identifier to be 4860 utilised for the segment."; 4862 reference 4863 "draft-ietf-pce-segment-routing"; 4864 } 4865 } 4866 } 4867 } 4868 } 4869 } 4870 } 4871 } 4872 } 4873 } 4874 } 4875 } 4876 4878 file "ietf-bgp-rib-shared-attributes@2019-03-21.yang" 4879 submodule ietf-bgp-rib-shared-attributes { 4880 yang-version "1.1"; 4881 belongs-to ietf-bgp { 4882 prefix "br"; 4883 } 4885 // import some basic types 4886 include ietf-bgp-rib-attributes; 4888 organization 4889 "IETF IDR Working Group"; 4891 contact 4892 "WG Web: 4893 WG List: 4895 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4896 Keyur Patel (keyur at arrcus.com), 4897 Susan Hares (shares at ndzh.com"; 4899 description 4900 "This submodule contains structural data definitions for 4901 attribute sets shared across routes."; 4903 revision "2019-03-21" { 4904 description 4905 "Initial version"; 4906 reference 4907 "RFC XXXX: BGP YANG Model for Service Provider Network."; 4908 } 4909 grouping attribute-sets { 4910 description 4911 "Top level grouping for list of common attribute sets"; 4913 container attr-sets { 4914 description 4915 "Enclosing container for the list of path attribute sets"; 4917 list attr-set { 4918 key "index"; 4920 description 4921 "List of path attributes that may be in use by multiple 4922 routes in the table"; 4924 leaf index { 4925 type uint64; 4926 description 4927 "System generated index for each attribute set. The 4928 index is used to reference an attribute set from a 4929 specific path. Multiple paths may reference the same 4930 attribute set."; 4931 } 4933 uses bgp-shared-common-attr-state; 4934 uses bgp-aggregator-attr-top; 4935 uses bgp-as-path-attr-top; 4936 uses bgp-as4-path-attr-top; 4937 uses bgp-tunnel-encapsulation-attr-top; 4938 } 4939 } 4940 } 4942 grouping community-sets { 4943 description 4944 "Top level grouping for list of shared community attribute 4945 sets"; 4947 container communities { 4948 description 4949 "Enclosing container for the list of community attribute 4950 sets"; 4952 list community { 4953 key "index"; 4955 config false; 4956 description 4957 "List of path attributes that may be in use by multiple 4958 routes in the table"; 4960 leaf index { 4961 type uint64; 4962 description 4963 "System generated index for each attribute set. The 4964 index is used to reference an attribute set from a 4965 specific path. Multiple paths may reference the same 4966 attribute set."; 4967 } 4969 uses bgp-community-attr-state; 4970 } 4971 } 4972 } 4974 grouping ext-community-sets { 4975 description 4976 "Top level grouping for list of extended community attribute 4977 sets"; 4979 container ext-communities { 4980 description 4981 "Enclosing container for the list of extended community 4982 attribute sets"; 4984 list ext-community { 4985 key "index"; 4987 config false; 4988 description 4989 "List of path attributes that may be in use by multiple 4990 routes in the table"; 4992 leaf index { 4993 type uint64; 4994 description 4995 "System generated index for each attribute set. The 4996 index is used to reference an attribute set from a 4997 specific path. Multiple paths may reference the same 4998 attribute set."; 4999 } 5001 uses bgp-extended-community-attr-state; 5002 } 5003 } 5004 } 5006 } 5007 5009 file "ietf-bgp-rib-table-attributes@2019-03-21.yang" 5010 submodule ietf-bgp-rib-table-attributes { 5011 yang-version "1.1"; 5012 belongs-to ietf-bgp { 5013 prefix "br"; 5014 } 5016 // import some basic types 5017 import ietf-yang-types { 5018 prefix types; 5019 reference 5020 "RFC 6991, Common YANG Data Types."; 5021 } 5023 include ietf-bgp-rib-types; 5025 organization 5026 "IETF IDR Working Group"; 5028 contact 5029 "WG Web: 5030 WG List: 5032 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 5033 Keyur Patel (keyur at arrcus.com), 5034 Susan Hares (shares at ndzh.com"; 5036 description 5037 "This submodule contains common data definitions for data 5038 related to a RIB entry, or RIB table."; 5040 revision "2019-03-21" { 5041 description 5042 "Initial version."; 5043 reference 5044 "RFC XXXX: BGP YANG Model for Service Provider Network."; 5045 } 5047 grouping bgp-common-route-annotations-state { 5048 description 5049 "Data definitions for flags and other information attached 5050 to routes in both LOC-RIB and Adj-RIB"; 5052 leaf last-modified { 5053 type types:timeticks; 5054 description 5055 "Timestamp when this path was last modified. 5057 The value is the timestamp in seconds relative to 5058 the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; 5059 } 5061 leaf valid-route { 5062 type boolean; 5063 description 5064 "Indicates that the route is considered valid by the 5065 local router"; 5066 } 5068 leaf invalid-reason { 5069 type identityref { 5070 base invalid-route-reason; 5071 } 5072 description 5073 "If the route is rejected as invalid, this indicates the 5074 reason."; 5075 } 5076 } 5078 grouping bgp-loc-rib-route-annotations-state { 5079 description 5080 "Data definitions for information attached to routes in the 5081 LOC-RIB"; 5083 // placeholder for route metadata specific to the LOC-RIB 5084 } 5086 grouping bgp-adj-rib-in-post-route-annotations-state { 5087 description 5088 "Data definitions for information attached to routes in the 5089 Adj-RIB-in post-policy table"; 5091 leaf best-path { 5092 type boolean; 5093 description 5094 "Current path was selected as the best path."; 5095 } 5096 } 5098 grouping bgp-common-table-attrs-state { 5099 description 5100 "Common attributes attached to all routing tables"; 5102 // placeholder for metadata associated with all tables 5103 } 5105 grouping bgp-common-table-attrs-top { 5106 // no enclosing container as this data will fit under an 5107 // existing LOC-RIB container 5109 uses bgp-common-table-attrs-state; 5110 description 5111 "Operational state data for data related to the entire 5112 LOC-RIB"; 5113 } 5114 } 5115 5117 file "ietf-bgp-rib-tables@2019-03-21.yang" 5118 submodule ietf-bgp-rib-tables { 5119 yang-version "1.1"; 5120 belongs-to ietf-bgp { 5121 prefix "br"; 5122 } 5124 // import some basic types 5125 import ietf-inet-types { 5126 prefix inet; 5127 } 5129 import ietf-routing { 5130 prefix "rt"; 5131 reference 5132 "RFC 8022: A YANG Data Model for Routing Management"; 5133 } 5135 include ietf-bgp-rib-ext; 5136 include ietf-bgp-rib-attributes; 5137 include ietf-bgp-rib-shared-attributes; 5138 include ietf-bgp-rib-table-attributes; 5140 organization 5141 "IETF IDR Working Group"; 5143 contact 5144 "WG Web: 5145 WG List: 5146 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 5147 Authors: Keyur Patel, 5148 Mahesh Jethanandani, 5149 Susan Hares"; 5151 description 5152 "This submodule contains structural data definitions for 5153 BGP routing tables."; 5155 revision "2019-03-21" { 5156 description 5157 "Initial Version"; 5158 reference 5159 "RFC XXXX, BGP YANG Model for Service Provider Network."; 5160 } 5162 grouping bgp-adj-rib-common-attr-refs { 5163 description 5164 "Definitions of common references to attribute sets for 5165 multiple AFI-SAFIs for Adj-RIB tables"; 5167 leaf attr-index { 5168 type leafref { 5169 path "../../../../../../../../../attr-sets/attr-set/" + 5170 "index"; 5171 } 5172 description 5173 "Reference to the common attribute group for the 5174 route"; 5175 } 5177 leaf community-index { 5178 type leafref { 5179 path "../../../../../../../../../communities/community/" + 5180 "index"; 5181 } 5182 description 5183 "Reference to the community attribute for the route"; 5184 } 5186 leaf ext-community-index { 5187 type leafref { 5188 path "../../../../../../../../../ext-communities/" + 5189 "ext-community/index"; 5190 } 5191 description 5192 "Reference to the extended community attribute for the 5193 route"; 5194 } 5195 } 5197 grouping bgp-loc-rib-common-attr-refs { 5198 description 5199 "Definitions of common references to attribute sets for 5200 multiple AFI-SAFIs for LOC-RIB tables"; 5202 leaf attr-index { 5203 type leafref { 5204 path "../../../../../../../attr-sets/attr-set/" + 5205 "index"; 5206 } 5207 description 5208 "Reference to the common attribute group for the 5209 route"; 5210 } 5212 leaf community-index { 5213 type leafref { 5214 path "../../../../../../../communities/community/" + 5215 "index"; 5216 } 5217 description 5218 "Reference to the community attribute for the route"; 5219 } 5221 leaf ext-community-index { 5222 type leafref { 5223 path "../../../../../../../ext-communities/" + 5224 "ext-community/index"; 5225 } 5226 description 5227 "Reference to the extended community attribute for the 5228 route"; 5229 } 5230 } 5232 grouping bgp-loc-rib-common-keys { 5233 description 5234 "Common references used in keys for IPv4 and IPv6 5235 LOC-RIB entries"; 5237 leaf origin { 5238 type union { 5239 type inet:ip-address; 5240 type identityref { 5241 base rt:routing-protocol; 5242 } 5243 } 5244 description 5245 "Indicates the origin of the route. If the route is learned 5246 from a neighbor, this value is the neighbor address. If 5247 the route was injected or redistributed from another 5248 protocol, the origin indicates the source protocol for the 5249 route."; 5250 } 5252 leaf path-id { 5253 type uint32; 5254 // TODO: YANG does not allow default values for key 5255 // default 0; 5256 description 5257 "If the route is learned from a neighbor, the path-id 5258 corresponds to the path-id for the route in the 5259 corresponding adj-rib-in-post table. If the route is 5260 injected from another protocol, or the neighbor does not 5261 support BGP add-paths, the path-id should be set 5262 to zero, also the default value."; 5263 } 5264 } 5266 grouping ipv4-loc-rib { 5267 description 5268 "Top-level grouping for IPv4 routing tables"; 5270 container loc-rib { 5271 config false; 5272 description 5273 "Container for the IPv4 BGP LOC-RIB data"; 5275 uses bgp-common-table-attrs-top; 5277 container routes { 5278 description 5279 "Enclosing container for list of routes in the routing 5280 table."; 5282 list route { 5283 key "prefix origin path-id"; 5285 description 5286 "List of routes in the table, keyed by the route 5287 prefix, the route origin, and path-id. The route 5288 origin can be either the neighbor address from which 5289 the route was learned, or the source protocol that 5290 injected the route. The path-id distinguishes routes 5291 for the same prefix received from a neighbor (e.g., 5292 if add-paths is eanbled)."; 5294 leaf prefix { 5295 type inet:ipv4-prefix; 5296 description 5297 "The IPv4 prefix corresponding to the route"; 5298 } 5300 uses bgp-loc-rib-common-keys; 5301 uses bgp-loc-rib-common-attr-refs; 5302 uses bgp-loc-rib-attr-state; 5303 uses bgp-common-route-annotations-state; 5304 uses bgp-loc-rib-route-annotations-state; 5305 uses bgp-unknown-attr-top; 5306 uses rib-ext-route-annotations; 5307 } 5308 } 5309 } 5310 } 5312 grouping ipv6-loc-rib { 5313 description 5314 "Top-level grouping for IPv6 routing tables"; 5316 container loc-rib { 5317 config false; 5318 description 5319 "Container for the IPv6 BGP LOC-RIB data"; 5321 uses bgp-common-table-attrs-top; 5323 container routes { 5324 description 5325 "Enclosing container for list of routes in the routing 5326 table."; 5328 list route { 5329 key "prefix origin path-id"; 5331 description 5332 "List of routes in the table, keyed by the route 5333 prefix, the route origin, and path-id. The route 5334 origin can be either the neighbor address from which 5335 the route was learned, or the source protocol that 5336 injected the route. The path-id distinguishes routes 5337 for the same prefix received from a neighbor (e.g., 5338 if add-paths is eanbled)."; 5340 leaf prefix { 5341 type inet:ipv6-prefix; 5342 description 5343 "The IPv6 prefix corresponding to the route"; 5344 } 5346 uses bgp-loc-rib-common-keys; 5347 uses bgp-loc-rib-common-attr-refs; 5348 uses bgp-loc-rib-attr-state; 5349 uses bgp-common-route-annotations-state; 5350 uses bgp-loc-rib-route-annotations-state; 5351 uses bgp-unknown-attr-top; 5352 uses rib-ext-route-annotations; 5353 } 5354 } 5355 } 5356 } 5358 grouping ipv4-adj-rib-common { 5359 description 5360 "Common structural grouping for each IPv4 adj-RIB table"; 5362 uses bgp-common-table-attrs-top; 5364 container routes { 5365 config false; 5366 description 5367 "Enclosing container for list of routes in the routing 5368 table."; 5370 list route { 5371 key "prefix path-id"; 5373 description 5374 "List of routes in the table, keyed by a combination of 5375 the route prefix and path-id to distinguish multiple 5376 routes received from a neighbor for the same prefix, 5377 e.g., when BGP add-paths is enabled."; 5379 leaf prefix { 5380 type inet:ipv4-prefix; 5381 description 5382 "Prefix for the route"; 5383 } 5384 uses bgp-adj-rib-attr-state; 5385 uses bgp-adj-rib-common-attr-refs; 5386 uses bgp-common-route-annotations-state; 5387 uses bgp-unknown-attr-top; 5388 uses rib-ext-route-annotations; 5389 } 5390 } 5391 } 5393 grouping ipv4-adj-rib-in-post { 5394 description 5395 "Common structural grouping for the IPv4 adj-rib-in 5396 post-policy table"; 5398 uses bgp-common-table-attrs-top; 5400 container routes { 5401 config false; 5402 description 5403 "Enclosing container for list of routes in the routing 5404 table."; 5406 list route { 5407 key "prefix path-id"; 5409 description 5410 "List of routes in the table, keyed by a combination of 5411 the route prefix and path-id to distinguish multiple 5412 routes received from a neighbor for the same prefix, 5413 e.g., when BGP add-paths is enabled."; 5415 leaf prefix { 5416 type inet:ipv4-prefix; 5417 description 5418 "Prefix for the route"; 5419 } 5421 uses bgp-adj-rib-attr-state; 5422 uses bgp-adj-rib-common-attr-refs; 5423 uses bgp-common-route-annotations-state; 5424 uses bgp-adj-rib-in-post-route-annotations-state; 5425 uses bgp-unknown-attr-top; 5426 uses rib-ext-route-annotations; 5427 } 5428 } 5429 } 5430 grouping ipv4-adj-rib { 5431 description 5432 "Top-level grouping for Adj-RIB table"; 5434 container neighbors { 5435 config false; 5436 description 5437 "Enclosing container for neighbor list"; 5439 list neighbor { 5440 key "neighbor-address"; 5441 description 5442 "List of neighbors (peers) of the local BGP speaker"; 5444 leaf neighbor-address { 5445 type inet:ip-address; 5446 description 5447 "IP address of the BGP neighbor or peer"; 5448 } 5450 container adj-rib-in-pre { 5451 description 5452 "Per-neighbor table containing the NLRI updates 5453 received from the neighbor before any local input 5454 policy rules or filters have been applied. This can 5455 be considered the 'raw' updates from the neighbor."; 5457 uses ipv4-adj-rib-common; 5459 } 5461 container adj-rib-in-post { 5462 description 5463 "Per-neighbor table containing the paths received from 5464 the neighbor that are eligible for best-path selection 5465 after local input policy rules have been applied."; 5467 uses ipv4-adj-rib-in-post; 5468 } 5470 container adj-rib-out-pre { 5471 description 5472 "Per-neighbor table containing paths eligble for 5473 sending (advertising) to the neighbor before output 5474 policy rules have been applied"; 5476 uses ipv4-adj-rib-common; 5478 } 5480 container adj-rib-out-post { 5481 description 5482 "Per-neighbor table containing paths eligble for 5483 sending (advertising) to the neighbor after output 5484 policy rules have been applied"; 5486 uses ipv4-adj-rib-common; 5488 } 5489 } 5490 } 5491 } 5493 grouping ipv6-adj-rib-common { 5494 description 5495 "Common structural grouping for each IPv6 adj-RIB table"; 5497 uses bgp-common-table-attrs-state; 5499 container routes { 5500 config false; 5501 description 5502 "Enclosing container for list of routes in the routing 5503 table."; 5505 list route { 5506 key "prefix path-id"; 5508 description 5509 "List of routes in the table"; 5511 leaf prefix { 5512 type inet:ipv6-prefix; 5513 description 5514 "Prefix for the route"; 5515 } 5517 uses bgp-adj-rib-attr-state; 5518 uses bgp-adj-rib-common-attr-refs; 5519 uses bgp-common-route-annotations-state; 5520 uses bgp-unknown-attr-top; 5521 uses rib-ext-route-annotations; 5522 } 5523 } 5524 } 5525 grouping ipv6-adj-rib-in-post { 5526 description 5527 "Common structural grouping for the IPv6 adj-rib-in 5528 post-policy table"; 5530 uses bgp-common-table-attrs-state; 5532 container routes { 5533 config false; 5534 description 5535 "Enclosing container for list of routes in the routing 5536 table."; 5538 list route { 5539 key "prefix path-id"; 5541 description 5542 "List of routes in the table"; 5544 leaf prefix { 5545 type inet:ipv6-prefix; 5546 description 5547 "Prefix for the route"; 5548 } 5550 uses bgp-adj-rib-attr-state; 5551 uses bgp-adj-rib-common-attr-refs; 5552 uses bgp-common-route-annotations-state; 5553 uses bgp-adj-rib-in-post-route-annotations-state; 5554 uses bgp-unknown-attr-top; 5555 uses rib-ext-route-annotations; 5556 } 5557 } 5558 } 5560 grouping ipv6-adj-rib { 5561 description 5562 "Top-level grouping for Adj-RIB table"; 5564 container neighbors { 5565 config false; 5566 description 5567 "Enclosing container for neighbor list"; 5569 list neighbor { 5570 key "neighbor-address"; 5571 description 5572 "List of neighbors (peers) of the local BGP speaker"; 5574 leaf neighbor-address { 5575 type inet:ip-address; 5576 description 5577 "IP address of the BGP neighbor or peer"; 5578 } 5580 container adj-rib-in-pre { 5581 description 5582 "Per-neighbor table containing the NLRI updates 5583 received from the neighbor before any local input 5584 policy rules or filters have been applied. This can 5585 be considered the 'raw' updates from the neighbor."; 5587 uses ipv6-adj-rib-common; 5589 } 5591 container adj-rib-in-post { 5592 description 5593 "Per-neighbor table containing the paths received from 5594 the neighbor that are eligible for best-path selection 5595 after local input policy rules have been applied."; 5597 uses ipv6-adj-rib-in-post; 5598 } 5600 container adj-rib-out-pre { 5601 description 5602 "Per-neighbor table containing paths eligble for 5603 sending (advertising) to the neighbor before output 5604 policy rules have been applied"; 5606 uses ipv6-adj-rib-common; 5608 } 5610 container adj-rib-out-post { 5611 description 5612 "Per-neighbor table containing paths eligble for 5613 sending (advertising) to the neighbor after output 5614 policy rules have been applied"; 5616 uses ipv6-adj-rib-common; 5618 } 5619 } 5620 } 5621 } 5622 grouping ipvX-srte-policy-adjrib { 5623 description 5624 "Top-level grouping for the IPv4 and IPv6 AFI, SR-TE Policy SAFI 5625 Adj-RIBs."; 5627 container neighbors { 5628 description 5629 "Surrounding container for the list of neighbours that are 5630 enabled for the IPv4 and IPv6 AFI, SR-TE Policy SAFI address 5631 family."; 5633 list neighbor { 5634 key "neighbor-address"; 5636 description 5637 "An individual neighbour that is enabled for the SR-TE 5638 Policy SAFI."; 5640 uses ipvX-srte-policy-adjrib-neighbor-state; 5642 container adj-rib-in-pre { 5643 description 5644 "The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour, 5645 prior to any inbound policy constraints or modifications 5646 having been applied."; 5647 uses ipvX-srte-policy-adjrib-common; 5648 } 5650 container adj-rib-in-post { 5651 description 5652 "The Adj-RIB-In for the SR-TE Policy SAFI for the neighbour, 5653 following any inbound policy constraints or modifications 5654 being made."; 5655 uses ipvX-srte-policy-adjrib-in-post; 5656 } 5658 container adj-rib-out-pre { 5659 description 5660 "The Adj-RIB-Out for the SR-TE Policy SAFI for the 5661 neighbour, prior to any outgoing policy modifications or 5662 constraints having been applied."; 5663 uses ipvX-srte-policy-adjrib-common; 5664 } 5666 container adj-rib-out-post { 5667 description 5668 "The Adj-RIB-Out for the SR-TE Policy SAFI for the 5669 neighbour, follow any outbound policy constraints or 5670 modifications being made."; 5671 uses ipvX-srte-policy-adjrib-common; 5672 } 5673 } 5674 } 5675 } 5677 grouping ipvX-srte-policy-adjrib-neighbor-state { 5678 description 5679 "Common attributes for each neighbour for which the SR-TE 5680 Policy SAFI RIBs are being maintained."; 5682 leaf neighbor-address { 5683 type inet:ip-address; 5684 description 5685 "The address of the neighbour for which the SR-TE policy 5686 SAFI has been negotiated."; 5687 } 5688 } 5690 grouping ipvX-srte-policy-adjrib-common { 5691 description 5692 "Common structure containing the routes that are learnt via 5693 the IPv4 or IPv6 SR-TE Policy SAFI."; 5695 container routes { 5696 description 5697 "Surrounding container for the list of routes within the 5698 SR-TE Policy SAFI."; 5700 list route { 5701 key "path-id endpoint color"; 5703 description 5704 "The routes within the SR-TE Policy SAFI Adj-RIB. The 5705 routes are keyed on the path-id - set to a non-zero 5706 value only if ADD-PATHS is being used; the color; and 5707 the endpoint. The colour and endpoint are extracted from 5708 the NLRI."; 5710 uses ipvX-srte-policy-common-route-state; 5711 uses bgp-adj-rib-common-attr-refs; 5712 uses bgp-common-route-annotations-state; 5713 uses bgp-unknown-attr-top; 5714 } 5715 } 5716 } 5717 grouping ipvX-srte-policy-common-route-state { 5718 description 5719 "Common attributes used SR-TE Policy SAFI routes."; 5721 leaf path-id { 5722 type uint32; 5723 // TODO: YANG does not allow default values for key 5724 // default 0; 5725 description 5726 "Identifier for the path when using BGP ADD-PATHS for the SR-TE 5727 policy SAFI."; 5728 } 5730 leaf endpoint { 5731 type inet:ip-address; 5732 description 5733 "A unique identifier for the remote set of nodes. When the 5734 address family is IPv4, the value is a 4-octet IPv4 address. 5735 When the address family is IPv6, the value is a 16-octet IPv6 5736 address."; 5737 } 5739 leaf color { 5740 type uint32; 5741 description 5742 "A 4-octet value identifying the policy. Combined with the 5743 endpoint the endpoint and colour represent the unique policy."; 5744 } 5745 } 5747 grouping ipvX-srte-policy-adjrib-in-post { 5748 description 5749 "Grouping for the post-policy Adj-RIB-In for SR-TE Policy SAFI 5750 routes"; 5752 container routes { 5753 description 5754 "The set of routes that are within the Adj-RIB-Out for the 5755 neighbour."; 5757 list route { 5758 key "path-id endpoint color"; 5760 description 5761 "The routes that are in the Adj-RIB-In-Post for the specified 5762 BGP neighbour within the SR-TE Policy SAFI for the specified 5763 address family."; 5765 uses ipvX-srte-policy-common-route-state; 5766 uses bgp-adj-rib-common-attr-refs; 5767 uses bgp-common-route-annotations-state; 5768 uses bgp-adj-rib-in-post-route-annotations-state; 5769 uses bgp-unknown-attr-top; 5770 } 5771 } 5772 } 5774 grouping ipvX-srte-policy-locrib { 5775 description 5776 "Top-level grouping for the Loc-RIB for IPv4 or IPv6 Adj-RIB 5777 for SR-TE Policy SAFI."; 5779 container loc-rib { 5780 description 5781 "The Loc-RIB for the SR-TE Policy SAFI for IPv4 or IPv6 Unicast 5782 AFIs."; 5784 container routes { 5785 description 5786 "List of routes within the SR-TE Policy SAFI, for the IPv4 or 5787 IPv6 AFI."; 5789 list route { 5790 key "path-id endpoint color"; 5792 description 5793 "Route within the specified address family for the SR-TE 5794 Policy SAFI."; 5796 uses ipvX-srte-policy-common-route-state; 5797 uses bgp-loc-rib-common-attr-refs; 5798 uses bgp-common-route-annotations-state; 5799 uses bgp-unknown-attr-top; 5800 } 5801 } 5802 } 5803 } 5804 } 5805 5807 file "ietf-bgp-rib-table-attributes@2019-03-21.yang" 5808 submodule ietf-bgp-rib-table-attributes { 5809 yang-version "1.1"; 5810 belongs-to ietf-bgp { 5811 prefix "br"; 5813 } 5815 // import some basic types 5816 import ietf-yang-types { 5817 prefix types; 5818 reference 5819 "RFC 6991, Common YANG Data Types."; 5820 } 5822 include ietf-bgp-rib-types; 5824 organization 5825 "IETF IDR Working Group"; 5827 contact 5828 "WG Web: 5829 WG List: 5831 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 5832 Keyur Patel (keyur at arrcus.com), 5833 Susan Hares (shares at ndzh.com"; 5835 description 5836 "This submodule contains common data definitions for data 5837 related to a RIB entry, or RIB table."; 5839 revision "2019-03-21" { 5840 description 5841 "Initial version."; 5842 reference 5843 "RFC XXXX: BGP YANG Model for Service Provider Network."; 5844 } 5846 grouping bgp-common-route-annotations-state { 5847 description 5848 "Data definitions for flags and other information attached 5849 to routes in both LOC-RIB and Adj-RIB"; 5851 leaf last-modified { 5852 type types:timeticks; 5853 description 5854 "Timestamp when this path was last modified. 5856 The value is the timestamp in seconds relative to 5857 the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; 5858 } 5859 leaf valid-route { 5860 type boolean; 5861 description 5862 "Indicates that the route is considered valid by the 5863 local router"; 5864 } 5866 leaf invalid-reason { 5867 type identityref { 5868 base invalid-route-reason; 5869 } 5870 description 5871 "If the route is rejected as invalid, this indicates the 5872 reason."; 5873 } 5874 } 5876 grouping bgp-loc-rib-route-annotations-state { 5877 description 5878 "Data definitions for information attached to routes in the 5879 LOC-RIB"; 5881 // placeholder for route metadata specific to the LOC-RIB 5882 } 5884 grouping bgp-adj-rib-in-post-route-annotations-state { 5885 description 5886 "Data definitions for information attached to routes in the 5887 Adj-RIB-in post-policy table"; 5889 leaf best-path { 5890 type boolean; 5891 description 5892 "Current path was selected as the best path."; 5893 } 5894 } 5896 grouping bgp-common-table-attrs-state { 5897 description 5898 "Common attributes attached to all routing tables"; 5900 // placeholder for metadata associated with all tables 5901 } 5903 grouping bgp-common-table-attrs-top { 5904 // no enclosing container as this data will fit under an 5905 // existing LOC-RIB container 5906 uses bgp-common-table-attrs-state; 5907 description 5908 "Operational state data for data related to the entire 5909 LOC-RIB"; 5910 } 5911 } 5912 5914 8. Examples 5916 This section tries to show some examples in how the model can be 5917 used. 5919 8.1. Creating BGP Instance 5921 This example shows how to enable BGP with the IPv4 unicast address 5922 family, while adding one network to advertise. 5924 [note: '\' line wrapping for formatting only] 5926 5927 5928 5930 5931 5932 bgp:bgp 5934 5935 name:BGP 5936 5938 5939 64496 5940 5941 5942 bt:ipv4-\ 5944 unicast 5945 5946 5947 5948 5949 5950 5951 5952 5953 5955 8.2. Neighbor Address Family Configuration 5957 This example shows how to configure a neighbor. 5959 [note: '\' line wrapping for formatting only] 5961 5962 5963 5965 5966 5967 bgp:bgp 5969 5970 name:BGP 5971 5973 5974 64496 5975 5976 5977 bt:ipv4-\ 5979 unicast 5980 5981 5982 5983 5984 5985 5986 192.0.2.1 5987 64497 5988 "Peer Router B" 5989 5990 5991 bt:ipv\ 5993 4-unicast 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 9. Contributors 6006 Previous versions of this document saw contributions from Anees 6007 Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr 6008 Zhadkin, and Xyfeng Liu. 6010 10. Acknowledgements 6012 The authors are grateful for valuable contributions to this document 6013 and the associated models from: Ebben Aires, Pavan Beeram, Chris 6014 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 6015 George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee 6016 Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- 6017 Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim 6018 Uttaro, and Gunter Vandevelde. 6020 Credit is also due to authors of the OpenConfig, whose model was 6021 relied upon to come up with this model. 6023 Special thanks to Robert Wilton who helped convert the YANG models to 6024 a NMDA compatible model. 6026 11. References 6028 11.1. Normative references 6030 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 6031 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 6032 . 6034 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 6035 Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November 6036 1998, . 6038 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 6039 DOI 10.17487/RFC3688, January 2004, 6040 . 6042 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 6043 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 6044 DOI 10.17487/RFC4271, January 2006, 6045 . 6047 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 6048 Reflection: An Alternative to Full Mesh Internal BGP 6049 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 6050 . 6052 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 6053 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 6054 DOI 10.17487/RFC4724, January 2007, 6055 . 6057 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 6058 "Multiprotocol Extensions for BGP-4", RFC 4760, 6059 DOI 10.17487/RFC4760, January 2007, 6060 . 6062 [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 6063 System Confederations for BGP", RFC 5065, 6064 DOI 10.17487/RFC5065, August 2007, 6065 . 6067 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 6068 the Network Configuration Protocol (NETCONF)", RFC 6020, 6069 DOI 10.17487/RFC6020, October 2010, 6070 . 6072 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 6073 and A. Bierman, Ed., "Network Configuration Protocol 6074 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 6075 . 6077 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 6078 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 6079 . 6081 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 6082 Austein, "BGP Prefix Origin Validation", RFC 6811, 6083 DOI 10.17487/RFC6811, January 2013, 6084 . 6086 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 6087 RFC 6991, DOI 10.17487/RFC6991, July 2013, 6088 . 6090 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 6091 RFC 7950, DOI 10.17487/RFC7950, August 2016, 6092 . 6094 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 6095 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 6096 . 6098 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 6099 Access Control Model", STD 91, RFC 8341, 6100 DOI 10.17487/RFC8341, March 2018, 6101 . 6103 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 6104 Routing Management (NMDA Version)", RFC 8349, 6105 DOI 10.17487/RFC8349, March 2018, 6106 . 6108 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 6109 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 6110 . 6112 11.2. Informative references 6114 [I-D.ietf-bfd-yang] 6115 Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and 6116 G. Mirsky, "YANG Data Model for Bidirectional Forwarding 6117 Detection (BFD)", draft-ietf-bfd-yang-17 (work in 6118 progress), August 2018. 6120 [I-D.ietf-grow-bmp] 6121 Scudder, J., Fernando, R., and S. Stuart, "BGP Monitoring 6122 Protocol", draft-ietf-grow-bmp-17 (work in progress), 6123 January 2016. 6125 [I-D.ietf-rtgwg-policy-model] 6126 Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data 6127 Model for Routing Policy Management", draft-ietf-rtgwg- 6128 policy-model-06 (work in progress), March 2019. 6130 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 6131 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 6132 . 6134 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 6135 and R. Wilton, "Network Management Datastore Architecture 6136 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 6137 . 6139 Authors' Addresses 6141 Mahesh Jethanandani 6142 VMware 6144 Email: mjethanandani@gmail.com 6145 Keyur Patel 6146 Arrcus 6147 CA 6148 USA 6150 Email: keyur@arrcus.com 6152 Susan Hares 6153 Huawei 6154 7453 Hickory Hill 6155 Saline, MI 48176 6156 USA 6158 Email: shares@ndzh.com