idnits 2.17.1 draft-ietf-idr-bgp-model-11.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 37 instances of too long lines in the document, the longest one being 3 characters in excess of 72. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 427 has weird spacing: '...address ine...' == Line 445 has weird spacing: '...address ine...' == Line 2260 has weird spacing: '...unicast speci...' == Line 4181 has weird spacing: '... case inlin...' == Line 6786 has weird spacing: '...rw name if:...' == (2 more instances...) -- The document date (10 July 2021) is 1020 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-27 Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Interdomain Routing M. Jethanandani 3 Internet-Draft Kloud Services 4 Intended status: Standards Track K. Patel 5 Expires: 11 January 2022 Arrcus 6 S. Hares 7 Huawei 8 J. Haas 9 Juniper Networks 10 10 July 2021 12 BGP YANG Model for Service Provider Networks 13 draft-ietf-idr-bgp-model-11 15 Abstract 17 This document defines a YANG data model for configuring and managing 18 BGP, including protocol, policy, and operational aspects, such as 19 RIB, based on data center, carrier, and content provider operational 20 requirements. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on 11 January 2022. 39 Copyright Notice 41 Copyright (c) 2021 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 46 license-info) in effect on the date of publication of this document. 47 Please review these documents carefully, as they describe your rights 48 and restrictions with respect to this document. Code Components 49 extracted from this document must include Simplified BSD License text 50 as described in Section 4.e of the Trust Legal Provisions and are 51 provided without warranty as described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 56 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 57 1.2. Note to RFC Editor . . . . . . . . . . . . . . . . . . . 4 58 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 59 1.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 5 60 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5 61 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6 62 2.2. Policy configuration overview . . . . . . . . . . . . . . 9 63 2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10 64 2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12 65 2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12 66 2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12 67 2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12 68 2.3.5. Post route advertisements per-neighbor . . . . . . . 12 69 3. Relation to other YANG data models . . . . . . . . . . . . . 12 70 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 71 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 72 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14 73 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 15 74 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 15 75 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 16 76 7.1. Main module and submodules for base items . . . . . . . . 16 77 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 65 78 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 78 79 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 90 80 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 118 81 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 118 82 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 118 83 10.1. Normative references . . . . . . . . . . . . . . . . . . 118 84 10.2. Informative references . . . . . . . . . . . . . . . . . 122 85 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 123 86 A.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 123 87 A.2. Neighbor Address Family Configuration . . . . . . . . . . 124 88 A.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 126 89 A.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 127 90 Appendix B. How to add a new AFI and Augment a Module . . . . . 129 91 Appendix C. How to deviate a module . . . . . . . . . . . . . . 132 92 Appendix D. Complete tree diagram . . . . . . . . . . . . . . . 133 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 152 95 1. Introduction 97 This document describes a YANG [RFC7950] data model for the BGP-4 98 [RFC4271] protocol, including various protocol extensions, policy 99 configuration, as well as defining key operational state data, 100 including a Routing Information Base (RIB). The model is intended to 101 be vendor-neutral, in order to allow operators to manage BGP 102 configuration in heterogeneous environments with routers supplied by 103 multiple vendors. The model is also intended to be readily mapped to 104 existing implementations to facilitate support from as large a set of 105 routing hardware and software vendors as possible. This module does 106 not support previous versions of BGP, and cannot support establishing 107 and maintaining state information of neighbors with previous versions 108 of BGP. 110 1.1. Goals and approach 112 The model covers the base BGP features that are deployed across major 113 implementations and the common BGP configurations in use across a 114 number of operator network deployments. In particular, this model 115 attempts to cover BGP features defined in BGP [RFC4271], BGP 116 Communities Attribute [RFC1997], BGP Route Reflection [RFC4456], 117 Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System 118 Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439], 119 Graceful Restart Mechanism for BGP [RFC4724], BGP Prefix Origin 120 Validation [RFC6811], and Advertisement of Multiple Paths in BGP 121 [RFC7911]. 123 Along with configuration of base BGP features, this model also 124 addresses policy configuration, by providing "hooks" for applying 125 policies, and also defining BGP-specific policy features. The BGP 126 policy features are intended to be used with the general routing 127 policy model defined in A YANG Data Model for Routing Policy 128 Management [I-D.ietf-rtgwg-policy-model]. 130 The model conforms to the NMDA [RFC8342] architecture. It has 131 support for securing BGP sessions using TCP-AO [RFC5925] or TCP-MD5, 132 and for configuring Bidirectional Forward Detection (BFD) [RFC5880] 133 for fast next hop liveliness checking. 135 For the base BGP features, the focus of the model described in this 136 document is on providing configuration and operational state 137 information relating to: 139 * The global BGP instance, and neighbors whose configuration is 140 specified individually, or templated with the use of peer-groups. 142 * The address families that are supported by peers, and the global 143 configuration which relates to them. 145 * The policy configuration "hooks" and BGP-specific policy features 146 that relate to a neighbor - controlling the import and export of 147 NLRIs. 149 * BGP RIB contents. 151 As mentioned earlier, any configuration items that are deemed to be 152 widely available in existing major BGP implementations are included 153 in the model. Additional, more esoteric, configuration items that 154 are not commonly used, or only available from a single 155 implementation, are omitted from the model with an expectation that 156 they will be available in companion modules that augment or extend 157 the current model. This allows clarity in identifying data that is 158 part of the vendor-neutral base model. 160 Where possible, naming in the model follows conventions used in 161 available standards documents, and otherwise tries to be self- 162 explanatory with sufficient descriptions of the intended behavior. 163 Similarly, configuration data value constraints and default values, 164 where used, are based on recommendations in current standards 165 documentation, or those commonly used in multiple implementations. 166 Since implementations can vary widely in this respect, this version 167 of the model specifies only a limited set of defaults and ranges with 168 the expectation of being more prescriptive in future versions based 169 on actual operator use. 171 1.2. Note to RFC Editor 173 This document uses several placeholder values throughout the 174 document. Please replace them as follows and remove this note before 175 publication. 177 RFC XXXX, where XXXX is the number assigned to this document at the 178 time of publication. 180 2021-07-11 with the actual date of the publication of this document. 182 RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for 183 Routing Policy Management [I-D.ietf-rtgwg-policy-model]. 185 RFC BBBB, where BBBB is the number assigned to YANG Data Model for 186 Bidirectional Forward Detection [I-D.ietf-bfd-yang]. 188 1.3. Terminology 190 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 191 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 192 "OPTIONAL" in this document are to be interpreted as described in BCP 193 14 [RFC2119] [RFC8174] when, and only when, they appear in all 194 capitals, as shown here. 196 1.4. Abbreviations 198 +==============+===========================================+ 199 | Abbreviation | | 200 +==============+===========================================+ 201 | AFI | Address Family Identifier | 202 +--------------+-------------------------------------------+ 203 | BFD | Bidirectional Forward Detection | 204 +--------------+-------------------------------------------+ 205 | NLRI | Network Layer Reachability Information | 206 +--------------+-------------------------------------------+ 207 | NMDA | Network Management Datastore Architecture | 208 +--------------+-------------------------------------------+ 209 | RIB | Routing Information Base | 210 +--------------+-------------------------------------------+ 211 | SAFI | Subsequent Address Family Identifier | 212 +--------------+-------------------------------------------+ 213 | VRF | Virtual Routing and Forwarding | 214 +--------------+-------------------------------------------+ 216 Table 1 218 2. Model overview 220 The BGP model is defined across several YANG modules and submodules, 221 but at a high level is organized into six elements: 223 * base protocol configuration -- configuration affecting BGP 224 protocol-related operations, defined at various levels of 225 hierarchy. 227 * multiprotocol configuration -- configuration affecting individual 228 address-families within BGP Multiprotocol Extensions for BGP-4 229 [RFC4760]. 231 * neighbor configuration -- configuration affecting an individual 232 neighbor within BGP. 234 * neighbor multiprotocol configuration -- configuration affecting 235 individual address-families for a neighbor within BGP. 237 * policy configuration -- hooks for application of the policies 238 defined in A YANG Data Model for Routing Policy Management 239 [I-D.ietf-rtgwg-policy-model] that act on routes sent (received) 240 to (from) peers or other routing protocols and BGP-specific policy 241 features. 243 * operational state -- variables used for monitoring and management 244 of BGP operations. 246 These modules also make use of standard Internet types, such as IP 247 addresses and prefixes, autonomous system numbers, etc., defined in 248 Common YANG Data Types [RFC6991]. 250 2.1. BGP protocol configuration 252 The BGP protocol configuration model is organized hierarchically, 253 much like the majority of router implementations. That is, 254 configuration items can be specified at multiple levels, as shown 255 below. 257 module: ietf-bgp 259 augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto 260 col: 261 +--rw bgp 262 +--rw global! 263 | +--rw as inet:as-number 264 | +--rw identifier? yang:dotted-quad 265 | +--rw distance 266 | +--rw confederation 267 | +--rw graceful-restart {bt:graceful-restart}? 268 | +--rw use-multiple-paths 269 | +--rw route-selection-options 270 | +--rw afi-safis 271 | +--rw apply-policy 272 | +--ro total-paths? uint32 273 | +--ro total-prefixes? uint32 274 +--rw neighbors 275 | +--rw neighbor* [remote-address] 276 | +---n established 277 | +---n backward-transition 278 | +---x clear {bt:clear-neighbors}? 279 +--rw peer-groups 280 | +--rw peer-group* [name] 281 +--rw interfaces 282 | +--rw interface* [name] 283 +--ro rib 284 +--ro attr-sets 285 +--ro communities 286 +--ro ext-communities 287 +--ro afi-safis 289 Users may specify configuration at a higher level and have it apply 290 to all lower-level items, or provide overriding configuration at a 291 lower level of the hierarchy. Overriding configuration items are 292 optional, with neighbor-specific configuration being the most 293 specific or lowest level, followed by peer-group, and finally global. 294 Global configuration options reflect a subset of the peer-group or 295 neighbor-specific configuration options which are relevant to the 296 entire BGP instance. 298 The model makes the simplifying assumption that most of the 299 configuration items are available at all levels of the hierarchy. 300 That is, very little configuration is specific to a particular level 301 in the hierarchy, other than obvious items such as "group-name" only 302 being available for the peer group-level config. A notable exception 303 is for sub-address family configuration where some items are only 304 applicable for a given AFI-SAFI combination. 306 In order to allow common configuration to be applied to a set of 307 neighbors, all neighbor configuration options are available within a 308 peer-group. A neighbor is associated to a particular peer-group 309 through the use of a peer-group leaf (which provides a reference to a 310 configured item in the peer-group list). 312 Address-family configuration is made available in multiple points 313 within the model - primarily within the global container, where 314 instance-wide configuration can be set (for example, global protocol 315 parameters, the BGP best-path route selection options, or global 316 policies relating to the address-family); and on a per-neighbor or 317 per-peer-group basis, where address-families can be enabled or 318 disabled, and policy associated with the parent entity applied. 319 Within the afi-safi container, generic configuration that applies to 320 all address-families (e.g., whether the AFI-SAFI is enabled) is 321 presented at the top-level, with address-family specific containers 322 made available for options relating to only that AFI-SAFI. Within 323 the current revision of the model a generic set of address-families, 324 and common configuration and state options are included - further 325 work is expected to add additional parameters to this area of the 326 model. 328 The model supports ipv4-unicast and ipv6-unicast address-families and 329 defers the remaining AFI/SAFI to other or future drafts: 331 +--rw bgp 332 +--rw global! 333 +--rw afi-safis 334 +--rw afi-safi* [afi-safi-name] 335 +--rw afi-safi-name identityref 336 | 337 +--rw ipv4-unicast 338 | ... 339 +--rw ipv6-unicast 340 | ... 341 +--rw ipv4-labeled-unicast 342 | ... 343 +--rw ipv6-labeled-unicast 344 | ... 345 +--rw l3vpn-ipv4-unicast 346 | ... 347 +--rw l3vpn-ipv6-unicast 348 | ... 349 +--rw l3vpn-ipv4-multicast 350 | ... 351 +--rw l3vpn-ipv6-multicast 352 | ... 353 +--rw l2vpn-vpls 354 | ... 355 +--rw l2vpn-evpn 356 | ... 358 2.2. Policy configuration overview 360 The BGP policy configuration model augments the generic YANG routing 361 policy model described in A YANG Data Model for Routing Policy 362 Management [I-D.ietf-rtgwg-policy-model], which represents a 363 condition-action policy framework for routing. This model adds BGP- 364 specific conditions (e.g., matching on the community attribute), and 365 actions (e.g., setting local preference) to the generic policy 366 framework. 368 Policies that are defined in the routing-policy model are referenced 369 in multiple places within the model: 371 * within the global instance, where a policy applies to all address- 372 families for all peers. 374 * on a global AFI-SAFI basis, where policies apply to all peers for 375 a particular address-family. 377 * on a per-peer-group or per-neighbor basis - where the policy 378 applies to all address-families for the particular group or 379 neighbor. 381 * on a per-afi-safi basis within a neighbor or peer-group context, 382 where the policy is specific to the AFI-SAFI for a a specific 383 neighbor or group. 385 module: ietf-bgp-policy 387 augment /rt-pol:routing-policy/rt-pol:defined-sets: 388 +--rw bgp-defined-sets 389 ... 390 augment /rt-pol:routing-policy/rt-pol:policy-definitions 391 /rt-pol:policy-definition/rt-pol:statements 392 /rt-pol:statement/rt-pol:conditions: 393 +--rw bgp-conditions 394 ... 395 augment /rt-pol:routing-policy/rt-pol:policy-definitions 396 /rt-pol:policy-definition/rt-pol:statements 397 /rt-pol:statement/rt-pol:actions: 398 +--rw bgp-actions 399 ... 401 2.3. BGP RIB overview 403 The RIB data model represents the BGP RIB contents. The model 404 supports five logical RIBs per address family. 406 An abridged version of the tree shows the RIB portion of the tree 407 diagram. 409 module: ietf-bgp 411 augment /rt:routing/rt:control-plane-protocols 412 /rt:control-plane-protocol: 413 +--rw bgp 414 +--ro rib 415 +--ro afi-safis 416 +--ro afi-safi* [name] 417 +--ro name identityref 418 +--ro ipv4-unicast 419 | +--ro loc-rib 420 | | +--ro routes 421 | | +--ro route* [prefix origin path-id] 422 | | | ... 423 | | +--ro clear-routes {bt:clear-routes}? 424 | | ... 425 | +--ro neighbors 426 | +--ro neighbor* [neighbor-address] 427 | +--ro neighbor-address inet:ip-address 428 | +--ro adj-rib-in-pre 429 | | ... 430 | +--ro adj-rib-in-post 431 | | ... 432 | +--ro adj-rib-out-pre 433 | | ... 434 | +--ro adj-rib-out-post 435 | ... 436 +--ro ipv6-unicast 437 +--ro loc-rib 438 | +--ro routes 439 | +--ro route* [prefix origin path-id] 440 | | ... 441 | +--ro clear-routes {bt:clear-routes}? 442 | ... 443 +--ro neighbors 444 +--ro neighbor* [neighbor-address] 445 +--ro neighbor-address inet:ip-address 446 +--ro adj-rib-in-pre 447 | ... 448 +--ro adj-rib-in-post 449 | ... 450 +--ro adj-rib-out-pre 451 | ... 452 +--ro adj-rib-out-post 453 ... 455 2.3.1. Local Routing 457 The loc-rib is the main BGP routing table for the local routing 458 instance, containing best-path selections for each prefix. The loc- 459 rib table may contain multiple routes for a given prefix, with an 460 attribute to indicate which was selected as the best-path. Note that 461 multiple paths may be used or advertised even if only one path is 462 marked as best, e.g., when using BGP add-paths. An implementation 463 may choose to mark multiple paths in the RIB as best-path by setting 464 the flag to true for multiple entries. 466 2.3.2. Pre updates per-neighbor 468 The adj-rib-in-pre table is a per-neighbor table containing the NLRI 469 updates received from the neighbor before any local input policy 470 rules or filters have been applied. This can be considered the 'raw' 471 updates from a given neighbor. 473 2.3.3. Post updates per-neighbor 475 The adj-rib-in-post table is a per-neighbor table containing the 476 routes received from the neighbor that are eligible for best-path 477 selection after local input policy rules have been applied. 479 2.3.4. Pre route advertisements per-neighbor 481 The adj-rib-out-pre table is a per-neighbor table containing routes 482 eligible for sending (advertising) to the neighbor before output 483 policy rules have been applied. 485 2.3.5. Post route advertisements per-neighbor 487 The adj-rib-out-post table is a per-neighbor table containing routes 488 eligible for sending (advertising) to the neighbor after output 489 policy rules have been applied. 491 3. Relation to other YANG data models 493 The BGP model augments the Routing Management model A YANG Data Model 494 for Routing Management [RFC8349] which defines the notion of routing, 495 routing protocols, and RIBs. The notion of Virtual Routing and 496 Forwarding (VRF) is derived by using the YANG Schema Mount [RFC8528] 497 to mount the Routing Management module under the YANG Data Model for 498 Network Instances [RFC8529]. 500 4. Security Considerations 502 The YANG module specified in this document defines a schema for data 503 that is designed to be accessed via network management protocols such 504 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 505 is the secure transport layer, and the mandatory-to-implement secure 506 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 507 is HTTPS, and the mandatory-to-implement secure transport is TLS 508 [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] 509 provides the means to restrict access for particular NETCONF or 510 RESTCONF users to a preconfigured subset of all available NETCONF or 511 RESTCONF protocol operations and content. 513 There are a number of data nodes defined in this YANG module that are 514 writable/creatable/deletable (i.e., config true, which is the 515 default). These data nodes may be considered sensitive or vulnerable 516 in some network environments. Write operations (e.g., edit-config) 517 to these data nodes without proper protection can have a negative 518 effect on network operations. Some of the subtrees and data nodes 519 and their sensitivity/vulnerability are described here. 521 - The attribute 'as'. If a user is allowed to change this attribute, 522 it will have the net effect of bringing down the entire routing 523 instance, causing it to delete all the current routing entries, and 524 learning new ones. 526 - The attribute 'identifier'. If a user is allowed to change this 527 attribute, it will have the net effect of this routing instance re- 528 advertising all its routes. 530 - The attribute 'distance'. If a user is allowed to change this 531 attribute, it will cause the preference for routes, e.g. external vs 532 internal to change. 534 - The attribute 'enabled' in the 'confederation' container. This 535 attribute defines whether a local-AS is part of a BGP federation. 537 - Finally, there are a whole set of route selection options such as 538 'always-compare-med', 'ignore-as-path-length' that affect the way the 539 system picks up a particular route. Being able to change will 540 adversely affect how the route selection happens. 542 Some of the readable data nodes in this YANG module may be considered 543 sensitive or vulnerable in some network environments. It is thus 544 important to control read access (e.g., via get, get-config, or 545 notification) to these data nodes. Some of the subtrees and data 546 nodes and their sensitivity/vulnerability are: 548 - The list of neighbors, and their attributes. Allowing a user to 549 read these attributes, in particular the address/port information may 550 allow a malicious user to launch an attack at the particular address/ 551 port. 553 - The 'rib' container. This container contains sensitive information 554 such as attribute sets, communities and external communities. Being 555 able to read the contents of this container will allow a malicious 556 user to understand how the system decide how to route a packet, and 557 thus try to affect a change. 559 Some of the RPC operations in this YANG module may be considered 560 sensitive or vulnerable in some network environments. It is thus 561 important to control access to these operations. These are the 562 operations and their sensitivity/vulnerability: 564 - The model allows for routes to be cleared using the 'clear' RPC 565 operations, causing the entire RIB table to be cleared. 567 - The model allows for statistics to be cleared by the 'clear' RPC 568 operation, causing all the individual statistics to be cleared. 570 - The model also allows for neighbors that have been learnt by the 571 system to be cleared by using the 'clear' RPC operation. 573 BGP OPSEC [RFC7454] describes several policies that can be used to 574 secure a BGP. In particular, it recommends securing the underlying 575 TCP session and to use Generalized TTL Security Mechanism (GTSM) 576 [RFC5082] capability to make it harder to spoof a BGP session. This 577 module allows implementations that want to support the capability to 578 configure a TTL value, under a feature flag. It also defines a 579 container 'secure-session' that can be augmented with 580 TCP-Authentication Option (TCP-AO) [RFC5925], or other methods to 581 secure a BGP session, and will be developed in a future version of 582 this draft. 584 5. IANA Considerations 586 This document registers three URIs and three YANG modules. 588 5.1. URI Registration 590 Following the format in the IETF XML registry [RFC3688] [RFC3688], 591 the following registration is requested to be made: 593 URI: urn:ietf:params:xml:ns:yang:ietf-bgp 594 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 595 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types 596 Registrant Contact: The IESG. XML: N/A, the requested URI is an XML 597 namespace. 599 5.2. YANG Module Name Registration 601 This document registers three YANG modules in the YANG Module Names 602 registry YANG [RFC6020]. 604 name: ietf-bgp 605 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp 606 prefix: bgp 607 reference: RFC XXXX 609 name: ietf-bgp-policy 610 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 611 prefix: bp 612 reference: RFC XXXX 614 name: ietf-bgp-types 615 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-types 616 prefix: bt 617 reference: RFC XXXX 619 6. YANG modules 621 The modules comprising the BGP configuration and operational model 622 are described by the YANG modules and submodules in the sections 623 below. 625 The main module, ietf-bgp.yang, includes the following submodules: 627 * ietf-bgp-common - defines the groupings that are common across 628 more than one context (where contexts are neighbor, group, global) 630 * ietf-bgp-common-multiprotocol - defines the groupings that are 631 common across more than one context, and relate to multiprotocol 632 BGP 634 * ietf-bgp-common-structure - defines groupings that are shared by 635 multiple contexts, but are used only to create structural 636 elements, i.e., containers (leaf nodes are defined in separate 637 groupings) 639 * ietf-bgp-peer-group - groupings with data specific to the peer 640 group context 642 * ietf-bgp-neighbor - groupings with data specific to the neighbor 643 context 645 * ietf-bgp-rib - grouping for representing BGP RIB. 647 Additionally, modules include: 649 * ietf-bgp-types - common type and identity definitions for BGP, 650 including BGP policy 652 * ietf-bgp-policy - BGP-specific policy data definitions for use 653 with [I-D.ietf-rtgwg-policy-model] (described in more detail 654 Section 2.2) 656 7. Structure of the YANG modules 658 The YANG model can be subdivided between the main module for base 659 items, types, policy data, and the RIB module. It references BGP 660 Communities Attribute [RFC1997], Route Refresh Capability for BGP-4 661 [RFC2918], NOPEER Community for BGP [RFC3765], BGP/MPLS IP Virtual 662 Private Networks (VPNs) [RFC4364], BGP-MPLS IP Virtual Private 663 Network (VPN) Extension for IPv6 VPN [RFC4659], Graceful Restart 664 Mechanism for BGP [RFC4724], Multiprotocol Extentions for BGP-4 665 [RFC4760], Virtual Private LAN Service (VPLS) Using BGP for 666 Auto-Discovery and Signaling [RFC4761], Autonomous System 667 Configuration for BGP [RFC5065], The Generalized TTL Security 668 Mechanism (GTSM) [RFC5082], Bidirectional Forward Detection (BFD) 669 [RFC5880], Bidirectional Forward Detection for IPv4 and IPv6 (Single 670 Hop) [RFC5881], Bidirectional Forwarding Detection (BFD) for Multihop 671 Paths [RFC5883], The TCP Authentication Option [RFC5925], BGP 672 Encodings and Procedures for Multicast in MPLS/BGP IP VPNs [RFC6514], 673 BGP Support for Four-Octet Autonomous System (AS) Number Space 674 [RFC6793], Advertisement of Multiple Paths in BGP [RFC7911], YANG Key 675 Chain [RFC8177], and Carrying Label Information in BGP-4 [RFC8277]. 677 7.1. Main module and submodules for base items 679 file "ietf-bgp@2021-07-11.yang" 680 module ietf-bgp { 681 yang-version 1.1; 682 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; 683 prefix bgp; 685 /* 686 * Import and Include 687 */ 689 import ietf-routing { 690 prefix rt; 691 reference 692 "RFC 8349, A YANG Data Model for Routing Management 693 (NMDA Version)."; 694 } 695 import ietf-routing-policy { 696 prefix rt-pol; 697 reference 698 "RFC ZZZZ, A YANG Data Model for Routing Policy Management."; 699 } 700 import ietf-interfaces { 701 prefix if; 702 reference 703 "RFC 8343, A YANG Data Model for Interface Management."; 704 } 705 import ietf-bgp-types { 706 prefix bt; 707 reference 708 "RFC XXXX, BGP YANG Model for Service Provider Network."; 709 } 710 import ietf-bfd-types { 711 prefix bfd-types; 712 reference 713 "RFC BBBB, YANG Data Model for Bidirectional Forward Detection."; 714 } 715 import ietf-inet-types { 716 prefix inet; 717 reference 718 "RFC 6991: Common YANG Data Types."; 719 } 720 import ietf-yang-types { 721 prefix yang; 722 reference 723 "RFC 6991: Common YANG Data Types."; 724 } 725 import ietf-key-chain { 726 prefix key-chain; 727 reference 728 "RFC 8177: YANG Key Chain."; 729 } 730 import ietf-tcp { 731 prefix tcp; 732 reference 733 "I-D.scharf-tcpm-yang-tcp: Transmission Control Protocol (TCP) 734 YANG Model."; 735 } 736 include ietf-bgp-common { 737 revision-date 2021-07-11; 738 } 739 include ietf-bgp-common-multiprotocol { 740 revision-date 2021-07-11; 742 } 743 include ietf-bgp-common-structure { 744 revision-date 2021-07-11; 745 } 746 include ietf-bgp-neighbor { 747 revision-date 2021-07-11; 748 } 749 include ietf-bgp-peer-group { 750 revision-date 2021-07-11; 751 } 752 include ietf-bgp-rib-types { 753 revision-date 2021-07-11; 754 } 755 include ietf-bgp-rib { 756 revision-date 2021-07-11; 757 } 758 include ietf-bgp-rib-attributes { 759 revision-date 2021-07-11; 760 } 761 include ietf-bgp-rib-tables { 762 revision-date 2021-07-11; 763 } 765 organization 766 "IETF IDR Working Group"; 767 contact 768 "WG Web: 769 WG List: 771 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 772 Keyur Patel (keyur at arrcus.com), 773 Susan Hares (shares at ndzh.com), 774 Jeffrey Haas (jhaas at juniper.net)."; 776 description 777 "This module describes a YANG model for BGP protocol 778 configuration. It is a limited subset of all of the configuration 779 parameters available in the variety of vendor implementations, 780 hence it is expected that it would be augmented with vendor- 781 specific configuration data as needed. Additional modules or 782 submodules to handle other aspects of BGP configuration, 783 including policy, VRFs, VPNs, and additional address families 784 are also expected. 786 This model supports the following BGP configuration level 787 hierarchy: 789 BGP 790 | 791 +-> [ global BGP configuration ] 792 +-> AFI / SAFI global 793 +-> peer group 794 +-> [ peer group config ] 795 +-> AFI / SAFI [ per-AFI overrides ] 796 +-> neighbor 797 +-> [ neighbor config ] 798 +-> [ optional pointer to peer-group ] 799 +-> AFI / SAFI [ per-AFI overrides ] 801 Copyright (c) 2021 IETF Trust and the persons identified as 802 authors of the code. All rights reserved. 804 Redistribution and use in source and binary forms, with or 805 without modification, is permitted pursuant to, and subject to 806 the license terms contained in, the Simplified BSD License set 807 forth in Section 4.c of the IETF Trust's Legal Provisions 808 Relating to IETF Documents 809 (https://trustee.ietf.org/license-info). 811 This version of this YANG module is part of RFC XXXX 812 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 813 for full legal notices. 815 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 816 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 817 'MAY', and 'OPTIONAL' in this document are to be interpreted as 818 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 819 they appear in all capitals, as shown here."; 821 revision 2021-07-11 { 822 description 823 "Initial Version"; 824 reference 825 "RFC XXXX, BGP Model for Service Provider Network "; 826 } 828 /* 829 * Identity 830 */ 832 identity bgp { 833 base rt:routing-protocol; 834 description 835 "BGP protocol."; 836 } 837 /* 838 * Containers 839 */ 841 augment "/rt:routing/rt:control-plane-protocols/" 842 + "rt:control-plane-protocol" { 843 when "derived-from-or-self(rt:type, 'bgp')" { 844 description 845 "This augmentation is valid for a routing protocol 846 instance of BGP."; 847 } 848 description 849 "BGP protocol augmentation of ietf-routing module 850 control-plane-protocol."; 851 container bgp { 852 description 853 "Top-level configuration for the BGP router."; 854 container global { 855 presence "Enables global configuration of BGP"; 856 description 857 "Global configuration for the BGP router."; 858 leaf as { 859 type inet:as-number; 860 mandatory true; 861 description 862 "Local autonomous system number of the router. Uses 863 the 32-bit as-number type from the model in RFC 6991."; 864 } 865 leaf identifier { 866 type yang:dotted-quad; 867 description 868 "BGP Identifier of the router - an unsigned 32-bit, 869 non-zero integer that should be unique within an AS. 870 The value of the BGP Identifier for a BGP speaker is 871 determined upon startup and is the same for every local 872 interface and BGP peer."; 873 reference 874 "RFC 6286: AS-Wide Unique BGP ID for BGP-4. Section 2.1"; 875 } 876 container distance { 877 description 878 "Administrative distances (or preferences) assigned to 879 routes received from different sources (external, and 880 internal)."; 881 leaf external { 882 type uint8 { 883 range "1..255"; 884 } 885 description 886 "Administrative distances for routes learned from 887 external BGP (eBGP)."; 888 } 889 leaf internal { 890 type uint8 { 891 range "1..255"; 892 } 893 description 894 "Administrative distances for routes learned from 895 internal BGP (iBGP)."; 896 } 897 } 898 container confederation { 899 description 900 "Configuration options specifying parameters when the 901 local router is within an autonomous system which is 902 part of a BGP confederation."; 903 leaf enabled { 904 type boolean; 905 description 906 "When this leaf is set to true it indicates that 907 the local-AS is part of a BGP confederation."; 908 } 909 leaf identifier { 910 type inet:as-number; 911 description 912 "Confederation identifier for the autonomous system."; 913 } 914 leaf-list member-as { 915 type inet:as-number; 916 description 917 "Remote autonomous systems that are to be treated 918 as part of the local confederation."; 919 } 920 } 921 container graceful-restart { 922 if-feature "bt:graceful-restart"; 923 description 924 "Parameters relating the graceful restart mechanism for 925 BGP."; 926 uses graceful-restart-config; 927 } 928 uses global-group-use-multiple-paths; 929 uses route-selection-options; 930 container afi-safis { 931 description 932 "List of address-families associated with the BGP 933 instance."; 934 list afi-safi { 935 key "name"; 936 description 937 "AFI,SAFI configuration available for the 938 neighbor or group."; 939 uses mp-afi-safi-config; 940 uses state; 941 container graceful-restart { 942 if-feature "bt:graceful-restart"; 943 description 944 "Parameters relating to BGP graceful-restart"; 945 uses mp-afi-safi-graceful-restart-config; 946 } 947 uses route-selection-options; 948 uses global-group-use-multiple-paths; 949 uses mp-all-afi-safi-list-contents; 950 } 951 } 952 uses rt-pol:apply-policy-group; 953 uses state; 954 } 956 container neighbors { 957 description 958 "Configuration for BGP neighbors."; 960 list neighbor { 961 key "remote-address"; 963 description 964 "List of BGP neighbors configured on the local system, 965 uniquely identified by remote IPv[46] address."; 967 leaf local-address { 968 type inet:ip-address; 969 config false; 970 description 971 "The local IP address of this entry's BGP connection."; 972 } 974 leaf local-port { 975 type inet:port-number; 976 config false; 977 description 978 "The local port for the TCP connection between 979 the BGP peers."; 980 } 981 leaf remote-address { 982 type inet:ip-address; 983 description 984 "The remote IP address of this entry's BGP peer."; 985 } 987 leaf remote-port { 988 type inet:port-number; 989 config false; 990 description 991 "The remote port for the TCP connection 992 between the BGP peers. Note that the 993 objects local-addr, local-port, remote-addr, and 994 reemote-port provide the appropriate 995 reference to the standard MIB TCP 996 connection table."; 997 } 999 leaf peer-type { 1000 type bt:peer-type; 1001 config false; 1002 description 1003 "The type of peering session associated with this 1004 neighbor."; 1005 reference 1006 "RFC 4271: A Border Gateway Protocol 4 (BGP-4) 1007 Section 1.1 for iBGP and eBGP. 1008 RFC 5065: Autonomous System Configuration 1009 for Confederation internal and external."; 1010 } 1012 leaf peer-group { 1013 type leafref { 1014 path "../../../peer-groups/peer-group/name"; 1015 } 1016 description 1017 "The peer-group with which this neighbor is associated"; 1018 } 1020 leaf identifier { 1021 type yang:dotted-quad; 1022 config false; 1023 description 1024 "The BGP Identifier of this entry's BGP peer. 1025 This entry MUST be 0.0.0.0 unless the 1026 session state is in the openconfirm or the 1027 established state."; 1028 reference 1029 "RFC 4271, Section 4.2, 'BGP Identifier'."; 1030 } 1032 leaf enabled { 1033 type boolean; 1034 default "true"; 1035 description 1036 "Whether the BGP peer is enabled. In cases where the 1037 enabled leaf is set to false, the local system should 1038 not initiate connections to the neighbor, and should 1039 not respond to TCP connections attempts from the 1040 neighbor. If the state of the BGP session is 1041 ESTABLISHED at the time that this leaf is set to false, 1042 the BGP session should be ceased. 1044 A transition from 'false' to 'true' will cause 1045 the BGP Manual Start Event to be generated. 1046 A transition from 'true' to 'false' will cause 1047 the BGP Manual Stop Event to be generated. 1048 This parameter can be used to restart BGP peer 1049 connections. Care should be used in providing 1050 write access to this object without adequate 1051 authentication."; 1052 reference 1053 "RFC 4271, Section 8.1.2."; 1054 } 1056 leaf secure-session-enable { 1057 type boolean; 1058 default "false"; 1059 description 1060 "Does this session need to be secured?"; 1061 } 1063 container secure-session { 1064 when "../secure-session-enable = 'true'"; 1065 description 1066 "Container for describing how a particular BGP session 1067 is to be secured."; 1069 choice option { 1070 case ao { 1071 uses tcp:ao; 1072 leaf ao-keychain { 1073 type key-chain:key-chain-ref; 1074 description 1075 "Reference to the key chain that will be used by 1076 this model. Applicable for TCP-AO and TCP-MD5 1077 only"; 1078 reference 1079 "RFC 8177: YANG Key Chain."; 1080 } 1081 description 1082 "Uses TCP-AO to secure the session. Parameters for 1083 those are defined as a grouping in the TCP YANG 1084 model."; 1085 reference 1086 "RFC 5925 - The TCP Authentication Option."; 1087 } 1089 case md5 { 1090 uses tcp:md5; 1091 leaf md5-keychain { 1092 type key-chain:key-chain-ref; 1093 description 1094 "Reference to the key chain that will be used by 1095 this model. Applicable for TCP-AO and TCP-MD5 1096 only"; 1097 reference 1098 "RFC 8177: YANG Key Chain."; 1099 } 1100 description 1101 "Uses TCP-MD5 to secure the session. Parameters for 1102 those are defined as a grouping in the TCP YANG 1103 model."; 1104 reference 1105 "RFC 5925: The TCP Authentication Option."; 1106 } 1108 case ipsec { 1109 leaf sa { 1110 type string; 1111 description 1112 "Security Association (SA) name."; 1113 } 1114 description 1115 "Currently, the IPsec/IKE YANG model has no 1116 grouping defined that this model can use. When 1117 such a grouping is defined, this model can import 1118 the grouping to add the key parameters 1119 needed to kick of IKE."; 1120 } 1121 description 1122 "Choice of authentication options."; 1123 } 1124 } 1125 leaf ttl-security { 1126 if-feature "bt:ttl-security"; 1127 type uint8; 1128 default "255"; 1129 description 1130 "BGP Time To Live (TTL) security check."; 1131 reference 1132 "RFC 5082: The Generalized TTL Security Mechanism 1133 (GTSM), 1134 RFC 7454: BGP Operations and Security."; 1135 } 1136 uses neighbor-group-config; 1137 leaf session-state { 1138 type enumeration { 1139 enum idle { 1140 description 1141 "Neighbor is down, and in the Idle state of the FSM"; 1142 } 1143 enum connect { 1144 description 1145 "Neighbor is down, and the session is waiting for the 1146 underlying transport session to be established"; 1147 } 1148 enum active { 1149 description 1150 "Neighbor is down, and the local system is awaiting a 1151 connection from the remote peer"; 1152 } 1153 enum opensent { 1154 description 1155 "Neighbor is in the process of being established. The 1156 local system has sent an OPEN message"; 1157 } 1158 enum openconfirm { 1159 description 1160 "Neighbor is in the process of being established. 1161 The local system is awaiting a NOTIFICATION or 1162 KEEPALIVE message"; 1163 } 1164 enum established { 1165 description 1166 "Neighbor is up - the BGP session with the peer is 1167 established"; 1168 } 1169 } 1170 // notification does not like a non-config statement. 1171 // config false; 1172 description 1173 "The BGP peer connection state."; 1174 reference 1175 "RFC 4271, Section 8.1.2."; 1176 } 1177 leaf last-established { 1178 type yang:date-and-time; 1179 config false; 1180 description 1181 "This timestamp indicates the time that the BGP session 1182 last transitioned in or out of the Established state. 1183 The value is the timestamp in seconds relative to the 1184 Unix Epoch (Jan 1, 1970 00:00:00 UTC). 1186 The BGP session uptime can be computed by clients as 1187 the difference between this value and the current time 1188 in UTC (assuming the session is in the ESTABLISHED 1189 state, per the session-state leaf)."; 1190 } 1191 leaf-list negotiated-capabilities { 1192 type identityref { 1193 base bt:bgp-capability; 1194 } 1195 config false; 1196 description 1197 "Negotiated BGP capabilities."; 1198 } 1199 leaf negotiated-hold-time { 1200 type uint16; 1201 config false; 1202 description 1203 "The negotiated hold-time for the BGP session"; 1204 } 1205 leaf last-error { 1206 type binary { 1207 length "2"; 1208 } 1209 // notification does not like non-config statement. 1210 // config false; 1211 description 1212 "The last error code and subcode seen by this 1213 peer on this connection. If no error has 1214 occurred, this field is zero. Otherwise, the 1215 first byte of this two byte OCTET STRING 1216 contains the error code, and the second byte 1217 contains the subcode."; 1218 reference 1219 "RFC 4271, Section 4.5."; 1220 } 1221 leaf fsm-established-time { 1222 type yang:gauge32; 1223 units "seconds"; 1224 config false; 1225 description 1226 "This timer indicates how long (in 1227 seconds) this peer has been in the 1228 established state or how long 1229 since this peer was last in the 1230 established state. It is set to zero when 1231 a new peer is configured or when the router is 1232 booted."; 1233 reference 1234 "RFC 4271, Section 8."; 1235 } 1236 container timers { 1237 description 1238 "Timers related to a BGP neighbor"; 1239 uses neighbor-group-timers-config; 1240 } 1241 container transport { 1242 description 1243 "Transport session parameters for the BGP neighbor"; 1244 uses neighbor-group-transport-config; 1245 } 1246 leaf treat-as-withdraw { 1247 type boolean; 1248 default "false"; 1249 description 1250 "Specify whether erroneous UPDATE messages for which 1251 the NLRI can be extracted are treated as though the 1252 NLRI is withdrawn - avoiding session reset"; 1253 reference 1254 "RFC 7606: Revised Error Handling for BGP UPDATE 1255 Messages."; 1256 } 1257 leaf erroneous-update-messages { 1258 type uint32; 1259 config false; 1260 description 1261 "The number of BGP UPDATE messages for which the 1262 treat-as-withdraw mechanism has been applied based on 1263 erroneous message contents"; 1264 } 1265 container graceful-restart { 1266 if-feature "bt:graceful-restart"; 1267 description 1268 "Parameters relating the graceful restart mechanism for 1269 BGP"; 1270 uses graceful-restart-config; 1271 leaf peer-restart-time { 1272 type uint16 { 1273 range "0..4096"; 1274 } 1275 config false; 1276 description 1277 "The period of time (advertised by the peer) that the 1278 peer expects a restart of a BGP session to take."; 1279 } 1280 leaf peer-restarting { 1281 type boolean; 1282 config false; 1283 description 1284 "This flag indicates whether the remote neighbor is 1285 currently in the process of restarting, and hence 1286 received routes are currently stale."; 1287 } 1288 leaf local-restarting { 1289 type boolean; 1290 config false; 1291 description 1292 "This flag indicates whether the local neighbor is 1293 currently restarting. The flag is cleared after all 1294 NLRI have been advertised to the peer, and the 1295 End-of-RIB (EOR) marker has been cleared."; 1296 } 1297 leaf mode { 1298 type enumeration { 1299 enum helper-only { 1300 description 1301 "The local router is operating in helper-only 1302 mode, and hence will not retain forwarding state 1303 during a local session restart, but will do so 1304 during a restart of the remote peer"; 1305 } 1306 enum bilateral { 1307 description 1308 "The local router is operating in both helper 1309 mode, and hence retains forwarding state during 1310 a remote restart, and also maintains forwarding 1311 state during local session restart"; 1312 } 1313 enum remote-helper { 1314 description 1315 "The local system is able to retain routes during 1316 restart but the remote system is only able to 1317 act as a helper"; 1318 } 1319 } 1320 config false; 1321 description 1322 "This leaf indicates the mode of operation of BGP 1323 graceful restart with the peer"; 1324 } 1325 } 1326 uses structure-neighbor-group-logging-options; 1327 uses structure-neighbor-group-ebgp-multihop; 1328 uses structure-neighbor-group-route-reflector; 1329 uses structure-neighbor-group-as-path-options; 1330 uses structure-neighbor-group-add-paths; 1331 uses bgp-neighbor-use-multiple-paths; 1332 uses rt-pol:apply-policy-group; 1333 container afi-safis { 1334 description 1335 "Per-address-family configuration parameters associated 1336 with the neighbor"; 1337 uses bgp-neighbor-afi-safi-list; 1338 } 1339 container statistics { 1340 description 1341 "Statistics per neighbor."; 1343 leaf peer-fsm-established-transitions { 1344 type yang:counter64; 1345 config false; 1346 description 1347 "Number of transitions to the Established state for 1348 the neighbor session. This value is analogous to the 1349 bgpPeerFsmEstablishedTransitions object from the 1350 standard BGP-4 MIB"; 1351 reference 1352 "RFC 4273 - Definitions of Managed Objects for BGP-4"; 1353 } 1354 leaf fsm-established-transitions { 1355 type yang:counter32; 1356 config false; 1357 description 1358 "The total number of times the BGP FSM 1359 transitioned into the established state 1360 for this peer."; 1361 reference 1362 "RFC 4271, Section 8."; 1363 } 1364 container messages { 1365 config false; 1366 description 1367 "Counters for BGP messages sent and received from the 1368 neighbor"; 1369 leaf in-total-messages { 1370 type yang:counter32; 1371 config false; 1372 description 1373 "The total number of messages received 1374 from the remote peer on this connection."; 1375 reference 1376 "RFC 4271, Section 4."; 1377 } 1378 leaf out-total-messages { 1379 type yang:counter32; 1380 config false; 1381 description 1382 "The total number of messages transmitted to 1383 the remote peer on this connection."; 1384 reference 1385 "RFC 4271, Section 4."; 1386 } 1387 leaf in-update-elapsed-time { 1388 type yang:gauge32; 1389 units "seconds"; 1390 config false; 1391 description 1392 "Elapsed time (in seconds) since the last BGP 1393 UPDATE message was received from the peer. 1394 Each time in-updates is incremented, 1395 the value of this object is set to zero (0)."; 1396 reference 1397 "RFC 4271, Section 4.3. 1398 RFC 4271, Section 8.2.2, Established state."; 1399 } 1400 container sent { 1401 description 1402 "Counters relating to BGP messages sent to the 1403 neighbor"; 1404 uses bgp-neighbor-counters-message-types-state; 1405 } 1406 container received { 1407 description 1408 "Counters for BGP messages received from the 1409 neighbor"; 1410 uses bgp-neighbor-counters-message-types-state; 1411 } 1412 } 1413 container queues { 1414 config false; 1415 description 1416 "Counters related to queued messages associated with 1417 the BGP neighbor"; 1418 leaf input { 1419 type uint32; 1420 description 1421 "The number of messages received from the peer 1422 currently queued"; 1423 } 1424 leaf output { 1425 type uint32; 1426 description 1427 "The number of messages queued to be sent to the 1428 peer"; 1429 } 1430 } 1431 action clear { 1432 if-feature "bt:clear-statistics"; 1433 description 1434 "Clear statistics action command. 1436 Execution of this command should result in all the 1437 counters to be cleared and set to 0."; 1439 input { 1440 leaf clear-at { 1441 type yang:date-and-time; 1442 description 1443 "Time when the clear action needs to be 1444 executed."; 1445 } 1446 } 1447 output { 1448 leaf clear-finished-at { 1449 type yang:date-and-time; 1450 description 1451 "Time when the clear action command completed."; 1452 } 1453 } 1454 } 1455 } 1456 } 1457 notification established { 1458 leaf remote-address { 1459 type leafref { 1460 path "../../neighbor/remote-address"; 1462 } 1463 description 1464 "IP address of the neighbor that went into established 1465 state."; 1466 } 1467 leaf last-error { 1468 type leafref { 1469 path "../../neighbor/last-error"; 1470 } 1471 description 1472 "The last error code and subcode seen by this 1473 peer on this connection. If no error has 1474 occurred, this field is zero. Otherwise, the 1475 first octet of this two byte OCTET STRING 1476 contains the error code, and the second octet 1477 contains the subcode."; 1478 reference 1479 "RFC 4271, Section 4.5."; 1480 } 1481 leaf session-state { 1482 type leafref { 1483 path "../../neighbor/session-state"; 1484 } 1485 description 1486 "The BGP peer connection state."; 1487 reference 1488 "RFC 4271, Section 8.2.2."; 1489 } 1490 description 1491 "The established event is generated 1492 when the BGP FSM enters the established state."; 1493 } 1495 notification backward-transition { 1496 leaf remote-addr { 1497 type leafref { 1498 path "../../neighbor/remote-address"; 1499 } 1500 description 1501 "IP address of the neighbor that changed its state from 1502 established state."; 1503 } 1504 leaf last-error { 1505 type leafref { 1506 path "../../neighbor/last-error"; 1507 } 1508 description 1509 "The last error code and subcode seen by this 1510 peer on this connection. If no error has 1511 occurred, this field is zero. Otherwise, the 1512 first byte of this two byte OCTET STRING 1513 contains the error code, and the second byte 1514 contains the subcode."; 1515 reference 1516 "RFC 4271, Section 4.5."; 1517 } 1518 leaf session-state { 1519 type leafref { 1520 path "../../neighbor/session-state"; 1521 } 1522 description 1523 "The BGP peer connection state."; 1524 reference 1525 "RFC 4271, Section 8.2.2."; 1526 } 1527 description 1528 "The backward-transition event is 1529 generated when the BGP FSM moves from a higher 1530 numbered state to a lower numbered state."; 1531 } 1532 action clear { 1533 if-feature "bt:clear-neighbors"; 1534 description 1535 "Clear neighbors action."; 1537 input { 1538 choice operation { 1539 default operation-admin; 1540 description 1541 "The type of operation for the clear action."; 1542 case operation-admin { 1543 leaf admin { 1544 type empty; 1545 description 1546 "Closes the Established BGP session with a BGP 1547 NOTIFICATION message with the Administrative 1548 Reset error subcode."; 1549 reference 1550 "RFC 4486 - Subcodes for BGP Cease Notification 1551 Message."; 1552 } 1553 } 1554 case operation-hard { 1555 leaf hard { 1556 type empty; 1557 description 1558 "Closes the Established BGP session with a BGP 1559 NOTIFICATION message with the Hard Reset error 1560 subcode."; 1561 reference 1562 "RFC 8538, Section 3 - Notification Message 1563 Support for BGP Graceful Restart."; 1564 } 1565 } 1566 case operation-soft { 1567 leaf soft { 1568 type empty; 1569 description 1570 "Re-sends the current Adj-Rib-Out to this 1571 neighbor."; 1572 } 1573 } 1574 case operation-soft-inbound { 1575 leaf soft-inbound { 1576 if-feature "bt:route-refresh"; 1577 type empty; 1578 description 1579 "Requests the Adj-Rib-In for this neighbor to be 1580 re-sent using the BGP Route Refresh feature."; 1581 } 1582 } 1583 } 1585 leaf clear-at { 1586 type yang:date-and-time; 1587 description 1588 "Time when the clear action command needs to be 1589 executed."; 1590 } 1591 } 1592 output { 1593 leaf clear-finished-at { 1594 type yang:date-and-time; 1595 description 1596 "Time when the clear action command completed."; 1597 } 1598 } 1599 } 1600 } 1601 container peer-groups { 1602 description 1603 "Configuration for BGP peer-groups"; 1604 uses bgp-peer-group-list; 1606 } 1607 container interfaces { 1608 list interface { 1609 key "name"; 1610 leaf name { 1611 type if:interface-ref; 1612 description 1613 "Reference to the interface within the routing instance."; 1614 } 1615 container bfd { 1616 if-feature "bt:bfd"; 1617 uses bfd-types:client-cfg-parms; 1618 description 1619 "BFD client configuration."; 1620 reference 1621 "RFC BBBB - YANG Data Model for Bidirectional Forwarding 1622 Detection."; 1623 } 1624 description 1625 "List of interfaces within the routing instance."; 1626 } 1627 description 1628 "Interface specific parameters."; 1629 } 1630 uses rib; 1631 } 1632 } 1633 } 1634 1636 file "ietf-bgp-common@2021-07-11.yang" 1637 submodule ietf-bgp-common { 1638 yang-version 1.1; 1639 belongs-to ietf-bgp { 1640 prefix bgp; 1641 } 1643 import ietf-bgp-types { 1644 prefix bt; 1645 reference 1646 "RFC XXXX: BGP Model for Service Provider Network."; 1647 } 1648 import ietf-inet-types { 1649 prefix inet; 1650 reference 1651 "RFC 6991: Common YANG Data Types."; 1652 } 1653 organization 1654 "IETF IDR Working Group"; 1655 contact 1656 "WG Web: 1657 WG List: 1659 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1660 Keyur Patel (keyur at arrcus.com), 1661 Susan Hares (shares at ndzh.com, 1662 Jeffrey Haas (jhaas at juniper.net)."; 1664 description 1665 "This sub-module contains common groupings that are common across 1666 multiple contexts within the BGP module. That is to say that 1667 they may be application to a subset of global, peer-group, or 1668 neighbor contexts. 1670 Copyright (c) 2021 IETF Trust and the persons identified as 1671 authors of the code. All rights reserved. 1673 Redistribution and use in source and binary forms, with or 1674 without modification, is permitted pursuant to, and subject to 1675 the license terms contained in, the Simplified BSD License set 1676 forth in Section 4.c of the IETF Trust's Legal Provisions 1677 Relating to IETF Documents 1678 (https://trustee.ietf.org/license-info). 1680 This version of this YANG module is part of RFC XXXX 1681 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 1682 for full legal notices. 1684 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 1685 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 1686 'MAY', and 'OPTIONAL' in this document are to be interpreted as 1687 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 1688 they appear in all capitals, as shown here."; 1690 revision 2021-07-11 { 1691 description 1692 "Initial Version"; 1693 reference 1694 "RFC XXXX, BGP Model for Service Provider Network."; 1695 } 1697 grouping neighbor-group-timers-config { 1698 description 1699 "Config parameters related to timers associated with the BGP 1700 peer"; 1702 leaf connect-retry-interval { 1703 type uint16 { 1704 range "1..max"; 1705 } 1706 units "seconds"; 1707 default "120"; 1708 description 1709 "Time interval (in seconds) for the ConnectRetryTimer. The 1710 suggested value for this timer is 120 seconds."; 1711 reference 1712 "RFC 4271, Section 8.2.2. This is the value used 1713 to initialize the 'ConnectRetryTimer'."; 1714 } 1715 leaf hold-time { 1716 type uint16 { 1717 range "0 | 3..65535"; 1718 } 1719 units "seconds"; 1720 default "90"; 1721 description 1722 "Time interval (in seconds) for the HoldTimer established 1723 with the peer. When read as operational data (ro), the 1724 value of this object is calculated by this BGP speaker, 1725 using the smaller of the values in hold-time that was 1726 configured (rw) in the running datastore and the Hold Time 1727 received in the OPEN message. 1729 This value must be at least three seconds 1730 if it is not zero (0). 1732 If the Hold Timer has not been established 1733 with the peer this object MUST have a value 1734 of zero (0). 1736 If the configured value of hold-time object was 1737 a value of (0), then when read this object MUST have a 1738 value of (0) also."; 1739 reference 1740 "RFC 4271, Section 4.2. 1741 RFC 4271, Section 10."; 1742 } 1743 leaf keepalive { 1744 type uint16 { 1745 range "0..21845"; 1746 } 1747 units "seconds"; 1748 description 1749 "When used as a configuration (rw) value, this Time interval 1750 (in seconds) for the KeepAlive timer configured for this BGP 1751 speaker with this peer. A reasonable maximum value for this 1752 timer would be one-third of the configured hold-time. 1754 In the absence of explicit configuration of the keepalive 1755 value, operationally it SHOULD have a value of one-third of 1756 the negotiated hold-time. 1758 If the value of this object is zero (0), no periodic 1759 KEEPALIVE messages are sent to the peer after the BGP 1760 connection has been established. 1762 The actual time interval for the KEEPALIVE messages is 1763 indicated by operational value of keepalive."; 1764 reference 1765 "RFC 4271, Section 4.4. 1766 RFC 4271, Section 10."; 1767 } 1768 leaf min-as-origination-interval { 1769 type uint16 { 1770 range "0..max"; 1771 } 1772 units "seconds"; 1773 description 1774 "Time interval (in seconds) for the MinASOriginationInterval 1775 timer. The suggested value for this timer is 15 seconds."; 1776 reference 1777 "RFC 4271, Section 9.2.1.2. 1778 RFC 4271, Section 10."; 1779 } 1780 leaf min-route-advertisement-interval { 1781 type uint16 { 1782 range "0..max"; 1783 } 1784 units "seconds"; 1785 description 1786 "Time interval (in seconds) for the 1787 MinRouteAdvertisementInterval timer. 1788 The suggested value for this timer is 30 1789 seconds for EBGP connections and 5 1790 seconds for IBGP connections."; 1791 reference 1792 "RFC 4271, Section 9.2.1.1. 1793 RFC 4271, Section 10."; 1794 } 1795 } 1797 grouping neighbor-group-config { 1798 description 1799 "Neighbor level configuration items."; 1800 leaf peer-as { 1801 type inet:as-number; 1802 description 1803 "AS number of the peer."; 1804 } 1805 leaf local-as { 1806 type inet:as-number; 1807 description 1808 "The local autonomous system number that is to be used when 1809 establishing sessions with the remote peer or peer group, if 1810 this differs from the global BGP router autonomous system 1811 number."; 1812 } 1814 leaf remove-private-as { 1815 type bt:remove-private-as-option; 1816 description 1817 "When this leaf is specified, remove private AS numbers from 1818 updates sent to peers."; 1819 } 1820 container route-flap-damping { 1821 if-feature "bt:damping"; 1822 leaf enable { 1823 type boolean; 1824 default "false"; 1825 description 1826 "Enable route flap damping."; 1827 } 1828 leaf suppress-above { 1829 type decimal64 { 1830 fraction-digits 1; 1831 } 1832 default "3.0"; 1833 description 1834 "This is the value of the instability metric at which 1835 route suppression takes place. A route is not installed 1836 in the forwarding information base (FIB), or announced 1837 even if it is reachable during the period that it is 1838 suppressed."; 1839 } 1840 leaf reuse-above { 1841 type decimal64 { 1842 fraction-digits 1; 1843 } 1844 default "2.0"; 1845 description 1846 "This is the value of the instability metric at which a 1847 suppressed route becomes unsuppressed if it is reachable 1848 but currently suppressed. The value assigned to 1849 reuse-below must be less than suppress-above."; 1850 } 1851 leaf max-flap { 1852 type decimal64 { 1853 fraction-digits 1; 1854 } 1855 default "16.0"; 1856 description 1857 "This is the upper limit of the instability metric. This 1858 value must be greater than the larger of 1 and 1859 suppress-above."; 1860 } 1861 leaf reach-decay { 1862 type uint32; 1863 units "seconds"; 1864 default "300"; 1865 description 1866 "This value specifies the time desired for the instability 1867 metric value to reach one-half of its current value when 1868 the route is reachable. This half-life value determines 1869 the rate at which the metric value is decayed. A smaller 1870 half-life value makes a suppressed route reusable sooner 1871 than a larger value."; 1872 } 1873 leaf unreach-decay { 1874 type uint32; 1875 units "seconds"; 1876 default "900"; 1877 description 1878 "This value acts the same as reach-decay except that it 1879 specifies the rate at which the instability metric is 1880 decayed when a route is unreachable. It should have a 1881 value greater than or equal to reach-decay."; 1882 } 1883 leaf keep-history { 1884 type uint32; 1885 units "seconds"; 1886 default "1800"; 1887 description 1888 "This value specifies the period over which the route 1889 flapping history is to be maintained for a given route. 1890 The size of the configuration arrays described below is 1891 directly affected by this value."; 1892 } 1893 description 1894 "Routes learned via BGP are subject to weighted route 1895 dampening."; 1896 } 1897 leaf send-community { 1898 if-feature "bt:send-communities"; 1899 type bt:community-type; 1900 description 1901 "When supported, this tells the router to propagate any 1902 prefixes that are attached to these community-types. 1903 The value of 0 implies 'none'."; 1904 } 1905 leaf description { 1906 type string; 1907 description 1908 "An optional textual description (intended primarily for use 1909 with a peer or group"; 1910 } 1911 } 1913 grouping neighbor-group-transport-config { 1914 description 1915 "Configuration parameters relating to the transport protocol 1916 used by the BGP session to the peer."; 1917 leaf tcp-mss { 1918 type uint16; 1919 description 1920 "Sets the max segment size for BGP TCP sessions."; 1921 } 1922 leaf mtu-discovery { 1923 type boolean; 1924 default "true"; 1925 description 1926 "Turns path mtu discovery for BGP TCP sessions on (true) or 1927 off (false)."; 1928 reference 1929 "RFC 1191: Path MTU discovery."; 1930 } 1931 leaf passive-mode { 1932 type boolean; 1933 default "false"; 1934 description 1935 "Wait for peers to issue requests to open a BGP session, 1936 rather than initiating sessions from the local router."; 1937 } 1938 leaf local-address { 1939 type union { 1940 type inet:ip-address; 1941 type leafref { 1942 path "../../../../interfaces/interface/name"; 1943 } 1944 } 1945 description 1946 "Set the local IP (either IPv4 or IPv6) address to use for 1947 the session when sending BGP update messages. This may be 1948 expressed as either an IP address or reference to the name 1949 of an interface."; 1950 } 1952 leaf md5-auth-password { 1953 type string; 1954 description 1955 "Configures an MD5 authentication password for use with 1956 neighboring devices."; 1957 reference 1958 "RFC 2385: Protection of BGP Sessions via the TCP MD5 1959 Signature Option."; 1960 } 1961 } 1963 grouping graceful-restart-config { 1964 description 1965 "Configuration parameters relating to BGP graceful restart."; 1966 leaf enabled { 1967 type boolean; 1968 description 1969 "Enable or disable the graceful-restart capability."; 1970 } 1971 leaf restart-time { 1972 type uint16 { 1973 range "0..4096"; 1974 } 1975 description 1976 "Estimated time (in seconds) for the local BGP speaker to 1977 restart a session. This value is advertise in the graceful 1978 restart BGP capability. This is a 12-bit value, referred to 1979 as Restart Time in RFC4724. Per RFC4724, the suggested 1980 default value is <= the hold-time value."; 1981 reference 1982 "RFC 4724: Graceful Restart Mechanism for BGP."; 1983 } 1984 leaf stale-routes-time { 1985 type uint32; 1986 description 1987 "An upper-bound on the time that stale routes will be 1988 retained by a router after a session is restarted. If an 1989 End-of-RIB (EOR) marker is received prior to this timer 1990 expiring, stale-routes will be flushed upon its receipt - if 1991 no EOR is received, then when this timer expires stale paths 1992 will be purged. This timer is referred to as the 1993 Selection_Deferral_Timer in RFC4724"; 1994 reference 1995 "RFC 4724: Graceful Restart Mechanism for BGP."; 1996 } 1997 leaf helper-only { 1998 type boolean; 1999 default "true"; 2000 description 2001 "Enable graceful-restart in helper mode only. When this leaf 2002 is set, the local system does not retain forwarding its own 2003 state during a restart, but supports procedures for the 2004 receiving speaker, as defined in RFC4724."; 2005 reference 2006 "RFC 4724: Graceful Restart Mechanism for BGP."; 2007 } 2008 } 2010 grouping global-group-use-multiple-paths { 2011 description 2012 "Common grouping used for both global and groups which provides 2013 configuration and state parameters relating to use of multiple 2014 paths"; 2015 container use-multiple-paths { 2016 description 2017 "Parameters related to the use of multiple paths for the 2018 same NLRI"; 2019 leaf enabled { 2020 type boolean; 2021 default "false"; 2022 description 2023 "Whether the use of multiple paths for the same NLRI is 2024 enabled for the neighbor. This value is overridden by any 2025 more specific configuration value."; 2026 } 2027 container ebgp { 2028 description 2029 "Multi-Path parameters for eBGP"; 2030 leaf allow-multiple-as { 2031 type boolean; 2032 default "false"; 2033 description 2034 "Allow multi-path to use paths from different neighboring 2035 ASes. The default is to only consider multiple paths 2036 from the same neighboring AS."; 2037 } 2038 leaf maximum-paths { 2039 type uint32; 2040 default "1"; 2041 description 2042 "Maximum number of parallel paths to consider when using 2043 BGP multi-path. The default is use a single path."; 2044 } 2045 } 2046 container ibgp { 2047 description 2048 "Multi-Path parameters for iBGP"; 2049 leaf maximum-paths { 2050 type uint32; 2051 default "1"; 2052 description 2053 "Maximum number of parallel paths to consider when using 2054 iBGP multi-path. The default is to use a single path"; 2055 } 2056 } 2057 } 2058 } 2060 grouping route-selection-options { 2061 description 2062 "Configuration and state relating to route selection options"; 2063 container route-selection-options { 2064 description 2065 "Parameters relating to options for route selection"; 2066 leaf always-compare-med { 2067 type boolean; 2068 default "false"; 2069 description 2070 "Compare multi-exit discriminator (MED) value from 2071 different ASes when selecting the best route. The default 2072 behavior is to only compare MEDs for paths received from 2073 the same AS."; 2074 } 2075 leaf ignore-as-path-length { 2076 type boolean; 2077 default "false"; 2078 description 2079 "Ignore the AS path length when selecting the best path. 2080 The default is to use the AS path length and prefer paths 2081 with a shorter length."; 2082 } 2083 leaf external-compare-router-id { 2084 type boolean; 2085 default "true"; 2086 description 2087 "When comparing similar routes received from external BGP 2088 peers, use the router-id as a criterion to select the 2089 active path."; 2090 } 2091 leaf advertise-inactive-routes { 2092 type boolean; 2093 default "false"; 2094 description 2095 "Advertise inactive routes to external peers. The default 2096 is to only advertise active routes."; 2097 reference 2098 "I-D.ietf-idr-best-external: Advertisement of the best 2099 external route in BGP."; 2100 } 2101 leaf enable-aigp { 2102 type boolean; 2103 default "false"; 2104 description 2105 "Flag to enable sending / receiving accumulated IGP 2106 attribute in routing updates"; 2107 reference 2108 "RFC 7311: AIGP Metric Attribute for BGP."; 2109 } 2110 leaf ignore-next-hop-igp-metric { 2111 type boolean; 2112 default "false"; 2113 description 2114 "Ignore the IGP metric to the next-hop when calculating BGP 2115 best-path. The default is to select the route for which 2116 the metric to the next-hop is lowest"; 2117 } 2118 leaf enable-med { 2119 type boolean; 2120 default "false"; 2121 description 2122 "Flag to enable sending/receiving of MED metric attribute 2123 in routing updates."; 2124 } 2125 } 2126 } 2128 grouping state { 2129 description 2130 "Grouping containing common counters relating to prefixes and 2131 paths"; 2132 leaf total-paths { 2133 type uint32; 2134 config false; 2135 description 2136 "Total number of BGP paths (BGP routes) within the context"; 2137 } 2138 leaf total-prefixes { 2139 type uint32; 2140 config false; 2141 description 2142 "Total number of BGP prefixes (destinations) received within 2143 the context"; 2144 } 2145 } 2146 } 2147 2149 file "ietf-bgp-common-multiprotocol@2021-07-11.yang" 2150 submodule ietf-bgp-common-multiprotocol { 2151 yang-version 1.1; 2152 belongs-to ietf-bgp { 2153 prefix bgp; 2154 } 2156 import ietf-bgp-types { 2157 prefix bt; 2158 } 2159 import ietf-routing-policy { 2160 prefix rt-pol; 2161 } 2162 import ietf-routing-types { 2163 prefix rt-types; 2164 } 2165 include ietf-bgp-common; 2167 // meta 2169 organization 2170 "IETF IDR Working Group"; 2171 contact 2172 "WG Web: 2173 WG List: 2175 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2176 Keyur Patel (keyur at arrcus.com), 2177 Susan Hares (shares at ndzh.com), 2178 Jeffrey Haas (jhaas at juniper.net)."; 2180 description 2181 "This sub-module contains groupings that are related to support 2182 for multiple protocols in BGP. The groupings are common across 2183 multiple contexts. 2185 Copyright (c) 2021 IETF Trust and the persons identified as 2186 authors of the code. All rights reserved. 2188 Redistribution and use in source and binary forms, with or 2189 without modification, is permitted pursuant to, and subject to 2190 the license terms contained in, the Simplified BSD License set 2191 forth in Section 4.c of the IETF Trust's Legal Provisions 2192 Relating to IETF Documents 2193 (https://trustee.ietf.org/license-info). 2195 This version of this YANG module is part of RFC XXXX 2196 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2197 for full legal notices. 2199 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2200 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2201 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2202 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2203 they appear in all capitals, as shown here."; 2205 revision 2021-07-11 { 2206 description 2207 "Initial Version"; 2208 reference 2209 "RFC XXX, BGP Model for Service Provider Network."; 2210 } 2212 grouping mp-afi-safi-graceful-restart-config { 2213 description 2214 "BGP graceful restart parameters that apply on a per-AFI-SAFI 2215 basis"; 2216 leaf enabled { 2217 type boolean; 2218 default "false"; 2219 description 2220 "This leaf indicates whether graceful-restart is enabled for 2221 this AFI-SAFI."; 2222 } 2223 } 2225 grouping mp-afi-safi-config { 2226 description 2227 "Configuration parameters used for all BGP AFI-SAFIs"; 2228 leaf name { 2229 type identityref { 2230 base bt:afi-safi-type; 2231 } 2232 description 2233 "AFI,SAFI"; 2234 } 2235 leaf enabled { 2236 type boolean; 2237 default "false"; 2238 description 2239 "This leaf indicates whether this AFI,SAFI is enabled for 2240 the neighbor or group"; 2241 } 2242 } 2244 grouping mp-all-afi-safi-list-contents { 2245 description 2246 "A common grouping used for contents of the list that is used 2247 for AFI-SAFI entries"; 2248 // import and export policy included for the afi/safi 2249 uses rt-pol:apply-policy-group; 2250 container ipv4-unicast { 2251 when "../name = 'bt:ipv4-unicast'" { 2252 description 2253 "Include this container for IPv4 Unicast specific 2254 configuration"; 2255 } 2256 description 2257 "IPv4 unicast configuration options"; 2258 // include common IPv[46] unicast options 2259 uses mp-ipv4-ipv6-unicast-common; 2260 // placeholder for IPv4 unicast specific configuration 2261 } 2262 container ipv6-unicast { 2263 when "../name = 'bt:ipv6-unicast'" { 2264 description 2265 "Include this container for IPv6 Unicast specific 2266 configuration"; 2267 } 2268 description 2269 "IPv6 unicast configuration options"; 2270 // include common IPv[46] unicast options 2271 uses mp-ipv4-ipv6-unicast-common; 2272 // placeholder for IPv6 unicast specific configuration 2273 // options 2274 } 2275 container ipv4-labeled-unicast { 2276 when "../name = 'bt:ipv4-labeled-unicast'" { 2277 description 2278 "Include this container for IPv4 Labeled Unicast specific 2279 configuration"; 2280 } 2281 description 2282 "IPv4 Labeled Unicast configuration options"; 2283 uses mp-all-afi-safi-common; 2284 // placeholder for IPv4 Labeled Unicast specific config 2285 // options 2286 } 2287 container ipv6-labeled-unicast { 2288 when "../name = 'bt:ipv6-labeled-unicast'" { 2289 description 2290 "Include this container for IPv6 Labeled Unicast specific 2291 configuration"; 2292 } 2293 description 2294 "IPv6 Labeled Unicast configuration options"; 2295 uses mp-all-afi-safi-common; 2296 // placeholder for IPv6 Labeled Unicast specific config 2297 // options. 2298 } 2299 container l3vpn-ipv4-unicast { 2300 when "../name = 'bt:l3vpn-ipv4-unicast'" { 2301 description 2302 "Include this container for IPv4 Unicast L3VPN specific 2303 configuration"; 2304 } 2305 description 2306 "Unicast IPv4 L3VPN configuration options"; 2307 // include common L3VPN configuration options 2308 uses mp-l3vpn-ipv4-ipv6-unicast-common; 2309 // placeholder for IPv4 Unicast L3VPN specific config options. 2310 } 2311 container l3vpn-ipv6-unicast { 2312 when "../name = 'bt:l3vpn-ipv6-unicast'" { 2313 description 2314 "Include this container for unicast IPv6 L3VPN specific 2315 configuration"; 2316 } 2317 description 2318 "Unicast IPv6 L3VPN configuration options"; 2319 // include common L3VPN configuration options 2320 uses mp-l3vpn-ipv4-ipv6-unicast-common; 2321 // placeholder for IPv6 Unicast L3VPN specific configuration 2322 // options 2323 } 2324 container l3vpn-ipv4-multicast { 2325 when "../name = 'bt:l3vpn-ipv4-multicast'" { 2326 description 2327 "Include this container for multicast IPv6 L3VPN specific 2328 configuration"; 2329 } 2330 description 2331 "Multicast IPv4 L3VPN configuration options"; 2332 // include common L3VPN multicast options 2333 uses mp-l3vpn-ipv4-ipv6-multicast-common; 2334 // placeholder for IPv4 Multicast L3VPN specific configuration 2335 // options 2336 } 2337 container l3vpn-ipv6-multicast { 2338 when "../name = 'bt:l3vpn-ipv6-multicast'" { 2339 description 2340 "Include this container for multicast IPv6 L3VPN specific 2341 configuration"; 2342 } 2343 description 2344 "Multicast IPv6 L3VPN configuration options"; 2345 // include common L3VPN multicast options 2346 uses mp-l3vpn-ipv4-ipv6-multicast-common; 2347 // placeholder for IPv6 Multicast L3VPN specific configuration 2348 // options 2349 } 2350 container l2vpn-vpls { 2351 when "../name = 'bt:l2vpn-vpls'" { 2352 description 2353 "Include this container for BGP-signalled VPLS specific 2354 configuration"; 2355 } 2356 description 2357 "BGP-signalled VPLS configuration options"; 2358 // include common L2VPN options 2359 uses mp-l2vpn-common; 2360 // placeholder for BGP-signalled VPLS specific configuration 2361 // options 2362 } 2363 container l2vpn-evpn { 2364 when "../name = 'bt:l2vpn-evpn'" { 2365 description 2366 "Include this container for BGP EVPN specific 2367 configuration"; 2368 } 2369 description 2370 "BGP EVPN configuration options"; 2371 // include common L2VPN options 2372 uses mp-l2vpn-common; 2373 // placeholder for BGP EVPN specific configuration options 2375 } 2376 } 2378 // Common groupings across multiple AFI,SAFIs 2380 grouping mp-all-afi-safi-common { 2381 description 2382 "Grouping for configuration common to all AFI,SAFI"; 2383 container prefix-limit { 2384 description 2385 "Parameters relating to the prefix limit for the AFI-SAFI"; 2386 leaf max-prefixes { 2387 type uint32; 2388 description 2389 "Maximum number of prefixes that will be accepted from the 2390 neighbor"; 2391 } 2392 leaf shutdown-threshold-pct { 2393 type rt-types:percentage; 2394 description 2395 "Threshold on number of prefixes that can be received from 2396 a neighbor before generation of warning messages or log 2397 entries. Expressed as a percentage of max-prefixes"; 2398 } 2399 leaf restart-timer { 2400 type uint32; 2401 units "seconds"; 2402 description 2403 "Time interval in seconds after which the BGP session is 2404 re-established after being torn down due to exceeding the 2405 max-prefix limit."; 2406 } 2407 } 2408 } 2410 grouping mp-ipv4-ipv6-unicast-common { 2411 description 2412 "Common configuration that is applicable for IPv4 and IPv6 2413 unicast"; 2414 // include common afi-safi options. 2415 uses mp-all-afi-safi-common; 2416 // configuration options that are specific to IPv[46] unicast 2417 leaf send-default-route { 2418 type boolean; 2419 default "false"; 2420 description 2421 "If set to true, send the default-route to the neighbor(s)"; 2422 } 2424 } 2426 grouping mp-l3vpn-ipv4-ipv6-unicast-common { 2427 description 2428 "Common configuration applied across L3VPN for IPv4 2429 and IPv6"; 2430 // placeholder -- specific configuration options that are generic 2431 // across IPv[46] unicast address families. 2432 uses mp-all-afi-safi-common; 2433 } 2435 grouping mp-l3vpn-ipv4-ipv6-multicast-common { 2436 description 2437 "Common configuration applied across L3VPN for IPv4 2438 and IPv6"; 2439 // placeholder -- specific configuration options that are 2440 // generic across IPv[46] multicast address families. 2441 uses mp-all-afi-safi-common; 2442 } 2444 grouping mp-l2vpn-common { 2445 description 2446 "Common configuration applied across L2VPN address 2447 families"; 2448 // placeholder -- specific configuration options that are 2449 // generic across L2VPN address families 2450 uses mp-all-afi-safi-common; 2451 } 2453 // Config groupings for common groups 2455 grouping mp-all-afi-safi-common-prefix-limit-config { 2456 description 2457 "Configuration parameters relating to prefix-limits for an 2458 AFI-SAFI"; 2459 } 2460 } 2461 2463 file "ietf-bgp-common-structure@2021-07-11.yang" 2464 submodule ietf-bgp-common-structure { 2465 yang-version 1.1; 2466 belongs-to ietf-bgp { 2467 prefix bgp; 2468 } 2470 import ietf-routing-policy { 2471 prefix rt-pol; 2472 reference 2473 "RFC ZZZZ, A YANG Data Model for Routing Policy Management"; 2474 } 2475 import ietf-bgp-types { 2476 prefix bt; 2477 reference 2478 "RFC XXXX, BGP YANG Model for Service Provider Network."; 2479 } 2480 include ietf-bgp-common-multiprotocol; 2481 include ietf-bgp-common; 2483 // meta 2485 organization 2486 "IETF IDR Working Group"; 2487 contact 2488 "WG Web: 2489 WG List: 2491 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2492 Keyur Patel (keyur at arrcus.com), 2493 Susan Hares (shares at ndzh.com), 2494 Jeffrey Haas (jhaas at juniper.net)."; 2496 description 2497 "This sub-module contains groupings that are common across 2498 multiple BGP contexts and provide structure around other 2499 primitive groupings. 2501 Copyright (c) 2021 IETF Trust and the persons identified as 2502 authors of the code. All rights reserved. 2504 Redistribution and use in source and binary forms, with or 2505 without modification, is permitted pursuant to, and subject to 2506 the license terms contained in, the Simplified BSD License set 2507 forth in Section 4.c of the IETF Trust's Legal Provisions 2508 Relating to IETF Documents 2509 (https://trustee.ietf.org/license-info). 2511 This version of this YANG module is part of RFC XXXX 2512 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2513 for full legal notices. 2515 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2516 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2517 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2518 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2519 they appear in all capitals, as shown here."; 2521 revision 2021-07-11 { 2522 description 2523 "Initial Version"; 2524 reference 2525 "RFC XXX, BGP Model for Service Provider Network."; 2526 } 2528 grouping structure-neighbor-group-logging-options { 2529 description 2530 "Structural grouping used to include error handling 2531 configuration and state for both BGP neighbors and groups"; 2532 container logging-options { 2533 description 2534 "Logging options for events related to the BGP neighbor or 2535 group"; 2536 leaf log-neighbor-state-changes { 2537 type boolean; 2538 default "true"; 2539 description 2540 "Configure logging of peer state changes. Default is to 2541 enable logging of peer state changes. 2543 Note: Documenting demotion from ESTABLISHED state is 2544 desirable, but documenting all backward transitions 2545 is problematic, and should be avoided."; 2546 } 2547 } 2548 } 2550 grouping structure-neighbor-group-ebgp-multihop { 2551 description 2552 "Structural grouping used to include eBGP multi-hop 2553 configuration and state for both BGP neighbors and peer 2554 groups"; 2555 container ebgp-multihop { 2556 description 2557 "eBGP multi-hop parameters for the BGP peer-group"; 2558 leaf enabled { 2559 type boolean; 2560 default "false"; 2561 description 2562 "When enabled, the referenced group or neighbors are 2563 permitted to be indirectly connected - including cases 2564 where the TTL can be decremented between the BGP peers"; 2565 } 2566 leaf multihop-ttl { 2567 type uint8; 2568 description 2569 "Time-to-live value to use when packets are sent to the 2570 referenced group or neighbors and ebgp-multihop is 2571 enabled"; 2572 } 2573 } 2574 } 2576 grouping structure-neighbor-group-route-reflector { 2577 description 2578 "Structural grouping used to include route reflector 2579 configuration and state for both BGP neighbors and peer 2580 groups"; 2581 container route-reflector { 2582 description 2583 "Route reflector parameters for the BGP peer-group"; 2584 reference 2585 "RFC 4456: BGP Route Reflection."; 2586 leaf cluster-id { 2587 type bt:rr-cluster-id-type; 2588 description 2589 "Route Reflector cluster id to use when local router is 2590 configured as a route reflector. Commonly set at the 2591 group level, but allows a different cluster id to be set 2592 for each neighbor."; 2593 reference 2594 "RFC 4456: BGP Route Reflection: An Alternative to 2595 Full Mesh."; 2596 } 2597 leaf no-client-reflect { 2598 type boolean; 2599 default "false"; 2600 description 2601 "When set to 'true', this disables route redistribution 2602 by the Route Reflector. It is set 'true' when the client is 2603 fully meshed in its peer-group to prevent sending of 2604 redundant route advertisements."; 2605 } 2606 leaf client { 2607 type boolean; 2608 default "false"; 2609 description 2610 "Configure the neighbor as a route reflector client."; 2611 reference 2612 "RFC 4456: BGP Route Reflection: An Alternative to 2613 Full Mesh."; 2614 } 2615 } 2616 } 2617 grouping structure-neighbor-group-as-path-options { 2618 description 2619 "Structural grouping used to include AS_PATH manipulation 2620 configuration and state for both BGP neighbors and peer 2621 groups"; 2622 container as-path-options { 2623 description 2624 "AS_PATH manipulation parameters for the BGP neighbor or 2625 group"; 2626 leaf allow-own-as { 2627 type uint8; 2628 default "0"; 2629 description 2630 "Specify the number of occurrences of the local BGP 2631 speaker's AS that can occur within the AS_PATH before it 2632 is rejected as looped."; 2633 } 2634 leaf replace-peer-as { 2635 type boolean; 2636 default "false"; 2637 description 2638 "Replace occurrences of the peer's AS in the AS_PATH with 2639 the local autonomous system number"; 2640 } 2641 } 2642 } 2644 grouping structure-neighbor-group-add-paths { 2645 description 2646 "Structural grouping used to include ADD-PATHs configuration 2647 and state for both BGP neighbors and peer groups"; 2648 container add-paths { 2649 if-feature "bt:add-paths"; 2650 description 2651 "Parameters relating to the advertisement and receipt of 2652 multiple paths for a single NLRI (add-paths)"; 2653 reference 2654 "RFC 7911: Advertisements of Multiple Paths in BGP."; 2655 leaf receive { 2656 type boolean; 2657 default "false"; 2658 description 2659 "Enable ability to receive multiple path advertisements for 2660 an NLRI from the neighbor or group"; 2661 } 2662 choice send { 2663 description 2664 "Choice of sending the max. number of paths or to send all."; 2666 case max { 2667 leaf max { 2668 type uint8; 2669 description 2670 "The maximum number of paths to advertise to neighbors 2671 for a single NLRI"; 2672 } 2673 } 2674 case all { 2675 leaf all { 2676 type empty; 2677 description 2678 "Send all the path advertisements to neighbors for a 2679 single NLRI."; 2680 } 2681 } 2682 } 2683 leaf eligible-prefix-policy { 2684 type leafref { 2685 path "/rt-pol:routing-policy/rt-pol:policy-definitions/" 2686 + "rt-pol:policy-definition/rt-pol:name"; 2687 } 2688 description 2689 "A reference to a routing policy which can be used to 2690 restrict the prefixes for which add-paths is enabled"; 2691 } 2692 } 2693 } 2694 } 2695 2697 file "ietf-bgp-peer-group@2021-07-11.yang" 2698 submodule ietf-bgp-peer-group { 2699 yang-version 1.1; 2700 belongs-to ietf-bgp { 2701 prefix bgp; 2702 } 2704 import ietf-routing-policy { 2705 prefix rt-pol; 2706 } 2707 import ietf-bgp-types { 2708 prefix bt; 2709 reference 2710 "RFC XXXX, BGP Model for Service Provider Network."; 2711 } 2713 // Include the common submodule 2714 include ietf-bgp-common; 2715 include ietf-bgp-common-multiprotocol; 2716 include ietf-bgp-common-structure; 2718 // meta 2720 organization 2721 "IETF IDR Working Group"; 2722 contact 2723 "WG Web: 2724 WG List: 2726 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2727 Keyur Patel (keyur at arrcus.com), 2728 Susan Hares (shares at ndzh.com), 2729 Jeffrey Haas (jhaas at juniper.net)."; 2731 description 2732 "This sub-module contains groupings that are specific to the 2733 peer-group context of the BGP module. 2735 Copyright (c) 2021 IETF Trust and the persons identified as 2736 authors of the code. All rights reserved. 2738 Redistribution and use in source and binary forms, with or 2739 without modification, is permitted pursuant to, and subject to 2740 the license terms contained in, the Simplified BSD License set 2741 forth in Section 4.c of the IETF Trust's Legal Provisions 2742 Relating to IETF Documents 2743 (https://trustee.ietf.org/license-info). 2745 This version of this YANG module is part of RFC XXXX 2746 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2747 for full legal notices. 2749 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2750 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2751 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2752 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2753 they appear in all capitals, as shown here."; 2755 revision 2021-07-11 { 2756 description 2757 "Initial Version"; 2758 reference 2759 "RFC XXX, BGP Model for Service Provider Network."; 2760 } 2761 grouping bgp-peer-group-afi-safi-list { 2762 description 2763 "List of address-families associated with the BGP peer-group"; 2764 list afi-safi { 2765 key "name"; 2766 description 2767 "AFI, SAFI configuration available for the 2768 neighbor or group"; 2769 uses mp-afi-safi-config; 2770 container graceful-restart { 2771 if-feature "bt:graceful-restart"; 2772 description 2773 "Parameters relating to BGP graceful-restart"; 2774 uses mp-afi-safi-graceful-restart-config; 2775 } 2776 uses route-selection-options; 2777 uses global-group-use-multiple-paths; 2778 uses mp-all-afi-safi-list-contents; 2779 } 2780 } 2782 grouping bgp-peer-group-base { 2783 description 2784 "Parameters related to a BGP peer-group."; 2785 leaf name { 2786 type string; 2787 description 2788 "Name of the BGP peer-group"; 2789 } 2790 uses neighbor-group-config; 2791 container timers { 2792 description 2793 "Timers related to a BGP peer-group."; 2794 uses neighbor-group-timers-config; 2795 } 2796 container transport { 2797 description 2798 "Transport session parameters for the BGP peer-group."; 2799 uses neighbor-group-transport-config; 2800 } 2801 container graceful-restart { 2802 if-feature "bt:graceful-restart"; 2803 description 2804 "Parameters relating the graceful restart mechanism for BGP."; 2805 uses graceful-restart-config; 2806 } 2807 uses structure-neighbor-group-ebgp-multihop; 2808 uses structure-neighbor-group-route-reflector; 2809 uses structure-neighbor-group-as-path-options; 2810 uses structure-neighbor-group-add-paths; 2811 uses global-group-use-multiple-paths; 2812 uses rt-pol:apply-policy-group; 2813 container afi-safis { 2814 description 2815 "Per-address-family configuration parameters associated with 2816 the peer-group."; 2817 uses bgp-peer-group-afi-safi-list; 2818 } 2819 } 2821 grouping bgp-peer-group-list { 2822 description 2823 "The list of BGP peer groups"; 2824 list peer-group { 2825 key "name"; 2826 description 2827 "List of BGP peer-groups configured on the local system - 2828 uniquely identified by peer-group name"; 2829 uses bgp-peer-group-base; 2830 } 2831 } 2832 } 2833 2835 file "ietf-bgp-neighbor@2021-07-11.yang" 2836 submodule ietf-bgp-neighbor { 2837 yang-version 1.1; 2838 belongs-to ietf-bgp { 2839 prefix bgp; 2840 } 2842 import ietf-bgp-types { 2843 prefix bt; 2844 reference 2845 "RFC XXXX, BGP Model for Service Provider Network."; 2846 } 2848 // Include the common submodule 2850 include ietf-bgp-common; 2851 include ietf-bgp-common-multiprotocol; 2852 include ietf-bgp-peer-group; 2853 include ietf-bgp-common-structure; 2855 // meta 2856 organization 2857 "IETF IDR Working Group"; 2858 contact 2859 "WG Web: 2860 WG List: 2862 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2863 Keyur Patel (keyur at arrcus.com), 2864 Susan Hares (shares at ndzh.com), 2865 Jeffrey Haas (jhaas at juniper.net)."; 2867 description 2868 "This sub-module contains groupings that are specific to the 2869 neighbor context of the BGP module. 2871 Copyright (c) 2021 IETF Trust and the persons identified as 2872 authors of the code. All rights reserved. 2874 Redistribution and use in source and binary forms, with or 2875 without modification, is permitted pursuant to, and subject to 2876 the license terms contained in, the Simplified BSD License set 2877 forth in Section 4.c of the IETF Trust's Legal Provisions 2878 Relating to IETF Documents 2879 (https://trustee.ietf.org/license-info). 2881 This version of this YANG module is part of RFC XXXX 2882 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2883 for full legal notices. 2885 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2886 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2887 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2888 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2889 they appear in all capitals, as shown here."; 2891 revision 2021-07-11 { 2892 description 2893 "Initial Version"; 2894 reference 2895 "RFC XXX, BGP Model for Service Provider Network."; 2896 } 2898 grouping bgp-neighbor-use-multiple-paths { 2899 description 2900 "Multi-path configuration and state applicable to a BGP 2901 neighbor"; 2902 container use-multiple-paths { 2903 description 2904 "Parameters related to the use of multiple-paths for the same 2905 NLRI when they are received only from this neighbor"; 2906 leaf enabled { 2907 type boolean; 2908 default "false"; 2909 description 2910 "Whether the use of multiple paths for the same NLRI is 2911 enabled for the neighbor."; 2912 } 2913 container ebgp { 2914 description 2915 "Multi-path configuration for eBGP"; 2916 leaf allow-multiple-as { 2917 type boolean; 2918 default "false"; 2919 description 2920 "Allow multi-path to use paths from different neighboring 2921 ASes. The default is to only consider multiple paths 2922 from the same neighboring AS."; 2923 } 2924 } 2925 } 2926 } 2928 grouping bgp-neighbor-counters-message-types-state { 2929 description 2930 "Grouping of BGP message types, included for re-use across 2931 counters"; 2932 leaf updates-received { 2933 type uint64; 2934 description 2935 "Number of BGP UPDATE messages received from this neighbor."; 2936 reference 2937 "RFC 4273: bgpPeerInUpdates."; 2938 } 2939 leaf updates-sent { 2940 type uint64; 2941 description 2942 "Number of BGP UPDATE messages sent to this neighbor"; 2943 reference 2944 "RFC 4273 - bgpPeerOutUpdates"; 2945 } 2946 leaf messages-received { 2947 type uint64; 2948 description 2949 "Number of BGP messages received from thsi neighbor"; 2950 reference 2951 "RFC 4273 - bgpPeerInTotalMessages"; 2953 } 2954 leaf messages-sent { 2955 type uint64; 2956 description 2957 "Number of BGP messages received from thsi neighbor"; 2958 reference 2959 "RFC 4273 - bgpPeerOutTotalMessages"; 2960 } 2961 leaf notification { 2962 type uint64; 2963 description 2964 "Number of BGP NOTIFICATION messages indicating an error 2965 condition has occurred exchanged."; 2966 } 2967 } 2969 grouping bgp-neighbor-afi-safi-list { 2970 description 2971 "List of address-families associated with the BGP neighbor"; 2972 list afi-safi { 2973 key "name"; 2974 description 2975 "AFI, SAFI configuration available for the neighbor or 2976 group"; 2977 uses mp-afi-safi-config; 2978 leaf active { 2979 type boolean; 2980 config false; 2981 description 2982 "This value indicates whether a particular AFI-SAFI has 2983 been successfully negotiated with the peer. An AFI-SAFI may 2984 be enabled in the current running configuration, but a 2985 session restart may be required in order to negotiate the 2986 new capability."; 2987 } 2988 container prefixes { 2989 config false; 2990 description 2991 "Prefix counters for the AFI/SAFI in this BGP session"; 2992 leaf received { 2993 type uint32; 2994 description 2995 "The number of prefixes received from the neighbor"; 2996 } 2997 leaf sent { 2998 type uint32; 2999 description 3000 "The number of prefixes advertised to the neighbor"; 3002 } 3003 leaf installed { 3004 type uint32; 3005 description 3006 "The number of advertised prefixes installed in the 3007 Loc-RIB"; 3008 } 3009 } 3010 container graceful-restart { 3011 if-feature "bt:graceful-restart"; 3012 description 3013 "Parameters relating to BGP graceful-restart"; 3014 uses mp-afi-safi-graceful-restart-config; 3015 leaf received { 3016 type boolean; 3017 config false; 3018 description 3019 "This leaf indicates whether the neighbor advertised the 3020 ability to support graceful-restart for this AFI-SAFI"; 3021 } 3022 leaf advertised { 3023 type boolean; 3024 config false; 3025 description 3026 "This leaf indicates whether the ability to support 3027 graceful-restart has been advertised to the peer"; 3028 } 3029 } 3030 uses mp-all-afi-safi-list-contents; 3031 uses bgp-neighbor-use-multiple-paths; 3032 } 3033 } 3034 } 3035 3037 7.2. BGP types 3039 file "ietf-bgp-types@2021-07-11.yang" 3040 module ietf-bgp-types { 3041 yang-version 1.1; 3042 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; 3043 prefix bt; 3045 import ietf-inet-types { 3046 prefix inet; 3047 } 3049 // meta 3050 organization 3051 "IETF IDR Working Group"; 3052 contact 3053 "WG Web: 3054 WG List: 3056 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3057 Keyur Patel (keyur at arrcus.com), 3058 Susan Hares (shares at ndzh.com), 3059 Jeffrey Haas (jhaas at juniper.net)."; 3061 description 3062 "This module contains general data definitions for use in BGP. 3063 It can be imported by modules that make use of BGP attributes. 3065 Copyright (c) 2021 IETF Trust and the persons identified as 3066 authors of the code. All rights reserved. 3068 Redistribution and use in source and binary forms, with or 3069 without modification, is permitted pursuant to, and subject to 3070 the license terms contained in, the Simplified BSD License set 3071 forth in Section 4.c of the IETF Trust's Legal Provisions 3072 Relating to IETF Documents 3073 (https://trustee.ietf.org/license-info). 3075 This version of this YANG module is part of RFC XXXX 3076 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 3077 for full legal notices. 3079 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 3080 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 3081 'MAY', and 'OPTIONAL' in this document are to be interpreted as 3082 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 3083 they appear in all capitals, as shown here."; 3085 revision 2021-07-11 { 3086 description 3087 "Initial Version"; 3088 reference 3089 "RFC XXX, BGP Model for Service Provider Network."; 3090 } 3092 /* 3093 * Features. 3094 */ 3096 feature graceful-restart { 3097 description 3098 "Graceful restart as defined in RFC 4724 is supported."; 3099 } 3101 feature clear-neighbors { 3102 description 3103 "Clearing of BGP neighbors is supported."; 3104 } 3106 feature clear-statistics { 3107 description 3108 "Clearing of BGP statistics is supported."; 3109 } 3111 feature send-communities { 3112 description 3113 "Enable the propagation of communities."; 3114 } 3116 feature ttl-security { 3117 description 3118 "BGP Time To Live (TTL) security check support."; 3119 reference 3120 "RFC 5082, The Generalized TTL Security Mechanism (GTSM)."; 3121 } 3123 feature bfd { 3124 description 3125 "Support for BFD detection of BGP neighbor reachability."; 3126 reference 3127 "RFC 5880, Bidirectional Forward Detection (BFD), 3128 RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6 3129 (Single Hop), 3130 RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop 3131 Paths."; 3132 } 3134 feature damping { 3135 description 3136 "Weighted route dampening is supported."; 3137 } 3139 feature clear-routes { 3140 description 3141 "Clearing of BGP routes is supported."; 3142 } 3144 feature add-paths { 3145 description 3146 "Advertisement of multiple paths for the same address prefix 3147 without the new paths implicitly replacing any previous ones."; 3148 reference 3149 "RFC 7911: Advertisement of Multiple Paths in BGP."; 3150 } 3152 feature route-refresh { 3153 description 3154 "Support for the BGP Route Refresh capability."; 3155 reference 3156 "RFC 2918: Route Refresh Capability for BGP-4."; 3157 } 3159 /* 3160 * Identities. 3161 */ 3163 identity bgp-capability { 3164 description 3165 "Base identity for a BGP capability"; 3166 } 3168 identity mp-bgp { 3169 base bgp-capability; 3170 description 3171 "Multi-protocol extensions to BGP"; 3172 reference 3173 "RFC 4760: Multiprotocol Extentions for BGP-4."; 3174 } 3176 identity route-refresh { 3177 base bgp-capability; 3178 description 3179 "The BGP route-refresh functionality"; 3180 reference 3181 "RFC 2918: Route Refresh Capability for BGP-4."; 3182 } 3184 identity asn32 { 3185 base bgp-capability; 3186 description 3187 "4-byte (32-bit) AS number functionality"; 3188 reference 3189 "RFC6793: BGP Support for Four-Octet Autonomous System (AS) 3190 Number Space."; 3191 } 3193 identity graceful-restart { 3194 if-feature "graceful-restart"; 3195 base bgp-capability; 3196 description 3197 "Graceful restart functionality"; 3198 reference 3199 "RFC 4724: Graceful Restart Mechanism for BGP."; 3200 } 3202 identity add-paths { 3203 if-feature "add-paths"; 3204 base bgp-capability; 3205 description 3206 "Advertisement of multiple paths for the same address prefix 3207 without the new paths implicitly replacing any previous ones."; 3208 reference 3209 "RFC 7911: Advertisement of Multiple Paths in BGP."; 3210 } 3212 identity afi-safi-type { 3213 description 3214 "Base identity type for AFI,SAFI tuples for BGP-4"; 3215 reference 3216 "RFC4760: Multiprotocol Extentions for BGP-4"; 3217 } 3219 identity ipv4-unicast { 3220 base afi-safi-type; 3221 description 3222 "IPv4 unicast (AFI,SAFI = 1,1)"; 3223 reference 3224 "RFC4760: Multiprotocol Extentions for BGP-4"; 3225 } 3227 identity ipv6-unicast { 3228 base afi-safi-type; 3229 description 3230 "IPv6 unicast (AFI,SAFI = 2,1)"; 3231 reference 3232 "RFC4760: Multiprotocol Extentions for BGP-4"; 3233 } 3235 identity ipv4-labeled-unicast { 3236 base afi-safi-type; 3237 description 3238 "Labeled IPv4 unicast (AFI,SAFI = 1,4)"; 3239 reference 3240 "RFC 3107: Carrying Label Information in BGP-4."; 3241 } 3242 identity ipv6-labeled-unicast { 3243 base afi-safi-type; 3244 description 3245 "Labeled IPv6 unicast (AFI,SAFI = 2,4)"; 3246 reference 3247 "RFC 3107: Carrying Label Information in BGP-4."; 3248 } 3250 identity l3vpn-ipv4-unicast { 3251 base afi-safi-type; 3252 description 3253 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 3254 reference 3255 "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; 3256 } 3258 identity l3vpn-ipv6-unicast { 3259 base afi-safi-type; 3260 description 3261 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 3262 reference 3263 "RFC 4659: BGP-MPLS IP Virtual Private Network (VPN) Extension 3264 for IPv6 VPN."; 3265 } 3267 identity l3vpn-ipv4-multicast { 3268 base afi-safi-type; 3269 description 3270 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 3271 reference 3272 "RFC 6514: BGP Encodings and Procedures for Multicast in 3273 MPLS/BGP IP VPNs."; 3274 } 3276 identity l3vpn-ipv6-multicast { 3277 base afi-safi-type; 3278 description 3279 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 3280 reference 3281 "RFC 6514: BGP Encodings and Procedures for Multicast in 3282 MPLS/BGP IP VPNs."; 3283 } 3285 identity l2vpn-vpls { 3286 base afi-safi-type; 3287 description 3288 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 3289 reference 3290 "RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for 3291 Auto-Discovery and Signaling."; 3292 } 3294 identity l2vpn-evpn { 3295 base afi-safi-type; 3296 description 3297 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 3298 } 3300 identity bgp-well-known-std-community { 3301 description 3302 "Base identity for reserved communities within the standard 3303 community space defined by RFC 1997. These communities must 3304 fall within the range 0xFFFF0000 to 0xFFFFFFFF"; 3305 reference 3306 "RFC 1997: BGP Communities Attribute."; 3307 } 3309 identity no-export { 3310 base bgp-well-known-std-community; 3311 description 3312 "Do not export NLRI received carrying this community outside 3313 the bounds of this autonomous system, or this confederation (if 3314 the local autonomous system is a confederation member AS). This 3315 community has a value of 0xFFFFFF01."; 3316 reference 3317 "RFC 1997: BGP Communities Attribute."; 3318 } 3320 identity no-advertise { 3321 base bgp-well-known-std-community; 3322 description 3323 "All NLRI received carrying this community must not be 3324 advertised to other BGP peers. This community has a value of 3325 0xFFFFFF02."; 3326 reference 3327 "RFC 1997: BGP Communities Attribute."; 3328 } 3330 identity no-export-subconfed { 3331 base bgp-well-known-std-community; 3332 description 3333 "All NLRI received carrying this community must not be 3334 advertised to external BGP peers - including over confederation 3335 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 3336 reference 3337 "RFC 1997: BGP Communities Attribute."; 3339 } 3341 identity no-peer { 3342 base bgp-well-known-std-community; 3343 description 3344 "An autonomous system receiving NLRI tagged with this community 3345 is advised not to re-advertise the NLRI to external bilateral 3346 peer autonomous systems. An AS may also filter received NLRI 3347 from bilateral peer sessions when they are tagged with this 3348 community value. This community has a value of 0xFFFFFF04."; 3349 reference 3350 "RFC 3765: NOPEER Community for BGP."; 3351 } 3353 identity as-path-segment-type { 3354 description 3355 "Base AS Path Segment Type. In [BGP-4], the path segment type 3356 is a 1-octet field with the following values defined."; 3357 reference 3358 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3359 } 3361 identity as-set { 3362 base as-path-segment-type; 3363 description 3364 "Unordered set of autonomous systems that a route in the UPDATE 3365 message has traversed."; 3366 reference 3367 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3368 } 3370 identity as-sequence { 3371 base as-path-segment-type; 3372 description 3373 "Ordered set of autonomous systems that a route in the UPDATE 3374 message has traversed."; 3375 reference 3376 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3377 } 3379 identity as-confed-sequence { 3380 base as-path-segment-type; 3381 description 3382 "Ordered set of Member Autonomous Systems in the local 3383 confederation that the UPDATE message has traversed."; 3384 reference 3385 "RFC 5065, Autonomous System Configuration for BGP."; 3386 } 3387 identity as-confed-set { 3388 base as-path-segment-type; 3389 description 3390 "Unordered set of Member Autonomous Systems in the local 3391 confederation that the UPDATE message has traversed."; 3392 reference 3393 "RFC 5065, Autonomous System Configuration for BGP."; 3394 } 3396 /* 3397 * Typedefs. 3398 */ 3400 typedef bgp-session-direction { 3401 type enumeration { 3402 enum inbound { 3403 description 3404 "Refers to all NLRI received from the BGP peer"; 3405 } 3406 enum oubound { 3407 description 3408 "Refers to all NLRI advertised to the BGP peer"; 3409 } 3410 } 3411 description 3412 "Type to describe the direction of NLRI transmission"; 3413 } 3415 typedef bgp-well-known-community-type { 3416 type identityref { 3417 base bgp-well-known-std-community; 3418 } 3419 description 3420 "Type definition for well-known IETF community attribute 3421 values."; 3422 reference 3423 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 3424 } 3426 typedef bgp-std-community-type { 3427 type union { 3428 type uint32; 3429 type string { 3430 pattern '([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|' 3431 + '6[0-5][0-9]{3}|66[0-4][0-9]{2}|' 3432 + '665[0-2][0-9]|6653[0-5]):' 3433 + '([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|' 3434 + '6[0-5][0-9]{3}|66[0-4][0-9]{2}|' 3435 + '665[0-2][0-9]|6653[0-5])'; 3436 } 3437 } 3438 description 3439 "Type definition for standard community attributes."; 3440 reference 3441 "RFC 1997 - BGP Communities Attribute"; 3442 } 3444 typedef bgp-ext-community-type { 3445 type union { 3446 type string { 3447 // Type 1: 2-octet global and 4-octet local 3448 // (AS number) (Integer) 3449 pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3450 + '[1-9][0-9]{1,4}|[0-9]):' 3451 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3452 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3453 } 3455 type string { 3456 // Type 2: 4-octet global and 2-octet local 3457 // (ipv4-address) (integer) 3458 pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3459 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3460 + '2[0-4][0-9]|25[0-5]):' 3461 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3462 + '[1-9][0-9]{1,4}|[0-9])'; 3463 } 3465 type string { 3466 // route-target with Type 1 3467 // route-target:(ASN):(local-part) 3468 // 2 octets global and 4 octets local. 3469 pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' 3470 + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' 3471 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3472 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3473 } 3475 type string { 3476 // route-target with Type 2 3477 // route-target:(IPv4):(local-part) 3478 // 4 bytes of IP address, and 2 bytes for local. 3479 pattern 'route\-target:' 3480 + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3481 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3482 + '2[0-4][0-9]|25[0-5]):' 3483 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3484 + '[1-9][0-9]{1,4}|[0-9])'; 3485 } 3487 type string { 3488 // route-origin with Type 1 3489 // All 6 octets are open. 3490 pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' 3491 + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' 3492 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3493 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3494 } 3496 type string { 3497 // route-origin with Type 2 3498 // 4 octets of IP address and two octets of local. 3499 pattern 'route\-origin:' 3500 + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3501 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3502 + '2[0-4][0-9]|25[0-5]):' 3503 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3504 + '[1-9][0-9]{1,4}|[0-9])'; 3505 } 3506 } 3507 description 3508 "Type definition for extended community attributes"; 3509 reference 3510 "RFC 4360 - BGP Extended Communities Attribute"; 3511 } 3513 typedef bgp-community-regexp-type { 3514 type string; 3515 description 3516 "Type definition for communities specified as regular 3517 expression patterns"; 3518 } 3520 typedef bgp-origin-attr-type { 3521 type enumeration { 3522 enum igp { 3523 description 3524 "Origin of the NLRI is internal"; 3525 } 3526 enum egp { 3527 description 3528 "Origin of the NLRI is EGP"; 3529 } 3530 enum incomplete { 3531 description 3532 "Origin of the NLRI is neither IGP or EGP"; 3533 } 3534 } 3535 description 3536 "Type definition for standard BGP origin attribute"; 3537 reference 3538 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3"; 3539 } 3541 typedef peer-type { 3542 type enumeration { 3543 enum internal { 3544 description 3545 "Internal (IBGP) peer"; 3546 } 3547 enum external { 3548 description 3549 "External (EBGP) peer"; 3550 } 3551 enum confederation-internal { 3552 description 3553 "Confederation Internal (IBGP) peer."; 3554 } 3555 enum confederation-external { 3556 description 3557 "Confederation External (EBGP) peer."; 3558 } 3559 } 3560 description 3561 "Labels a peer or peer group as explicitly internal, 3562 external, or the related confederation type."; 3563 reference 3564 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 1.1. 3565 RFC 5065, Autonomous System Configuration for BGP."; 3566 } 3568 identity remove-private-as-option { 3569 description 3570 "Base identity for options for removing private autonomous 3571 system numbers from the AS_PATH attribute"; 3572 } 3574 identity private-as-remove-all { 3575 base remove-private-as-option; 3576 description 3577 "Strip all private autonomous system numbers from the AS_PATH. 3578 This action is performed regardless of the other content of the 3579 AS_PATH attribute, and for all instances of private AS numbers 3580 within that attribute."; 3581 } 3583 identity private-as-replace-all { 3584 base remove-private-as-option; 3585 description 3586 "Replace all instances of private autonomous system numbers in 3587 the AS_PATH with the local BGP speaker's autonomous system 3588 number. This action is performed regardless of the other 3589 content of the AS_PATH attribute, and for all instances of 3590 private AS number within that attribute."; 3591 } 3593 typedef remove-private-as-option { 3594 type identityref { 3595 base remove-private-as-option; 3596 } 3597 description 3598 "Set of options for configuring how private AS path numbers 3599 are removed from advertisements"; 3600 } 3602 typedef rr-cluster-id-type { 3603 type union { 3604 type uint32; 3605 type inet:ipv4-address; 3606 } 3607 description 3608 "Union type for route reflector cluster ids: 3609 option 1: 4-byte number 3610 option 2: IP address"; 3611 } 3613 typedef community-type { 3614 type bits { 3615 bit standard { 3616 position 0; 3617 description 3618 "Send standard communities."; 3619 reference 3620 "RFC 1997: BGP Communities Attribute."; 3621 } 3622 bit extended { 3623 description 3624 "Send extended communities."; 3625 reference 3626 "RFC 4360: BGP Extended Communities Attribute."; 3628 } 3629 bit large { 3630 description 3631 "Send large communities."; 3632 reference 3633 "RFC 8092: BGP Large Communities Attribute."; 3634 } 3635 } 3636 description 3637 "Type describing variations of community attributes. 3638 The community types can be combined and a value of 0 3639 implies 'none'"; 3640 } 3641 } 3642 3644 7.3. BGP policy data 3646 file "ietf-bgp-policy@2021-07-11.yang" 3647 module ietf-bgp-policy { 3648 yang-version 1.1; 3649 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; 3650 prefix bp; 3652 // import some basic types 3654 import ietf-inet-types { 3655 prefix inet; 3656 } 3657 import ietf-routing-policy { 3658 prefix rt-pol; 3659 } 3660 import ietf-bgp-types { 3661 prefix bt; 3662 } 3663 import ietf-routing-types { 3664 prefix rt-types; 3665 } 3667 organization 3668 "IETF IDR Working Group"; 3669 contact 3670 "WG Web: 3671 WG List: 3673 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3674 Keyur Patel (keyur at arrcus.com), 3675 Susan Hares (shares at ndzh.com), 3676 Jeffrey Haas (jhaas at juniper.net)."; 3678 description 3679 "This module contains data definitions for BGP routing policy. 3680 It augments the base routing-policy module with BGP-specific 3681 options for conditions and actions. 3683 Copyright (c) 2021 IETF Trust and the persons identified as 3684 authors of the code. All rights reserved. 3686 Redistribution and use in source and binary forms, with or 3687 without modification, is permitted pursuant to, and subject to 3688 the license terms contained in, the Simplified BSD License set 3689 forth in Section 4.c of the IETF Trust's Legal Provisions 3690 Relating to IETF Documents 3691 (https://trustee.ietf.org/license-info). 3693 This version of this YANG module is part of RFC XXXX 3694 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 3695 for full legal notices. 3697 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 3698 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 3699 'MAY', and 'OPTIONAL' in this document are to be interpreted as 3700 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 3701 they appear in all capitals, as shown here."; 3703 revision 2021-07-11 { 3704 description 3705 "Initial Version"; 3706 reference 3707 "RFC XXX, BGP Model for Service Provider Network."; 3708 } 3710 // typedef statements 3712 typedef bgp-set-community-option-type { 3713 type enumeration { 3714 enum add { 3715 description 3716 "Add the specified communities to the existing 3717 community attribute"; 3718 } 3719 enum remove { 3720 description 3721 "Remove the specified communities from the 3722 existing community attribute"; 3723 } 3724 enum replace { 3725 description 3726 "Replace the existing community attribute with 3727 the specified communities. If an empty set is 3728 specified, this removes the community attribute 3729 from the route."; 3730 } 3731 } 3732 description 3733 "Type definition for options when setting the community 3734 attribute in a policy action"; 3735 } 3737 typedef bgp-next-hop-type { 3738 type union { 3739 type inet:ip-address-no-zone; 3740 type enumeration { 3741 enum self { 3742 description 3743 "Special designation for local router's own 3744 address, i.e., next-hop-self"; 3745 } 3746 } 3747 } 3748 description 3749 "Type definition for specifying next-hop in policy actions"; 3750 } 3752 typedef bgp-set-med-type { 3753 type union { 3754 type uint32; 3755 type string { 3756 pattern '^[+-]([0-9]{1,8}|[0-3][0-9]{1,9}|4[0-1][0-9]{1,8}|' 3757 + '428[0-9]{1,7}|429[0-3][0-9]{1,6}|42948[0-9]{1,5}|' 3758 + '42949[0-5][0-9]{1,4}|429496[0-6][0-9]{1,3}|' 3759 + '4294971[0-9]{1,2}|42949728[0-9]|42949729[0-5])$'; 3760 } 3761 type enumeration { 3762 enum igp { 3763 description 3764 "Set the MED value to the IGP cost toward the 3765 next hop for the route"; 3766 } 3767 enum med-plus-igp { 3768 description 3769 "Before comparing MED values for path selection, adds to 3770 the MED the cost of the IGP route to the BGP next-hop 3771 destination. 3773 This option replaces the MED value for the router, 3774 but does not affect the IGP metric comparison. As a 3775 result, when multiple routes have the same value 3776 after the MED-plus-IPG comparison, and route selection 3777 continues, the IGP route metric is also compared, even 3778 though it was added to the MED value and compared 3779 earlier in the selection process. 3781 Useful when the downstream AS requires the complete 3782 cost of a certain route that is received across 3783 multiple ASs."; 3784 } 3785 } 3786 } 3787 description 3788 "Type definition for specifying how the BGP MED can 3789 be set in BGP policy actions. The three choices are to set 3790 the MED directly, increment/decrement using +/- notation, 3791 and setting it to the IGP cost (predefined value)."; 3792 } 3794 // augment statements 3796 augment "/rt-pol:routing-policy/rt-pol:defined-sets" { 3797 description 3798 "Adds BGP defined sets container to routing policy model."; 3799 container bgp-defined-sets { 3800 description 3801 "BGP-related set definitions for policy match conditions"; 3802 container community-sets { 3803 description 3804 "Enclosing container for list of defined BGP community sets"; 3805 list community-set { 3806 key "name"; 3807 description 3808 "List of defined BGP community sets"; 3809 leaf name { 3810 type string; 3811 mandatory true; 3812 description 3813 "Name / label of the community set -- this is used to 3814 reference the set in match conditions"; 3815 } 3816 leaf-list member { 3817 type union { 3818 type bt:bgp-std-community-type; 3819 type bt:bgp-community-regexp-type; 3820 type bt:bgp-well-known-community-type; 3822 } 3823 description 3824 "Members of the community set"; 3825 } 3826 } 3827 } 3828 container ext-community-sets { 3829 description 3830 "Enclosing container for list of extended BGP community 3831 sets"; 3832 list ext-community-set { 3833 key "name"; 3834 description 3835 "List of defined extended BGP community sets"; 3836 leaf name { 3837 type string; 3838 description 3839 "Name / label of the extended community set -- this is 3840 used to reference the set in match conditions"; 3841 } 3842 leaf-list member { 3843 type union { 3844 type rt-types:route-target; 3845 type bt:bgp-community-regexp-type; 3846 } 3847 description 3848 "Members of the extended community set"; 3849 } 3850 } 3851 } 3852 container as-path-sets { 3853 description 3854 "Enclosing container for list of define AS path sets"; 3855 list as-path-set { 3856 key "name"; 3857 description 3858 "List of defined AS path sets"; 3859 leaf name { 3860 type string; 3861 description 3862 "Name of the AS path set -- this is used to reference the 3863 set in match conditions"; 3864 } 3865 leaf-list member { 3866 type string; 3867 description 3868 "AS path regular expression -- list of ASes in the set"; 3869 } 3871 } 3872 } 3873 } 3874 } 3876 augment "/rt-pol:routing-policy/rt-pol:policy-definitions/" + 3877 "rt-pol:policy-definition/rt-pol:statements/" + 3878 "rt-pol:statement/rt-pol:conditions" { 3879 description 3880 "BGP policy conditions added to routing policy module."; 3882 container bgp-conditions { 3883 description 3884 "Top-level container for BGP specific policy conditions."; 3886 leaf med-eq { 3887 type uint32; 3888 description 3889 "Condition to check if the received MED value is equal to 3890 the specified value."; 3891 } 3893 leaf origin-eq { 3894 type bt:bgp-origin-attr-type; 3895 description 3896 "Condition to check if the route origin is equal to the 3897 specified value."; 3898 } 3900 leaf-list next-hop-in-eq { 3901 type inet:ip-address-no-zone; 3902 description 3903 "List of next hop addresses to check for in the route 3904 update."; 3905 } 3907 leaf-list afi-safi-in { 3908 type identityref { 3909 base bt:afi-safi-type; 3910 } 3911 description 3912 "List of address families which the NLRI may be within."; 3913 } 3915 leaf local-pref-eq { 3916 type uint32; 3917 description 3918 "Condition to check if the local pref attribute is equal to 3919 the specified value."; 3920 } 3922 leaf route-type { 3923 type enumeration { 3924 enum internal { 3925 description 3926 "route type is internal"; 3927 } 3928 enum external { 3929 description 3930 "route type is external"; 3931 } 3932 } 3933 description 3934 "Condition to check the route type in the route update"; 3935 } 3937 container community-count { 3938 description 3939 "Value and comparison operations for conditions based on the 3940 number of communities in the route update."; 3942 leaf community-count { 3943 type uint32; 3944 description 3945 "Value for the number of communities in the route update."; 3946 } 3948 choice operation { 3949 case eq { 3950 leaf eq { 3951 type empty; 3952 description 3953 "Check to see if the value is equal."; 3954 } 3955 } 3957 case lt-or-eq { 3958 leaf lt-or-eq { 3959 type empty; 3960 description 3961 "Check to see if the value is less than or equal."; 3962 } 3963 } 3965 case gt-or-eq { 3966 leaf gt-or-eq { 3967 type empty; 3968 description 3969 "Check to see if the value is greater than or equal."; 3970 } 3971 } 3972 description 3973 "Choice of operations on the value of community-count."; 3974 } 3975 } 3977 container as-path-length { 3978 description 3979 "Value and comparison operations for conditions based on the 3980 length of the AS path in the route update. 3982 The as-path-length SHALL be calculated and SHALL follow 3983 RFC 4271 rules."; 3984 reference 3985 "RFC 4271: BGP-4."; 3987 leaf as-path-length { 3988 type uint32; 3989 description 3990 "Value of the AS path length in the route update."; 3991 } 3993 choice operation { 3994 case eq { 3995 leaf eq { 3996 type empty; 3997 description 3998 "Check to see if the value is equal."; 3999 } 4000 } 4002 case lt-or-eq { 4003 leaf lt-or-eq { 4004 type empty; 4005 description 4006 "Check to see if the value is less than or equal."; 4007 } 4008 } 4010 case gt-or-eq { 4011 leaf gt-or-eq { 4012 type empty; 4013 description 4014 "Check to see if the value is greater than or equal."; 4016 } 4017 } 4018 description 4019 "Choice of operations on the value of as-path-len."; 4020 } 4021 } 4023 container match-community-set { 4024 description 4025 "Top-level container for match conditions on communities. 4026 Match a referenced community-set according to the logic 4027 defined in the match-set-options leaf."; 4028 leaf community-set { 4029 type leafref { 4030 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 4031 + "bp:bgp-defined-sets/bp:community-sets/" 4032 + "bp:community-set/bp:name"; 4033 } 4034 description 4035 "References a defined community set."; 4036 } 4037 uses rt-pol:match-set-options-group; 4038 } 4040 container match-ext-community-set { 4041 description 4042 "Match a referenced extended community-set according to the 4043 logic defined in the match-set-options leaf."; 4044 leaf ext-community-set { 4045 type leafref { 4046 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 4047 + "bp:bgp-defined-sets/bp:ext-community-sets/" 4048 + "bp:ext-community-set/bp:name"; 4049 } 4050 description 4051 "References a defined extended community set."; 4052 } 4053 uses rt-pol:match-set-options-group; 4054 } 4055 container match-as-path-set { 4056 description 4057 "Match a referenced as-path set according to the logic 4058 defined in the match-set-options leaf."; 4059 leaf as-path-set { 4060 type leafref { 4061 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 4062 + "bp:bgp-defined-sets/bp:as-path-sets/" 4063 + "bp:as-path-set/bp:name"; 4065 } 4066 description 4067 "References a defined AS path set"; 4068 } 4069 uses rt-pol:match-set-options-group; 4070 } 4071 } 4072 } 4074 augment "/rt-pol:routing-policy/rt-pol:policy-definitions/" + 4075 "rt-pol:policy-definition/rt-pol:statements/" + 4076 "rt-pol:statement/rt-pol:actions" { 4077 description 4078 "BGP policy actions added to routing policy module."; 4079 container bgp-actions { 4080 description 4081 "Top-level container for BGP-specific actions"; 4082 leaf set-route-origin { 4083 type bt:bgp-origin-attr-type; 4084 description 4085 "Set the origin attribute to the specified value"; 4086 } 4087 leaf set-local-pref { 4088 type uint32; 4089 description 4090 "Set the local pref attribute on the route."; 4091 } 4092 leaf set-next-hop { 4093 type bgp-next-hop-type; 4094 description 4095 "Set the next-hop attribute in the route."; 4096 } 4097 leaf set-med { 4098 type bgp-set-med-type; 4099 description 4100 "Set the med metric attribute in the route."; 4101 } 4102 container set-as-path-prepend { 4103 description 4104 "Action to prepend local AS number to the AS-path a 4105 specified number of times"; 4106 leaf repeat-n { 4107 type uint8 { 4108 range "1..max"; 4109 } 4110 description 4111 "Number of times to prepend the local AS number to the AS 4112 path. The value should be between 1 and the maximum 4113 supported by the implementation."; 4114 } 4115 } 4117 container set-community { 4118 description 4119 "Action to set the community attributes of the route, along 4120 with options to modify how the community is modified. 4121 Communities may be set using an inline list OR 4122 reference to an existing defined set (not both)."; 4124 leaf options { 4125 type bgp-set-community-option-type; 4126 description 4127 "Options for modifying the community attribute with 4128 the specified values. These options apply to both 4129 methods of setting the community attribute."; 4130 } 4132 choice method { 4133 description 4134 "Indicates the method used to specify the extended 4135 communities for the set-community action"; 4136 case inline { 4137 leaf-list communities { 4138 type union { 4139 type bt:bgp-std-community-type; 4140 type bt:bgp-well-known-community-type; 4141 } 4142 description 4143 "Set the community values for the update inline with a 4144 list."; 4145 } 4146 } 4148 case reference { 4149 leaf community-set-ref { 4150 type leafref { 4151 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 4152 + "bp:bgp-defined-sets/" 4153 + "bp:community-sets/bp:community-set/bp:name"; 4154 } 4155 description 4156 "References a defined community set by name"; 4157 } 4158 } 4159 } 4160 } 4161 container set-ext-community { 4162 description 4163 "Action to set the extended community attributes of the 4164 route, along with options to modify how the community is 4165 modified. Extended communities may be set using an inline 4166 list OR a reference to an existing defined set (but not 4167 both)."; 4169 leaf options { 4170 type bgp-set-community-option-type; 4171 description 4172 "Options for modifying the community attribute with 4173 the specified values. These options apply to both 4174 methods of setting the community attribute."; 4175 } 4177 choice method { 4178 description 4179 "Indicates the method used to specify the extended 4180 communities for the set-ext-community action"; 4181 case inline { 4182 leaf-list communities { 4183 type union { 4184 type rt-types:route-target; 4185 type bt:bgp-well-known-community-type; 4186 } 4187 description 4188 "Set the extended community values for the update inline 4189 with a list."; 4190 } 4191 } 4192 case reference { 4193 leaf ext-community-set-ref { 4194 type leafref { 4195 path "/rt-pol:routing-policy/rt-pol:defined-sets/" 4196 + "bp:bgp-defined-sets/bp:ext-community-sets/" 4197 + "bp:ext-community-set/bp:name"; 4198 } 4199 description 4200 "References a defined extended community set by name"; 4201 } 4202 } 4203 } 4204 } 4205 } 4206 } 4207 } 4208 4210 7.4. RIB modules 4212 file "ietf-bgp-rib@2021-07-11.yang" 4213 submodule ietf-bgp-rib { 4214 yang-version 1.1; 4215 belongs-to ietf-bgp { 4216 prefix br; 4217 } 4219 /* 4220 * Import and Include 4221 */ 4223 import ietf-bgp-types { 4224 prefix bt; 4225 reference 4226 "RFC XXXX: BGP YANG Model for Service Provider Networks."; 4227 } 4228 import ietf-inet-types { 4229 prefix inet; 4230 reference 4231 "RFC 6991: Common YANG Types."; 4232 } 4233 import ietf-yang-types { 4234 prefix yang; 4235 reference 4236 "RFC 6991: Common YANG Types."; 4237 } 4238 import ietf-routing-types { 4239 prefix rt; 4240 reference 4241 "RFC 8294: Routing Area YANG Types."; 4242 } 4243 include ietf-bgp-rib-types; 4244 include ietf-bgp-rib-tables; 4246 // groupings of attributes in three categories: 4247 // - shared across multiple routes 4248 // - common to LOC-RIB and Adj-RIB, but not shared across routes 4249 // - specific to LOC-RIB or Adj-RIB 4250 // groupings of annotations for each route or table 4251 include ietf-bgp-rib-attributes; 4253 organization 4254 "IETF IDR Working Group"; 4255 contact 4256 "WG Web: 4257 WG List: 4258 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4259 Keyur Patel (keyur at arrcus.com), 4260 Susan Hares (shares at ndzh.com), 4261 Jeffrey Haas (jhaas at juniper dot net)."; 4263 description 4264 "Defines a submodule for representing BGP routing table (RIB) 4265 contents. The submodule supports 5 logical RIBs per address 4266 family: 4268 loc-rib: This is the main BGP routing table for the local routing 4269 instance, containing best-path selections for each prefix. The 4270 loc-rib table may contain multiple routes for a given prefix, 4271 with an attribute to indicate which was selected as the best 4272 path. Note that multiple paths may be used or advertised even if 4273 only one path is marked as best, e.g., when using BGP 4274 add-paths. An implementation may choose to mark multiple 4275 paths in the RIB as best path by setting the flag to true for 4276 multiple entries. 4278 adj-rib-in-pre: This is a per-neighbor table containing the NLRI 4279 updates received from the neighbor before any local input policy 4280 rules or filters have been applied. This can be considered the 4281 'raw' updates from a given neighbor. 4283 adj-rib-in-post: This is a per-neighbor table containing the 4284 routes received from the neighbor that are eligible for 4285 best-path selection after local input policy rules have been 4286 applied. 4288 adj-rib-out-pre: This is a per-neighbor table containing routes 4289 eligible for sending (advertising) to the neighbor before output 4290 policy rules have been applied. 4292 adj-rib-out-post: This is a per-neighbor table containing routes 4293 eligible for sending (advertising) to the neighbor after output 4294 policy rules have been applied. 4296 Copyright (c) 2021 IETF Trust and the persons identified as 4297 authors of the code. All rights reserved. 4299 Redistribution and use in source and binary forms, with or 4300 without modification, is permitted pursuant to, and subject to 4301 the license terms contained in, the Simplified BSD License set 4302 forth in Section 4.c of the IETF Trust's Legal Provisions 4303 Relating to IETF Documents 4304 (https://trustee.ietf.org/license-info). 4306 This version of this YANG module is part of RFC XXXX 4307 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4308 for full legal notices. 4310 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4311 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4312 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4313 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4314 they appear in all capitals, as shown here."; 4316 revision 2021-07-11 { 4317 description 4318 "Initial Version"; 4319 reference 4320 "RFC XXXX, BGP YANG Model for Service Provider Network."; 4321 } 4323 grouping attr-set-attributes { 4324 description 4325 "A grouping for all attribute set parameters."; 4327 container attributes { 4328 description 4329 "A container for attribute set parameters."; 4331 leaf origin { 4332 type bt:bgp-origin-attr-type; 4333 description 4334 "BGP attribute defining the origin of the path 4335 information."; 4336 } 4337 leaf atomic-aggregate { 4338 type boolean; 4339 description 4340 "BGP attribute indicating that the prefix is an atomic 4341 aggregate; i.e., the peer selected is a less specific 4342 route without selecting a more specific route that is 4343 subsumed by it."; 4344 reference 4345 "RFC 4271: Section 5.1.6."; 4346 } 4347 leaf next-hop { 4348 type inet:ip-address; 4349 description 4350 "BGP next hop attribute defining the IP address of the 4351 router that should be used as the next hop to the 4352 destination"; 4353 reference 4354 "RFC 4271: Section 5.1.3."; 4355 } 4356 leaf med { 4357 type uint32; 4358 description 4359 "BGP multi-exit discriminator attribute used in the BGP route 4360 selection process"; 4361 reference 4362 "RFC 4271: Section 5.1.4."; 4363 } 4364 leaf local-pref { 4365 type uint32; 4366 description 4367 "BGP local preference attribute sent to internal peers to 4368 indicate the degree of preference for externally learned 4369 routes. The route with the highest local preference 4370 value is preferred."; 4371 reference 4372 "RFC 4271: Section 5.1.5."; 4373 } 4374 leaf originator-id { 4375 type yang:dotted-quad; 4376 description 4377 "BGP attribute that provides the id as an IPv4 address 4378 of the originator of the announcement."; 4379 reference 4380 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4381 Mesh Internal BGP (IBGP)"; 4382 } 4383 leaf-list cluster-list { 4384 type yang:dotted-quad; 4385 description 4386 "Represents the reflection path that the route has 4387 passed."; 4388 reference 4389 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4390 Mesh Internal BGP (IBGP)"; 4391 } 4392 leaf aigp-metric { 4393 type uint64; 4394 description 4395 "BGP path attribute representing the accumulated IGP 4396 metric for the path"; 4397 reference 4398 "RFC 7311 - The Accumulated IGP Metric Attribute for BGP"; 4399 } 4400 container aggregator { 4401 config false; 4402 description 4403 "BGP attribute indicating the prefix has been 4404 aggregated by the specified AS and router."; 4405 reference 4406 "RFC 4271: Section 5.1.7. 4407 RFC 6793 - BGP Support for Four-octet AS Number Space."; 4408 leaf as { 4409 type inet:as-number; 4410 description 4411 "AS number of the autonomous system that performed the 4412 aggregation."; 4413 } 4414 leaf address { 4415 type inet:ipv4-address; 4416 description 4417 "IP address of the router that performed the 4418 aggregation."; 4419 } 4420 } 4421 container aggregator4 { 4422 config false; 4423 description 4424 "BGP attribute indicating the prefix has been 4425 aggregated by the specified AS and router. 4426 This value is populated with the received or sent 4427 attribute in Adj-RIB-In or Adj-RIB-Out, respectively. 4428 It should not be populated in Loc-RIB since the Loc-RIB 4429 is expected to store the effective AGGREGATOR in the 4430 aggregator/as leaf regardless of being 4-octet or 2-octet."; 4431 reference 4432 "RFC 4271: Section 5.1.7."; 4433 leaf as4 { 4434 type inet:as-number; 4435 description 4436 "AS number of the autonomous system that performed the 4437 aggregation (4-octet representation). This value is 4438 populated if an upstream router is not 4-octet capable. 4439 Its semantics are similar to the AS4_PATH optional 4440 transitive attribute"; 4441 reference 4442 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4443 } 4444 leaf address { 4445 type inet:ipv4-address; 4446 description 4447 "IP address of the router that performed the 4448 aggregation."; 4449 } 4451 } 4452 container as-path { 4453 description 4454 "Enclosing container for the list of AS path segments. 4456 In the Adj-RIB-In or Adj-RIB-Out, this list should show 4457 the received or sent AS_PATH, respectively. For 4458 example, if the local router is not 4-byte capable, this 4459 value should consist of 2-octet ASNs or the AS_TRANS 4460 (AS 23456) values received or sent in route updates. 4462 In the Loc-RIB, this list should reflect the effective 4463 AS path for the route, e.g., a 4-octet value if the 4464 local router is 4-octet capable."; 4465 reference 4466 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4) 4467 RFC 6793 - BGP Support for Four-octet AS Number Space 4468 RFC 5065 - Autonomous System Confederations for BGP"; 4469 list segment { 4470 config false; 4471 uses bgp-as-path-attr; 4472 description 4473 "List of AS PATH segments"; 4474 } 4475 } 4476 container as4-path { 4477 description 4478 "This is the path encoded with 4-octet 4479 AS numbers in the optional transitive AS4_PATH attribute. 4480 This value is populated with the received or sent 4481 attribute in Adj-RIB-In or Adj-RIB-Out, respectively. 4482 It should not be populated in Loc-RIB since the Loc-RIB 4483 is expected to store the effective AS-Path in the 4484 as-path leaf regardless of being 4-octet or 2-octet."; 4485 reference 4486 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4487 list segment { 4488 config false; 4489 uses bgp-as-path-attr; 4490 description 4491 "List of AS PATH segments"; 4492 } 4493 } 4494 } 4495 } 4497 grouping attr-set { 4498 description 4499 "A grouping for all path attributes."; 4501 list attr-set { 4502 key "index"; 4503 description 4504 "List of path attributes that may be in use by multiple 4505 routes in the table"; 4506 leaf index { 4507 type uint64; 4508 description 4509 "System generated index for each attribute set. The 4510 index is used to reference an attribute set from a 4511 specific path. Multiple paths may reference the same 4512 attribute set."; 4513 } 4514 uses attr-set-attributes; 4515 } 4516 } 4518 grouping attr-sets { 4519 description 4520 "A grouping for all sets of path attributes."; 4522 container attr-sets { 4523 description 4524 "Enclosing container for the list of path attribute sets"; 4525 uses attr-set; 4526 } 4527 } 4529 grouping ext-community-attributes { 4530 description 4531 "A grouping for all external community parameters."; 4533 leaf-list ext-community { 4534 type rt:route-target; 4535 description 4536 "List of BGP extended community attributes. The received 4537 extended community may be an explicitly modeled 4538 type or unknown, represented by an 8-octet value 4539 formatted according to RFC 4360."; 4540 reference 4541 "RFC 4360 - BGP Extended Communities Attribute"; 4542 } 4543 } 4545 grouping rib { 4546 description 4547 "Grouping for rib."; 4548 container rib { 4549 config false; 4550 uses attr-sets; 4551 container communities { 4552 description 4553 "Enclosing container for the list of community attribute 4554 sets."; 4555 list community { 4556 key "index"; 4557 config false; 4558 description 4559 "List of path attributes that may be in use by multiple 4560 routes in the table."; 4561 leaf index { 4562 type uint64; 4563 description 4564 "System generated index for each attribute set. The 4565 index is used to reference an attribute set from a 4566 specific path. Multiple paths may reference the same 4567 attribute set."; 4568 } 4569 uses bgp-community-attr-state; 4570 } 4571 } 4572 container ext-communities { 4573 description 4574 "Enclosing container for the list of extended community 4575 attribute sets."; 4576 list ext-community { 4577 key "index"; 4578 config false; 4579 description 4580 "List of path attributes that may be in use by multiple 4581 routes in the table."; 4582 leaf index { 4583 type uint64; 4584 description 4585 "System generated index for each attribute set. The 4586 index is used to reference an attribute set from a 4587 specific path. Multiple paths may reference the same 4588 attribute set."; 4589 } 4590 uses ext-community-attributes; 4591 } 4592 } 4594 container afi-safis { 4595 config false; 4596 description 4597 "Enclosing container for address family list."; 4598 list afi-safi { 4599 key "name"; 4600 description 4601 "List of afi-safi types."; 4602 leaf name { 4603 type identityref { 4604 base bt:afi-safi-type; 4605 } 4606 description 4607 "AFI,SAFI name."; 4608 } 4609 container ipv4-unicast { 4610 when "../name = 'bt:ipv4-unicast'" { 4611 description 4612 "Include this container for IPv4 unicast RIB."; 4613 } 4614 description 4615 "Routing tables for IPv4 unicast -- active when the 4616 afi-safi name is ipv4-unicast."; 4617 uses ipv4-loc-rib; 4618 uses ipv4-adj-rib; 4619 } 4620 container ipv6-unicast { 4621 when "../name = 'bt:ipv6-unicast'" { 4622 description 4623 "Include this container for IPv6 unicast RIB."; 4624 } 4625 description 4626 "Routing tables for IPv6 unicast -- active when the 4627 afi-safi name is ipv6-unicast."; 4628 uses ipv6-loc-rib; 4629 uses ipv6-adj-rib; 4630 } 4631 } 4632 } 4633 description 4634 "Top level container for BGP RIB."; 4635 } 4636 } 4637 } 4638 4639 file "ietf-bgp-rib-types@2021-07-11.yang" 4640 submodule ietf-bgp-rib-types { 4641 yang-version 1.1; 4642 belongs-to ietf-bgp { 4643 prefix br; 4644 } 4646 organization 4647 "IETF IDR Working Group"; 4648 contact 4649 "WG Web: 4650 WG List: 4652 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4653 Keyur Patel (keyur at arrcus.com), 4654 Susan Hares (shares at ndzh.com), 4655 Jeffrey Haas (jhaas at juniper.net)."; 4657 description 4658 "Defines identity and type definitions associated with 4659 the BGP RIB modules. 4661 Copyright (c) 2021 IETF Trust and the persons identified as 4662 authors of the code. All rights reserved. 4664 Redistribution and use in source and binary forms, with or 4665 without modification, is permitted pursuant to, and subject to 4666 the license terms contained in, the Simplified BSD License set 4667 forth in Section 4.c of the IETF Trust's Legal Provisions 4668 Relating to IETF Documents 4669 (https://trustee.ietf.org/license-info). 4671 This version of this YANG module is part of RFC XXXX 4672 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4673 for full legal notices. 4675 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4676 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4677 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4678 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4679 they appear in all capitals, as shown here."; 4681 revision 2021-07-11 { 4682 description 4683 "Initial Version"; 4684 reference 4685 "RFC XXXX, BGP Model for Service Provider Network."; 4686 } 4687 identity ineligible-route-reason { 4688 description 4689 "Base identity for reason code for routes that are rejected as 4690 ineligible. Some derived entities are based on BMP v3."; 4691 reference 4692 "RFC 7854: BGP Monitoring Protocol."; 4693 } 4695 identity ineligible-cluster-loop { 4696 base ineligible-route-reason; 4697 description 4698 "Route was ineligible due to CLUSTER_LIST loop"; 4699 } 4701 identity ineligible-as-loop { 4702 base ineligible-route-reason; 4703 description 4704 "Route was ineligible due to AS_PATH loop"; 4705 } 4707 identity ineligible-originator { 4708 base ineligible-route-reason; 4709 description 4710 "Route was ineligible due to ORIGINATOR_ID. For example, update 4711 has local router as originator"; 4712 } 4714 identity ineligible-confed { 4715 base ineligible-route-reason; 4716 description 4717 "Route was ineligible due to a loop in the AS_CONFED_SEQUENCE 4718 or AS_CONFED_SET attributes"; 4719 } 4721 identity bgp-not-selected-bestpath { 4722 description 4723 "Base identity for indicating reason a route was was not 4724 selected by BGP route selection algorithm"; 4725 reference 4726 "RFC 4271 - Section 9.1"; 4727 } 4729 identity local-pref-lower { 4730 base bgp-not-selected-bestpath; 4731 description 4732 "Route has a lower localpref attribute than current best path"; 4733 reference 4734 "RFC 4271 - Section 9.1.2"; 4736 } 4738 identity as-path-longer { 4739 base bgp-not-selected-bestpath; 4740 description 4741 "Route has a longer AS path attribute than current best path"; 4742 reference 4743 "RFC 4271 - Section 9.1.2.2 (a)"; 4744 } 4746 identity origin-type-higher { 4747 base bgp-not-selected-bestpath; 4748 description 4749 "Route has a higher origin type, i.e., IGP origin is preferred 4750 over EGP or incomplete"; 4751 reference 4752 "RFC 4271 - Section 9.1.2.2 (b)"; 4753 } 4755 identity med-higher { 4756 base bgp-not-selected-bestpath; 4757 description 4758 "Route has a higher MED, or metric, attribute than the current 4759 best path"; 4760 reference 4761 "RFC 4271 - Section 9.1.2.2 (c)"; 4762 } 4764 identity prefer-external { 4765 base bgp-not-selected-bestpath; 4766 description 4767 "Route source is via IBGP, rather than EGP."; 4768 reference 4769 "RFC 4271 - Section 9.1.2.2 (d)"; 4770 } 4772 identity nexthop-cost-higher { 4773 base bgp-not-selected-bestpath; 4774 description 4775 "Route has a higher interior cost to the next hop."; 4776 reference 4777 "RFC 4271 - Section 9.1.2.2 (e)"; 4778 } 4780 identity higher-router-id { 4781 base bgp-not-selected-bestpath; 4782 description 4783 "Route was sent by a peer with a higher BGP Identifier value."; 4785 reference 4786 "RFC 4271 - Section 9.1.2.2 (f)"; 4787 } 4789 identity higher-peer-address { 4790 base bgp-not-selected-bestpath; 4791 description 4792 "Route was sent by a peer with a higher IP address"; 4793 reference 4794 "RFC 4271 - Section 9.1.2.2 (g)"; 4795 } 4797 identity bgp-not-selected-policy { 4798 description 4799 "Base identity for reason code for routes that are rejected 4800 due to policy"; 4801 } 4803 identity rejected-import-policy { 4804 base bgp-not-selected-policy; 4805 description 4806 "Route was rejected after applying import policies."; 4807 } 4808 } 4809 4811 file "ietf-bgp-rib-attributes@2021-07-11.yang" 4812 submodule ietf-bgp-rib-attributes { 4813 yang-version 1.1; 4814 belongs-to ietf-bgp { 4815 prefix br; 4816 } 4818 // import some basic types 4820 import ietf-bgp-types { 4821 prefix bgpt; 4822 } 4823 import ietf-inet-types { 4824 prefix inet; 4825 } 4826 include ietf-bgp-rib-types; 4828 // meta 4830 organization 4831 "IETF IDR Working Group"; 4832 contact 4833 "WG Web: 4834 WG List: 4836 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4837 Keyur Patel (keyur at arrcus.com), 4838 Susan Hares (shares at ndzh.com), 4839 Jeffrey Haas (jhaas at juniper.net)."; 4841 description 4842 "This submodule contains common data definitions for BGP 4843 attributes for use in BGP RIB tables. 4845 Copyright (c) 2021 IETF Trust and the persons identified as 4846 authors of the code. All rights reserved. 4848 Redistribution and use in source and binary forms, with or 4849 without modification, is permitted pursuant to, and subject to 4850 the license terms contained in, the Simplified BSD License set 4851 forth in Section 4.c of the IETF Trust's Legal Provisions 4852 Relating to IETF Documents 4853 (https://trustee.ietf.org/license-info). 4855 This version of this YANG module is part of RFC XXXX 4856 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4857 for full legal notices. 4859 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4860 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4861 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4862 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4863 they appear in all capitals, as shown here."; 4865 revision 2021-07-11 { 4866 description 4867 "Initial version"; 4868 reference 4869 "RFC XXXX: BGP YANG Model for Service Provider Network"; 4870 } 4872 grouping bgp-as-path-attr { 4873 description 4874 "Data for representing BGP AS-PATH attribute"; 4876 leaf type { 4877 type identityref { 4878 base bgpt:as-path-segment-type; 4879 } 4880 description 4881 "The type of AS-PATH segment"; 4882 } 4883 leaf-list member { 4884 type inet:as-number; 4885 description 4886 "List of the AS numbers in the AS-PATH segment"; 4887 } 4888 } 4890 grouping bgp-community-attr-state { 4891 description 4892 "Common definition of BGP community attributes"; 4893 leaf-list community { 4894 type union { 4895 type bgpt:bgp-well-known-community-type; 4896 type bgpt:bgp-std-community-type; 4897 } 4898 description 4899 "List of standard or well-known BGP community 4900 attributes."; 4901 } 4902 } 4904 grouping bgp-unknown-attr-top { 4905 description 4906 "Unknown path attributes that are not expected to be shared 4907 across route entries, common to LOC-RIB and Adj-RIB"; 4908 container unknown-attributes { 4909 description 4910 "Unknown path attributes that were received in the UPDATE 4911 message which contained the prefix."; 4913 list unknown-attribute { 4914 key "attr-type"; 4915 description 4916 "This list contains received attributes that are 4917 unrecognized or unsupported by the local router. The list 4918 may be empty."; 4920 leaf optional { 4921 type boolean; 4922 description 4923 "Defines whether the attribute is optional (if 4924 set to true) or well-known (if set to false). 4925 Set in the high-order bit of the BGP attribute 4926 flags octet."; 4927 reference 4928 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4930 } 4932 leaf transitive { 4933 type boolean; 4934 description 4935 "Defines whether an optional attribute is transitive 4936 (if set to true) or non-transitive (if set to false). 4937 For well-known attributes, the transitive flag must be 4938 set to true. Set in the second high-order bit of the BGP 4939 attribute flags octet."; 4940 reference 4941 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4942 } 4944 leaf partial { 4945 type boolean; 4946 description 4947 "Defines whether the information contained in the 4948 optional transitive attribute is partial (if set to 4949 true) or complete (if set to false). For well-known 4950 attributes and for optional non-transitive attributes, 4951 the partial flag must be set to false. Set in the third 4952 high-order bit of the BGP attribute flags octet."; 4953 reference 4954 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4955 } 4957 leaf extended { 4958 type boolean; 4959 description 4960 "Defines whether the attribute length is one octet 4961 (if set to false) or two octets (if set to true). Set in 4962 the fourth high-order bit of the BGP attribute flags 4963 octet."; 4964 reference 4965 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4966 } 4968 leaf attr-type { 4969 type uint8; 4970 description 4971 "1-octet value encoding the attribute type code"; 4972 reference 4973 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4974 } 4976 leaf attr-len { 4977 type uint16; 4978 description 4979 "One or two octet attribute length field indicating the 4980 length of the attribute data in octets. If the Extended 4981 Length attribute flag is set, the length field is 2 4982 octets, otherwise it is 1 octet"; 4983 reference 4984 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4985 } 4987 leaf attr-value { 4988 type binary { 4989 length "0..65535"; 4990 } 4991 description 4992 "Raw attribute value, not including the attribute 4993 flags, type, or length. The maximum length 4994 of the attribute value data is 2^16-1 per the max value 4995 of the attr-len field (2 octets)."; 4996 reference 4997 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4998 } 4999 } 5000 } 5001 } 5003 grouping bgp-adj-rib-attr-state { 5004 description 5005 "Path attributes that are not expected to be shared across 5006 route entries, specific to Adj-RIB"; 5007 leaf path-id { 5008 type uint32; 5009 description 5010 "When the BGP speaker supports advertisement of multiple 5011 paths for a prefix, the path identifier is used to 5012 uniquely identify a route based on the combination of the 5013 prefix and path id. In the Adj-RIB-In, the path-id value is 5014 the value received in the update message. In the Loc-RIB, 5015 if used, it should represent a locally generated path-id 5016 value for the corresponding route. In Adj-RIB-Out, it 5017 should be the value sent to a neighbor when add-paths is 5018 used, i.e., the capability has been negotiated."; 5019 reference 5020 "RFC 7911: Advertisement of Multiple Paths in BGP"; 5021 } 5022 } 5023 } 5024 5025 file "ietf-bgp-rib-tables@2021-07-11.yang" 5026 submodule ietf-bgp-rib-tables { 5027 yang-version 1.1; 5028 belongs-to ietf-bgp { 5029 prefix br; 5030 } 5032 // import some basic types 5034 import ietf-inet-types { 5035 prefix inet; 5036 reference 5037 "RFC 6991: Common YANG Data Types."; 5038 } 5039 import ietf-yang-types { 5040 prefix yang; 5041 reference 5042 "RFC 6991: Common YANG Data Types."; 5043 } 5044 import ietf-routing { 5045 prefix rt; 5046 reference 5047 "RFC 8022: A YANG Data Model for Routing Management."; 5048 } 5049 import ietf-bgp-types { 5050 prefix bt; 5051 reference 5052 "RFC XXXX: BGP YANG Model for Service Provider Network."; 5053 } 5054 include ietf-bgp-rib-attributes; 5056 organization 5057 "IETF IDR Working Group"; 5058 contact 5059 "WG Web: 5060 WG List: 5062 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 5063 Keyur Patel (keyur at arrcus.com), 5064 Susan Hares (shares at ndzh.com, 5065 Jeffrey Haas (jhaas at juniper.net)."; 5067 description 5068 "This submodule contains structural data definitions for 5069 BGP routing tables. 5071 Copyright (c) 2021 IETF Trust and the persons identified as 5072 authors of the code. All rights reserved. 5074 Redistribution and use in source and binary forms, with or 5075 without modification, is permitted pursuant to, and subject to 5076 the license terms contained in, the Simplified BSD License set 5077 forth in Section 4.c of the IETF Trust's Legal Provisions 5078 Relating to IETF Documents 5079 (https://trustee.ietf.org/license-info). 5081 This version of this YANG module is part of RFC XXXX 5082 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 5083 for full legal notices. 5085 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 5086 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 5087 'MAY', and 'OPTIONAL' in this document are to be interpreted as 5088 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 5089 they appear in all capitals, as shown here."; 5091 revision 2021-07-11 { 5092 description 5093 "Initial Version"; 5094 reference 5095 "RFC XXXX, BGP YANG Model for Service Provider Network."; 5096 } 5098 grouping bgp-common-route-annotations-state { 5099 description 5100 "Data definitions for flags and other information attached 5101 to routes in both LOC-RIB and Adj-RIB"; 5102 leaf last-modified { 5103 type yang:timeticks; 5104 description 5105 "Timestamp when this path was last modified. 5107 The value is the timestamp in seconds relative to 5108 the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; 5109 } 5110 leaf eligible-route { 5111 type boolean; 5112 description 5113 "Indicates that the route is eligible for selection for the 5114 best route in the Loc-Rib in BGP's Decision Process."; 5115 reference 5116 "RFC 4271, Section 9.1."; 5117 } 5118 leaf ineligible-reason { 5119 type identityref { 5120 base ineligible-route-reason; 5121 } 5122 description 5123 "If the route is ineligible for selection for the best route 5124 in the Loc-Rib in BGP's Decision process, this indicates the 5125 reason."; 5126 reference 5127 "RFC 4271, Section 9.1."; 5128 } 5129 } 5131 grouping bgp-adj-rib-in-post-route-annotations-state { 5132 description 5133 "Data definitions for information attached to routes in the 5134 Adj-RIB-in post-policy table"; 5135 leaf best-path { 5136 type boolean; 5137 description 5138 "Current path was selected as the best path."; 5139 } 5140 } 5142 grouping rib-ext-route-annotations { 5143 description 5144 "Extended annotations for routes in the routing tables"; 5145 leaf reject-reason { 5146 type union { 5147 type identityref { 5148 base bgp-not-selected-bestpath; 5149 } 5150 type identityref { 5151 base bgp-not-selected-policy; 5152 } 5153 } 5154 description 5155 "Indicates the reason the route is not used, either due to 5156 policy filtering or bestpath selection"; 5157 } 5158 } 5160 grouping bgp-adj-rib-common-attr-refs { 5161 description 5162 "Definitions of common references to attribute sets for 5163 multiple AFI-SAFIs for Adj-RIB tables."; 5164 leaf attr-index { 5165 type leafref { 5166 path "../../../../../../../../../attr-sets/" 5167 + "attr-set/index"; 5168 } 5169 description 5170 "Reference to the common attribute group for the 5171 route."; 5172 } 5173 leaf community-index { 5174 type leafref { 5175 path "../../../../../../../../../communities/community/" 5176 + "index"; 5177 } 5178 description 5179 "Reference to the community attribute for the route."; 5180 } 5181 leaf ext-community-index { 5182 type leafref { 5183 path "../../../../../../../../../ext-communities/" 5184 + "ext-community/index"; 5185 } 5186 description 5187 "Reference to the extended community attribute for the 5188 route."; 5189 } 5190 } 5192 grouping bgp-loc-rib-common-attr-refs { 5193 description 5194 "Definitions of common references to attribute sets for 5195 multiple AFI-SAFIs for LOC-RIB tables."; 5196 leaf attr-index { 5197 type leafref { 5198 path "../../../../../../../attr-sets/attr-set/" 5199 + "index"; 5200 } 5201 description 5202 "Reference to the common attribute group for the 5203 route."; 5204 } 5205 leaf community-index { 5206 type leafref { 5207 path "../../../../../../../communities/community/" 5208 + "index"; 5209 } 5210 description 5211 "Reference to the community attribute for the route."; 5212 } 5213 leaf ext-community-index { 5214 type leafref { 5215 path "../../../../../../../ext-communities/" 5216 + "ext-community/index"; 5217 } 5218 description 5219 "Reference to the extended community attribute for the 5220 route."; 5221 } 5222 } 5224 grouping bgp-loc-rib-common-keys { 5225 description 5226 "Common references used in keys for IPv4 and IPv6 5227 LOC-RIB entries."; 5228 leaf origin { 5229 type union { 5230 type inet:ip-address; 5231 type identityref { 5232 base rt:routing-protocol; 5233 } 5234 } 5235 description 5236 "Indicates the origin of the route. If the route is learned 5237 from a neighbor, this value is the neighbor address. If 5238 the route was injected or redistributed from another 5239 protocol, the origin indicates the source protocol for the 5240 route."; 5241 } 5242 leaf path-id { 5243 type uint32; 5244 description 5245 "If the route is learned from a neighbor, the path-id 5246 corresponds to the path-id for the route in the 5247 corresponding adj-rib-in-post table. If the route is 5248 injected from another protocol, or the neighbor does not 5249 support BGP add-paths, the path-id should be set 5250 to zero, also the default value. 5252 However, YANG does not allow default values to be set 5253 for parameters that form the key, so a default value 5254 cannot be set here."; 5255 } 5256 } 5258 grouping clear-routes { 5259 description 5260 "Action to clear BGP routes."; 5261 container clear-routes { 5262 if-feature "bt:clear-routes"; 5263 action clear { 5264 input { 5265 leaf clear-at { 5266 type yang:date-and-time; 5267 description 5268 "The time, in the future when the clear operation will 5269 be initiated."; 5270 } 5271 } 5272 output { 5273 leaf clear-finished-at { 5274 type yang:date-and-time; 5275 description 5276 "The time when the clear operation finished."; 5277 } 5278 } 5279 } 5280 description 5281 "Action commands to clear routes governed by a if-feature."; 5282 } 5283 } 5285 grouping ipv4-loc-rib { 5286 description 5287 "Top-level grouping for IPv4 routing tables."; 5288 container loc-rib { 5289 config false; 5290 description 5291 "Container for the IPv4 BGP LOC-RIB data."; 5292 container routes { 5293 description 5294 "Enclosing container for list of routes in the routing 5295 table."; 5296 list route { 5297 key "prefix origin path-id"; 5298 description 5299 "List of routes in the table, keyed by the route 5300 prefix, the route origin, and path-id. The route 5301 origin can be either the neighbor address from which 5302 the route was learned, or the source protocol that 5303 injected the route. The path-id distinguishes routes 5304 for the same prefix received from a neighbor (e.g., 5305 if add-paths is enabled)."; 5306 leaf prefix { 5307 type inet:ipv4-prefix; 5308 description 5309 "The IPv4 prefix corresponding to the route."; 5310 } 5311 uses bgp-loc-rib-common-keys; 5312 uses bgp-loc-rib-common-attr-refs; 5313 uses bgp-common-route-annotations-state; 5314 uses bgp-unknown-attr-top; 5315 uses rib-ext-route-annotations; 5316 } 5317 uses clear-routes; 5318 } 5319 } 5320 } 5322 grouping ipv6-loc-rib { 5323 description 5324 "Top-level grouping for IPv6 routing tables."; 5325 container loc-rib { 5326 config false; 5327 description 5328 "Container for the IPv6 BGP LOC-RIB data."; 5329 container routes { 5330 description 5331 "Enclosing container for list of routes in the routing 5332 table."; 5333 list route { 5334 key "prefix origin path-id"; 5335 description 5336 "List of routes in the table, keyed by the route 5337 prefix, the route origin, and path-id. The route 5338 origin can be either the neighbor address from which 5339 the route was learned, or the source protocol that 5340 injected the route. The path-id distinguishes routes 5341 for the same prefix received from a neighbor (e.g., 5342 if add-paths is enabled)."; 5343 leaf prefix { 5344 type inet:ipv6-prefix; 5345 description 5346 "The IPv6 prefix corresponding to the route."; 5347 } 5348 uses bgp-loc-rib-common-keys; 5349 uses bgp-loc-rib-common-attr-refs; 5350 uses bgp-common-route-annotations-state; 5351 uses bgp-unknown-attr-top; 5352 uses rib-ext-route-annotations; 5353 } 5354 uses clear-routes; 5355 } 5356 } 5357 } 5359 grouping ipv4-adj-rib-common { 5360 description 5361 "Common structural grouping for each IPv4 adj-RIB table."; 5363 container routes { 5364 config false; 5365 description 5366 "Enclosing container for list of routes in the routing 5367 table."; 5368 list route { 5369 key "prefix path-id"; 5370 description 5371 "List of routes in the table, keyed by a combination of 5372 the route prefix and path-id to distinguish multiple 5373 routes received from a neighbor for the same prefix, 5374 e.g., when BGP add-paths is enabled."; 5375 leaf prefix { 5376 type inet:ipv4-prefix; 5377 description 5378 "Prefix for the route."; 5379 } 5380 uses bgp-adj-rib-attr-state; 5381 uses bgp-adj-rib-common-attr-refs; 5382 uses bgp-common-route-annotations-state; 5383 uses bgp-unknown-attr-top; 5384 uses rib-ext-route-annotations; 5385 } 5386 uses clear-routes; 5387 } 5388 } 5390 grouping ipv4-adj-rib-in-post { 5391 description 5392 "Common structural grouping for the IPv4 adj-rib-in 5393 post-policy table."; 5394 container routes { 5395 config false; 5396 description 5397 "Enclosing container for list of routes in the routing 5398 table."; 5399 list route { 5400 key "prefix path-id"; 5401 description 5402 "List of routes in the table, keyed by a combination of 5403 the route prefix and path-id to distinguish multiple 5404 routes received from a neighbor for the same prefix, 5405 e.g., when BGP add-paths is enabled."; 5406 leaf prefix { 5407 type inet:ipv4-prefix; 5408 description 5409 "Prefix for the route."; 5410 } 5411 uses bgp-adj-rib-attr-state; 5412 uses bgp-adj-rib-common-attr-refs; 5413 uses bgp-common-route-annotations-state; 5414 uses bgp-adj-rib-in-post-route-annotations-state; 5415 uses bgp-unknown-attr-top; 5416 uses rib-ext-route-annotations; 5417 } 5418 } 5419 } 5421 grouping ipv4-adj-rib { 5422 description 5423 "Top-level grouping for Adj-RIB table."; 5424 container neighbors { 5425 config false; 5426 description 5427 "Enclosing container for neighbor list."; 5428 list neighbor { 5429 key "neighbor-address"; 5430 description 5431 "List of neighbors (peers) of the local BGP speaker."; 5432 leaf neighbor-address { 5433 type inet:ip-address; 5434 description 5435 "IP address of the BGP neighbor or peer."; 5436 } 5437 container adj-rib-in-pre { 5438 description 5439 "Per-neighbor table containing the NLRI updates 5440 received from the neighbor before any local input 5441 policy rules or filters have been applied. This can 5442 be considered the 'raw' updates from the neighbor."; 5443 uses ipv4-adj-rib-common; 5444 } 5445 container adj-rib-in-post { 5446 description 5447 "Per-neighbor table containing the paths received from 5448 the neighbor that are eligible for best-path selection 5449 after local input policy rules have been applied."; 5450 uses ipv4-adj-rib-in-post; 5451 } 5452 container adj-rib-out-pre { 5453 description 5454 "Per-neighbor table containing paths eligible for 5455 sending (advertising) to the neighbor before output 5456 policy rules have been applied."; 5457 uses ipv4-adj-rib-common; 5458 } 5459 container adj-rib-out-post { 5460 description 5461 "Per-neighbor table containing paths eligible for 5462 sending (advertising) to the neighbor after output 5463 policy rules have been applied."; 5464 uses ipv4-adj-rib-common; 5465 } 5466 } 5467 } 5468 } 5470 grouping ipv6-adj-rib-common { 5471 description 5472 "Common structural grouping for each IPv6 adj-RIB table."; 5473 container routes { 5474 config false; 5475 description 5476 "Enclosing container for list of routes in the routing 5477 table."; 5478 list route { 5479 key "prefix path-id"; 5480 description 5481 "List of routes in the table."; 5482 leaf prefix { 5483 type inet:ipv6-prefix; 5484 description 5485 "Prefix for the route."; 5486 } 5487 uses bgp-adj-rib-attr-state; 5488 uses bgp-adj-rib-common-attr-refs; 5489 uses bgp-common-route-annotations-state; 5490 uses bgp-unknown-attr-top; 5491 uses rib-ext-route-annotations; 5492 } 5493 uses clear-routes; 5494 } 5495 } 5497 grouping ipv6-adj-rib-in-post { 5498 description 5499 "Common structural grouping for the IPv6 adj-rib-in 5500 post-policy table."; 5501 container routes { 5502 config false; 5503 description 5504 "Enclosing container for list of routes in the routing 5505 table."; 5506 list route { 5507 key "prefix path-id"; 5508 description 5509 "List of routes in the table."; 5510 leaf prefix { 5511 type inet:ipv6-prefix; 5512 description 5513 "Prefix for the route."; 5514 } 5515 uses bgp-adj-rib-attr-state; 5516 uses bgp-adj-rib-common-attr-refs; 5517 uses bgp-common-route-annotations-state; 5518 uses bgp-adj-rib-in-post-route-annotations-state; 5519 uses bgp-unknown-attr-top; 5520 uses rib-ext-route-annotations; 5521 } 5522 } 5523 } 5525 grouping ipv6-adj-rib { 5526 description 5527 "Top-level grouping for Adj-RIB table."; 5528 container neighbors { 5529 config false; 5530 description 5531 "Enclosing container for neighbor list."; 5532 list neighbor { 5533 key "neighbor-address"; 5534 description 5535 "List of neighbors (peers) of the local BGP speaker."; 5536 leaf neighbor-address { 5537 type inet:ip-address; 5538 description 5539 "IP address of the BGP neighbor or peer."; 5540 } 5541 container adj-rib-in-pre { 5542 description 5543 "Per-neighbor table containing the NLRI updates 5544 received from the neighbor before any local input 5545 policy rules or filters have been applied. This can 5546 be considered the 'raw' updates from the neighbor."; 5547 uses ipv6-adj-rib-common; 5548 } 5549 container adj-rib-in-post { 5550 description 5551 "Per-neighbor table containing the paths received from 5552 the neighbor that are eligible for best-path selection 5553 after local input policy rules have been applied."; 5554 uses ipv6-adj-rib-in-post; 5556 } 5557 container adj-rib-out-pre { 5558 description 5559 "Per-neighbor table containing paths eligible for 5560 sending (advertising) to the neighbor before output 5561 policy rules have been applied."; 5562 uses ipv6-adj-rib-common; 5563 } 5564 container adj-rib-out-post { 5565 description 5566 "Per-neighbor table containing paths eligible for 5567 sending (advertising) to the neighbor after output 5568 policy rules have been applied."; 5569 uses ipv6-adj-rib-common; 5570 } 5571 } 5572 } 5573 } 5574 } 5575 5577 8. Contributors 5579 Previous versions of this document saw contributions from Anees 5580 Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr 5581 Zhadkin, and Xyfeng Liu. 5583 9. Acknowledgements 5585 The authors are grateful for valuable contributions to this document 5586 and the associated models from: Ebben Aires, Pavan Beeram, Chris 5587 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 5588 George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee 5589 Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- 5590 Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim 5591 Uttaro, and Gunter Vandevelde. 5593 Credit is also due to authors of the OpenConfig, whose model was 5594 relied upon to come up with this model. 5596 Special thanks to Robert Wilton who helped convert the YANG models to 5597 a NMDA compatible model. 5599 10. References 5601 10.1. Normative references 5603 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 5604 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 5605 . 5607 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5608 Requirement Levels", BCP 14, RFC 2119, 5609 DOI 10.17487/RFC2119, March 1997, 5610 . 5612 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 5613 Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November 5614 1998, . 5616 [RFC2918] Chen, E., "Route Refresh Capability for BGP-4", RFC 2918, 5617 DOI 10.17487/RFC2918, September 2000, 5618 . 5620 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 5621 DOI 10.17487/RFC3688, January 2004, 5622 . 5624 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 5625 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 5626 DOI 10.17487/RFC4271, January 2006, 5627 . 5629 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 5630 Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February 5631 2006, . 5633 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 5634 Reflection: An Alternative to Full Mesh Internal BGP 5635 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 5636 . 5638 [RFC4659] De Clercq, J., Ooms, D., Carugi, M., and F. Le Faucheur, 5639 "BGP-MPLS IP Virtual Private Network (VPN) Extension for 5640 IPv6 VPN", RFC 4659, DOI 10.17487/RFC4659, September 2006, 5641 . 5643 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 5644 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 5645 DOI 10.17487/RFC4724, January 2007, 5646 . 5648 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 5649 "Multiprotocol Extensions for BGP-4", RFC 4760, 5650 DOI 10.17487/RFC4760, January 2007, 5651 . 5653 [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private 5654 LAN Service (VPLS) Using BGP for Auto-Discovery and 5655 Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, 5656 . 5658 [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 5659 System Confederations for BGP", RFC 5065, 5660 DOI 10.17487/RFC5065, August 2007, 5661 . 5663 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5664 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 5665 . 5667 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5668 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 5669 DOI 10.17487/RFC5881, June 2010, 5670 . 5672 [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5673 (BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883, 5674 June 2010, . 5676 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 5677 the Network Configuration Protocol (NETCONF)", RFC 6020, 5678 DOI 10.17487/RFC6020, October 2010, 5679 . 5681 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 5682 and A. Bierman, Ed., "Network Configuration Protocol 5683 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 5684 . 5686 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 5687 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 5688 . 5690 [RFC6514] Aggarwal, R., Rosen, E., Morin, T., and Y. Rekhter, "BGP 5691 Encodings and Procedures for Multicast in MPLS/BGP IP 5692 VPNs", RFC 6514, DOI 10.17487/RFC6514, February 2012, 5693 . 5695 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 5696 Autonomous System (AS) Number Space", RFC 6793, 5697 DOI 10.17487/RFC6793, December 2012, 5698 . 5700 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 5701 Austein, "BGP Prefix Origin Validation", RFC 6811, 5702 DOI 10.17487/RFC6811, January 2013, 5703 . 5705 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 5706 RFC 6991, DOI 10.17487/RFC6991, July 2013, 5707 . 5709 [RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder, 5710 "Advertisement of Multiple Paths in BGP", RFC 7911, 5711 DOI 10.17487/RFC7911, July 2016, 5712 . 5714 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 5715 RFC 7950, DOI 10.17487/RFC7950, August 2016, 5716 . 5718 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 5719 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 5720 . 5722 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 5723 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 5724 May 2017, . 5726 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 5727 Zhang, "YANG Data Model for Key Chains", RFC 8177, 5728 DOI 10.17487/RFC8177, June 2017, 5729 . 5731 [RFC8277] Rosen, E., "Using BGP to Bind MPLS Labels to Address 5732 Prefixes", RFC 8277, DOI 10.17487/RFC8277, October 2017, 5733 . 5735 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 5736 Access Control Model", STD 91, RFC 8341, 5737 DOI 10.17487/RFC8341, March 2018, 5738 . 5740 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 5741 Routing Management (NMDA Version)", RFC 8349, 5742 DOI 10.17487/RFC8349, March 2018, 5743 . 5745 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 5746 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 5747 . 5749 [RFC8528] Bjorklund, M. and L. Lhotka, "YANG Schema Mount", 5750 RFC 8528, DOI 10.17487/RFC8528, March 2019, 5751 . 5753 [RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 5754 Liu, "YANG Data Model for Network Instances", RFC 8529, 5755 DOI 10.17487/RFC8529, March 2019, 5756 . 5758 10.2. Informative references 5760 [RFC3765] Huston, G., "NOPEER Community for Border Gateway Protocol 5761 (BGP) Route Scope Control", RFC 3765, 5762 DOI 10.17487/RFC3765, April 2004, 5763 . 5765 [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C. 5766 Pignataro, "The Generalized TTL Security Mechanism 5767 (GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007, 5768 . 5770 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 5771 Authentication Option", RFC 5925, DOI 10.17487/RFC5925, 5772 June 2010, . 5774 [RFC7454] Durand, J., Pepelnjak, I., and G. Doering, "BGP Operations 5775 and Security", BCP 194, RFC 7454, DOI 10.17487/RFC7454, 5776 February 2015, . 5778 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 5779 and R. Wilton, "Network Management Datastore Architecture 5780 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 5781 . 5783 [I-D.ietf-rtgwg-policy-model] 5784 Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data 5785 Model for Routing Policy", Work in Progress, Internet- 5786 Draft, draft-ietf-rtgwg-policy-model-27, 10 January 2021, 5787 . 5790 [I-D.ietf-bfd-yang] 5791 Rahman, R., Zheng, L., Jethanandani, M., Pallagatti, S., 5792 and G. Mirsky, "YANG Data Model for Bidirectional 5793 Forwarding Detection (BFD)", Work in Progress, Internet- 5794 Draft, draft-ietf-bfd-yang-17, 2 August 2018, 5795 . 5798 Appendix A. Examples 5800 This section tries to show some examples in how the model can be 5801 used. 5803 A.1. Creating BGP Instance 5805 This example shows how to enable BGP with the IPv4 unicast address 5806 family, while adding one network to advertise. 5808 [note: '\' line wrapping for formatting only] 5810 5811 5813 5814 5815 bgp:bgp 5818 BGP 5819 5821 5822 64496 5823 5824 5825 bt:ip\ 5828 v4-unicast 5829 5830 5831 5832 5833 5834 5835 5837 A.2. Neighbor Address Family Configuration 5839 This example shows how to configure a BGP peer, where the remote 5840 address is 192.0.2.1, the remote AS number is 64497, and the address 5841 family of the peer is IPv4 unicast. 5843 [note: '\' line wrapping for formatting only] 5845 5849 5850 5852 5853 5854 bgp:bgp 5858 name:BGP 5859 5861 5862 64496 5863 5864 5865 bt:ip\ 5868 v4-unicast 5869 5870 5871 5872 5873 5874 192.0.2.1 5875 64497 5876 5877 true 5878 4.0 5879 3.0 5880 15.0 5881 100 5882 500 5883 1000 5884 5885 "Peer Router B" 5886 5887 5888 bt:\ 5891 ipv4-unicast 5892 5893 5894 5895 5896 5897 5898 5899 5901 A.3. IPv6 Neighbor Configuration 5903 This example shows how to configure a BGP peer, where the remote peer 5904 has a IPv6 address, uses TCP-AO to secure the session with the peer, 5905 and uses non-default timers for hold-time and keepalive. 5907 [note: '\' line wrapping for formatting only] 5909 5910 5912 5913 bgp-key-chain 5914 5915 5916 5918 5919 5920 bgp:bgp 5923 name:BGP 5924 5926 5927 64496 5928 5929 5930 bt:ip\ 5933 v6-unicast 5934 5935 5936 5937 5938 5939 2001:db8:: 5940 true 5941 true 5942 5943 bgp-key-chain 5944 5945 64497 5946 "Peer Router B" 5947 5948 120 5949 70 5950 5951 5952 5953 bt:\ 5956 ipv6-unicast 5957 5958 5959 5960 5961 5962 5963 5964 5966 A.4. VRF Configuration 5968 This example shows how BGP can be configured for two VRFs, red and 5969 blue. In this case, the two network instances share a common AS, and 5970 distinguish between the instances using the router id. 5972 [note: '\' line wrapping for formatting only] 5974 5975 5977 5978 vrf-red 5979 5980 5982 192.0.2.1 5983 5984 5985 bgp:bgp 5989 BGP 5990 5992 5993 64496 5994 5995 5996 bt:ipv4-unicast 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 vrf-blue 6011 6012 6014 192.0.2.2 6015 6016 6017 bgp:bgp 6021 BGP 6022 6024 6025 64496 6026 6027 6028 bt:ipv4-unicast 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6043 Appendix B. How to add a new AFI and Augment a Module 6045 This section explains how a new AFI can be defined in a new module 6046 and how that module can then be augmented. Assume that the new AFI 6047 being defined is called 'foo' which extends the base identity of 6048 'afi-safi-type', and the augmentation is to add a new container for 6049 'foo' under two different XPaths. The example shows how the base 6050 identity can be extended to add this new AFI, and then use the 6051 augmented containers be used to add 'foo' specific information. 6053 module example-newafi-bgp { 6054 yang-version 1.1; 6055 namespace "http://example.com/ns/example-newafi-bgp"; 6056 prefix example-newafi-bgp; 6058 import ietf-inet-types { 6059 prefix inet; 6060 reference 6061 "RFC 6991: Common YANG Data Types."; 6062 } 6064 import ietf-routing { 6065 prefix rt; 6066 reference 6067 "RFC 8349, A YANG Data Model for Routing Management 6068 (NMDA Version)"; 6069 } 6071 import ietf-bgp { 6072 prefix "bgp"; 6073 reference 6074 "RFC XXXX: BGP YANG module for Service Provider Network."; 6075 } 6077 import ietf-bgp-types { 6078 prefix "bt"; 6079 } 6081 organization 6082 "Newafi model group."; 6084 contact 6085 "abc@newafi.com"; 6086 description 6087 "This YANG module defines and uses new AFI."; 6089 revision 2021-07-11 { 6090 description 6091 "Creating new AFI and using in this model"; 6093 reference 6094 "RFC XXXX: BGP YANG Model for Service Provider Network."; 6095 } 6097 identity foo { 6098 base bt:afi-safi-type; 6099 description 6100 "New AFI type foo."; 6101 } 6103 augment "/rt:routing/rt:control-plane-protocols/" + 6104 "rt:control-plane-protocol/bgp:bgp/bgp:global/" + 6105 "bgp:afi-safis/bgp:afi-safi" { 6106 when "derived-from-or-self(bgp:name, 'foo')" { 6107 description 6108 "This augmentation is valid for a AFI/SAFI instance 6109 of 'foo'"; 6110 } 6111 container foo { 6112 description 6113 "Container to add 'foo' specific AFI/SAFI information. 6114 First add the common stuff."; 6115 uses bgp:mp-all-afi-safi-common; 6116 } 6117 } 6119 augment "/rt:routing/rt:control-plane-protocols/" + 6120 "rt:control-plane-protocol/bgp:bgp/" + 6121 "bgp:rib/bgp:afi-safis/bgp:afi-safi" { 6122 when "derived-from-or-self(bgp:name, 'foo')" { 6123 description 6124 "This augmentation is valid for a AFI/SAFI instance 6125 of 'foo'"; 6126 } 6128 container foo { 6129 description 6130 "Container to add 'foo' rib specific information. 6131 First add the common stuff."; 6132 container loc-rib { 6133 config false; 6134 description 6135 "Container for the 'foo' BGP LOC-RIB data."; 6136 container routes { 6137 description 6138 "Enclosing container for list of routes in the routing 6139 table."; 6140 list route { 6141 key "prefix origin path-id"; 6142 description 6143 "List of routes in the table, keyed by the route 6144 prefix, the route origin, and path-id. The route 6145 origin can be either the neighbor address from which 6146 the route was learned, or the source protocol that 6147 injected the route. The path-id distinguishes routes 6148 for the same prefix received from a neighbor (e.g., 6149 if add-paths is enabled)."; 6150 leaf prefix { 6151 type inet:ip-address; 6152 description 6153 "The 'foo' prefix corresponding to the route."; 6154 } 6155 uses bgp:bgp-loc-rib-common-keys; 6156 uses bgp:bgp-loc-rib-common-attr-refs; 6157 uses bgp:bgp-common-route-annotations-state; 6158 uses bgp:bgp-unknown-attr-top; 6159 uses bgp:rib-ext-route-annotations; 6160 } 6161 uses bgp:clear-routes; 6162 } 6163 } 6165 container neighbors { 6166 config false; 6167 description 6168 "Enclosing container for neighbor list."; 6169 list neighbor { 6170 key "neighbor-address"; 6171 description 6172 "List of neighbors (peers) of the local BGP speaker."; 6173 leaf neighbor-address { 6174 type inet:ip-address; 6175 description 6176 "IP address of the BGP neighbor or peer."; 6177 } 6178 container adj-rib-in-pre { 6179 description 6180 "Per-neighbor table containing the NLRI updates 6181 received from the neighbor before any local input 6182 policy rules or filters have been applied. This can 6183 be considered the 'raw' updates from the neighbor."; 6184 uses bgp:ipv4-adj-rib-common; 6185 } 6186 container adj-rib-in-post { 6187 description 6188 "Per-neighbor table containing the paths received from 6189 the neighbor that are eligible for best-path selection 6190 after local input policy rules have been applied."; 6191 uses bgp:ipv4-adj-rib-in-post; 6192 } 6193 container adj-rib-out-pre { 6194 description 6195 "Per-neighbor table containing paths eligible for 6196 sending (advertising) to the neighbor before output 6197 policy rules have been applied."; 6198 uses bgp:ipv4-adj-rib-common; 6199 } 6200 container adj-rib-out-post { 6201 description 6202 "Per-neighbor table containing paths eligible for 6203 sending (advertising) to the neighbor after output 6204 policy rules have been applied."; 6205 uses bgp:ipv4-adj-rib-common; 6206 } 6207 } 6208 } 6209 } 6210 } 6211 } 6213 Appendix C. How to deviate a module 6215 This example shows how the BGP can be deviated to indicate two nodes 6216 that the particular implementation is choosing not to support. 6218 module example-newco-bgp { 6219 yang-version 1.1; 6220 namespace "http://example.com/ns/example-newco-bgp"; 6221 prefix example-newco-bgp; 6223 import ietf-bgp { 6224 prefix "bgp"; 6225 } 6227 organization 6228 "Newco model group."; 6230 contact 6231 "abc@newco.com"; 6232 description 6233 "This YANG module deviates IETF BGP YANG module."; 6235 revision 2021-07-11 { 6236 description 6237 "Creating NewCo deviations to ietf-bgp model"; 6239 reference 6240 "RFC XXXX: BGP YANG module for Service Provider Network."; 6241 } 6243 deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + 6244 "bgp:restart-time" { 6245 deviate not-supported; 6246 } 6248 deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + 6249 "bgp:stale-route-time" { 6250 deviate not-supported; 6251 } 6252 } 6254 Appendix D. Complete tree diagram 6256 Here is a complete tree diagram for the model. 6258 module: ietf-bgp 6260 augment /rt:routing/rt:control-plane-protocols 6261 /rt:control-plane-protocol: 6262 +--rw bgp 6263 +--rw global! 6264 | +--rw as inet:as-number 6265 | +--rw identifier? yang:dotted-quad 6266 | +--rw distance 6267 | | +--rw external? uint8 6268 | | +--rw internal? uint8 6269 | +--rw confederation 6270 | | +--rw enabled? boolean 6271 | | +--rw identifier? inet:as-number 6272 | | +--rw member-as* inet:as-number 6273 | +--rw graceful-restart {bt:graceful-restart}? 6274 | | +--rw enabled? boolean 6275 | | +--rw restart-time? uint16 6276 | | +--rw stale-routes-time? uint32 6277 | | +--rw helper-only? boolean 6278 | +--rw use-multiple-paths 6279 | | +--rw enabled? boolean 6280 | | +--rw ebgp 6281 | | | +--rw allow-multiple-as? boolean 6282 | | | +--rw maximum-paths? uint32 6283 | | +--rw ibgp 6284 | | +--rw maximum-paths? uint32 6285 | +--rw route-selection-options 6286 | | +--rw always-compare-med? boolean 6287 | | +--rw ignore-as-path-length? boolean 6288 | | +--rw external-compare-router-id? boolean 6289 | | +--rw advertise-inactive-routes? boolean 6290 | | +--rw enable-aigp? boolean 6291 | | +--rw ignore-next-hop-igp-metric? boolean 6292 | | +--rw enable-med? boolean 6293 | +--rw afi-safis 6294 | | +--rw afi-safi* [name] 6295 | | +--rw name identityref 6296 | | +--rw enabled? boolean 6297 | | +--ro total-paths? uint32 6298 | | +--ro total-prefixes? uint32 6299 | | +--rw graceful-restart {bt:graceful-restart}? 6300 | | | +--rw enabled? boolean 6301 | | +--rw route-selection-options 6302 | | | +--rw always-compare-med? boolean 6303 | | | +--rw ignore-as-path-length? boolean 6304 | | | +--rw external-compare-router-id? boolean 6305 | | | +--rw advertise-inactive-routes? boolean 6306 | | | +--rw enable-aigp? boolean 6307 | | | +--rw ignore-next-hop-igp-metric? boolean 6308 | | | +--rw enable-med? boolean 6309 | | +--rw use-multiple-paths 6310 | | | +--rw enabled? boolean 6311 | | | +--rw ebgp 6312 | | | | +--rw allow-multiple-as? boolean 6313 | | | | +--rw maximum-paths? uint32 6314 | | | +--rw ibgp 6315 | | | +--rw maximum-paths? uint32 6316 | | +--rw apply-policy 6317 | | | +--rw import-policy* leafref 6318 | | | +--rw default-import-policy? default-policy-type 6319 | | | +--rw export-policy* leafref 6320 | | | +--rw default-export-policy? default-policy-type 6321 | | +--rw ipv4-unicast 6322 | | | +--rw prefix-limit 6323 | | | | +--rw max-prefixes? uint32 6324 | | | | +--rw shutdown-threshold-pct? 6325 | | | | | rt-types:percentage 6326 | | | | +--rw restart-timer? uint32 6327 | | | +--rw send-default-route? boolean 6328 | | +--rw ipv6-unicast 6329 | | | +--rw prefix-limit 6330 | | | | +--rw max-prefixes? uint32 6331 | | | | +--rw shutdown-threshold-pct? 6332 | | | | | rt-types:percentage 6333 | | | | +--rw restart-timer? uint32 6334 | | | +--rw send-default-route? boolean 6335 | | +--rw ipv4-labeled-unicast 6336 | | | +--rw prefix-limit 6337 | | | +--rw max-prefixes? uint32 6338 | | | +--rw shutdown-threshold-pct? 6339 | | | | rt-types:percentage 6340 | | | +--rw restart-timer? uint32 6341 | | +--rw ipv6-labeled-unicast 6342 | | | +--rw prefix-limit 6343 | | | +--rw max-prefixes? uint32 6344 | | | +--rw shutdown-threshold-pct? 6345 | | | | rt-types:percentage 6346 | | | +--rw restart-timer? uint32 6347 | | +--rw l3vpn-ipv4-unicast 6348 | | | +--rw prefix-limit 6349 | | | +--rw max-prefixes? uint32 6350 | | | +--rw shutdown-threshold-pct? 6351 | | | | rt-types:percentage 6352 | | | +--rw restart-timer? uint32 6353 | | +--rw l3vpn-ipv6-unicast 6354 | | | +--rw prefix-limit 6355 | | | +--rw max-prefixes? uint32 6356 | | | +--rw shutdown-threshold-pct? 6357 | | | | rt-types:percentage 6358 | | | +--rw restart-timer? uint32 6359 | | +--rw l3vpn-ipv4-multicast 6360 | | | +--rw prefix-limit 6361 | | | +--rw max-prefixes? uint32 6362 | | | +--rw shutdown-threshold-pct? 6363 | | | | rt-types:percentage 6364 | | | +--rw restart-timer? uint32 6365 | | +--rw l3vpn-ipv6-multicast 6366 | | | +--rw prefix-limit 6367 | | | +--rw max-prefixes? uint32 6368 | | | +--rw shutdown-threshold-pct? 6369 | | | | rt-types:percentage 6370 | | | +--rw restart-timer? uint32 6371 | | +--rw l2vpn-vpls 6372 | | | +--rw prefix-limit 6373 | | | +--rw max-prefixes? uint32 6374 | | | +--rw shutdown-threshold-pct? 6375 | | | | rt-types:percentage 6376 | | | +--rw restart-timer? uint32 6377 | | +--rw l2vpn-evpn 6378 | | +--rw prefix-limit 6379 | | +--rw max-prefixes? uint32 6380 | | +--rw shutdown-threshold-pct? 6381 | | | rt-types:percentage 6382 | | +--rw restart-timer? uint32 6383 | +--rw apply-policy 6384 | | +--rw import-policy* leafref 6385 | | +--rw default-import-policy? default-policy-type 6386 | | +--rw export-policy* leafref 6387 | | +--rw default-export-policy? default-policy-type 6388 | +--ro total-paths? uint32 6389 | +--ro total-prefixes? uint32 6390 +--rw neighbors 6391 | +--rw neighbor* [remote-address] 6392 | | +--ro local-address? inet:ip-address 6393 | | +--ro local-port? inet:port-number 6394 | | +--rw remote-address inet:ip-address 6395 | | +--ro remote-port? inet:port-number 6396 | | +--ro peer-type? bt:peer-type 6397 | | +--rw peer-group? 6398 | | | -> ../../../peer-groups/peer-group/name 6399 | | +--ro identifier? yang:dotted-quad 6400 | | +--rw enabled? boolean 6401 | | +--rw secure-session-enable? boolean 6402 | | +--rw secure-session 6403 | | | +--rw (option)? 6404 | | | +--:(ao) 6405 | | | | +--rw enable-ao? boolean 6406 | | | | +--rw send-id? uint8 6407 | | | | +--rw recv-id? uint8 6408 | | | | +--rw include-tcp-options? boolean 6409 | | | | +--rw accept-ao-mismatch? boolean 6410 | | | | +--rw ao-keychain? 6411 | | | | key-chain:key-chain-ref 6412 | | | +--:(md5) 6413 | | | | +--rw enable-md5? boolean 6414 | | | | +--rw md5-keychain? 6415 | | | | key-chain:key-chain-ref 6416 | | | +--:(ipsec) 6417 | | | +--rw sa? string 6418 | | +--rw ttl-security? uint8 6419 | | | {bt:ttl-security}? 6420 | | +--rw peer-as? inet:as-number 6421 | | +--rw local-as? inet:as-number 6422 | | +--rw remove-private-as? 6423 | | | bt:remove-private-as-option 6424 | | +--rw route-flap-damping {bt:damping}? 6425 | | | +--rw enable? boolean 6426 | | | +--rw suppress-above? decimal64 6427 | | | +--rw reuse-above? decimal64 6428 | | | +--rw max-flap? decimal64 6429 | | | +--rw reach-decay? uint32 6430 | | | +--rw unreach-decay? uint32 6431 | | | +--rw keep-history? uint32 6432 | | +--rw send-community? bt:community-type 6433 | | | {bt:send-communities}? 6434 | | +--rw description? string 6435 | | +--rw session-state? enumeration 6436 | | +--ro last-established? yang:date-and-time 6437 | | +--ro negotiated-capabilities* identityref 6438 | | +--ro negotiated-hold-time? uint16 6439 | | +--rw last-error? binary 6440 | | +--ro fsm-established-time? yang:gauge32 6441 | | +--rw timers 6442 | | | +--rw connect-retry-interval? uint16 6443 | | | +--rw hold-time? uint16 6444 | | | +--rw keepalive? uint16 6445 | | | +--rw min-as-origination-interval? uint16 6446 | | | +--rw min-route-advertisement-interval? uint16 6447 | | +--rw transport 6448 | | | +--rw tcp-mss? uint16 6449 | | | +--rw mtu-discovery? boolean 6450 | | | +--rw passive-mode? boolean 6451 | | | +--rw local-address? union 6452 | | | +--rw md5-auth-password? string 6453 | | +--rw treat-as-withdraw? boolean 6454 | | +--ro erroneous-update-messages? uint32 6455 | | +--rw graceful-restart {bt:graceful-restart}? 6456 | | | +--rw enabled? boolean 6457 | | | +--rw restart-time? uint16 6458 | | | +--rw stale-routes-time? uint32 6459 | | | +--rw helper-only? boolean 6460 | | | +--ro peer-restart-time? uint16 6461 | | | +--ro peer-restarting? boolean 6462 | | | +--ro local-restarting? boolean 6463 | | | +--ro mode? enumeration 6464 | | +--rw logging-options 6465 | | | +--rw log-neighbor-state-changes? boolean 6466 | | +--rw ebgp-multihop 6467 | | | +--rw enabled? boolean 6468 | | | +--rw multihop-ttl? uint8 6469 | | +--rw route-reflector 6470 | | | +--rw cluster-id? bt:rr-cluster-id-type 6471 | | | +--rw no-client-reflect? boolean 6472 | | | +--rw client? boolean 6473 | | +--rw as-path-options 6474 | | | +--rw allow-own-as? uint8 6475 | | | +--rw replace-peer-as? boolean 6476 | | +--rw add-paths {bt:add-paths}? 6477 | | | +--rw receive? boolean 6478 | | | +--rw (send)? 6479 | | | | +--:(max) 6480 | | | | | +--rw max? uint8 6481 | | | | +--:(all) 6482 | | | | +--rw all? empty 6483 | | | +--rw eligible-prefix-policy? leafref 6484 | | +--rw use-multiple-paths 6485 | | | +--rw enabled? boolean 6486 | | | +--rw ebgp 6487 | | | +--rw allow-multiple-as? boolean 6488 | | +--rw apply-policy 6489 | | | +--rw import-policy* leafref 6490 | | | +--rw default-import-policy? default-policy-type 6491 | | | +--rw export-policy* leafref 6492 | | | +--rw default-export-policy? default-policy-type 6493 | | +--rw afi-safis 6494 | | | +--rw afi-safi* [name] 6495 | | | +--rw name identityref 6496 | | | +--rw enabled? boolean 6497 | | | +--ro active? boolean 6498 | | | +--ro prefixes 6499 | | | | +--ro received? uint32 6500 | | | | +--ro sent? uint32 6501 | | | | +--ro installed? uint32 6502 | | | +--rw graceful-restart {bt:graceful-restart}? 6503 | | | | +--rw enabled? boolean 6504 | | | | +--ro received? boolean 6505 | | | | +--ro advertised? boolean 6506 | | | +--rw apply-policy 6507 | | | | +--rw import-policy* leafref 6508 | | | | +--rw default-import-policy? 6509 | | | | | default-policy-type 6510 | | | | +--rw export-policy* leafref 6511 | | | | +--rw default-export-policy? 6512 | | | | default-policy-type 6513 | | | +--rw ipv4-unicast 6514 | | | | +--rw prefix-limit 6515 | | | | | +--rw max-prefixes? uint32 6516 | | | | | +--rw shutdown-threshold-pct? 6517 | | | | | | rt-types:percentage 6518 | | | | | +--rw restart-timer? uint32 6519 | | | | +--rw send-default-route? boolean 6520 | | | +--rw ipv6-unicast 6521 | | | | +--rw prefix-limit 6522 | | | | | +--rw max-prefixes? uint32 6523 | | | | | +--rw shutdown-threshold-pct? 6524 | | | | | | rt-types:percentage 6525 | | | | | +--rw restart-timer? uint32 6526 | | | | +--rw send-default-route? boolean 6527 | | | +--rw ipv4-labeled-unicast 6528 | | | | +--rw prefix-limit 6529 | | | | +--rw max-prefixes? uint32 6530 | | | | +--rw shutdown-threshold-pct? 6531 | | | | | rt-types:percentage 6532 | | | | +--rw restart-timer? uint32 6533 | | | +--rw ipv6-labeled-unicast 6534 | | | | +--rw prefix-limit 6535 | | | | +--rw max-prefixes? uint32 6536 | | | | +--rw shutdown-threshold-pct? 6537 | | | | | rt-types:percentage 6538 | | | | +--rw restart-timer? uint32 6539 | | | +--rw l3vpn-ipv4-unicast 6540 | | | | +--rw prefix-limit 6541 | | | | +--rw max-prefixes? uint32 6542 | | | | +--rw shutdown-threshold-pct? 6543 | | | | | rt-types:percentage 6544 | | | | +--rw restart-timer? uint32 6545 | | | +--rw l3vpn-ipv6-unicast 6546 | | | | +--rw prefix-limit 6547 | | | | +--rw max-prefixes? uint32 6548 | | | | +--rw shutdown-threshold-pct? 6549 | | | | | rt-types:percentage 6550 | | | | +--rw restart-timer? uint32 6551 | | | +--rw l3vpn-ipv4-multicast 6552 | | | | +--rw prefix-limit 6553 | | | | +--rw max-prefixes? uint32 6554 | | | | +--rw shutdown-threshold-pct? 6555 | | | | | rt-types:percentage 6556 | | | | +--rw restart-timer? uint32 6557 | | | +--rw l3vpn-ipv6-multicast 6558 | | | | +--rw prefix-limit 6559 | | | | +--rw max-prefixes? uint32 6560 | | | | +--rw shutdown-threshold-pct? 6561 | | | | | rt-types:percentage 6562 | | | | +--rw restart-timer? uint32 6563 | | | +--rw l2vpn-vpls 6564 | | | | +--rw prefix-limit 6565 | | | | +--rw max-prefixes? uint32 6566 | | | | +--rw shutdown-threshold-pct? 6567 | | | | | rt-types:percentage 6568 | | | | +--rw restart-timer? uint32 6569 | | | +--rw l2vpn-evpn 6570 | | | | +--rw prefix-limit 6571 | | | | +--rw max-prefixes? uint32 6572 | | | | +--rw shutdown-threshold-pct? 6573 | | | | | rt-types:percentage 6574 | | | | +--rw restart-timer? uint32 6575 | | | +--rw use-multiple-paths 6576 | | | +--rw enabled? boolean 6577 | | | +--rw ebgp 6578 | | | +--rw allow-multiple-as? boolean 6579 | | +--rw statistics 6580 | | +--ro peer-fsm-established-transitions? 6581 | | | yang:counter64 6582 | | +--ro fsm-established-transitions? 6583 | | | yang:counter32 6584 | | +--ro messages 6585 | | | +--ro in-total-messages? yang:counter32 6586 | | | +--ro out-total-messages? yang:counter32 6587 | | | +--ro in-update-elapsed-time? yang:gauge32 6588 | | | +--ro sent 6589 | | | | +--ro updates-received? uint64 6590 | | | | +--ro updates-sent? uint64 6591 | | | | +--ro messages-received? uint64 6592 | | | | +--ro messages-sent? uint64 6593 | | | | +--ro notification? uint64 6594 | | | +--ro received 6595 | | | +--ro updates-received? uint64 6596 | | | +--ro updates-sent? uint64 6597 | | | +--ro messages-received? uint64 6598 | | | +--ro messages-sent? uint64 6599 | | | +--ro notification? uint64 6600 | | +--ro queues 6601 | | | +--ro input? uint32 6602 | | | +--ro output? uint32 6603 | | +---x clear {bt:clear-statistics}? 6604 | | +---w input 6605 | | | +---w clear-at? yang:date-and-time 6606 | | +--ro output 6607 | | +--ro clear-finished-at? yang:date-and-time 6608 | +---n established 6609 | | +-- remote-address? -> ../../neighbor/remote-address 6610 | | +-- last-error? -> ../../neighbor/last-error 6611 | | +-- session-state? -> ../../neighbor/session-state 6612 | +---n backward-transition 6613 | | +-- remote-addr? -> ../../neighbor/remote-address 6614 | | +-- last-error? -> ../../neighbor/last-error 6615 | | +-- session-state? -> ../../neighbor/session-state 6616 | +---x clear {bt:clear-neighbors}? 6617 | +---w input 6618 | | +---w (operation)? 6619 | | | +--:(operation-admin) 6620 | | | | +---w admin? empty 6621 | | | +--:(operation-hard) 6622 | | | | +---w hard? empty 6623 | | | +--:(operation-soft) 6624 | | | | +---w soft? empty 6625 | | | +--:(operation-soft-inbound) 6626 | | | +---w soft-inbound? empty {bt:route-refresh}? 6627 | | +---w clear-at? yang:date-and-time 6628 | +--ro output 6629 | +--ro clear-finished-at? yang:date-and-time 6630 +--rw peer-groups 6631 | +--rw peer-group* [name] 6632 | +--rw name string 6633 | +--rw peer-as? inet:as-number 6634 | +--rw local-as? inet:as-number 6635 | +--rw remove-private-as? bt:remove-private-as-option 6636 | +--rw route-flap-damping {bt:damping}? 6637 | | +--rw enable? boolean 6638 | | +--rw suppress-above? decimal64 6639 | | +--rw reuse-above? decimal64 6640 | | +--rw max-flap? decimal64 6641 | | +--rw reach-decay? uint32 6642 | | +--rw unreach-decay? uint32 6643 | | +--rw keep-history? uint32 6644 | +--rw send-community? bt:community-type 6645 | | {bt:send-communities}? 6646 | +--rw description? string 6647 | +--rw timers 6648 | | +--rw connect-retry-interval? uint16 6649 | | +--rw hold-time? uint16 6650 | | +--rw keepalive? uint16 6651 | | +--rw min-as-origination-interval? uint16 6652 | | +--rw min-route-advertisement-interval? uint16 6653 | +--rw transport 6654 | | +--rw tcp-mss? uint16 6655 | | +--rw mtu-discovery? boolean 6656 | | +--rw passive-mode? boolean 6657 | | +--rw local-address? union 6658 | | +--rw md5-auth-password? string 6659 | +--rw graceful-restart {bt:graceful-restart}? 6660 | | +--rw enabled? boolean 6661 | | +--rw restart-time? uint16 6662 | | +--rw stale-routes-time? uint32 6663 | | +--rw helper-only? boolean 6664 | +--rw ebgp-multihop 6665 | | +--rw enabled? boolean 6666 | | +--rw multihop-ttl? uint8 6667 | +--rw route-reflector 6668 | | +--rw cluster-id? bt:rr-cluster-id-type 6669 | | +--rw no-client-reflect? boolean 6670 | | +--rw client? boolean 6671 | +--rw as-path-options 6672 | | +--rw allow-own-as? uint8 6673 | | +--rw replace-peer-as? boolean 6674 | +--rw add-paths {bt:add-paths}? 6675 | | +--rw receive? boolean 6676 | | +--rw (send)? 6677 | | | +--:(max) 6678 | | | | +--rw max? uint8 6679 | | | +--:(all) 6680 | | | +--rw all? empty 6681 | | +--rw eligible-prefix-policy? leafref 6682 | +--rw use-multiple-paths 6683 | | +--rw enabled? boolean 6684 | | +--rw ebgp 6685 | | | +--rw allow-multiple-as? boolean 6686 | | | +--rw maximum-paths? uint32 6687 | | +--rw ibgp 6688 | | +--rw maximum-paths? uint32 6689 | +--rw apply-policy 6690 | | +--rw import-policy* leafref 6691 | | +--rw default-import-policy? default-policy-type 6692 | | +--rw export-policy* leafref 6693 | | +--rw default-export-policy? default-policy-type 6694 | +--rw afi-safis 6695 | +--rw afi-safi* [name] 6696 | +--rw name identityref 6697 | +--rw enabled? boolean 6698 | +--rw graceful-restart {bt:graceful-restart}? 6699 | | +--rw enabled? boolean 6700 | +--rw route-selection-options 6701 | | +--rw always-compare-med? boolean 6702 | | +--rw ignore-as-path-length? boolean 6703 | | +--rw external-compare-router-id? boolean 6704 | | +--rw advertise-inactive-routes? boolean 6705 | | +--rw enable-aigp? boolean 6706 | | +--rw ignore-next-hop-igp-metric? boolean 6707 | | +--rw enable-med? boolean 6708 | +--rw use-multiple-paths 6709 | | +--rw enabled? boolean 6710 | | +--rw ebgp 6711 | | | +--rw allow-multiple-as? boolean 6712 | | | +--rw maximum-paths? uint32 6713 | | +--rw ibgp 6714 | | +--rw maximum-paths? uint32 6715 | +--rw apply-policy 6716 | | +--rw import-policy* leafref 6717 | | +--rw default-import-policy? 6718 | | | default-policy-type 6719 | | +--rw export-policy* leafref 6720 | | +--rw default-export-policy? 6721 | | default-policy-type 6722 | +--rw ipv4-unicast 6723 | | +--rw prefix-limit 6724 | | | +--rw max-prefixes? uint32 6725 | | | +--rw shutdown-threshold-pct? 6726 | | | | rt-types:percentage 6727 | | | +--rw restart-timer? uint32 6728 | | +--rw send-default-route? boolean 6729 | +--rw ipv6-unicast 6730 | | +--rw prefix-limit 6731 | | | +--rw max-prefixes? uint32 6732 | | | +--rw shutdown-threshold-pct? 6733 | | | | rt-types:percentage 6734 | | | +--rw restart-timer? uint32 6735 | | +--rw send-default-route? boolean 6736 | +--rw ipv4-labeled-unicast 6737 | | +--rw prefix-limit 6738 | | +--rw max-prefixes? uint32 6739 | | +--rw shutdown-threshold-pct? 6740 | | | rt-types:percentage 6741 | | +--rw restart-timer? uint32 6742 | +--rw ipv6-labeled-unicast 6743 | | +--rw prefix-limit 6744 | | +--rw max-prefixes? uint32 6745 | | +--rw shutdown-threshold-pct? 6746 | | | rt-types:percentage 6747 | | +--rw restart-timer? uint32 6748 | +--rw l3vpn-ipv4-unicast 6749 | | +--rw prefix-limit 6750 | | +--rw max-prefixes? uint32 6751 | | +--rw shutdown-threshold-pct? 6752 | | | rt-types:percentage 6753 | | +--rw restart-timer? uint32 6754 | +--rw l3vpn-ipv6-unicast 6755 | | +--rw prefix-limit 6756 | | +--rw max-prefixes? uint32 6757 | | +--rw shutdown-threshold-pct? 6758 | | | rt-types:percentage 6759 | | +--rw restart-timer? uint32 6760 | +--rw l3vpn-ipv4-multicast 6761 | | +--rw prefix-limit 6762 | | +--rw max-prefixes? uint32 6763 | | +--rw shutdown-threshold-pct? 6764 | | | rt-types:percentage 6765 | | +--rw restart-timer? uint32 6766 | +--rw l3vpn-ipv6-multicast 6767 | | +--rw prefix-limit 6768 | | +--rw max-prefixes? uint32 6769 | | +--rw shutdown-threshold-pct? 6770 | | | rt-types:percentage 6771 | | +--rw restart-timer? uint32 6772 | +--rw l2vpn-vpls 6773 | | +--rw prefix-limit 6774 | | +--rw max-prefixes? uint32 6775 | | +--rw shutdown-threshold-pct? 6776 | | | rt-types:percentage 6777 | | +--rw restart-timer? uint32 6778 | +--rw l2vpn-evpn 6779 | +--rw prefix-limit 6780 | +--rw max-prefixes? uint32 6781 | +--rw shutdown-threshold-pct? 6782 | | rt-types:percentage 6783 | +--rw restart-timer? uint32 6784 +--rw interfaces 6785 | +--rw interface* [name] 6786 | +--rw name if:interface-ref 6787 | +--rw bfd {bt:bfd}? 6788 | +--rw enable? boolean 6789 | +--rw local-multiplier? multiplier 6790 | +--rw (interval-config-type)? 6791 | +--:(tx-rx-intervals) 6792 | | +--rw desired-min-tx-interval? uint32 6793 | | +--rw required-min-rx-interval? uint32 6794 | +--:(single-interval) {single-minimum-interval}? 6795 | +--rw min-interval? uint32 6796 +--ro rib 6797 +--ro attr-sets 6798 | +--ro attr-set* [index] 6799 | +--ro index uint64 6800 | +--ro attributes 6801 | +--ro origin? bt:bgp-origin-attr-type 6802 | +--ro atomic-aggregate? boolean 6803 | +--ro next-hop? inet:ip-address 6804 | +--ro med? uint32 6805 | +--ro local-pref? uint32 6806 | +--ro originator-id? yang:dotted-quad 6807 | +--ro cluster-list* yang:dotted-quad 6808 | +--ro aigp-metric? uint64 6809 | +--ro aggregator 6810 | | +--ro as? inet:as-number 6811 | | +--ro address? inet:ipv4-address 6812 | +--ro aggregator4 6813 | | +--ro as4? inet:as-number 6814 | | +--ro address? inet:ipv4-address 6815 | +--ro as-path 6816 | | +--ro segment* [] 6817 | | +--ro type? identityref 6818 | | +--ro member* inet:as-number 6819 | +--ro as4-path 6820 | +--ro segment* [] 6821 | +--ro type? identityref 6822 | +--ro member* inet:as-number 6823 +--ro communities 6824 | +--ro community* [index] 6825 | +--ro index uint64 6826 | +--ro community* union 6827 +--ro ext-communities 6828 | +--ro ext-community* [index] 6829 | +--ro index uint64 6830 | +--ro ext-community* rt:route-target 6831 +--ro afi-safis 6832 +--ro afi-safi* [name] 6833 +--ro name identityref 6834 +--ro ipv4-unicast 6835 | +--ro loc-rib 6836 | | +--ro routes 6837 | | +--ro route* [prefix origin path-id] 6838 | | | +--ro prefix 6839 | | | | inet:ipv4-prefix 6840 | | | +--ro origin union 6841 | | | +--ro path-id uint32 6842 | | | +--ro attr-index? leafref 6843 | | | +--ro community-index? leafref 6844 | | | +--ro ext-community-index? leafref 6845 | | | +--ro last-modified? 6846 | | | | yang:timeticks 6847 | | | +--ro eligible-route? boolean 6848 | | | +--ro ineligible-reason? identityref 6849 | | | +--ro unknown-attributes 6850 | | | | +--ro unknown-attribute* [attr-type] 6851 | | | | +--ro optional? boolean 6852 | | | | +--ro transitive? boolean 6853 | | | | +--ro partial? boolean 6854 | | | | +--ro extended? boolean 6855 | | | | +--ro attr-type uint8 6856 | | | | +--ro attr-len? uint16 6857 | | | | +--ro attr-value? binary 6858 | | | +--ro reject-reason? union 6859 | | +--ro clear-routes {bt:clear-routes}? 6860 | | +---x clear 6861 | | +---w input 6862 | | | +---w clear-at? 6863 | | | yang:date-and-time 6864 | | +--ro output 6865 | | +--ro clear-finished-at? 6866 | | yang:date-and-time 6867 | +--ro neighbors 6868 | +--ro neighbor* [neighbor-address] 6869 | +--ro neighbor-address inet:ip-address 6870 | +--ro adj-rib-in-pre 6871 | | +--ro routes 6872 | | +--ro route* [prefix path-id] 6873 | | | +--ro prefix 6874 | | | | inet:ipv4-prefix 6875 | | | +--ro path-id uint32 6876 | | | +--ro attr-index? leafref 6877 | | | +--ro community-index? leafref 6878 | | | +--ro ext-community-index? leafref 6879 | | | +--ro last-modified? 6880 | | | | yang:timeticks 6881 | | | +--ro eligible-route? 6882 | | | | boolean 6883 | | | +--ro ineligible-reason? 6884 | | | | identityref 6885 | | | +--ro unknown-attributes 6886 | | | | +--ro unknown-attribute* 6887 | | | | [attr-type] 6888 | | | | +--ro optional? boolean 6889 | | | | +--ro transitive? boolean 6890 | | | | +--ro partial? boolean 6891 | | | | +--ro extended? boolean 6892 | | | | +--ro attr-type uint8 6893 | | | | +--ro attr-len? uint16 6894 | | | | +--ro attr-value? binary 6895 | | | +--ro reject-reason? union 6896 | | +--ro clear-routes {bt:clear-routes}? 6897 | | +---x clear 6898 | | +---w input 6899 | | | +---w clear-at? 6900 | | | yang:date-and-time 6901 | | +--ro output 6902 | | +--ro clear-finished-at? 6903 | | yang:date-and-time 6904 | +--ro adj-rib-in-post 6905 | | +--ro routes 6906 | | +--ro route* [prefix path-id] 6907 | | +--ro prefix 6908 | | | inet:ipv4-prefix 6909 | | +--ro path-id uint32 6910 | | +--ro attr-index? leafref 6911 | | +--ro community-index? leafref 6912 | | +--ro ext-community-index? leafref 6913 | | +--ro last-modified? 6914 | | | yang:timeticks 6915 | | +--ro eligible-route? 6916 | | | boolean 6917 | | +--ro ineligible-reason? 6918 | | | identityref 6919 | | +--ro best-path? 6920 | | | boolean 6921 | | +--ro unknown-attributes 6922 | | | +--ro unknown-attribute* 6923 | | | [attr-type] 6924 | | | +--ro optional? boolean 6925 | | | +--ro transitive? boolean 6926 | | | +--ro partial? boolean 6927 | | | +--ro extended? boolean 6928 | | | +--ro attr-type uint8 6929 | | | +--ro attr-len? uint16 6930 | | | +--ro attr-value? binary 6931 | | +--ro reject-reason? union 6932 | +--ro adj-rib-out-pre 6933 | | +--ro routes 6934 | | +--ro route* [prefix path-id] 6935 | | | +--ro prefix 6936 | | | | inet:ipv4-prefix 6937 | | | +--ro path-id uint32 6938 | | | +--ro attr-index? leafref 6939 | | | +--ro community-index? leafref 6940 | | | +--ro ext-community-index? leafref 6941 | | | +--ro last-modified? 6942 | | | | yang:timeticks 6943 | | | +--ro eligible-route? 6944 | | | | boolean 6945 | | | +--ro ineligible-reason? 6946 | | | | identityref 6947 | | | +--ro unknown-attributes 6948 | | | | +--ro unknown-attribute* 6949 | | | | [attr-type] 6950 | | | | +--ro optional? boolean 6951 | | | | +--ro transitive? boolean 6952 | | | | +--ro partial? boolean 6953 | | | | +--ro extended? boolean 6954 | | | | +--ro attr-type uint8 6955 | | | | +--ro attr-len? uint16 6956 | | | | +--ro attr-value? binary 6957 | | | +--ro reject-reason? union 6958 | | +--ro clear-routes {bt:clear-routes}? 6959 | | +---x clear 6960 | | +---w input 6961 | | | +---w clear-at? 6962 | | | yang:date-and-time 6963 | | +--ro output 6964 | | +--ro clear-finished-at? 6965 | | yang:date-and-time 6966 | +--ro adj-rib-out-post 6967 | +--ro routes 6968 | +--ro route* [prefix path-id] 6969 | | +--ro prefix 6970 | | | inet:ipv4-prefix 6971 | | +--ro path-id uint32 6972 | | +--ro attr-index? leafref 6973 | | +--ro community-index? leafref 6974 | | +--ro ext-community-index? leafref 6975 | | +--ro last-modified? 6976 | | | yang:timeticks 6977 | | +--ro eligible-route? 6978 | | | boolean 6979 | | +--ro ineligible-reason? 6980 | | | identityref 6981 | | +--ro unknown-attributes 6982 | | | +--ro unknown-attribute* 6983 | | | [attr-type] 6984 | | | +--ro optional? boolean 6985 | | | +--ro transitive? boolean 6986 | | | +--ro partial? boolean 6987 | | | +--ro extended? boolean 6988 | | | +--ro attr-type uint8 6989 | | | +--ro attr-len? uint16 6990 | | | +--ro attr-value? binary 6991 | | +--ro reject-reason? union 6992 | +--ro clear-routes {bt:clear-routes}? 6993 | +---x clear 6994 | +---w input 6995 | | +---w clear-at? 6996 | | yang:date-and-time 6997 | +--ro output 6998 | +--ro clear-finished-at? 6999 | yang:date-and-time 7000 +--ro ipv6-unicast 7001 +--ro loc-rib 7002 | +--ro routes 7003 | +--ro route* [prefix origin path-id] 7004 | | +--ro prefix 7005 | | | inet:ipv6-prefix 7006 | | +--ro origin union 7007 | | +--ro path-id uint32 7008 | | +--ro attr-index? leafref 7009 | | +--ro community-index? leafref 7010 | | +--ro ext-community-index? leafref 7011 | | +--ro last-modified? 7012 | | | yang:timeticks 7013 | | +--ro eligible-route? boolean 7014 | | +--ro ineligible-reason? identityref 7015 | | +--ro unknown-attributes 7016 | | | +--ro unknown-attribute* [attr-type] 7017 | | | +--ro optional? boolean 7018 | | | +--ro transitive? boolean 7019 | | | +--ro partial? boolean 7020 | | | +--ro extended? boolean 7021 | | | +--ro attr-type uint8 7022 | | | +--ro attr-len? uint16 7023 | | | +--ro attr-value? binary 7024 | | +--ro reject-reason? union 7025 | +--ro clear-routes {bt:clear-routes}? 7026 | +---x clear 7027 | +---w input 7028 | | +---w clear-at? 7029 | | yang:date-and-time 7030 | +--ro output 7031 | +--ro clear-finished-at? 7032 | yang:date-and-time 7033 +--ro neighbors 7034 +--ro neighbor* [neighbor-address] 7035 +--ro neighbor-address inet:ip-address 7036 +--ro adj-rib-in-pre 7037 | +--ro routes 7038 | +--ro route* [prefix path-id] 7039 | | +--ro prefix 7040 | | | inet:ipv6-prefix 7041 | | +--ro path-id uint32 7042 | | +--ro attr-index? leafref 7043 | | +--ro community-index? leafref 7044 | | +--ro ext-community-index? leafref 7045 | | +--ro last-modified? 7046 | | | yang:timeticks 7047 | | +--ro eligible-route? 7048 | | | boolean 7049 | | +--ro ineligible-reason? 7050 | | | identityref 7051 | | +--ro unknown-attributes 7052 | | | +--ro unknown-attribute* 7053 | | | [attr-type] 7054 | | | +--ro optional? boolean 7055 | | | +--ro transitive? boolean 7056 | | | +--ro partial? boolean 7057 | | | +--ro extended? boolean 7058 | | | +--ro attr-type uint8 7059 | | | +--ro attr-len? uint16 7060 | | | +--ro attr-value? binary 7061 | | +--ro reject-reason? union 7062 | +--ro clear-routes {bt:clear-routes}? 7063 | +---x clear 7064 | +---w input 7065 | | +---w clear-at? 7066 | | yang:date-and-time 7067 | +--ro output 7068 | +--ro clear-finished-at? 7069 | yang:date-and-time 7070 +--ro adj-rib-in-post 7071 | +--ro routes 7072 | +--ro route* [prefix path-id] 7073 | +--ro prefix 7074 | | inet:ipv6-prefix 7075 | +--ro path-id uint32 7076 | +--ro attr-index? leafref 7077 | +--ro community-index? leafref 7078 | +--ro ext-community-index? leafref 7079 | +--ro last-modified? 7080 | | yang:timeticks 7081 | +--ro eligible-route? 7082 | | boolean 7083 | +--ro ineligible-reason? 7084 | | identityref 7085 | +--ro best-path? 7086 | | boolean 7087 | +--ro unknown-attributes 7088 | | +--ro unknown-attribute* 7089 | | [attr-type] 7090 | | +--ro optional? boolean 7091 | | +--ro transitive? boolean 7092 | | +--ro partial? boolean 7093 | | +--ro extended? boolean 7094 | | +--ro attr-type uint8 7095 | | +--ro attr-len? uint16 7096 | | +--ro attr-value? binary 7097 | +--ro reject-reason? union 7098 +--ro adj-rib-out-pre 7099 | +--ro routes 7100 | +--ro route* [prefix path-id] 7101 | | +--ro prefix 7102 | | | inet:ipv6-prefix 7103 | | +--ro path-id uint32 7104 | | +--ro attr-index? leafref 7105 | | +--ro community-index? leafref 7106 | | +--ro ext-community-index? leafref 7107 | | +--ro last-modified? 7108 | | | yang:timeticks 7109 | | +--ro eligible-route? 7110 | | | boolean 7111 | | +--ro ineligible-reason? 7112 | | | identityref 7113 | | +--ro unknown-attributes 7114 | | | +--ro unknown-attribute* 7115 | | | [attr-type] 7116 | | | +--ro optional? boolean 7117 | | | +--ro transitive? boolean 7118 | | | +--ro partial? boolean 7119 | | | +--ro extended? boolean 7120 | | | +--ro attr-type uint8 7121 | | | +--ro attr-len? uint16 7122 | | | +--ro attr-value? binary 7123 | | +--ro reject-reason? union 7124 | +--ro clear-routes {bt:clear-routes}? 7125 | +---x clear 7126 | +---w input 7127 | | +---w clear-at? 7128 | | yang:date-and-time 7129 | +--ro output 7130 | +--ro clear-finished-at? 7131 | yang:date-and-time 7132 +--ro adj-rib-out-post 7133 +--ro routes 7134 +--ro route* [prefix path-id] 7135 | +--ro prefix 7136 | | inet:ipv6-prefix 7137 | +--ro path-id uint32 7138 | +--ro attr-index? leafref 7139 | +--ro community-index? leafref 7140 | +--ro ext-community-index? leafref 7141 | +--ro last-modified? 7142 | | yang:timeticks 7143 | +--ro eligible-route? 7144 | | boolean 7145 | +--ro ineligible-reason? 7146 | | identityref 7147 | +--ro unknown-attributes 7148 | | +--ro unknown-attribute* 7149 | | [attr-type] 7150 | | +--ro optional? boolean 7151 | | +--ro transitive? boolean 7152 | | +--ro partial? boolean 7153 | | +--ro extended? boolean 7154 | | +--ro attr-type uint8 7155 | | +--ro attr-len? uint16 7156 | | +--ro attr-value? binary 7157 | +--ro reject-reason? union 7158 +--ro clear-routes {bt:clear-routes}? 7159 +---x clear 7160 +---w input 7161 | +---w clear-at? 7162 | yang:date-and-time 7163 +--ro output 7164 +--ro clear-finished-at? 7165 yang:date-and-time 7167 Authors' Addresses 7169 Mahesh Jethanandani 7170 Kloud Services 7172 Email: mjethanandani@gmail.com 7173 Keyur Patel 7174 Arrcus 7175 CA 7176 United States of America 7178 Email: keyur@arrcus.com 7180 Susan Hares 7181 Huawei 7182 7453 Hickory Hill 7183 Saline, MI 48176 7184 United States of America 7186 Email: shares@ndzh.com 7188 Jeffrey Haas 7189 Juniper Networks 7191 Email: jhaas@pfrc.org