idnits 2.17.1 draft-ietf-idr-bgp-model-09.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 : ---------------------------------------------------------------------------- -- 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 412 has weird spacing: '...fi-name ide...' == Line 422 has weird spacing: '...address ine...' == Line 440 has weird spacing: '...address ine...' == Line 2198 has weird spacing: '...unicast speci...' -- The document date (June 28, 2020) is 1397 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-16 Summary: 0 errors (**), 0 flaws (~~), 6 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: December 30, 2020 Arrcus 6 S. Hares 7 Huawei 8 J. Haas 9 Juniper Networks 10 June 28, 2020 12 BGP YANG Model for Service Provider Networks 13 draft-ietf-idr-bgp-model-09 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 December 30, 2020. 39 Copyright Notice 41 Copyright (c) 2020 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 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 57 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 58 1.2. Note to RFC Editor . . . . . . . . . . . . . . . . . . . 4 59 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 60 1.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 5 61 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5 62 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6 63 2.2. Policy configuration overview . . . . . . . . . . . . . . 9 64 2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10 65 2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12 66 2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12 67 2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12 68 2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12 69 2.3.5. Post route advertisements per-neighbor . . . . . . . 12 70 3. Relation to other YANG data models . . . . . . . . . . . . . 12 71 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 72 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 73 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14 74 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14 75 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14 76 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15 77 7.1. Main module and submodules for base items . . . . . . . . 16 78 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 64 79 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 76 80 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 86 81 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 120 82 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 120 83 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 121 84 10.1. Normative references . . . . . . . . . . . . . . . . . . 121 85 10.2. Informative references . . . . . . . . . . . . . . . . . 124 86 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 125 87 A.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 125 88 A.2. Neighbor Address Family Configuration . . . . . . . . . . 126 89 A.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 128 90 A.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 129 91 Appendix B. How to add a new AFI and Augment a Module . . . . . 131 92 Appendix C. How to deviate a module . . . . . . . . . . . . . . 133 93 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 133 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 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 check. 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 o The global BGP instance, and neighbors whose configuration is 140 specified individually, or templated with the use of peer-groups. 142 o The address families that are supported by peers, and the global 143 configuration which relates to them. 145 o The policy configuration "hooks" and BGP-specific policy features 146 that relate to a neighbor - controlling the import and export of 147 NLRIs. 149 o 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 2020-06-28 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 2. Model overview 218 The BGP model is defined across several YANG modules and submodules, 219 but at a high level is organized into six elements: 221 o base protocol configuration -- configuration affecting BGP 222 protocol-related operations, defined at various levels of 223 hierarchy. 225 o multiprotocol configuration -- configuration affecting individual 226 address-families within BGP Multiprotocol Extensions for BGP-4 227 [RFC4760]. 229 o neighbor configuration -- configuration affecting an individual 230 neighbor within BGP. 232 o neighbor multiprotocol configuration -- configuration affecting 233 individual address-families for a neighbor within BGP. 235 o policy configuration -- hooks for application of the policies 236 defined in A YANG Data Model for Routing Policy Management 237 [I-D.ietf-rtgwg-policy-model] that act on routes sent (received) 238 to (from) peers or other routing protocols and BGP-specific policy 239 features. 241 o operational state -- variables used for monitoring and management 242 of BGP operations. 244 These modules also make use of standard Internet types, such as IP 245 addresses and prefixes, autonomous system numbers, etc., defined in 246 Common YANG Data Types [RFC6991]. 248 2.1. BGP protocol configuration 250 The BGP protocol configuration model is organized hierarchically, 251 much like the majority of router implementations. That is, 252 configuration items can be specified at multiple levels, as shown 253 below. 255 module: ietf-bgp 257 augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto 258 col: 259 +--rw bgp 260 +--rw global! 261 | +--rw as inet:as-number 262 | +--rw identifier? yang:dotted-quad 263 | +--rw distance 264 | +--rw confederation 265 | +--rw graceful-restart {bt:graceful-restart}? 266 | +--rw use-multiple-paths 267 | +--rw route-selection-options 268 | +--rw afi-safis 269 | +--rw apply-policy 270 | +--ro total-paths? uint32 271 | +--ro total-prefixes? uint32 272 +--rw neighbors 273 | +--rw neighbor* [remote-address] 274 | +---n established 275 | +---n backward-transition 276 | +---x clear {bt:clear-neighbors}? 277 +--rw peer-groups 278 | +--rw peer-group* [peer-group-name] 279 +--rw interfaces 280 | +--rw interface* [name] 281 +--ro rib 282 +--ro attr-sets 283 +--ro communities 284 +--ro ext-communities 285 +--ro afi-safis 287 Users may specify configuration at a higher level and have it apply 288 to all lower-level items, or provide overriding configuration at a 289 lower level of the hierarchy. Overriding configuration items are 290 optional, with neighbor specific configuration being the most 291 specific or lowest level, followed by peer-group, and finally global. 292 Global configuration options reflect a subset of the peer-group or 293 neighbor specific configuration options which are relevant to the 294 entire BGP instance. 296 The model makes the simplifying assumption that most of the 297 configuration items are available at all levels of the hierarchy. 298 That is, very little configuration is specific to a particular level 299 in the hierarchy, other than obvious items such as "group-name" only 300 being available for the peer group-level config. A notable exception 301 is for sub-address family configuration where some items are only 302 applicable for a given AFI-SAFI combination. 304 In order to allow common configuration to be applied to a set of 305 neighbors, all neighbor configuration options are available within a 306 peer-group. A neighbor is associated to a particular peer-group 307 through the use of a peer-group leaf (which provides a reference to a 308 configured item in the peer-group list). 310 Address-family configuration is made available in multiple points 311 within the model - primarily within the global container, where 312 instance-wide configuration can be set (for example, global protocol 313 parameters, the BGP best path route selection options, or global 314 policies relating to the address-family); and on a per-neighbor or 315 per-peer-group basis, where address-families can be enabled or 316 disabled, and policy associated with the parent entity applied. 317 Within the afi-safi container, generic configuration that applies to 318 all address-families (e.g., whether the AFI-SAFI is enabled) is 319 presented at the top-level, with address-family specific containers 320 made available for options relating to only that AFI-SAFI. Within 321 the current revision of the model a generic set of address-families, 322 and common configuration and state options are included - further 323 work is expected to add additional parameters to this area of the 324 model. 326 The following address-families are currently supported by the model: 328 +--rw bgp 329 +--rw global! 330 +--rw afi-safis 331 +--rw afi-safi* [afi-safi-name] 332 +--rw afi-safi-name identityref 333 | 334 +--rw ipv4-unicast 335 | ... 336 +--rw ipv6-unicast 337 | ... 338 +--rw ipv4-labeled-unicast 339 | ... 340 +--rw ipv6-labeled-unicast 341 | ... 342 +--rw l3vpn-ipv4-unicast 343 | ... 344 +--rw l3vpn-ipv6-unicast 345 | ... 346 +--rw l3vpn-ipv4-multicast 347 | ... 348 +--rw l3vpn-ipv6-multicast 349 | ... 350 +--rw l2vpn-vpls 351 | ... 352 +--rw l2vpn-evpn 353 | ... 355 2.2. Policy configuration overview 357 The BGP policy configuration model augments the generic YANG routing 358 policy model described in A YANG Data Model for Routing Policy 359 Management [I-D.ietf-rtgwg-policy-model], which represents a 360 condition-action policy framework for routing. This model adds BGP- 361 specific conditions (e.g., matching on the community attribute), and 362 actions (e.g., setting local preference) to the generic policy 363 framework. 365 Policies that are defined in the routing-policy model are referenced 366 in multiple places within the model: 368 o within the global instance, where a policy applies to all address- 369 families for all peers. 371 o on a global AFI-SAFI basis, where policies apply to all peers for 372 a particular address-family. 374 o on a per-peer-group or per-neighbor basis - where the policy 375 applies to all address-families for the particular group or 376 neighbor. 378 o on a per-afi-safi basis within a neighbor or peer-group context, 379 where the policy is specific to the AFI-SAFI for a a specific 380 neighbor or group. 382 module: ietf-bgp-policy 383 augment /rpol:routing-policy/rpol:defined-sets: 384 +--rw bgp-defined-sets 385 ... 386 augment /rpol:routing-policy/rpol:policy-definitions 387 /rpol:policy-definition/rpol:policy-statements 388 /rpol:statement/rpol:conditions: 389 +--rw bgp-conditions 390 ... 391 augment /rpol:routing-policy/rpol:policy-definitions 392 /rpol:policy-definition/rpol:policy-statements 393 /rpol:statement/rpol:actions: 394 +--rw bgp-actions 395 ... 397 2.3. BGP RIB overview 399 The RIB data model represents the BGP RIB contents. The model 400 supports five logical RIBs per address family. 402 A abridged version of the tree shows the RIB portion of the tree 403 diagram. 405 module: ietf-bgp 406 augment /rt:routing/rt:control-plane-protocols 407 /rt:control-plane-protocol: 408 +--rw bgp 409 +--ro rib 410 +--ro afi-safis 411 +--ro afi-safi* [afi-safi-name] 412 +--ro afi-safi-name identityref 413 +--ro ipv4-unicast 414 | +--ro loc-rib 415 | | +--ro routes 416 | | +--ro route* [prefix origin path-id] 417 | | | ... 418 | | +--ro clear-routes {bt:clear-routes}? 419 | | ... 420 | +--ro neighbors 421 | +--ro neighbor* [neighbor-address] 422 | +--ro neighbor-address inet:ip-address 423 | +--ro adj-rib-in-pre 424 | | ... 425 | +--ro adj-rib-in-post 426 | | ... 427 | +--ro adj-rib-out-pre 428 | | ... 429 | +--ro adj-rib-out-post 430 | ... 431 +--ro ipv6-unicast 432 +--ro loc-rib 433 | +--ro routes 434 | +--ro route* [prefix origin path-id] 435 | | ... 436 | +--ro clear-routes {bt:clear-routes}? 437 | ... 438 +--ro neighbors 439 +--ro neighbor* [neighbor-address] 440 +--ro neighbor-address inet:ip-address 441 +--ro adj-rib-in-pre 442 | ... 443 +--ro adj-rib-in-post 444 | ... 445 +--ro adj-rib-out-pre 446 | ... 447 +--ro adj-rib-out-post 448 ... 450 2.3.1. Local Routing 452 The loc-rib is the main BGP routing table for the local routing 453 instance, containing best-path selections for each prefix. The loc- 454 rib table may contain multiple routes for a given prefix, with an 455 attribute to indicate which was selected as the best path. Note that 456 multiple paths may be used or advertised even if only one path is 457 marked as best, e.g., when using BGP add-paths. An implementation 458 may choose to mark multiple paths in the RIB as best path by setting 459 the flag to true for multiple entries. 461 2.3.2. Pre updates per-neighbor 463 The adj-rib-in-pre table is a per-neighbor table containing the NLRI 464 updates received from the neighbor before any local input policy 465 rules or filters have been applied. This can be considered the 'raw' 466 updates from a given neighbor. 468 2.3.3. Post updates per-neighbor 470 The adj-rib-in-post table is a per-neighbor table containing the 471 routes received from the neighbor that are eligible for best-path 472 selection after local input policy rules have been applied. 474 2.3.4. Pre route advertisements per-neighbor 476 The adj-rib-out-pre table is a per-neighbor table containing routes 477 eligible for sending (advertising) to the neighbor before output 478 policy rules have been applied. 480 2.3.5. Post route advertisements per-neighbor 482 The adj-rib-out-post table is a per-neighbor table containing routes 483 eligible for sending (advertising) to the neighbor after output 484 policy rules have been applied 486 3. Relation to other YANG data models 488 The BGP model augments the Routing Management model A YANG Data Model 489 for Routing Management [RFC8349] which defines the notion of routing, 490 routing protocols, and RIBs. The notion of Virtual Routing and 491 Forwarding (VRF) is derived by using the YANG Schema Mount [RFC8528] 492 to mount the Routing Management module under the YANG Data Model for 493 Network Instances [RFC8529]. 495 4. Security Considerations 497 The YANG module specified in this document defines a schema for data 498 that is designed to be accessed via network management protocols such 499 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 500 is the secure transport layer, and the mandatory-to-implement secure 501 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 502 is HTTPS, and the mandatory-to-implement secure transport is TLS 503 [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] 504 provides the means to restrict access for particular NETCONF or 505 RESTCONF users to a preconfigured subset of all available NETCONF or 506 RESTCONF protocol operations and content. 508 There are a number of data nodes defined in this YANG module that are 509 writable/creatable/deletable (i.e., config true, which is the 510 default). These data nodes may be considered sensitive or vulnerable 511 in some network environments. Write operations (e.g., edit-config) 512 to these data nodes without proper protection can have a negative 513 effect on network operations. These are the subtrees and data nodes 514 and their sensitivity/vulnerability: 516 Some of the readable data nodes in this YANG module may be considered 517 sensitive or vulnerable in some network environments. It is thus 518 important to control read access (e.g., via get, get-config, or 519 notification) to these data nodes. These are the subtrees and data 520 nodes and their sensitivity/vulnerability: 522 Some of the RPC operations in this YANG module may be considered 523 sensitive or vulnerable in some network environments. It is thus 524 important to control access to these operations. These are the 525 operations and their sensitivity/vulnerability: 527 BGP OPSEC [RFC7454] describes several policies that can be used to 528 secure a BGP. In particular, it recommends securing the underlying 529 TCP session and to use Generalized TTL Security Mechanism (GTSM) 530 [RFC5082] capability to make it harder to spoof a BGP session. This 531 module allows implementations that want to support the capability to 532 configure a TTL value, under a feature flag. It also defines a 533 container 'secure-session' that can be augmented with TCP- 534 Authentication Option (TCP-AO) [RFC5925], or other methods to secure 535 a BGP session, and will be developed in a future version of this 536 draft. 538 5. IANA Considerations 540 This document registers three URIs and three YANG modules. 542 5.1. URI Registration 544 in the IETF XML registry [RFC3688] [RFC3688]. Following the format 545 in RFC 3688, the following registration is requested to be made: 547 URI: urn:ietf:params:xml:ns:yang:ietf-bgp 548 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 549 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types 551 Registrant Contact: The IESG. XML: N/A, the requested URI is an XML 552 namespace. 554 5.2. YANG Module Name Registration 556 This document registers three YANG module in the YANG Module Names 557 registry YANG [RFC6020]. 559 name: ietf-bgp 560 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp 561 prefix: bgp 562 reference: RFC XXXX 564 name: ietf-bgp-policy 565 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 566 prefix: bp 567 reference: RFC XXXX 569 name: ietf-bgp-types 570 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-types 571 prefix: bt 572 reference: RFC XXXX 574 6. YANG modules 576 The modules comprising the BGP configuration and operational model 577 are described by the YANG modules and submodules in the sections 578 below. 580 The main module, ietf-bgp.yang, includes the following submodules: 582 o ietf-bgp-common - defines the groupings that are common across 583 more than one context (where contexts are neighbor, group, global) 585 o ietf-bgp-common-multiprotocol - defines the groupings that are 586 common across more than one context, and relate to multiprotocol 587 BGP 589 o ietf-bgp-common-structure - defines groupings that are shared by 590 multiple contexts, but are used only to create structural 591 elements, i.e., containers (leaf nodes are defined in separate 592 groupings) 594 o ietf-bgp-global - groupings with data specific to the global 595 context 597 o ietf-bgp-peer-group - groupings with data specific to the peer 598 group context 600 o ietf-bgp-neighbor - groupings with data specific to the neighbor 601 context 603 o ietf-bgp-rib - grouping for representing BGP RIB. 605 Additionally, modules include: 607 o ietf-bgp-types - common type and identity definitions for BGP, 608 including BGP policy 610 o ietf-bgp-policy - BGP-specific policy data definitions for use 611 with [I-D.ietf-rtgwg-policy-model] (described in more detail 612 Section 2.2) 614 7. Structure of the YANG modules 616 The YANG model can be subdivided between the main module for base 617 items, types, policy data, and the RIB module. It references BGP 618 Communities Attribute [RFC1997], Route Refresh Capability for BGP-4 619 [RFC2918], , NOPEER Community for BGP [RFC3765], BGP/MPLS IP Virtual 620 Private Networks (VPNs) [RFC4364], BGP-MPLS IP Virtual Private 621 Network (VPN) Extension for IPv6 VPN [RFC4659], Graceful Restart 622 Mechanism for BGP [RFC4724], Multiprotocol Extenstions for BGP-4 623 [RFC4760], Virtual Private LAN Service (VPLS) Using BGP for Auto- 624 Discovery and Signaling [RFC4761], Autonomous System Configuration 625 for BGP [RFC5065], The Generalized TTL Security Mechanism (GTSM) 626 [RFC5082], Bidirectional Forward Detection (BFD) [RFC5880], 627 Bidirectional Forward Detection for IPv4 and IPv6 (Single Hop) 628 [RFC5881], Bidirectional Forwarding Detection (BFD) for Multihop 629 Paths [RFC5883], The TCP Authentication Option [RFC5925], BGP 630 Encodings and Procedures for Multicast in MPLS/BGP IP VPNs [RFC6514], 631 BGP Support for Four-Octet Autonomous System (AS) Number Space 632 [RFC6793], Advertisement of Multiple Paths in BGP [RFC7911], YANG Key 633 Chain [RFC8177], and Carrying Label Information in BGP-4 [RFC8277]. 635 7.1. Main module and submodules for base items 637 file "ietf-bgp@2020-06-28.yang" 638 module ietf-bgp { 639 yang-version 1.1; 640 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; 641 prefix bgp; 643 /* 644 * Import and Include 645 */ 647 import ietf-routing { 648 prefix rt; 649 reference 650 "RFC 8349, A YANG Data Model for Routing Management 651 (NMDA Version)"; 652 } 653 import ietf-routing-policy { 654 prefix rpol; 655 reference 656 "RFC ZZZZ, A YANG Data Model for Routing Policy Management"; 657 } 658 import ietf-interfaces { 659 prefix if; 660 reference 661 "RFC 8343, A YANG Data Model for Interface Management."; 662 } 663 import ietf-bgp-types { 664 prefix bt; 665 reference 666 "RFC XXXX, BGP YANG Model for Service Provider Network."; 667 } 668 import ietf-bfd-types { 669 prefix bfd; 670 reference 671 "RFC BBBB, YANG Data Model for Bidirectional Forward Detection."; 672 } 673 import ietf-inet-types { 674 prefix inet; 675 reference 676 "RFC 6991: Common YANG Data Types."; 677 } 678 import ietf-yang-types { 679 prefix yang; 680 reference 681 "RFC 6991: Common YANG Data Types."; 682 } 683 import ietf-key-chain { 684 prefix kc; 685 reference 686 "RFC 8177: YANG Key Chain."; 687 } 688 import ietf-tcp { 689 prefix tcp; 690 reference 691 "I-D.scharf-tcpm-yang-tcp: Transmission Control Protocol (TCP) 692 YANG Model."; 693 } 694 include ietf-bgp-common { 695 revision-date 2020-06-28; 696 } 697 include ietf-bgp-common-multiprotocol { 698 revision-date 2020-06-28; 699 } 700 include ietf-bgp-common-structure { 701 revision-date 2020-06-28; 702 } 703 include ietf-bgp-neighbor { 704 revision-date 2020-06-28; 705 } 706 include ietf-bgp-peer-group { 707 revision-date 2020-06-28; 708 } 709 include ietf-bgp-rib-types { 710 revision-date 2020-06-28; 711 } 712 include ietf-bgp-rib { 713 revision-date 2020-06-28; 714 } 715 include ietf-bgp-rib-ext { 716 revision-date 2020-06-28; 717 } 718 include ietf-bgp-rib-attributes { 719 revision-date 2020-06-28; 720 } 721 include ietf-bgp-rib-table-attributes { 722 revision-date 2020-06-28; 723 } 724 include ietf-bgp-rib-tables { 725 revision-date 2020-06-28; 726 } 728 organization 729 "IETF IDR Working Group"; 730 contact 731 "WG Web: 732 WG List: 734 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 735 Keyur Patel (keyur at arrcus.com), 736 Susan Hares (shares at ndzh.com), 737 Jeffrey Haas (jhaas at pfrc.org)."; 738 description 739 "This module describes a YANG model for BGP protocol 740 configuration. It is a limited subset of all of the configuration 741 parameters available in the variety of vendor implementations, 742 hence it is expected that it would be augmented with vendor- 743 specific configuration data as needed. Additional modules or 744 submodules to handle other aspects of BGP configuration, 745 including policy, VRFs, VPNs, and additional address families 746 are also expected. 748 This model supports the following BGP configuration level 749 hierarchy: 751 BGP 752 | 753 +-> [ global BGP configuration ] 754 +-> AFI / SAFI global 755 +-> peer group 756 +-> [ peer group config ] 757 +-> AFI / SAFI [ per-AFI overrides ] 758 +-> neighbor 759 +-> [ neighbor config ] 760 +-> [ optional pointer to peer-group ] 761 +-> AFI / SAFI [ per-AFI overrides ] 763 Copyright (c) 2019 IETF Trust and the persons identified as 764 authors of the code. All rights reserved. 766 Redistribution and use in source and binary forms, with or 767 without modification, is permitted pursuant to, and subject to 768 the license terms contained in, the Simplified BSD License set 769 forth in Section 4.c of the IETF Trust's Legal Provisions 770 Relating to IETF Documents 771 (https://trustee.ietf.org/license-info). 773 This version of this YANG module is part of RFC XXXX 774 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 775 for full legal notices. 777 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 778 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 779 'MAY', and 'OPTIONAL' in this document are to be interpreted as 780 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 781 they appear in all capitals, as shown here."; 783 revision 2020-06-28 { 784 description 785 "Initial Version"; 786 reference 787 "RFC XXXX, BGP Model for Service Provider Network "; 788 } 790 /* 791 * Identity 792 */ 794 identity bgp { 795 base rt:routing-protocol; 796 description 797 "BGP protocol."; 798 } 800 /* 801 * Containers 802 */ 804 augment "/rt:routing/rt:control-plane-protocols/" 805 + "rt:control-plane-protocol" { 806 when "derived-from-or-self(rt:type, 'bgp')" { 807 description 808 "This augmentation is valid for a routing protocol 809 instance of BGP."; 810 } 811 description 812 "BGP protocol augmentation of ietf-routing module 813 control-plane-protocol."; 814 container bgp { 815 description 816 "Top-level configuration for the BGP router"; 817 container global { 818 presence "Enables global configuration of BGP"; 819 description 820 "Global configuration for the BGP router"; 821 leaf as { 822 type inet:as-number; 823 mandatory true; 824 description 825 "Local autonomous system number of the router. Uses 826 the 32-bit as-number type from the model in RFC 6991."; 828 } 829 leaf identifier { 830 type yang:dotted-quad; 831 description 832 "BGP Identifier of the router - an unsigned 32-bit, 833 non-zero integer that should be unique within an AS. 834 The value of the BGP Identifier for a BGP speaker is 835 determined upon startup and is the same for every local 836 interface and BGP peer."; 837 reference 838 "RFC 6286: AS-Wide Unique BGP ID for BGP-4. Section 2.1"; 839 } 840 container distance { 841 description 842 "Administrative distance (or preference) assigned to 843 routes received from different sources 844 (external, internal, and local)."; 845 leaf external { 846 type uint8 { 847 range "1..255"; 848 } 849 description 850 "Administrative distance for routes learned from 851 external BGP (eBGP)."; 852 } 853 leaf internal { 854 type uint8 { 855 range "1..255"; 856 } 857 description 858 "Administrative distance for routes learned from 859 internal BGP (iBGP)."; 860 } 861 } 862 container confederation { 863 description 864 "Configuration options specifying parameters when the 865 local router is within an autonomous system which is 866 part of a BGP confederation."; 867 leaf enabled { 868 type boolean; 869 description 870 "When this leaf is set to true it indicates that 871 the local-AS is part of a BGP confederation"; 872 } 873 leaf identifier { 874 type inet:as-number; 875 description 876 "Confederation identifier for the autonomous system."; 877 } 878 leaf-list member-as { 879 type inet:as-number; 880 description 881 "Remote autonomous systems that are to be treated 882 as part of the local confederation."; 883 } 884 } 885 container graceful-restart { 886 if-feature "bt:graceful-restart"; 887 description 888 "Parameters relating the graceful restart mechanism for 889 BGP"; 890 uses graceful-restart-config; 891 } 892 uses global-group-use-multiple-paths; 893 uses route-selection-options; 894 container afi-safis { 895 description 896 "List of address-families associated with the BGP 897 instance"; 898 list afi-safi { 899 key "afi-safi-name"; 900 description 901 "AFI,SAFI configuration available for the 902 neighbour or group"; 903 uses mp-afi-safi-config; 904 uses state; 905 container graceful-restart { 906 if-feature "bt:graceful-restart"; 907 description 908 "Parameters relating to BGP graceful-restart"; 909 uses mp-afi-safi-graceful-restart-config; 910 } 911 uses route-selection-options; 912 uses global-group-use-multiple-paths; 913 uses mp-all-afi-safi-list-contents; 914 } 915 } 916 uses rpol:apply-policy-group; 917 uses state; 918 } 920 container neighbors { 921 description 922 "Configuration for BGP neighbors"; 924 list neighbor { 925 key "remote-address"; 927 description 928 "List of BGP neighbors configured on the local system, 929 uniquely identified by remote IPv[46] address"; 931 leaf local-address { 932 type inet:ip-address; 933 config false; 934 description 935 "The local IP address of this entry's BGP connection."; 936 } 938 leaf local-port { 939 type inet:port-number { 940 range "0..65535"; 941 } 942 config false; 943 description 944 "The local port for the TCP connection between 945 the BGP peers."; 946 } 948 leaf peer-type { 949 type bt:peer-type; 950 config false; 951 description 952 "The type of peering session associated with this 953 neighbor."; 954 reference 955 "RFC 4271: A Border Gateway Protocol 4 (BGP-4) 956 Section 1.1 for iBGP and eBGP. 957 RFC 5065: Autonomous System Configuration 958 for Confederation internal and external."; 959 } 961 leaf peer-group { 962 type leafref { 963 path "../../../peer-groups/peer-group/peer-group-name"; 964 } 965 description 966 "The peer-group with which this neighbor is associated"; 967 } 969 leaf identifier { 970 type yang:dotted-quad; 971 config false; 972 description 973 "The BGP Identifier of this entry's BGP peer. 974 This entry MUST be 0.0.0.0 unless the 975 sessionstate is in the openconfirm or the 976 established state."; 977 reference 978 "RFC 4271, Section 4.2, 'BGP Identifier'."; 979 } 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 range "0..65535"; 990 } 991 config false; 992 description 993 "The remote port for the TCP connection 994 between the BGP peers. Note that the 995 objects local-addr, local-port, remote-addr, and 996 reemote-port provide the appropriate 997 reference to the standard MIB TCP 998 connection table."; 999 } 1001 leaf enabled { 1002 type boolean; 1003 default "true"; 1004 description 1005 "Whether the BGP peer is enabled. In cases where the 1006 enabled leaf is set to false, the local system should 1007 not initiate connections to the neighbor, and should 1008 not respond to TCP connections attempts from the 1009 neighbor. If the state of the BGP session is 1010 ESTABLISHED at the time that this leaf is set to false, 1011 the BGP session should be ceased. 1013 A transition from 'false' to 'true' will cause 1014 the BGP Manual Start Event to be generated. 1015 A transition from 'true' to 'false' will cause 1016 the BGP Manual Stop Event to be generated. 1017 This parameter can be used to restart BGP peer 1018 connections. Care should be used in providing 1019 write access to this object without adequate 1020 authentication."; 1021 reference 1022 "RFC 4271, Section 8.1.2."; 1023 } 1025 leaf secure-session-enable { 1026 type boolean; 1027 default "false"; 1028 description 1029 "Does this session need to be secured?"; 1030 } 1032 container secure-session { 1033 when "../secure-session-enable = 'true'"; 1034 description 1035 "Container for describing how a particular BGP session 1036 is to be secured."; 1038 choice option { 1039 case ao { 1040 uses tcp:ao; 1041 leaf ao-keychain { 1042 type kc:key-chain-ref; 1043 description 1044 "Reference to the key chain that will be used by 1045 this model. Applicable for TCP-AO and TCP-MD5 1046 only"; 1047 reference 1048 "RFC 8177: YANG Key Chain."; 1049 } 1050 description 1051 "Uses TCP-AO to secure the session. Parameters for 1052 those are defined as a grouping in the TCP YANG 1053 model."; 1054 reference 1055 "RFC 5925 - The TCP Authentication Option."; 1056 } 1058 case md5 { 1059 uses tcp:md5; 1060 leaf md5-keychain { 1061 type kc:key-chain-ref; 1062 description 1063 "Reference to the key chain that will be used by 1064 this model. Applicable for TCP-AO and TCP-MD5 1065 only"; 1066 reference 1067 "RFC 8177: YANG Key Chain."; 1069 } 1070 description 1071 "Uses TCP-MD5 to secure the session. Parameters for 1072 those are defined as a grouping in the TCP YANG 1073 model."; 1074 reference 1075 "RFC 5925: The TCP Authentication Option."; 1076 } 1078 case ipsec { 1079 leaf sa { 1080 type string; 1081 description 1082 "Security Association (SA) name."; 1083 } 1084 description 1085 "Currently, the IPsec/IKE YANG model has no 1086 grouping defined that this model can use. When 1087 such a grouping is defined, this model can import 1088 the grouping to add the key parameters 1089 needed to kick of IKE."; 1090 } 1091 description 1092 "Choice of authentication options."; 1093 } 1094 } 1095 leaf ttl-security { 1096 if-feature "bt:ttl-security"; 1097 type uint8; 1098 default "255"; 1099 description 1100 "BGP Time To Live (TTL) security check."; 1101 reference 1102 "RFC 5082: The Genaralized TTL Security Mechanism 1103 (GTSM), 1104 RFC 7454: BGP Operations and Security."; 1105 } 1106 uses neighbor-group-config; 1107 uses route-selection-options; 1108 leaf session-state { 1109 type enumeration { 1110 enum idle { 1111 description 1112 "Neighbor is down, and in the Idle state of the FSM"; 1113 } 1114 enum connect { 1115 description 1116 "Neighbor is down, and the session is waiting for the 1117 underlying transport session to be established"; 1118 } 1119 enum active { 1120 description 1121 "Neighbor is down, and the local system is awaiting a 1122 connection from the remote peer"; 1123 } 1124 enum opensent { 1125 description 1126 "Neighbor is in the process of being established. The 1127 local system has sent an OPEN message"; 1128 } 1129 enum openconfirm { 1130 description 1131 "Neighbor is in the process of being established. 1132 The local system is awaiting a NOTIFICATION or 1133 KEEPALIVE message"; 1134 } 1135 enum established { 1136 description 1137 "Neighbor is up - the BGP session with the peer is 1138 established"; 1139 } 1140 } 1141 // notification does not like a non-config statement. 1142 // config false; 1143 description 1144 "The BGP peer connection state."; 1145 reference 1146 "RFC 4271, Section 8.1.2."; 1147 } 1148 leaf last-established { 1149 type uint64; 1150 config false; 1151 description 1152 "This timestamp indicates the time that the BGP session 1153 last transitioned in or out of the Established state. 1154 The value is the timestamp in seconds relative to the 1155 Unix Epoch (Jan 1, 1970 00:00:00 UTC). 1157 The BGP session uptime can be computed by clients as 1158 the difference between this value and the current time 1159 in UTC (assuming the session is in the ESTABLISHED 1160 state, per the session-state leaf)."; 1161 } 1162 leaf-list supported-capabilities { 1163 type identityref { 1164 base bt:bgp-capability; 1166 } 1167 config false; 1168 description 1169 "BGP capabilities negotiated as supported with the peer"; 1170 } 1171 leaf negotiated-hold-time { 1172 type decimal64 { 1173 fraction-digits 2; 1174 } 1175 config false; 1176 description 1177 "The negotiated hold-time for the BGP session"; 1178 } 1179 leaf last-error { 1180 type binary { 1181 length "2"; 1182 } 1183 // notification does not like non-config statement. 1184 // config false; 1185 description 1186 "The last error code and subcode seen by this 1187 peer on this connection. If no error has 1188 occurred, this field is zero. Otherwise, the 1189 first byte of this two byte OCTET STRING 1190 contains the error code, and the second byte 1191 contains the subcode."; 1192 reference 1193 "RFC 4271, Section 4.5."; 1194 } 1195 leaf fsm-established-time { 1196 type yang:gauge32; 1197 units "seconds"; 1198 config false; 1199 description 1200 "This timer indicates how long (in 1201 seconds) this peer has been in the 1202 established state or how long 1203 since this peer was last in the 1204 established state. It is set to zero when 1205 a new peer is configured or when the router is 1206 booted."; 1207 reference 1208 "RFC 4271, Section 8."; 1209 } 1210 container timers { 1211 description 1212 "Timers related to a BGP neighbor"; 1213 uses neighbor-group-timers-config; 1215 } 1216 container transport { 1217 description 1218 "Transport session parameters for the BGP neighbor"; 1219 uses neighbor-group-transport-config; 1220 } 1221 leaf treat-as-withdraw { 1222 type boolean; 1223 default "false"; 1224 description 1225 "Specify whether erroneous UPDATE messages for which 1226 the NLRI can be extracted are treated as though the 1227 NLRI is withdrawn - avoiding session reset"; 1228 reference 1229 "RFC 7606: Revised Error Handling for BGP UPDATE 1230 Messages."; 1231 } 1232 leaf erroneous-update-messages { 1233 type uint32; 1234 config false; 1235 description 1236 "The number of BGP UPDATE messages for which the 1237 treat-as-withdraw mechanism has been applied based on 1238 erroneous message contents"; 1239 } 1240 container graceful-restart { 1241 if-feature "bt:graceful-restart"; 1242 description 1243 "Parameters relating the graceful restart mechanism for 1244 BGP"; 1245 uses graceful-restart-config; 1246 leaf peer-restart-time { 1247 type uint16 { 1248 range "0..4096"; 1249 } 1250 config false; 1251 description 1252 "The period of time (advertised by the peer) that the 1253 peer expects a restart of a BGP session to take"; 1254 } 1255 leaf peer-restarting { 1256 type boolean; 1257 config false; 1258 description 1259 "This flag indicates whether the remote neighbor is 1260 currently in the process of restarting, and hence 1261 received routes are currently stale"; 1262 } 1263 leaf local-restarting { 1264 type boolean; 1265 config false; 1266 description 1267 "This flag indicates whether the local neighbor is 1268 currently restarting. The flag is unset after all NLRI 1269 have been advertised to the peer, and the End-of-RIB 1270 (EOR) marker has been unset"; 1271 } 1272 leaf mode { 1273 type enumeration { 1274 enum helper-only { 1275 description 1276 "The local router is operating in helper-only 1277 mode, and hence will not retain forwarding state 1278 during a local session restart, but will do so 1279 during a restart of the remote peer"; 1280 } 1281 enum bilateral { 1282 description 1283 "The local router is operating in both helper 1284 mode, and hence retains forwarding state during 1285 a remote restart, and also maintains forwarding 1286 state during local session restart"; 1287 } 1288 enum remote-helper { 1289 description 1290 "The local system is able to retain routes during 1291 restart but the remote system is only able to 1292 act as a helper"; 1293 } 1294 } 1295 config false; 1296 description 1297 "This leaf indicates the mode of operation of BGP 1298 graceful restart with the peer"; 1299 } 1300 } 1301 uses structure-neighbor-group-logging-options; 1302 uses structure-neighbor-group-ebgp-multihop; 1303 uses structure-neighbor-group-route-reflector; 1304 uses structure-neighbor-group-as-path-options; 1305 uses structure-neighbor-group-add-paths; 1306 uses bgp-neighbor-use-multiple-paths; 1307 uses rpol:apply-policy-group; 1308 container afi-safis { 1309 description 1310 "Per-address-family configuration parameters associated 1311 with the neighbor"; 1312 uses bgp-neighbor-afi-safi-list; 1313 } 1314 container statistics { 1315 description 1316 "Statistics per neighbor."; 1318 leaf established-transitions { 1319 type yang:counter64; 1320 config false; 1321 description 1322 "Number of transitions to the Established state for 1323 the neighbor session. This value is analogous to the 1324 bgpPeerFsmEstablishedTransitions object from the 1325 standard BGP-4 MIB"; 1326 reference 1327 "RFC 4273 - Definitions of Managed Objects for BGP-4"; 1328 } 1329 leaf fsm-established-transitions { 1330 type yang:counter32; 1331 config false; 1332 description 1333 "The total number of times the BGP FSM 1334 transitioned into the established state 1335 for this peer."; 1336 reference 1337 "RFC 4271, Section 8."; 1338 } 1339 container messages { 1340 config false; 1341 description 1342 "Counters for BGP messages sent and received from the 1343 neighbor"; 1344 leaf in-total-messages { 1345 type yang:counter32; 1346 config false; 1347 description 1348 "The total number of messages received 1349 from the remote peer on this connection."; 1350 reference 1351 "RFC 4271, Section 4."; 1352 } 1353 leaf out-total-messages { 1354 type yang:counter32; 1355 config false; 1356 description 1357 "The total number of messages transmitted to 1358 the remote peer on this connection."; 1360 reference 1361 "RFC 4271, Section 4."; 1362 } 1363 leaf in-update-elapsed-time { 1364 type yang:gauge32; 1365 units "seconds"; 1366 config false; 1367 description 1368 "Elapsed time (in seconds) since the last BGP 1369 UPDATE message was received from the peer. 1370 Each time in-updates is incremented, 1371 the value of this object is set to zero (0)."; 1372 reference 1373 "RFC 4271, Section 4.3. 1374 RFC 4271, Section 8.2.2, Established state."; 1375 } 1376 container sent { 1377 description 1378 "Counters relating to BGP messages sent to the 1379 neighbor"; 1380 uses bgp-neighbor-counters-message-types-state; 1381 } 1382 container received { 1383 description 1384 "Counters for BGP messages received from the 1385 neighbor"; 1386 uses bgp-neighbor-counters-message-types-state; 1387 } 1388 } 1389 container queues { 1390 config false; 1391 description 1392 "Counters related to queued messages associated with 1393 the BGP neighbor"; 1394 leaf input { 1395 type uint32; 1396 description 1397 "The number of messages received from the peer 1398 currently queued"; 1399 } 1400 leaf output { 1401 type uint32; 1402 description 1403 "The number of messages queued to be sent to the 1404 peer"; 1405 } 1406 } 1407 action clear { 1408 if-feature "bt:clear-statistics"; 1409 description 1410 "Clear statistics action command. 1412 Execution of this command should result in all the 1413 counters to be cleared and set to 0."; 1415 input { 1416 leaf clear-at { 1417 type yang:date-and-time; 1418 description 1419 "Time when the clear action needs to be 1420 executed."; 1421 } 1422 } 1423 output { 1424 leaf clear-finished-at { 1425 type yang:date-and-time; 1426 description 1427 "Time when the clear action command completed."; 1428 } 1429 } 1430 } 1431 } 1432 } 1433 notification established { 1434 leaf remote-address { 1435 type leafref { 1436 path "../../neighbor/remote-address"; 1437 } 1438 description 1439 "IP address of the neighbor that went into established 1440 state."; 1441 } 1442 leaf last-error { 1443 type leafref { 1444 path "../../neighbor/last-error"; 1445 } 1446 description 1447 "The last error code and subcode seen by this 1448 peer on this connection. If no error has 1449 occurred, this field is zero. Otherwise, the 1450 first byte of this two byte OCTET STRING 1451 contains the error code, and the second byte 1452 contains the subcode."; 1453 reference 1454 "RFC 4271, Section 4.5."; 1455 } 1456 leaf session-state { 1457 type leafref { 1458 path "../../neighbor/session-state"; 1459 } 1460 description 1461 "The BGP peer connection state."; 1462 reference 1463 "RFC 4271, Section 8.2.2."; 1464 } 1465 description 1466 "The established event is generated 1467 when the BGP FSM enters the established state."; 1468 } 1470 notification backward-transition { 1471 leaf remote-addr { 1472 type leafref { 1473 path "../../neighbor/remote-address"; 1474 } 1475 description 1476 "IP address of the neighbor that went away from 1477 established state."; 1478 } 1479 leaf last-error { 1480 type leafref { 1481 path "../../neighbor/last-error"; 1482 } 1483 description 1484 "The last error code and subcode seen by this 1485 peer on this connection. If no error has 1486 occurred, this field is zero. Otherwise, the 1487 first byte of this two byte OCTET STRING 1488 contains the error code, and the second byte 1489 contains the subcode."; 1490 reference 1491 "RFC 4271, Section 4.5."; 1492 } 1493 leaf session-state { 1494 type leafref { 1495 path "../../neighbor/session-state"; 1496 } 1497 description 1498 "The BGP peer connection state."; 1499 reference 1500 "RFC 4271, Section 8.2.2."; 1501 } 1502 description 1503 "The backward-transition event is 1504 generated when the BGP FSM moves from a higher 1505 numbered state to a lower numbered state."; 1506 } 1507 action clear { 1508 if-feature "bt:clear-neighbors"; 1509 description 1510 "Clear neighbors action."; 1512 input { 1513 leaf clear-at { 1514 type yang:date-and-time; 1515 description 1516 "Time when the clear action command needs to be 1517 executed."; 1518 } 1519 } 1520 output { 1521 leaf clear-finished-at { 1522 type yang:date-and-time; 1523 description 1524 "Time when the clear action command completed."; 1525 } 1526 } 1527 } 1528 } 1529 container peer-groups { 1530 description 1531 "Configuration for BGP peer-groups"; 1532 uses bgp-peer-group-list; 1533 } 1534 container interfaces { 1535 list interface { 1536 key "name"; 1537 leaf name { 1538 type if:interface-ref; 1539 description 1540 "Reference to the interface within the routing instance."; 1541 } 1542 container bfd { 1543 if-feature "bt:bfd"; 1544 uses bfd:client-cfg-parms; 1545 description 1546 "BFD client configuration."; 1547 reference 1548 "RFC BBBB - YANG Data Model for Bidirectional Forwarding 1549 Detection."; 1550 } 1551 description 1552 "List of interfaces within the routing instance."; 1553 } 1554 description 1555 "Interface specific parameters."; 1556 } 1557 uses rib; 1558 } 1559 } 1560 } 1561 1563 file "ietf-bgp-common@2020-06-28.yang" 1564 submodule ietf-bgp-common { 1565 yang-version 1.1; 1566 belongs-to ietf-bgp { 1567 prefix bgp; 1568 } 1570 import ietf-bgp-types { 1571 prefix bt; 1572 reference 1573 "RFC XXXX: BGP Model for Service Provider Network."; 1574 } 1575 import ietf-inet-types { 1576 prefix inet; 1577 reference 1578 "RFC 6991: Common YANG Data Types."; 1579 } 1580 import ietf-yang-types { 1581 prefix yang; 1582 reference 1583 "RFC 6991: Common YANG Data Types."; 1584 } 1586 organization 1587 "IETF IDR Working Group"; 1588 contact 1589 "WG Web: 1590 WG List: 1592 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 1593 Keyur Patel (keyur at arrcus.com), 1594 Susan Hares (shares at ndzh.com, 1595 Jeffrey Haas (jhaas at pfrc.org)."; 1596 description 1597 "This sub-module contains common groupings that are common across 1598 multiple contexts within the BGP module. That is to say that 1599 they may be application to a subset of global, peer-group or 1600 neighbor contexts. 1602 Copyright (c) 2019 IETF Trust and the persons identified as 1603 authors of the code. All rights reserved. 1605 Redistribution and use in source and binary forms, with or 1606 without modification, is permitted pursuant to, and subject to 1607 the license terms contained in, the Simplified BSD License set 1608 forth in Section 4.c of the IETF Trust's Legal Provisions 1609 Relating to IETF Documents 1610 (https://trustee.ietf.org/license-info). 1612 This version of this YANG module is part of RFC XXXX 1613 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 1614 for full legal notices. 1616 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 1617 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 1618 'MAY', and 'OPTIONAL' in this document are to be interpreted as 1619 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 1620 they appear in all capitals, as shown here."; 1622 revision 2020-06-28 { 1623 description 1624 "Initial Version"; 1625 reference 1626 "RFC XXXX, BGP Model for Service Provider Network."; 1627 } 1629 grouping neighbor-group-timers-config { 1630 description 1631 "Config parameters related to timers associated with the BGP 1632 peer"; 1633 leaf connect-retry-interval { 1634 type uint16 { 1635 range "1..max"; 1636 } 1637 units "seconds"; 1638 default "120"; 1639 description 1640 "Time interval (in seconds) for the ConnectRetryTimer. The 1641 suggested value for this timer is 120 seconds."; 1642 reference 1643 "RFC 4271, Section 8.2.2. This is the value used 1644 to initialize the 'ConnectRetryTimer'."; 1645 } 1646 leaf hold-time { 1647 type uint16 { 1648 range "0 | 3..65535"; 1649 } 1650 units "seconds"; 1651 default "90"; 1652 description 1653 "Time interval (in seconds) for the HoldTimer established 1654 with the peer. When read as operational data (ro), the 1655 value of this object is calculated by this BGP speaker, 1656 using the smaller of the values in hold-time that was 1657 configured (rw) in the running datastore and the Hold Time 1658 received in the OPEN message. 1660 This value must be at least three seconds 1661 if it is not zero (0). 1663 If the Hold Timer has not been established 1664 with the peer this object MUST have a value 1665 of zero (0). 1667 If the configured value of hold-time object was 1668 a value of (0), then when read this object MUST have a 1669 value of (0) also."; 1670 reference 1671 "RFC 4271, Section 4.2. 1672 RFC 4271, Section 10."; 1673 } 1674 leaf keepalive { 1675 type uint16 { 1676 range "0..21845"; 1677 } 1678 units "seconds"; 1679 default "30"; 1680 description 1681 "When used as a configuration (rw) value, this Time interval 1682 (in seconds) for the KeepAlive timer configured for this BGP 1683 speaker with this peer. The value of this object will only 1684 determine the KEEPALIVE messages' frequency relative to 1685 the value specified in configured value for hold-time. 1687 If the value of this object is zero (0), no periodical 1688 KEEPALIVE messages are sent to the peer after the BGP 1689 connection has been established. The suggested value for 1690 this timer is 30 seconds.; 1692 The actual time interval for the KEEPALIVE messages is 1693 indicated by operational value of keepalive. That value 1694 of this object is calculated by this BGP speaker such that, 1695 when compared with hold-time, it has the same proportion 1696 that keepalive has, compared with hold-time. A 1697 reasonable maximum value for this timer would be one third 1698 of that of hold-time."; 1699 reference 1700 "RFC 4271, Section 4.4. 1701 RFC 4271, Section 10."; 1702 } 1703 leaf min-as-origination-interval { 1704 type uint16 { 1705 range "0..max"; 1706 } 1707 units "seconds"; 1708 default "15"; 1709 description 1710 "Time interval (in seconds) for the MinASOriginationInterval 1711 timer. The suggested value for this timer is 15 seconds."; 1712 reference 1713 "RFC 4271, Section 9.2.1.2. 1714 RFC 4271, Section 10."; 1715 } 1716 leaf min-route-advertisement-interval { 1717 type uint16 { 1718 range "0..max"; 1719 } 1720 units "seconds"; 1721 description 1722 "Time interval (in seconds) for the 1723 MinRouteAdvertisementInterval timer. 1724 The suggested value for this timer is 30 1725 seconds for EBGP connections and 5 1726 seconds for IBGP connections."; 1727 reference 1728 "RFC 4271, Section 9.2.1.1. 1729 RFC 4271, Section 10."; 1730 } 1731 } 1733 grouping neighbor-group-config { 1734 description 1735 "Neighbor level configuration items."; 1736 leaf remote-as { 1737 type inet:as-number; 1738 description 1739 "The remote autonomous system number received in 1740 the BGP OPEN message."; 1741 reference 1742 "RFC 4271, Section 4.2."; 1743 } 1744 leaf peer-as { 1745 type inet:as-number; 1746 description 1747 "AS number of the peer."; 1748 } 1749 leaf local-as { 1750 type inet:as-number; 1751 description 1752 "The local autonomous system number that is to be used when 1753 establishing sessions with the remote peer or peer group, if 1754 this differs from the global BGP router autonomous system 1755 number."; 1756 } 1758 leaf remove-private-as { 1759 // could also make this a container with a flag to enable 1760 // remove-private and separate option. here, option implies 1761 // remove-private is enabled. 1762 type bt:remove-private-as-option; 1763 description 1764 "Remove private AS numbers from updates sent to peers - when 1765 this leaf is not specified, the AS_PATH attribute should be 1766 sent to the peer unchanged"; 1767 } 1768 container route-flap-damping { 1769 if-feature "bt:damping"; 1770 leaf enable { 1771 type boolean; 1772 default "false"; 1773 description 1774 "Enable route flap damping."; 1775 } 1776 leaf suppress-above { 1777 type decimal64 { 1778 fraction-digits 1; 1779 } 1780 default "3.0"; 1781 description 1782 "This is the value of the instability metric at which 1783 route suppression takes place. A route is not installed 1784 in the forwarding information base (FIB), or announced 1785 even if it is reachable during the period that it is 1786 suppressed."; 1787 } 1788 leaf reuse-above { 1789 type decimal64 { 1790 fraction-digits 1; 1791 } 1792 default "2.0"; 1793 description 1794 "This is the value of the instability metric at which a 1795 suppressed route becomes unsuppressed if it is reachable 1796 but currently suppressed. The value assigned to 1797 reuse-below must be less than suppress-above."; 1798 } 1799 leaf max-flap { 1800 type decimal64 { 1801 fraction-digits 1; 1802 } 1803 default "16.0"; 1804 description 1805 "This is the upper limit of the instability metric. This 1806 value must be greater than the larger of 1 and 1807 suppress-above."; 1808 } 1809 leaf reach-decay { 1810 type yang:gauge32; 1811 units "seconds"; 1812 default "300"; 1813 description 1814 "This value specifies the time desired for the instability 1815 metric value to reach one-half of its current value when 1816 the route is reachable. This half-life value determines 1817 the rate at which the metric value is decayed. A smaller 1818 half-life value makes a suppressed route reusable sooner 1819 than a larger value."; 1820 } 1821 leaf unreach-decay { 1822 type yang:gauge32; 1823 units "seconds"; 1824 default "900"; 1825 description 1826 "This value acts the same as reach-decay except that it 1827 specifies the rate at which the instability metric is 1828 decayed when a route is unreachable. It should have a 1829 value greater than or equal to reach-decay."; 1830 } 1831 leaf keep-history { 1832 type yang:gauge32; 1833 units "seconds"; 1834 default "1800"; 1835 description 1836 "This value specifies the period over which the route 1837 flapping history is to be maintained for a given route. 1839 The size of the configuration arrays described below is 1840 directly affected by this value."; 1841 } 1842 description 1843 "Routes learned via BGP are subject to weighted route 1844 dampening."; 1845 } 1846 leaf send-community { 1847 if-feature "bt:send-communities"; 1848 type bt:community-type; 1849 description 1850 "When supported, this tells the router to propogate any 1851 prefixes that are attached to this community. The value 1852 of 0 implies 'none'."; 1853 } 1854 leaf description { 1855 type string; 1856 description 1857 "An optional textual description (intended primarily for use 1858 with a peer or group"; 1859 } 1860 } 1862 grouping neighbor-group-transport-config { 1863 description 1864 "Configuration parameters relating to the transport protocol 1865 used by the BGP session to the peer"; 1866 leaf tcp-mss { 1867 type uint16; 1868 description 1869 "Sets the max segment size for BGP TCP sessions."; 1870 } 1871 leaf mtu-discovery { 1872 type boolean; 1873 default "false"; 1874 description 1875 "Turns path mtu discovery for BGP TCP sessions on (true) or 1876 off (false)"; 1877 } 1878 leaf passive-mode { 1879 type boolean; 1880 default "false"; 1881 description 1882 "Wait for peers to issue requests to open a BGP session, 1883 rather than initiating sessions from the local router."; 1884 } 1885 leaf local-address { 1886 type union { 1887 type inet:ip-address; 1888 type leafref { 1889 path "../../../../interfaces/interface/name"; 1890 } 1891 } 1892 description 1893 "Set the local IP (either IPv4 or IPv6) address to use for 1894 the session when sending BGP update messages. This may be 1895 expressed as either an IP address or reference to the name 1896 of an interface."; 1897 } 1899 leaf auth-password { 1900 type string; 1901 description 1902 "Configures an MD5 authentication password for use with 1903 neighboring devices."; 1904 } 1905 } 1907 grouping graceful-restart-config { 1908 description 1909 "Configuration parameters relating to BGP graceful restart."; 1910 leaf enabled { 1911 type boolean; 1912 description 1913 "Enable or disable the graceful-restart capability."; 1914 } 1915 leaf restart-time { 1916 type uint16 { 1917 range "0..4096"; 1918 } 1919 description 1920 "Estimated time (in seconds) for the local BGP speaker to 1921 restart a session. This value is advertise in the graceful 1922 restart BGP capability. This is a 12-bit value, referred to 1923 as Restart Time in RFC4724. Per RFC4724, the suggested 1924 default value is <= the hold-time value."; 1925 reference 1926 "RFC 4724: Graceful Restart Mechanism for BGP."; 1927 } 1928 leaf stale-routes-time { 1929 type uint32; 1930 description 1931 "An upper-bound on the time that stale routes will be 1932 retained by a router after a session is restarted. If an 1933 End-of-RIB (EOR) marker is received prior to this timer 1934 expiring stale-routes will be flushed upon its receipt - if 1935 no EOR is received, then when this timer expires stale paths 1936 will be purged. This timer is referred to as the 1937 Selection_Deferral_Timer in RFC4724"; 1938 reference 1939 "RFC 4724: Graceful Restart Mechanism for BGP."; 1940 } 1941 leaf helper-only { 1942 type boolean; 1943 default "true"; 1944 description 1945 "Enable graceful-restart in helper mode only. When this leaf 1946 is set, the local system does not retain forwarding its own 1947 state during a restart, but supports procedures for the 1948 receiving speaker, as defined in RFC4724."; 1949 reference 1950 "RFC 4724: Graceful Restart Mechanism for BGP."; 1951 } 1952 } 1954 grouping global-group-use-multiple-paths { 1955 description 1956 "Common grouping used for both global and groups which provides 1957 configuration and state parameters relating to use of multiple 1958 paths"; 1959 container use-multiple-paths { 1960 description 1961 "Parameters related to the use of multiple paths for the 1962 same NLRI"; 1963 leaf enabled { 1964 type boolean; 1965 default "false"; 1966 description 1967 "Whether the use of multiple paths for the same NLRI is 1968 enabled for the neighbor. This value is overridden by any 1969 more specific configuration value."; 1970 } 1971 container ebgp { 1972 description 1973 "Multi-Path parameters for eBGP"; 1974 leaf allow-multiple-as { 1975 type boolean; 1976 default "false"; 1977 description 1978 "Allow multi-path to use paths from different neighboring 1979 ASes. The default is to only consider multiple paths 1980 from the same neighboring AS."; 1981 } 1982 leaf maximum-paths { 1983 type uint32; 1984 default "1"; 1985 description 1986 "Maximum number of parallel paths to consider when using 1987 BGP multi-path. The default is use a single path."; 1988 } 1989 } 1990 container ibgp { 1991 description 1992 "Multi-Path parameters for iBGP"; 1993 leaf maximum-paths { 1994 type uint32; 1995 default "1"; 1996 description 1997 "Maximum number of parallel paths to consider when using 1998 iBGP multi-path. The default is to use a single path"; 1999 } 2000 } 2001 } 2002 } 2004 grouping route-selection-options { 2005 description 2006 "Configuration and state relating to route selection options"; 2007 container route-selection-options { 2008 description 2009 "Parameters relating to options for route selection"; 2010 leaf always-compare-med { 2011 type boolean; 2012 default "false"; 2013 description 2014 "Compare multi-exit discriminator (MED) value from 2015 different ASes when selecting the best route. The default 2016 behavior is to only compare MEDs for paths received from 2017 the same AS."; 2018 } 2019 leaf ignore-as-path-length { 2020 type boolean; 2021 default "false"; 2022 description 2023 "Ignore the AS path length when selecting the best path. 2024 The default is to use the AS path length and prefer paths 2025 with shorter length."; 2026 } 2027 leaf external-compare-router-id { 2028 type boolean; 2029 default "true"; 2030 description 2031 "When comparing similar routes received from external BGP 2032 peers, use the router-id as a criterion to select the 2033 active path."; 2034 } 2035 leaf advertise-inactive-routes { 2036 type boolean; 2037 default "false"; 2038 description 2039 "Advertise inactive routes to external peers. The default 2040 is to only advertise active routes."; 2041 reference 2042 "I-D.ietf-idr-best-external: Advertisement of the best 2043 external route in BGP."; 2044 } 2045 leaf enable-aigp { 2046 type boolean; 2047 default "false"; 2048 description 2049 "Flag to enable sending / receiving accumulated IGP 2050 attribute in routing updates"; 2051 reference 2052 "RFC 7311: AIGP Metric Attribute for BGP."; 2053 } 2054 leaf ignore-next-hop-igp-metric { 2055 type boolean; 2056 default "false"; 2057 description 2058 "Ignore the IGP metric to the next-hop when calculating BGP 2059 best-path. The default is to select the route for which 2060 the metric to the next-hop is lowest"; 2061 } 2062 leaf enable-med { 2063 type boolean; 2064 default "false"; 2065 description 2066 "Flag to enable sending/receiving of MED metric attribute 2067 in routing updates."; 2068 } 2069 } 2070 } 2072 grouping state { 2073 description 2074 "Grouping containing common counters relating to prefixes and 2075 paths"; 2076 leaf total-paths { 2077 type uint32; 2078 config false; 2079 description 2080 "Total number of BGP paths within the context"; 2081 } 2082 leaf total-prefixes { 2083 type uint32; 2084 config false; 2085 description 2086 "Total number of BGP prefixes received within the context"; 2087 } 2088 } 2089 } 2090 2092 file "ietf-bgp-common-multiprotocol@2020-06-28.yang" 2093 submodule ietf-bgp-common-multiprotocol { 2094 yang-version 1.1; 2095 belongs-to ietf-bgp { 2096 prefix bgp; 2097 } 2099 import ietf-bgp-types { 2100 prefix bt; 2101 } 2102 import ietf-routing-policy { 2103 prefix rpol; 2104 } 2105 include ietf-bgp-common; 2107 // meta 2109 organization 2110 "IETF IDR Working Group"; 2111 contact 2112 "WG Web: 2113 WG List: 2115 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2116 Keyur Patel (keyur at arrcus.com), 2117 Susan Hares (shares at ndzh.com)"; 2118 description 2119 "This sub-module contains groupings that are related to support 2120 for multiple protocols in BGP. The groupings are common across 2121 multiple contexts. 2123 Copyright (c) 2019 IETF Trust and the persons identified as 2124 authors of the code. All rights reserved. 2126 Redistribution and use in source and binary forms, with or 2127 without modification, is permitted pursuant to, and subject to 2128 the license terms contained in, the Simplified BSD License set 2129 forth in Section 4.c of the IETF Trust's Legal Provisions 2130 Relating to IETF Documents 2131 (https://trustee.ietf.org/license-info). 2133 This version of this YANG module is part of RFC XXXX 2134 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2135 for full legal notices. 2137 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2138 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2139 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2140 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2141 they appear in all capitals, as shown here."; 2143 revision 2020-06-28 { 2144 description 2145 "Initial Version"; 2146 reference 2147 "RFC XXX, BGP Model for Service Provider Network."; 2148 } 2150 grouping mp-afi-safi-graceful-restart-config { 2151 description 2152 "BGP graceful restart parameters that apply on a per-AFI-SAFI 2153 basis"; 2154 leaf enabled { 2155 type boolean; 2156 default "false"; 2157 description 2158 "This leaf indicates whether graceful-restart is enabled for 2159 this AFI-SAFI"; 2160 } 2161 } 2163 grouping mp-afi-safi-config { 2164 description 2165 "Configuration parameters used for all BGP AFI-SAFIs"; 2166 leaf afi-safi-name { 2167 type identityref { 2168 base bt:afi-safi-type; 2169 } 2170 description 2171 "AFI,SAFI"; 2172 } 2173 leaf enabled { 2174 type boolean; 2175 default "false"; 2176 description 2177 "This leaf indicates whether the IPv4 Unicast AFI,SAFI is 2178 enabled for the neighbour or group"; 2179 } 2180 } 2182 grouping mp-all-afi-safi-list-contents { 2183 description 2184 "A common grouping used for contents of the list that is used 2185 for AFI-SAFI entries"; 2186 // import and export policy included for the afi/safi 2187 uses rpol:apply-policy-group; 2188 container ipv4-unicast { 2189 when "../afi-safi-name = 'bt:ipv4-unicast'" { 2190 description 2191 "Include this container for IPv4 Unicast specific 2192 configuration"; 2193 } 2194 description 2195 "IPv4 unicast configuration options"; 2196 // include common IPv[46] unicast options 2197 uses mp-ipv4-ipv6-unicast-common; 2198 // placeholder for IPv4 unicast specific configuration 2199 } 2200 container ipv6-unicast { 2201 when "../afi-safi-name = 'bt:ipv6-unicast'" { 2202 description 2203 "Include this container for IPv6 Unicast specific 2204 configuration"; 2205 } 2206 description 2207 "IPv6 unicast configuration options"; 2208 // include common IPv[46] unicast options 2209 uses mp-ipv4-ipv6-unicast-common; 2210 // placeholder for IPv6 unicast specific configuration 2211 // options 2212 } 2213 container ipv4-labeled-unicast { 2214 when "../afi-safi-name = 'bt:ipv4-labeled-unicast'" { 2215 description 2216 "Include this container for IPv4 Labeled Unicast specific 2217 configuration"; 2218 } 2219 description 2220 "IPv4 Labeled Unicast configuration options"; 2221 uses mp-all-afi-safi-common; 2222 // placeholder for IPv4 Labeled Unicast specific config 2223 // options 2224 } 2225 container ipv6-labeled-unicast { 2226 when "../afi-safi-name = 'bt:ipv6-labeled-unicast'" { 2227 description 2228 "Include this container for IPv6 Labeled Unicast specific 2229 configuration"; 2230 } 2231 description 2232 "IPv6 Labeled Unicast configuration options"; 2233 uses mp-all-afi-safi-common; 2234 // placeholder for IPv6 Labeled Unicast specific config 2235 // options. 2236 } 2237 container l3vpn-ipv4-unicast { 2238 when "../afi-safi-name = 'bt:l3vpn-ipv4-unicast'" { 2239 description 2240 "Include this container for IPv4 Unicast L3VPN specific 2241 configuration"; 2242 } 2243 description 2244 "Unicast IPv4 L3VPN configuration options"; 2245 // include common L3VPN configuration options 2246 uses mp-l3vpn-ipv4-ipv6-unicast-common; 2247 // placeholder for IPv4 Unicast L3VPN specific config options. 2248 } 2249 container l3vpn-ipv6-unicast { 2250 when "../afi-safi-name = 'bt:l3vpn-ipv6-unicast'" { 2251 description 2252 "Include this container for unicast IPv6 L3VPN specific 2253 configuration"; 2254 } 2255 description 2256 "Unicast IPv6 L3VPN configuration options"; 2257 // include common L3VPN configuration options 2258 uses mp-l3vpn-ipv4-ipv6-unicast-common; 2259 // placeholder for IPv6 Unicast L3VPN specific configuration 2260 // options 2261 } 2262 container l3vpn-ipv4-multicast { 2263 when "../afi-safi-name = 'bt:l3vpn-ipv4-multicast'" { 2264 description 2265 "Include this container for multicast IPv6 L3VPN specific 2266 configuration"; 2267 } 2268 description 2269 "Multicast IPv4 L3VPN configuration options"; 2271 // include common L3VPN multicast options 2272 uses mp-l3vpn-ipv4-ipv6-multicast-common; 2273 // placeholder for IPv4 Multicast L3VPN specific configuration 2274 // options 2275 } 2276 container l3vpn-ipv6-multicast { 2277 when "../afi-safi-name = 'bt:l3vpn-ipv6-multicast'" { 2278 description 2279 "Include this container for multicast IPv6 L3VPN specific 2280 configuration"; 2281 } 2282 description 2283 "Multicast IPv6 L3VPN configuration options"; 2284 // include common L3VPN multicast options 2285 uses mp-l3vpn-ipv4-ipv6-multicast-common; 2286 // placeholder for IPv6 Multicast L3VPN specific configuration 2287 // options 2288 } 2289 container l2vpn-vpls { 2290 when "../afi-safi-name = 'bt:l2vpn-vpls'" { 2291 description 2292 "Include this container for BGP-signalled VPLS specific 2293 configuration"; 2294 } 2295 description 2296 "BGP-signalled VPLS configuration options"; 2297 // include common L2VPN options 2298 uses mp-l2vpn-common; 2299 // placeholder for BGP-signalled VPLS specific configuration 2300 // options 2301 } 2302 container l2vpn-evpn { 2303 when "../afi-safi-name = 'bt:l2vpn-evpn'" { 2304 description 2305 "Include this container for BGP EVPN specific 2306 configuration"; 2307 } 2308 description 2309 "BGP EVPN configuration options"; 2310 // include common L2VPN options 2311 uses mp-l2vpn-common; 2312 // placeholder for BGP EVPN specific configuration options 2313 } 2314 } 2316 // Common groupings across multiple AFI,SAFIs 2318 grouping mp-all-afi-safi-common { 2319 description 2320 "Grouping for configuration common to all AFI,SAFI"; 2321 container prefix-limit { 2322 description 2323 "Parameters relating to the prefix limit for the AFI-SAFI"; 2324 leaf max-prefixes { 2325 type uint32; 2326 description 2327 "Maximum number of prefixes that will be accepted from the 2328 neighbour"; 2329 } 2330 leaf shutdown-threshold-pct { 2331 type bt:percentage; 2332 description 2333 "Threshold on number of prefixes that can be received from 2334 a neighbour before generation of warning messages or log 2335 entries. Expressed as a percentage of max-prefixes"; 2336 } 2337 leaf restart-timer { 2338 type uint32; 2339 units "seconds"; 2340 description 2341 "Time interval in seconds after which the BGP session is 2342 re-established after being torn down due to exceeding the 2343 max-prefix limit."; 2344 } 2345 } 2346 } 2348 grouping mp-ipv4-ipv6-unicast-common { 2349 description 2350 "Common configuration that is applicable for IPv4 and IPv6 2351 unicast"; 2352 // include common afi-safi options. 2353 uses mp-all-afi-safi-common; 2354 // configuration options that are specific to IPv[46] unicast 2355 leaf send-default-route { 2356 type boolean; 2357 default "false"; 2358 description 2359 "If set to true, send the default-route to the neighbour(s)"; 2360 } 2361 } 2363 grouping mp-l3vpn-ipv4-ipv6-unicast-common { 2364 description 2365 "Common configuration applied across L3VPN for IPv4 2366 and IPv6"; 2368 // placeholder -- specific configuration options that are generic 2369 // across IPv[46] unicast address families. 2370 uses mp-all-afi-safi-common; 2371 } 2373 grouping mp-l3vpn-ipv4-ipv6-multicast-common { 2374 description 2375 "Common configuration applied across L3VPN for IPv4 2376 and IPv6"; 2377 // placeholder -- specific configuration options that are 2378 // generic across IPv[46] multicast address families. 2379 uses mp-all-afi-safi-common; 2380 } 2382 grouping mp-l2vpn-common { 2383 description 2384 "Common configuration applied across L2VPN address 2385 families"; 2386 // placeholder -- specific configuration options that are 2387 // generic across L2VPN address families 2388 uses mp-all-afi-safi-common; 2389 } 2391 // Config groupings for common groups 2393 grouping mp-all-afi-safi-common-prefix-limit-config { 2394 description 2395 "Configuration parameters relating to prefix-limits for an 2396 AFI-SAFI"; 2397 } 2398 } 2399 2401 file "ietf-bgp-common-structure@2020-06-28.yang" 2402 submodule ietf-bgp-common-structure { 2403 yang-version 1.1; 2404 belongs-to ietf-bgp { 2405 prefix bgp; 2406 } 2408 import ietf-routing-policy { 2409 prefix rpol; 2410 reference 2411 "RFC ZZZZ, A YANG Data Model for Routing Policy Management"; 2412 } 2413 import ietf-bgp-types { 2414 prefix bt; 2415 reference 2416 "RFC XXXX, BGP YANG Model for Service Provider Network."; 2417 } 2418 include ietf-bgp-common-multiprotocol; 2419 include ietf-bgp-common; 2421 // meta 2423 organization 2424 "IETF IDR Working Group"; 2425 contact 2426 "WG Web: 2427 WG List: 2429 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2430 Keyur Patel (keyur at arrcus.com), 2431 Susan Hares (shares at ndzh.com), 2432 Jeffrey Haas (jhaas at pfrc.org)."; 2433 description 2434 "This sub-module contains groupings that are common across 2435 multiple BGP contexts and provide structure around other 2436 primitive groupings. 2438 Copyright (c) 2019 IETF Trust and the persons identified as 2439 authors of the code. All rights reserved. 2441 Redistribution and use in source and binary forms, with or 2442 without modification, is permitted pursuant to, and subject to 2443 the license terms contained in, the Simplified BSD License set 2444 forth in Section 4.c of the IETF Trust's Legal Provisions 2445 Relating to IETF Documents 2446 (https://trustee.ietf.org/license-info). 2448 This version of this YANG module is part of RFC XXXX 2449 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2450 for full legal notices. 2452 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2453 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2454 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2455 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2456 they appear in all capitals, as shown here."; 2458 revision 2020-06-28 { 2459 description 2460 "Initial Version"; 2461 reference 2462 "RFC XXX, BGP Model for Service Provider Network."; 2464 } 2466 grouping structure-neighbor-group-logging-options { 2467 description 2468 "Structural grouping used to include error handling 2469 configuration and state for both BGP neighbors and groups"; 2470 container logging-options { 2471 description 2472 "Logging options for events related to the BGP neighbor or 2473 group"; 2474 leaf log-neighbor-state-changes { 2475 type boolean; 2476 default "true"; 2477 description 2478 "Configure logging of peer state changes. Default is to 2479 enable logging of peer state changes. 2481 Note: Documenting out of ESTABLISHED state is desirable, 2482 but documenting all backward transitions is 2483 problematic, and should be avoided."; 2484 } 2485 } 2486 } 2488 grouping structure-neighbor-group-ebgp-multihop { 2489 description 2490 "Structural grouping used to include eBGP multi-hop 2491 configuration and state for both BGP neighbors and peer 2492 groups"; 2493 container ebgp-multihop { 2494 description 2495 "eBGP multi-hop parameters for the BGPgroup"; 2496 leaf enabled { 2497 type boolean; 2498 default "false"; 2499 description 2500 "When enabled the referenced group or neighbors are 2501 permitted to be indirectly connected - including cases 2502 where the TTL can be decremented between the BGP peers"; 2503 } 2504 leaf multihop-ttl { 2505 type uint8; 2506 description 2507 "Time-to-live value to use when packets are sent to the 2508 referenced group or neighbors and ebgp-multihop is 2509 enabled"; 2510 } 2511 } 2513 } 2515 grouping structure-neighbor-group-route-reflector { 2516 description 2517 "Structural grouping used to include route reflector 2518 configuration and state for both BGP neighbors and peer 2519 groups"; 2520 container route-reflector { 2521 description 2522 "Route reflector parameters for the BGPgroup"; 2523 reference 2524 "RFC 4456: BGP Route Reflection."; 2525 leaf route-reflector-cluster-id { 2526 when "../route-reflector-client = 'false'"; 2527 type bt:rr-cluster-id-type; 2528 description 2529 "Route Reflector cluster id to use when local router is 2530 configured as a route reflector. Commonly set at the 2531 group level, but allows a different cluster id to be set 2532 for each neighbor."; 2533 reference 2534 "RFC 4456: BGP Route Reflection: An Alternative to 2535 Full Mesh."; 2536 } 2537 leaf no-client-reflect { 2538 type boolean; 2539 default "false"; 2540 description 2541 "When set to 'true', this disables route redistribution 2542 by the Route Reflector. It is set 'true' when the client is 2543 fully meshed to prevent sending of redundant route 2544 advertisements."; 2545 } 2546 leaf route-reflector-client { 2547 type boolean; 2548 default "false"; 2549 description 2550 "Configure the neighbor as a route reflector client."; 2551 reference 2552 "RFC 4456: BGP Route Reflection: An Alternative to 2553 Full Mesh."; 2554 } 2555 } 2556 } 2558 grouping structure-neighbor-group-as-path-options { 2559 description 2560 "Structural grouping used to include AS_PATH manipulation 2561 configuration and state for both BGP neighbors and peer 2562 groups"; 2563 container as-path-options { 2564 description 2565 "AS_PATH manipulation parameters for the BGP neighbor or 2566 group"; 2567 leaf allow-own-as { 2568 type uint8; 2569 default "0"; 2570 description 2571 "Specify the number of occurrences of the local BGP 2572 speaker's AS that can occur within the AS_PATH before it 2573 is rejected."; 2574 } 2575 leaf replace-peer-as { 2576 type boolean; 2577 default "false"; 2578 description 2579 "Replace occurrences of the peer's AS in the AS_PATH with 2580 the local autonomous system number"; 2581 } 2582 } 2583 } 2585 grouping structure-neighbor-group-add-paths { 2586 description 2587 "Structural grouping used to include ADD-PATHs configuration 2588 and state for both BGP neighbors and peer groups"; 2589 container add-paths { 2590 if-feature "bt:add-paths"; 2591 description 2592 "Parameters relating to the advertisement and receipt of 2593 multiple paths for a single NLRI (add-paths)"; 2594 reference 2595 "RFC 7911: Advertisements of Multiple Paths in BGP."; 2596 leaf receive { 2597 type boolean; 2598 default "false"; 2599 description 2600 "Enable ability to receive multiple path advertisements for 2601 an NLRI from the neighbor or group"; 2602 } 2603 choice send { 2604 default "all"; 2605 description 2606 "Choice of sending the max. number of paths or to send all."; 2607 case max { 2608 leaf max { 2609 type uint8; 2610 description 2611 "The maximum number of paths to advertise to neighbors 2612 for a single NLRI"; 2613 } 2614 } 2615 case all { 2616 leaf all { 2617 type empty; 2618 description 2619 "Send all the path advertisements to neighbors for a 2620 single NLRI."; 2621 } 2622 } 2623 } 2624 leaf eligible-prefix-policy { 2625 type leafref { 2626 path "/rpol:routing-policy/rpol:policy-definitions/" 2627 + "rpol:policy-definition/rpol:name"; 2628 } 2629 description 2630 "A reference to a routing policy which can be used to 2631 restrict the prefixes for which add-paths is enabled"; 2632 } 2633 } 2634 } 2635 } 2636 2638 file "ietf-bgp-peer-group@2020-06-28.yang" 2639 submodule ietf-bgp-peer-group { 2640 yang-version 1.1; 2641 belongs-to ietf-bgp { 2642 prefix bgp; 2643 } 2645 import ietf-routing-policy { 2646 prefix rpol; 2647 } 2648 import ietf-bgp-types { 2649 prefix bt; 2650 reference 2651 "RFC XXXX, BGP Model for Service Provider Network."; 2652 } 2654 // Include the common submodule 2655 include ietf-bgp-common; 2656 include ietf-bgp-common-multiprotocol; 2657 include ietf-bgp-common-structure; 2659 // meta 2661 organization 2662 "IETF IDR Working Group"; 2663 contact 2664 "WG Web: 2665 WG List: 2667 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2668 Keyur Patel (keyur at arrcus.com), 2669 Susan Hares (shares at ndzh.com), 2670 Jeffrey Haas (jhaas at pfrc.org)."; 2671 description 2672 "This sub-module contains groupings that are specific to the 2673 peer-group context of the BGP module. 2675 Copyright (c) 2019 IETF Trust and the persons identified as 2676 authors of the code. All rights reserved. 2678 Redistribution and use in source and binary forms, with or 2679 without modification, is permitted pursuant to, and subject to 2680 the license terms contained in, the Simplified BSD License set 2681 forth in Section 4.c of the IETF Trust's Legal Provisions 2682 Relating to IETF Documents 2683 (https://trustee.ietf.org/license-info). 2685 This version of this YANG module is part of RFC XXXX 2686 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2687 for full legal notices. 2689 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2690 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2691 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2692 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2693 they appear in all capitals, as shown here."; 2695 revision 2020-06-28 { 2696 description 2697 "Initial Version"; 2698 reference 2699 "RFC XXX, BGP Model for Service Provider Network."; 2700 } 2702 grouping bgp-peer-group-afi-safi-list { 2703 description 2704 "List of address-families associated with the BGP peer-group"; 2705 list afi-safi { 2706 key "afi-safi-name"; 2707 description 2708 "AFI, SAFI configuration available for the 2709 neighbour or group"; 2710 uses mp-afi-safi-config; 2711 container graceful-restart { 2712 if-feature "bt:graceful-restart"; 2713 description 2714 "Parameters relating to BGP graceful-restart"; 2715 uses mp-afi-safi-graceful-restart-config; 2716 } 2717 uses route-selection-options; 2718 uses global-group-use-multiple-paths; 2719 uses mp-all-afi-safi-list-contents; 2720 } 2721 } 2723 grouping bgp-peer-group-base { 2724 description 2725 "Parameters related to a BGP group."; 2726 leaf peer-group-name { 2727 type string; 2728 description 2729 "Name of the BGP peer-group"; 2730 } 2731 uses neighbor-group-config; 2732 container timers { 2733 description 2734 "Timers related to a BGP peer-group."; 2735 uses neighbor-group-timers-config; 2736 } 2737 container transport { 2738 description 2739 "Transport session parameters for the BGP peer-group."; 2740 uses neighbor-group-transport-config; 2741 } 2742 container graceful-restart { 2743 if-feature "bt:graceful-restart"; 2744 description 2745 "Parameters relating the graceful restart mechanism for BGP."; 2746 uses graceful-restart-config; 2747 } 2748 uses structure-neighbor-group-ebgp-multihop; 2749 uses structure-neighbor-group-route-reflector; 2750 uses structure-neighbor-group-as-path-options; 2751 uses structure-neighbor-group-add-paths; 2752 uses global-group-use-multiple-paths; 2753 uses rpol:apply-policy-group; 2754 container afi-safis { 2755 description 2756 "Per-address-family configuration parameters associated with 2757 the group."; 2758 uses bgp-peer-group-afi-safi-list; 2759 } 2760 } 2762 grouping bgp-peer-group-list { 2763 description 2764 "The list of BGP peer groups"; 2765 list peer-group { 2766 key "peer-group-name"; 2767 description 2768 "List of BGP peer-groups configured on the local system - 2769 uniquely identified by peer-group name"; 2770 uses bgp-peer-group-base; 2771 } 2772 } 2773 } 2774 2776 file "ietf-bgp-neighbor@2020-06-28.yang" 2777 submodule ietf-bgp-neighbor { 2778 yang-version 1.1; 2779 belongs-to ietf-bgp { 2780 prefix bgp; 2781 } 2783 import ietf-bgp-types { 2784 prefix bt; 2785 reference 2786 "RFC XXXX, BGP Model for Service Provider Network."; 2787 } 2789 // Include the common submodule 2791 include ietf-bgp-common; 2792 include ietf-bgp-common-multiprotocol; 2793 include ietf-bgp-peer-group; 2794 include ietf-bgp-common-structure; 2796 // meta 2797 organization 2798 "IETF IDR Working Group"; 2799 contact 2800 "WG Web: 2801 WG List: 2803 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2804 Keyur Patel (keyur at arrcus.com), 2805 Susan Hares (shares at ndzh.com), 2806 Jeffrey Haas (jhaas at pfrc.org)."; 2807 description 2808 "This sub-module contains groupings that are specific to the 2809 neighbor context of the BGP module. 2811 Copyright (c) 2019 IETF Trust and the persons identified as 2812 authors of the code. All rights reserved. 2814 Redistribution and use in source and binary forms, with or 2815 without modification, is permitted pursuant to, and subject to 2816 the license terms contained in, the Simplified BSD License set 2817 forth in Section 4.c of the IETF Trust's Legal Provisions 2818 Relating to IETF Documents 2819 (https://trustee.ietf.org/license-info). 2821 This version of this YANG module is part of RFC XXXX 2822 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 2823 for full legal notices. 2825 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 2826 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 2827 'MAY', and 'OPTIONAL' in this document are to be interpreted as 2828 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 2829 they appear in all capitals, as shown here."; 2831 revision 2020-06-28 { 2832 description 2833 "Initial Version"; 2834 reference 2835 "RFC XXX, BGP Model for Service Provider Network."; 2836 } 2838 grouping bgp-neighbor-use-multiple-paths { 2839 description 2840 "Multi-path configuration and state applicable to a BGP 2841 neighbor"; 2842 container use-multiple-paths { 2843 description 2844 "Parameters related to the use of multiple-paths for the same 2845 NLRI when they are received only from this neighbor"; 2846 leaf enabled { 2847 type boolean; 2848 default "false"; 2849 description 2850 "Whether the use of multiple paths for the same NLRI is 2851 enabled for the neighbor. This value is overridden by any 2852 more specific configuration value."; 2853 } 2854 container ebgp { 2855 description 2856 "Multi-path configuration for eBGP"; 2857 leaf allow-multiple-as { 2858 type boolean; 2859 default "false"; 2860 description 2861 "Allow multi-path to use paths from different neighboring 2862 ASes. The default is to only consider multiple paths 2863 from the same neighboring AS."; 2864 } 2865 } 2866 } 2867 } 2869 grouping bgp-neighbor-counters-message-types-state { 2870 description 2871 "Grouping of BGP message types, included for re-use across 2872 counters"; 2873 leaf updates-received { 2874 type uint64; 2875 description 2876 "Number of BGP UPDATE messages received from this neighbor."; 2877 reference 2878 "RFC 4273: bgpPeerInUpdates."; 2879 } 2880 leaf updates-sent { 2881 type uint64; 2882 description 2883 "Number of BGP UPDATE messages sent to this neighbor"; 2884 reference 2885 "RFC 4273 - bgpPeerOutUpdates"; 2886 } 2887 leaf messages-received { 2888 type uint64; 2889 description 2890 "Number of BGP messages received from thsi neighbor"; 2891 reference 2892 "RFC 4273 - bgpPeerInTotalMessages"; 2894 } 2895 leaf messages-sent { 2896 type uint64; 2897 description 2898 "Number of BGP messages received from thsi neighbor"; 2899 reference 2900 "RFC 4273 - bgpPeerOutTotalMessages"; 2901 } 2902 leaf notification { 2903 type uint64; 2904 description 2905 "Number of BGP NOTIFICATION messages indicating an error 2906 condition has occurred exchanged."; 2907 } 2908 } 2910 grouping bgp-neighbor-afi-safi-list { 2911 description 2912 "List of address-families associated with the BGP neighbor"; 2913 list afi-safi { 2914 key "afi-safi-name"; 2915 description 2916 "AFI, SAFI configuration available for the neighbor or 2917 group"; 2918 uses mp-afi-safi-config; 2919 leaf active { 2920 type boolean; 2921 config false; 2922 description 2923 "This value indicates whether a particular AFI-SAFI has 2924 been successfully negotiated with the peer. An AFI-SAFI may 2925 be enabled in the current running configuration, but a 2926 session restart may be required in order to negotiate the 2927 new capability."; 2928 } 2929 container prefixes { 2930 config false; 2931 description 2932 "Prefix counters for the BGP session"; 2933 leaf received { 2934 type uint32; 2935 description 2936 "The number of prefixes received from the neighbor"; 2937 } 2938 leaf sent { 2939 type uint32; 2940 description 2941 "The number of prefixes advertised to the neighbor"; 2943 } 2944 leaf installed { 2945 type uint32; 2946 description 2947 "The number of advertised prefixes installed in the 2948 Loc-RIB"; 2949 } 2950 } 2951 container graceful-restart { 2952 if-feature "bt:graceful-restart"; 2953 description 2954 "Parameters relating to BGP graceful-restart"; 2955 uses mp-afi-safi-graceful-restart-config; 2956 leaf received { 2957 type boolean; 2958 config false; 2959 description 2960 "This leaf indicates whether the neighbor advertised the 2961 ability to support graceful-restart for this AFI-SAFI"; 2962 } 2963 leaf advertised { 2964 type boolean; 2965 config false; 2966 description 2967 "This leaf indicates whether the ability to support 2968 graceful-restart has been advertised to the peer"; 2969 } 2970 } 2971 uses mp-all-afi-safi-list-contents; 2972 uses bgp-neighbor-use-multiple-paths; 2973 } 2974 } 2975 } 2976 2978 7.2. BGP types 2980 file "ietf-bgp-types@2020-06-28.yang" 2981 module ietf-bgp-types { 2982 yang-version 1.1; 2983 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; 2984 prefix bt; 2986 import ietf-inet-types { 2987 prefix inet; 2988 } 2989 // meta 2991 organization 2992 "IETF IDR Working Group"; 2993 contact 2994 "WG Web: 2995 WG List: 2997 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 2998 Keyur Patel (keyur at arrcus.com), 2999 Susan Hares (shares at ndzh.com), 3000 Jeffrey Haas (jhaas at pfrc.org)."; 3001 description 3002 "This module contains general data definitions for use in BGP 3003 policy. It can be imported by modules that make use of BGP 3004 attributes"; 3006 revision 2020-06-28 { 3007 description 3008 "Initial Version"; 3009 reference 3010 "RFC XXX, BGP Model for Service Provider Network."; 3011 } 3013 /* 3014 * Features. 3015 */ 3017 feature graceful-restart { 3018 description 3019 "Graceful restart as defined in RFC 4724 is supported."; 3020 } 3022 feature clear-neighbors { 3023 description 3024 "Clearing of BGP neighbors is supported."; 3025 } 3027 feature clear-statistics { 3028 description 3029 "Clearing of BGP statistics is supported."; 3030 } 3032 feature send-communities { 3033 description 3034 "Enable the propogation of communities."; 3035 } 3036 feature ttl-security { 3037 description 3038 "BGP Time To Live (TTL) security check support."; 3039 reference 3040 "RFC 5082, The Generalized TTL Security Mechanism (GTSM)."; 3041 } 3043 feature bfd { 3044 description 3045 "Support for BFD detection of BGP neighbor reachability."; 3046 reference 3047 "RFC 5880, Bidirectional Forward Detection (BFD), 3048 RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6 3049 (Single Hop), 3050 RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop 3051 Paths."; 3052 } 3054 feature damping { 3055 description 3056 "Weighted route dampening is supported."; 3057 } 3059 feature clear-routes { 3060 description 3061 "Clearing of BGP routes is supported."; 3062 } 3064 feature add-paths { 3065 description 3066 "Advertisement of multiple paths for the same address prefix 3067 without the new paths implicitly replacing any previous ones."; 3068 reference 3069 "RFC 7911: Advertisement of Multiple Paths in BGP."; 3070 } 3072 /* 3073 * Identities. 3074 */ 3076 identity bgp-capability { 3077 description 3078 "Base identity for a BGP capability"; 3079 } 3081 identity mp-bgp { 3082 base bgp-capability; 3083 description 3084 "Multi-protocol extensions to BGP"; 3085 reference 3086 "RFC 4760: Multiprotocol Extenstions for BGP-4."; 3087 } 3089 identity route-refresh { 3090 base bgp-capability; 3091 description 3092 "The BGP route-refresh functionality"; 3093 reference 3094 "RFC 2918: Route Refresh Capability for BGP-4."; 3095 } 3097 identity asn32 { 3098 base bgp-capability; 3099 description 3100 "4-byte (32-bit) AS number functionality"; 3101 reference 3102 "RFC6793: BGP Support for Four-Octet Autonomous System (AS) 3103 Number Space."; 3104 } 3106 identity graceful-restart { 3107 if-feature "graceful-restart"; 3108 base bgp-capability; 3109 description 3110 "Graceful restart functionality"; 3111 reference 3112 "RFC 4724: Graceful Restart Mechanism for BGP."; 3113 } 3115 identity add-paths { 3116 if-feature "add-paths"; 3117 base bgp-capability; 3118 description 3119 "Advertisement of multiple paths for the same address prefix 3120 without the new paths implicitly replacing any previous ones."; 3121 reference 3122 "RFC 7911: Advertisement of Multiple Paths in BGP."; 3123 } 3125 identity afi-safi-type { 3126 description 3127 "Base identity type for AFI,SAFI tuples for BGP-4"; 3128 reference 3129 "RFC4760: Multi-protocol extensions for BGP-4"; 3130 } 3131 identity ipv4-unicast { 3132 base afi-safi-type; 3133 description 3134 "IPv4 unicast (AFI,SAFI = 1,1)"; 3135 reference 3136 "RFC4760: Multi-protocol extensions for BGP-4"; 3137 } 3139 identity ipv6-unicast { 3140 base afi-safi-type; 3141 description 3142 "IPv6 unicast (AFI,SAFI = 2,1)"; 3143 reference 3144 "RFC4760: Multi-protocol extensions for BGP-4"; 3145 } 3147 identity ipv4-labeled-unicast { 3148 base afi-safi-type; 3149 description 3150 "Labeled IPv4 unicast (AFI,SAFI = 1,4)"; 3151 reference 3152 "RFC 3107: Carrying Label Information in BGP-4."; 3153 } 3155 identity ipv6-labeled-unicast { 3156 base afi-safi-type; 3157 description 3158 "Labeled IPv6 unicast (AFI,SAFI = 2,4)"; 3159 reference 3160 "RFC 3107: Carrying Label Information in BGP-4."; 3161 } 3163 identity l3vpn-ipv4-unicast { 3164 base afi-safi-type; 3165 description 3166 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 3167 reference 3168 "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)."; 3169 } 3171 identity l3vpn-ipv6-unicast { 3172 base afi-safi-type; 3173 description 3174 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 3175 reference 3176 "RFC 4659: BGP-MPLS IP Virtual Private Network (VPN) Extension 3177 for IPv6 VPN."; 3178 } 3179 identity l3vpn-ipv4-multicast { 3180 base afi-safi-type; 3181 description 3182 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 3183 reference 3184 "RFC 6514: BGP Encodings and Procedures for Multicast in 3185 MPLS/BGP IP VPNs."; 3186 } 3188 identity l3vpn-ipv6-multicast { 3189 base afi-safi-type; 3190 description 3191 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 3192 reference 3193 "RFC 6514: BGP Encodings and Procedures for Multicast in 3194 MPLS/BGP IP VPNs."; 3195 } 3197 identity l2vpn-vpls { 3198 base afi-safi-type; 3199 description 3200 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 3201 reference 3202 "RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for 3203 Auto-Discovery and Signaling."; 3204 } 3206 identity l2vpn-evpn { 3207 base afi-safi-type; 3208 description 3209 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 3210 } 3212 identity bgp-well-known-std-community { 3213 description 3214 "Base identity for reserved communities within the standard 3215 community space defined by RFC1997. These communities must 3216 fall within the range 0xFFFF0000 to 0xFFFFFFFF"; 3217 reference 3218 "RFC 1997: BGP Communities Attribute."; 3219 } 3221 identity no-export { 3222 base bgp-well-known-std-community; 3223 description 3224 "Do not export NLRI received carrying this community outside 3225 the bounds of this autonomous system, or this confederation if 3226 the local autonomous system is a confederation member AS. This 3227 community has a value of 0xFFFFFF01."; 3228 reference 3229 "RFC 1997: BGP Communities Attribute."; 3230 } 3232 identity no-advertise { 3233 base bgp-well-known-std-community; 3234 description 3235 "All NLRI received carrying this community must not be 3236 advertised to other BGP peers. This community has a value of 3237 0xFFFFFF02."; 3238 reference 3239 "RFC 1997: BGP Communities Attribute."; 3240 } 3242 identity no-export-subconfed { 3243 base bgp-well-known-std-community; 3244 description 3245 "All NLRI received carrying this community must not be 3246 advertised to external BGP peers - including over confederation 3247 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 3248 reference 3249 "RFC 1997: BGP Communities Attribute."; 3250 } 3252 identity no-peer { 3253 base bgp-well-known-std-community; 3254 description 3255 "An autonomous system receiving NLRI tagged with this community 3256 is advised not to re-advertise the NLRI to external bi-lateral 3257 peer autonomous systems. An AS may also filter received NLRI 3258 from bilateral peer sessions when they are tagged with this 3259 community value"; 3260 reference 3261 "RFC 3765: NOPEER Community for BGP."; 3262 } 3264 identity as-path-segment-type { 3265 description 3266 "Base AS Path Segment Type. In [BGP-4], the path segment type 3267 is a 1-octet field with the following values defined."; 3268 reference 3269 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3270 } 3272 identity as-set { 3273 base as-path-segment-type; 3274 description 3275 "Unordered set of autonomous systems that a route in the UPDATE 3276 message has traversed."; 3277 reference 3278 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3279 } 3281 identity as-sequence { 3282 base as-path-segment-type; 3283 description 3284 "Ordered set of autonomous systems that a route in the UPDATE 3285 message has traversed."; 3286 reference 3287 "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; 3288 } 3290 identity as-confed-sequence { 3291 base as-path-segment-type; 3292 description 3293 "Ordered set of Member Autonomous Systems in the local 3294 confederation that the UPDATE message has traversed."; 3295 reference 3296 "RFC 5065, Autonomous System Configuration for BGP."; 3297 } 3299 identity as-confed-set { 3300 base as-path-segment-type; 3301 description 3302 "Unordered set of Member Autonomous Systems in the local 3303 confederation that the UPDATE message has traversed."; 3304 reference 3305 "RFC 5065, Autonomous System Configuration for BGP."; 3306 } 3308 /* 3309 * Typedefs. 3310 */ 3312 typedef bgp-session-direction { 3313 type enumeration { 3314 enum INBOUND { 3315 description 3316 "Refers to all NLRI received from the BGP peer"; 3317 } 3318 enum OUTBOUND { 3319 description 3320 "Refers to all NLRI advertised to the BGP peer"; 3321 } 3322 } 3323 description 3324 "Type to describe the direction of NLRI transmission"; 3325 } 3327 typedef bgp-well-known-community-type { 3328 type identityref { 3329 base bgp-well-known-std-community; 3330 } 3331 description 3332 "Type definition for well-known IETF community attribute 3333 values"; 3334 reference 3335 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 3336 } 3338 typedef bgp-std-community-type { 3339 type union { 3340 type uint32 { 3341 range "65536..4294901759"; 3342 } 3343 type string { 3344 pattern '([0-9]+:[0-9]+)'; 3345 } 3346 } 3347 description 3348 "Type definition for standard community attributes"; 3349 reference 3350 "RFC 1997 - BGP Communities Attribute"; 3351 } 3353 typedef bgp-ext-community-type { 3354 type union { 3355 type string { 3356 // Type 1: 2-octet global and 4-octet local 3357 // (AS number) (Integer) 3358 pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3359 + '[1-9][0-9]{1,4}|[0-9]):' 3360 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3361 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3362 } 3363 type string { 3364 // Type 2: 4-octet global and 2-octet local 3365 // (ipv4-address) (integer) 3366 pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3367 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3368 + '2[0-4][0-9]|25[0-5]):' 3369 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3370 + '[1-9][0-9]{1,4}|[0-9])'; 3372 } 3373 type string { 3374 // route-target with Type 1 3375 // route-target:(ASN):(local-part) 3376 pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' 3377 + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' 3378 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3379 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3380 } 3381 type string { 3382 // route-target with Type 2 3383 // route-target:(IPv4):(local-part) 3384 pattern 'route\-target:' 3385 + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3386 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3387 + '2[0-4][0-9]|25[0-5]):' 3388 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3389 + '[1-9][0-9]{1,4}|[0-9])'; 3390 } 3391 type string { 3392 // route-origin with Type 1 3393 pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' 3394 + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' 3395 + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' 3396 + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3397 } 3398 type string { 3399 // route-origin with Type 2 3400 pattern 'route\-origin:' 3401 + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' 3402 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' 3403 + '2[0-4][0-9]|25[0-5]):' 3404 + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' 3405 + '[1-9][0-9]{1,4}|[0-9])'; 3406 } 3407 } 3408 description 3409 "Type definition for extended community attributes"; 3410 reference 3411 "RFC 4360 - BGP Extended Communities Attribute"; 3412 } 3414 typedef bgp-community-regexp-type { 3415 type string; 3416 description 3417 "Type definition for communities specified as regular 3418 expression patterns"; 3419 } 3420 typedef bgp-origin-attr-type { 3421 type enumeration { 3422 enum igp { 3423 description 3424 "Origin of the NLRI is internal"; 3425 } 3426 enum egp { 3427 description 3428 "Origin of the NLRI is EGP"; 3429 } 3430 enum incomplete { 3431 description 3432 "Origin of the NLRI is neither IGP or EGP"; 3433 } 3434 } 3435 description 3436 "Type definition for standard BGP origin attribute"; 3437 reference 3438 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3"; 3439 } 3441 typedef peer-type { 3442 type enumeration { 3443 enum internal { 3444 description 3445 "Internal (iBGP) peer"; 3446 } 3447 enum external { 3448 description 3449 "External (eBGP) peer"; 3450 } 3451 enum confederation { 3452 description 3453 "Confederation as peer"; 3454 } 3455 } 3456 description 3457 "Labels a peer or peer group as explicitly internal, 3458 external or confederation."; 3459 } 3461 identity REMOVE_PRIVATE_AS_OPTION { 3462 description 3463 "Base identity for options for removing private autonomous 3464 system numbers from the AS_PATH attribute"; 3465 } 3467 identity PRIVATE_AS_REMOVE_ALL { 3468 base REMOVE_PRIVATE_AS_OPTION; 3469 description 3470 "Strip all private autonomous system numbers from the AS_PATH. 3471 This action is performed regardless of the other content of the 3472 AS_PATH attribute, and for all instances of private AS numbers 3473 within that attribute."; 3474 } 3476 identity PRIVATE_AS_REPLACE_ALL { 3477 base REMOVE_PRIVATE_AS_OPTION; 3478 description 3479 "Replace all instances of private autonomous system numbers in 3480 the AS_PATH with the local BGP speaker's autonomous system 3481 number. This action is performed regardless of the other 3482 content of the AS_PATH attribute, and for all instances of 3483 private AS number within that attribute."; 3484 } 3486 typedef remove-private-as-option { 3487 type identityref { 3488 base REMOVE_PRIVATE_AS_OPTION; 3489 } 3490 description 3491 "Set of options for configuring how private AS path numbers 3492 are removed from advertisements"; 3493 } 3495 typedef percentage { 3496 type uint8 { 3497 range "0..100"; 3498 } 3499 description 3500 "Integer indicating a percentage value"; 3501 } 3503 typedef rr-cluster-id-type { 3504 type union { 3505 type uint32; 3506 type inet:ipv4-address; 3507 } 3508 description 3509 "Union type for route reflector cluster ids: 3510 option 1: 4-byte number 3511 option 2: IP address"; 3512 } 3514 typedef community-type { 3515 type bits { 3516 bit standard { 3517 position 0; 3518 description 3519 "Send only standard communities."; 3520 reference 3521 "RFC 1997: BGP Communities Attribute."; 3522 } 3523 bit extended { 3524 description 3525 "Send only extended communities."; 3526 reference 3527 "RFC 4360: BGP Extended Communities Attribute."; 3528 } 3529 bit large { 3530 description 3531 "Send only large communities."; 3532 reference 3533 "RFC 8092: BGP Large Communities Attribute."; 3534 } 3535 } 3536 description 3537 "Type describing variations of community attributes. 3538 The community types can be combined and a value of 0 3539 implies 'none'"; 3540 } 3541 } 3542 3544 7.3. BGP policy data 3546 file "ietf-bgp-policy@2020-06-28.yang" 3547 module ietf-bgp-policy { 3548 yang-version 1.1; 3549 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; 3550 prefix bp; 3552 // import some basic types 3554 import ietf-inet-types { 3555 prefix inet; 3556 } 3557 import ietf-routing-policy { 3558 prefix rpol; 3559 } 3560 import ietf-bgp-types { 3561 prefix bt; 3562 } 3563 import ietf-routing-types { 3564 prefix rt-types; 3565 } 3567 organization 3568 "IETF IDR Working Group"; 3569 contact 3570 "WG Web: 3571 WG List: 3573 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 3574 Keyur Patel (keyur at arrcus.com), 3575 Susan Hares (shares at ndzh.com), 3576 Jeffrey Haas (jhaas at pfrc.org)."; 3577 description 3578 "This module contains data definitions for BGP routing policy. 3579 It augments the base routing-policy module with BGP-specific 3580 options for conditions and actions."; 3582 revision 2020-06-28 { 3583 description 3584 "Initial Version"; 3585 reference 3586 "RFC XXX, BGP Model for Service Provider Network."; 3587 } 3589 // typedef statements 3591 typedef bgp-set-community-option-type { 3592 type enumeration { 3593 enum add { 3594 description 3595 "Add the specified communities to the existing 3596 community attribute"; 3597 } 3598 enum remove { 3599 description 3600 "Remove the specified communities from the 3601 existing community attribute"; 3602 } 3603 enum replace { 3604 description 3605 "Replace the existing community attribute with 3606 the specified communities. If an empty set is 3607 specified, this removes the community attribute 3608 from the route."; 3609 } 3610 } 3611 description 3612 "Type definition for options when setting the community 3613 attribute in a policy action"; 3614 } 3616 typedef bgp-next-hop-type { 3617 type union { 3618 type inet:ip-address-no-zone; 3619 type enumeration { 3620 enum self { 3621 description 3622 "Special designation for local router's own 3623 address, i.e., next-hop-self"; 3624 } 3625 } 3626 } 3627 description 3628 "Type definition for specifying next-hop in policy actions"; 3629 } 3631 typedef bgp-set-med-type { 3632 type union { 3633 type uint32; 3634 type string { 3635 pattern '^[+-]([0-9]{1,8}|[0-3][0-9]{1,9}|4[0-1][0-9]{1,8}|' 3636 + '428[0-9]{1,7}|429[0-3][0-9]{1,6}|42948[0-9]{1,5}|' 3637 + '42949[0-5][0-9]{1,4}|429496[0-6][0-9]{1,3}|' 3638 + '4294971[0-9]{1,2}|42949728[0-9]|42949729[0-5])$'; 3639 } 3640 type enumeration { 3641 enum igp { 3642 description 3643 "Set the MED value to the IGP cost toward the 3644 next hop for the route"; 3645 } 3646 enum med-plus-igp { 3647 description 3648 "Before comparing MED values for path selection, adds to 3649 the MED the cost of the IGP route to the BGP next-hop 3650 destination. 3652 This option replaces the MED value for the router, 3653 but does not affect the IGP metric comparison. As a 3654 result, when multiple routes have the same value 3655 after the MED-plus-IPG comparison, and route selection 3656 continues, the IGP route metric is also compared, even 3657 though it was added to the MED value and compared 3658 earlier in the selection process. 3660 Useful when the downstream AS requires the complete 3661 cost of a certain route that is received across 3662 multiple ASs."; 3663 } 3664 } 3665 } 3666 description 3667 "Type definition for specifying how the BGP MED can 3668 be set in BGP policy actions. The three choices are to set 3669 the MED directly, increment/decrement using +/- notation, 3670 and setting it to the IGP cost (predefined value)."; 3671 reference 3672 "None. WG needs to decide if this is going to be a standard."; 3673 } 3675 // augment statements 3677 augment "/rpol:routing-policy/rpol:defined-sets" { 3678 description 3679 "Adds BGP defined sets container to routing policy model."; 3680 container bgp-defined-sets { 3681 description 3682 "BGP-related set definitions for policy match conditions"; 3683 container community-sets { 3684 description 3685 "Enclosing container for list of defined BGP community sets"; 3686 list community-set { 3687 key "name"; 3688 description 3689 "List of defined BGP community sets"; 3690 leaf name { 3691 type string; 3692 mandatory true; 3693 description 3694 "Name / label of the community set -- this is used to 3695 reference the set in match conditions"; 3696 } 3697 leaf-list member { 3698 type union { 3699 type bt:bgp-std-community-type; 3700 type bt:bgp-community-regexp-type; 3701 type bt:bgp-well-known-community-type; 3702 } 3703 description 3704 "Members of the community set"; 3705 } 3706 } 3707 } 3708 container ext-community-sets { 3709 description 3710 "Enclosing container for list of extended BGP community 3711 sets"; 3712 list ext-community-set { 3713 key "name"; 3714 description 3715 "List of defined extended BGP community sets"; 3716 leaf name { 3717 type string; 3718 description 3719 "Name / label of the extended community set -- this is 3720 used to reference the set in match conditions"; 3721 } 3722 leaf-list member { 3723 type union { 3724 type rt-types:route-target; 3725 type bt:bgp-community-regexp-type; 3726 } 3727 description 3728 "Members of the extended community set"; 3729 } 3730 } 3731 } 3732 container as-path-sets { 3733 description 3734 "Enclosing container for list of define AS path sets"; 3735 list as-path-set { 3736 key "name"; 3737 description 3738 "List of defined AS path sets"; 3739 leaf name { 3740 type string; 3741 description 3742 "Name of the AS path set -- this is used to reference the 3743 set in match conditions"; 3744 } 3745 leaf-list member { 3746 type string; 3747 description 3748 "AS path expression -- list of ASes in the set"; 3749 } 3750 } 3751 } 3752 } 3753 } 3755 grouping set-community-action-common { 3756 description 3757 "Common leaves for set-community and set-ext-community 3758 actions"; 3759 leaf method { 3760 type enumeration { 3761 enum inline { 3762 description 3763 "The extended communities are specified inline as a 3764 list"; 3765 } 3766 enum reference { 3767 description 3768 "The extended communities are specified by referencing a 3769 defined ext-community set"; 3770 } 3771 } 3772 description 3773 "Indicates the method used to specify the extended 3774 communities for the set-ext-community action"; 3775 } 3776 leaf options { 3777 type bgp-set-community-option-type; 3778 description 3779 "Options for modifying the community attribute with 3780 the specified values. These options apply to both 3781 methods of setting the community attribute."; 3782 } 3783 } 3785 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3786 "rpol:policy-definition/rpol:policy-statements/" + 3787 "rpol:statement/rpol:conditions" { 3788 description 3789 "BGP policy conditions added to routing policy module"; 3790 container bgp-conditions { 3791 description 3792 "Top-level container for BGP specific policy conditions "; 3793 leaf med-eq { 3794 type uint32; 3795 description 3796 "Condition to check if the received MED value is equal to 3797 the specified value"; 3798 } 3799 leaf origin-eq { 3800 type bt:bgp-origin-attr-type; 3801 description 3802 "Condition to check if the route origin is equal to the 3803 specified value"; 3805 } 3806 leaf-list next-hop-in { 3807 type inet:ip-address-no-zone; 3808 description 3809 "List of next hop addresses to check for in the route 3810 update"; 3811 } 3812 leaf-list afi-safi-in { 3813 type identityref { 3814 base bt:afi-safi-type; 3815 } 3816 description 3817 "List of address families which the NLRI may be within"; 3818 } 3819 leaf local-pref-eq { 3820 type uint32; 3821 description 3822 "Condition to check if the local pref attribute is equal to 3823 the specified value"; 3824 } 3825 leaf route-type { 3826 type enumeration { 3827 enum internal { 3828 description 3829 "route type is internal"; 3830 } 3831 enum external { 3832 description 3833 "route type is external"; 3834 } 3835 } 3836 description 3837 "Condition to check the route type in the route update"; 3838 } 3839 container community-count { 3840 description 3841 "Value and comparison operations for conditions based on the 3842 number of communities in the route update"; 3843 } 3844 container as-path-length { 3845 description 3846 "Value and comparison operations for conditions based on the 3847 length of the AS path in the route update. 3849 The as-path-length SHALL be calculated and SHALL follow 3850 RFC 4271 rules."; 3851 reference 3852 "RFC 4271: BGP-4."; 3854 } 3855 container match-community-set { 3856 description 3857 "Top-level container for match conditions on communities. 3858 Match a referenced community-set according to the logic 3859 defined in the match-set-options leaf"; 3860 leaf community-set { 3861 type leafref { 3862 path "/rpol:routing-policy/rpol:defined-sets/" 3863 + "bp:bgp-defined-sets/bp:community-sets/" 3864 + "bp:community-set/bp:name"; 3865 } 3866 description 3867 "References a defined community set"; 3868 } 3869 uses rpol:match-set-options-group; 3870 } 3871 container match-ext-community-set { 3872 description 3873 "Match a referenced extended community-set according to the 3874 logic defined in the match-set-options leaf"; 3875 leaf ext-community-set { 3876 type leafref { 3877 path "/rpol:routing-policy/rpol:defined-sets/" 3878 + "bp:bgp-defined-sets/bp:ext-community-sets/" 3879 + "bp:ext-community-set/bp:name"; 3880 } 3881 description 3882 "References a defined extended community set"; 3883 } 3884 uses rpol:match-set-options-group; 3885 } 3886 container match-as-path-set { 3887 description 3888 "Match a referenced as-path set according to the logic 3889 defined in the match-set-options leaf"; 3890 leaf as-path-set { 3891 type leafref { 3892 path "/rpol:routing-policy/rpol:defined-sets/" 3893 + "bp:bgp-defined-sets/bp:as-path-sets/" 3894 + "bp:as-path-set/bp:name"; 3895 } 3896 description 3897 "References a defined AS path set"; 3898 } 3899 uses rpol:match-set-options-group; 3900 } 3901 } 3903 } 3905 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3906 "rpol:policy-definition/rpol:policy-statements/" + 3907 "rpol:statement/rpol:actions" { 3908 description 3909 "BGP policy actions added to routing policy module."; 3910 container bgp-actions { 3911 description 3912 "Top-level container for BGP-specific actions"; 3913 leaf set-route-origin { 3914 type bt:bgp-origin-attr-type; 3915 description 3916 "Set the origin attribute to the specified value"; 3917 } 3918 leaf set-local-pref { 3919 type uint32; 3920 description 3921 "Set the local pref attribute on the route update"; 3922 } 3923 leaf set-next-hop { 3924 type bgp-next-hop-type; 3925 description 3926 "Set the next-hop attribute in the route update"; 3927 } 3928 leaf set-med { 3929 type bgp-set-med-type; 3930 description 3931 "Set the med metric attribute in the route update"; 3932 } 3933 container set-as-path-prepend { 3934 description 3935 "Action to prepend local AS number to the AS-path a 3936 specified number of times"; 3937 leaf repeat-n { 3938 type uint8 { 3939 range "1..max"; 3940 } 3941 description 3942 "Number of times to prepend the local AS number to the AS 3943 path. The value should be between 1 and the maximum 3944 supported by the implementation."; 3945 } 3946 } 3947 container set-community { 3948 description 3949 "Action to set the community attributes of the route, along 3950 with options to modify how the community is modified. 3952 Communities may be set using an inline list OR 3953 reference to an existing defined set (not both)."; 3954 uses set-community-action-common; 3955 container inline { 3956 when "../method = 'inline'" { 3957 description 3958 "Active only when the set-community method is inline"; 3959 } 3960 description 3961 "Set the community values for the action inline with 3962 a list."; 3963 leaf-list communities { 3964 type union { 3965 type bt:bgp-std-community-type; 3966 type bt:bgp-well-known-community-type; 3967 } 3968 description 3969 "Set the community values for the update inline with a 3970 list."; 3971 } 3972 } 3973 container reference { 3974 when "../method = 'reference'" { 3975 description 3976 "Active only when the set-community method is reference"; 3977 } 3978 description 3979 "Provide a reference to a defined community set for the 3980 set-community action"; 3981 leaf community-set-ref { 3982 type leafref { 3983 path "/rpol:routing-policy/rpol:defined-sets/" 3984 + "bp:bgp-defined-sets/" 3985 + "bp:community-sets/bp:community-set/bp:name"; 3986 } 3987 description 3988 "References a defined community set by name"; 3989 } 3990 } 3991 } 3992 container set-ext-community { 3993 description 3994 "Action to set the extended community attributes of the 3995 route, along with options to modify how the community is 3996 modified. Extended communities may be set using an inline 3997 list OR a reference to an existing defined set (but not 3998 both)."; 3999 uses set-community-action-common; 4000 container inline { 4001 when "../method = 'inline'" { 4002 description 4003 "Active only when the set-community method is inline"; 4004 } 4005 description 4006 "Set the extended community values for the action inline 4007 with a list."; 4008 leaf-list communities { 4009 type union { 4010 type rt-types:route-target; 4011 type bt:bgp-well-known-community-type; 4012 } 4013 description 4014 "Set the extended community values for the update inline 4015 with a list."; 4016 } 4017 } 4018 container reference { 4019 when "../method = 'reference'" { 4020 description 4021 "Active only when the set-community method is reference"; 4022 } 4023 description 4024 "Provide a reference to an extended community set for the 4025 set-ext-community action"; 4026 leaf ext-community-set-ref { 4027 type leafref { 4028 path "/rpol:routing-policy/rpol:defined-sets/" 4029 + "bp:bgp-defined-sets/bp:ext-community-sets/" 4030 + "bp:ext-community-set/bp:name"; 4031 } 4032 description 4033 "References a defined extended community set by name"; 4034 } 4035 } 4036 } 4037 } 4038 } 4039 } 4040 4042 7.4. RIB modules 4044 file "ietf-bgp-rib@2020-06-28.yang" 4045 submodule ietf-bgp-rib { 4046 yang-version 1.1; 4047 belongs-to ietf-bgp { 4048 prefix br; 4049 } 4051 /* 4052 * Import and Include 4053 */ 4055 import ietf-bgp-types { 4056 prefix bt; 4057 reference 4058 "RFC XXXX: BGP YANG Model for Service Provider Networks."; 4059 } 4060 import ietf-inet-types { 4061 prefix inet; 4062 reference 4063 "RFC 6991: Common YANG Types."; 4064 } 4065 import ietf-yang-types { 4066 prefix yang; 4067 reference 4068 "RFC 6991: Common YANG Types."; 4069 } 4070 import ietf-routing-types { 4071 prefix rt; 4072 reference 4073 "RFC 8294: Routing Area YANG Types."; 4074 } 4075 include ietf-bgp-rib-types; 4076 include ietf-bgp-rib-tables; 4078 // groupings of attributes in three categories: 4079 // - shared across multiple routes 4080 // - common to LOC-RIB and Adj-RIB, but not shared across routes 4081 // - specific to LOC-RIB or Adj-RIB 4083 include ietf-bgp-rib-attributes; 4085 // groupings of annotations for each route or table 4087 include ietf-bgp-rib-table-attributes; 4089 organization 4090 "IETF IDR Working Group"; 4091 contact 4092 "WG Web: 4093 WG List: 4095 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4096 Keyur Patel (keyur at arrcus.com), 4097 Susan Hares (shares at ndzh.com)"; 4098 description 4099 "Defines a submodule for representing BGP routing table (RIB) 4100 contents. The submodule supports 5 logical RIBs per address 4101 family: 4103 loc-rib: This is the main BGP routing table for the local routing 4104 instance, containing best-path selections for each prefix. The 4105 loc-rib table may contain multiple routes for a given prefix, 4106 with an attribute to indicate which was selected as the best 4107 path. Note that multiple paths may be used or advertised even if 4108 only one path is marked as best, e.g., when using BGP 4109 add-paths. An implementation may choose to mark multiple 4110 paths in the RIB as best path by setting the flag to true for 4111 multiple entries. 4113 adj-rib-in-pre: This is a per-neighbor table containing the NLRI 4114 updates received from the neighbor before any local input policy 4115 rules or filters have been applied. This can be considered the 4116 'raw' updates from a given neighbor. 4118 adj-rib-in-post: This is a per-neighbor table containing the 4119 routes received from the neighbor that are eligible for 4120 best-path selection after local input policy rules have been 4121 applied. 4123 adj-rib-out-pre: This is a per-neighbor table containing routes 4124 eligible for sending (advertising) to the neighbor before output 4125 policy rules have been applied. 4127 adj-rib-out-post: This is a per-neighbor table containing routes 4128 eligible for sending (advertising) to the neighbor after output 4129 policy rules have been applied. 4131 Copyright (c) 2019 IETF Trust and the persons identified as 4132 authors of the code. All rights reserved. 4134 Redistribution and use in source and binary forms, with or 4135 without modification, is permitted pursuant to, and subject to 4136 the license terms contained in, the Simplified BSD License set 4137 forth in Section 4.c of the IETF Trust's Legal Provisions 4138 Relating to IETF Documents 4139 (https://trustee.ietf.org/license-info). 4141 This version of this YANG module is part of RFC XXXX 4142 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4143 for full legal notices. 4145 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4146 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4147 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4148 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4149 they appear in all capitals, as shown here."; 4151 revision 2020-06-28 { 4152 description 4153 "Initial Version"; 4154 reference 4155 "RFC XXXX, BGP YANG Model for Service Provider Network."; 4156 } 4158 grouping attr-set-attributes { 4159 description 4160 "A grouping for all attribute set parameters."; 4162 container attr-set-attributes { 4163 description 4164 "A container for attribute set parameters."; 4166 leaf origin { 4167 type bt:bgp-origin-attr-type; 4168 description 4169 "BGP attribute defining the origin of the path 4170 information."; 4171 } 4172 leaf atomic-aggregate { 4173 type boolean; 4174 description 4175 "BGP attribute indicating that the prefix is an atomic 4176 aggregate; i.e., the peer selected a less specific 4177 route without selecting a more specific route that is 4178 included in it."; 4179 reference 4180 "RFC 4271: Section 5.1.6."; 4181 } 4182 leaf next-hop { 4183 type inet:ip-address; 4184 description 4185 "BGP next hop attribute defining the IP address of the 4186 router that should be used as the next hop to the 4187 destination"; 4188 reference 4189 "RFC 4271: Section 5.1.3."; 4190 } 4191 leaf med { 4192 type uint32; 4193 description 4194 "BGP multi-exit discriminator attribute used in BGP route 4195 selection process"; 4196 reference 4197 "RFC 4271: Section 5.1.4."; 4198 } 4199 leaf local-pref { 4200 type uint32; 4201 description 4202 "BGP local preference attribute sent to internal peers to 4203 indicate the degree of preference for externally learned 4204 routes. The route with the highest local preference 4205 value is preferred."; 4206 reference 4207 "RFC 4271: Section 5.1.5."; 4208 } 4209 leaf originator-id { 4210 type yang:dotted-quad; 4211 description 4212 "BGP attribute that provides the id as an IPv4 address 4213 of the originator of the announcement."; 4214 reference 4215 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4216 Mesh Internal BGP (IBGP)"; 4217 } 4218 leaf-list cluster-list { 4219 type yang:dotted-quad; 4220 description 4221 "Represents the reflection path that the route has 4222 passed."; 4223 reference 4224 "RFC 4456 - BGP Route Reflection: An Alternative to Full 4225 Mesh Internal BGP (IBGP)"; 4226 } 4227 leaf aigp-metric { 4228 type uint64; 4229 description 4230 "BGP path attribute representing the accumulated IGP 4231 metric for the path"; 4232 reference 4233 "RFC 7311 - The Accumulated IGP Metric Attribute for BGP"; 4234 } 4235 container aggregator { 4236 config false; 4237 description 4238 "BGP attribute indicating the prefix has been 4239 aggregated by the specified AS and router."; 4240 reference 4241 "RFC 4271: Section 5.1.7."; 4242 leaf as { 4243 type inet:as-number; 4244 description 4245 "AS number of the autonomous system that performed the 4246 aggregation."; 4247 } 4248 leaf as4 { 4249 type inet:as-number; 4250 description 4251 "AS number of the autonomous system that performed the 4252 aggregation (4-octet representation). This value is 4253 populated if an upstream router is not 4-octet capable. 4254 Its semantics are similar to the AS4_PATH optional 4255 transitive attribute"; 4256 reference 4257 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4258 } 4259 leaf address { 4260 type inet:ipv4-address; 4261 description 4262 "IP address of the router that performed the 4263 aggregation."; 4264 } 4265 } 4266 container as-path { 4267 description 4268 "Enclosing container for the list of AS path segments. 4270 In the Adj-RIB-In or Adj-RIB-Out, this list should show 4271 the received or sent AS_PATH, respectively. For 4272 example, if the local router is not 4-byte capable, this 4273 value should consist of 2-octet ASNs or the AS_TRANS 4274 (AS 23456) values received or sent in route updates. 4276 In the Loc-RIB, this list should reflect the effective 4277 AS path for the route, e.g., a 4-octet value if the 4278 local router is 4-octet capable."; 4279 reference 4280 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4) 4281 RFC 6793 - BGP Support for Four-octet AS Number Space 4282 RFC 5065 - Autonomous System Confederations for BGP"; 4283 list segment { 4284 key "index"; 4285 config false; 4286 uses bgp-as-path-attr; 4287 description 4288 "List of AS PATH segments"; 4290 } 4291 } 4292 container as4-path { 4293 description 4294 "This is the path encoded with 4-octet 4295 AS numbers in the optional transitive AS4_PATH attribute. 4296 This value is populated with the received or sent 4297 attribute in Adj-RIB-In or Adj-RIB-Out, respectively. 4298 It should not be populated in Loc-RIB since the Loc-RIB 4299 is expected to store the effective AS-Path in the 4300 as-path leaf regardless of being 4-octet or 2-octet."; 4301 reference 4302 "RFC 6793 - BGP Support for Four-octet AS Number Space"; 4303 list segment { 4304 key "index"; 4305 config false; 4306 uses bgp-as-path-attr; 4307 description 4308 "List of AS PATH segments"; 4309 } 4310 } 4311 } 4312 } 4314 grouping attr-set { 4315 description 4316 "A grouping for all path attributes."; 4318 list attr-set { 4319 key "index"; 4320 description 4321 "List of path attributes that may be in use by multiple 4322 routes in the table"; 4323 leaf index { 4324 type uint64; 4325 description 4326 "System generated index for each attribute set. The 4327 index is used to reference an attribute set from a 4328 specific path. Multiple paths may reference the same 4329 attribute set."; 4330 } 4331 uses attr-set-attributes; 4332 } 4333 } 4335 grouping attr-sets { 4336 description 4337 "A grouping for all sets of path attributes."; 4339 container attr-sets { 4340 description 4341 "Enclosing container for the list of path attribute sets"; 4342 uses attr-set; 4343 } 4344 } 4346 grouping ext-community-attributes { 4347 description 4348 "A grouping for all external community parameters."; 4350 leaf-list ext-community { 4351 type rt:route-target; 4352 description 4353 "List of BGP extended community attributes. The received 4354 extended community may be an explicitly modeled 4355 type or unknown, represented by an 8-octet value 4356 formatted according to RFC 4360."; 4357 reference 4358 "RFC 4360 - BGP Extended Communities Attribute"; 4359 } 4360 } 4362 grouping rib { 4363 description 4364 "Grouping for rib."; 4365 container rib { 4366 config false; 4367 uses attr-sets; 4368 container communities { 4369 description 4370 "Enclosing container for the list of community attribute 4371 sets"; 4372 list community { 4373 key "index"; 4374 config false; 4375 description 4376 "List of path attributes that may be in use by multiple 4377 routes in the table"; 4378 leaf index { 4379 type uint64; 4380 description 4381 "System generated index for each attribute set. The 4382 index is used to reference an attribute set from a 4383 specific path. Multiple paths may reference the same 4384 attribute set."; 4385 } 4386 uses bgp-community-attr-state; 4388 } 4389 } 4390 container ext-communities { 4391 description 4392 "Enclosing container for the list of extended community 4393 attribute sets"; 4394 list ext-community { 4395 key "index"; 4396 config false; 4397 description 4398 "List of path attributes that may be in use by multiple 4399 routes in the table"; 4400 leaf index { 4401 type uint64; 4402 description 4403 "System generated index for each attribute set. The 4404 index is used to reference an attribute set from a 4405 specific path. Multiple paths may reference the same 4406 attribute set."; 4407 } 4408 uses ext-community-attributes; 4409 } 4410 } 4412 container afi-safis { 4413 config false; 4414 description 4415 "Enclosing container for address family list"; 4416 list afi-safi { 4417 key "afi-safi-name"; 4418 description 4419 "List of afi-safi types."; 4420 leaf afi-safi-name { 4421 type identityref { 4422 base bt:afi-safi-type; 4423 } 4424 description 4425 "AFI,SAFI name."; 4426 } 4427 container ipv4-unicast { 4428 when "../afi-safi-name = 'bt:ipv4-unicast'" { 4429 description 4430 "Include this container for IPv4 unicast RIB"; 4431 } 4432 description 4433 "Routing tables for IPv4 unicast -- active when the 4434 afi-safi name is ipv4-unicast"; 4435 uses ipv4-loc-rib; 4436 uses ipv4-adj-rib; 4437 } 4438 container ipv6-unicast { 4439 when "../afi-safi-name = 'bt:ipv6-unicast'" { 4440 description 4441 "Include this container for IPv6 unicast RIB"; 4442 } 4443 description 4444 "Routing tables for IPv6 unicast -- active when the 4445 afi-safi name is ipv6-unicast"; 4446 uses ipv6-loc-rib; 4447 uses ipv6-adj-rib; 4448 } 4449 } 4450 } 4451 description 4452 "Top level container for BGP RIB"; 4453 } 4454 } 4455 } 4456 4458 file "ietf-bgp-rib-ext@2020-06-28.yang" 4459 submodule ietf-bgp-rib-ext { 4460 yang-version 1.1; 4461 belongs-to ietf-bgp { 4462 prefix bre; 4463 } 4465 include ietf-bgp-rib-types; 4467 organization 4468 "IETF IDR Working Group"; 4469 contact 4470 "WG Web: 4471 WG List: 4473 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4474 Keyur Patel (keyur at arrcus.com), 4475 Susan Hares (shares at ndzh.com), 4476 Jeffrey Haas (jhaas at pfrc.org)."; 4477 description 4478 "Defines additional data nodes for the BGP RIB model. 4479 These items reflect extensions that are desirable features but 4480 are not currently supported in a majority of BGP 4481 implementations. 4483 Copyright (c) 2019 IETF Trust and the persons identified as 4484 authors of the code. All rights reserved. 4486 Redistribution and use in source and binary forms, with or 4487 without modification, is permitted pursuant to, and subject to 4488 the license terms contained in, the Simplified BSD License set 4489 forth in Section 4.c of the IETF Trust's Legal Provisions 4490 Relating to IETF Documents 4491 (https://trustee.ietf.org/license-info). 4493 This version of this YANG module is part of RFC XXXX 4494 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4495 for full legal notices. 4497 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4498 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4499 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4500 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4501 they appear in all capitals, as shown here."; 4503 revision 2020-06-28 { 4504 description 4505 "Initial Revision."; 4506 reference 4507 "RFC XXXX: BGP YANG Model for Service Providers."; 4508 } 4510 grouping rib-ext-route-annotations { 4511 description 4512 "Extended annotations for routes in the routing tables"; 4513 leaf reject-reason { 4514 type union { 4515 type identityref { 4516 base bgp-not-selected-bestpath; 4517 } 4518 type identityref { 4519 base bgp-not-selected-policy; 4520 } 4521 } 4522 description 4523 "Indicates the reason the route is not used, either due to 4524 policy filtering or bestpath selection"; 4525 } 4526 } 4527 } 4528 4529 file "ietf-bgp-rib-types@2020-06-28.yang" 4530 submodule ietf-bgp-rib-types { 4531 yang-version 1.1; 4532 belongs-to ietf-bgp { 4533 prefix br; 4534 } 4536 organization 4537 "IETF IDR Working Group"; 4538 contact 4539 "WG Web: 4540 WG List: 4542 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4543 Keyur Patel (keyur at arrcus.com), 4544 Susan Hares (shares at ndzh.com), 4545 Jeffrey Haas (jhaas at pfrc.org)."; 4546 description 4547 "Defines identity and type definitions associated with 4548 the BGP RIB modules. 4550 Copyright (c) 2019 IETF Trust and the persons identified as 4551 authors of the code. All rights reserved. 4553 Redistribution and use in source and binary forms, with or 4554 without modification, is permitted pursuant to, and subject to 4555 the license terms contained in, the Simplified BSD License set 4556 forth in Section 4.c of the IETF Trust's Legal Provisions 4557 Relating to IETF Documents 4558 (https://trustee.ietf.org/license-info). 4560 This version of this YANG module is part of RFC XXXX 4561 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4562 for full legal notices. 4564 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4565 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4566 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4567 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4568 they appear in all capitals, as shown here."; 4570 revision 2020-06-28 { 4571 description 4572 "Initial Version"; 4573 reference 4574 "RFC XXXX, BGP Model for Service Provider Network."; 4575 } 4576 identity invalid-route-reason { 4577 description 4578 "Base identity for reason code for routes that are rejected as 4579 invalid. Some derived entities are based on BMP v3"; 4580 reference 4581 "RFC 7854: BGP Monitoring Protocol."; 4582 } 4584 identity invalid-cluster-loop { 4585 base invalid-route-reason; 4586 description 4587 "Route was invalid due to CLUSTER_LIST loop"; 4588 } 4590 identity invalid-as-loop { 4591 base invalid-route-reason; 4592 description 4593 "Route was invalid due to AS_PATH loop"; 4594 } 4596 identity invalid-originator { 4597 base invalid-route-reason; 4598 description 4599 "Route was invalid due to ORIGINATOR_ID, e.g., update has 4600 local router as originator"; 4601 } 4603 identity invalid-confed { 4604 base invalid-route-reason; 4605 description 4606 "Route was invalid due to a loop in the AS_CONFED_SEQUENCE or 4607 AS_CONFED_SET attributes"; 4608 } 4610 identity bgp-not-selected-bestpath { 4611 description 4612 "Base identity for indicating reason a route was was not 4613 selected by BGP route selection algorithm"; 4614 reference 4615 "RFC 4271 - Section 9.1"; 4616 } 4618 identity local-pref-lower { 4619 base bgp-not-selected-bestpath; 4620 description 4621 "Route has a lower localpref attribute than current best path"; 4622 reference 4623 "RFC 4271 - Section 9.1.2"; 4625 } 4627 identity as-path-longer { 4628 base bgp-not-selected-bestpath; 4629 description 4630 "Route has a longer AS path attribute than current best path"; 4631 reference 4632 "RFC 4271 - Section 9.1.2.2 (a)"; 4633 } 4635 identity origin-type-higher { 4636 base bgp-not-selected-bestpath; 4637 description 4638 "Route has a higher origin type, i.e., IGP origin is preferred 4639 over EGP or incomplete"; 4640 reference 4641 "RFC 4271 - Section 9.1.2.2 (b)"; 4642 } 4644 identity med-higher { 4645 base bgp-not-selected-bestpath; 4646 description 4647 "Route has a higher MED, or metric, attribute than the current 4648 best path"; 4649 reference 4650 "RFC 4271 - Section 9.1.2.2 (c)"; 4651 } 4653 identity prefer-external { 4654 base bgp-not-selected-bestpath; 4655 description 4656 "Route source is via IGP, rather than EGP."; 4657 reference 4658 "RFC 4271 - Section 9.1.2.2 (d)"; 4659 } 4661 identity nexthop-cost-higher { 4662 base bgp-not-selected-bestpath; 4663 description 4664 "Route has a higher interior cost to the next hop."; 4665 reference 4666 "RFC 4271 - Section 9.1.2.2 (e)"; 4667 } 4669 identity higher-router-id { 4670 base bgp-not-selected-bestpath; 4671 description 4672 "Route was sent by a peer with a higher BGP Identifier value, 4673 or router id"; 4674 reference 4675 "RFC 4271 - Section 9.1.2.2 (f)"; 4676 } 4678 identity higher-peer-address { 4679 base bgp-not-selected-bestpath; 4680 description 4681 "Route was sent by a peer with a higher IP address"; 4682 reference 4683 "RFC 4271 - Section 9.1.2.2 (g)"; 4684 } 4686 identity bgp-not-selected-policy { 4687 description 4688 "Base identity for reason code for routes that are rejected 4689 due to policy"; 4690 } 4692 identity rejected-import-policy { 4693 base bgp-not-selected-policy; 4694 description 4695 "Route was rejected after apply import policies"; 4696 } 4697 } 4698 4700 file "ietf-bgp-rib-attributes@2020-06-28.yang" 4701 submodule ietf-bgp-rib-attributes { 4702 yang-version 1.1; 4703 belongs-to ietf-bgp { 4704 prefix br; 4705 } 4707 // import some basic types 4709 import ietf-bgp-types { 4710 prefix bgpt; 4711 } 4712 import ietf-inet-types { 4713 prefix inet; 4714 } 4715 include ietf-bgp-rib-types; 4717 // meta 4719 organization 4720 "IETF IDR Working Group"; 4721 contact 4722 "WG Web: 4723 WG List: 4725 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4726 Keyur Patel (keyur at arrcus.com), 4727 Susan Hares (shares at ndzh.com)"; 4728 description 4729 "This submodule contains common data definitions for BGP 4730 attributes for use in BGP RIB tables. 4732 Copyright (c) 2019 IETF Trust and the persons identified as 4733 authors of the code. All rights reserved. 4735 Redistribution and use in source and binary forms, with or 4736 without modification, is permitted pursuant to, and subject to 4737 the license terms contained in, the Simplified BSD License set 4738 forth in Section 4.c of the IETF Trust's Legal Provisions 4739 Relating to IETF Documents 4740 (https://trustee.ietf.org/license-info). 4742 This version of this YANG module is part of RFC XXXX 4743 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4744 for full legal notices. 4746 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4747 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4748 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4749 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4750 they appear in all capitals, as shown here."; 4752 revision 2020-06-28 { 4753 description 4754 "Initial version"; 4755 reference 4756 "RFC XXXX: BGP YANG Model for Service Provider Network"; 4757 } 4759 grouping bgp-as-path-attr { 4760 description 4761 "Data for representing BGP AS-PATH attribute"; 4762 leaf index { 4763 type uint16; 4764 description 4765 "An index into the AS segments."; 4766 } 4767 leaf type { 4768 type identityref { 4769 base bgpt:as-path-segment-type; 4770 } 4771 description 4772 "The type of AS-PATH segment"; 4773 } 4774 leaf-list member { 4775 type inet:as-number; 4776 description 4777 "List of the AS numbers in the AS-PATH segment"; 4778 } 4779 } 4781 grouping bgp-community-attr-state { 4782 description 4783 "Common definition of BGP community attributes"; 4784 leaf-list community { 4785 type union { 4786 type bgpt:bgp-well-known-community-type; 4787 type bgpt:bgp-std-community-type; 4788 } 4789 description 4790 "List of standard or well-known BGP community 4791 attributes."; 4792 } 4793 } 4795 grouping bgp-unknown-attr-flags-state { 4796 description 4797 "Operational state data for path attribute flags"; 4798 leaf optional { 4799 type boolean; 4800 description 4801 "Defines whether the attribute is optional (if 4802 set to true) or well-known (if set to false). 4803 Set in the high-order bit of the BGP attribute 4804 flags octet."; 4805 reference 4806 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4807 } 4808 leaf transitive { 4809 type boolean; 4810 description 4811 "Defines whether an optional attribute is transitive 4812 (if set to true) or non-transitive (if set to false). For 4813 well-known attributes, the transitive flag must be set to 4814 true. Set in the second high-order bit of the BGP attribute 4815 flags octet."; 4817 reference 4818 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4819 } 4820 leaf partial { 4821 type boolean; 4822 description 4823 "Defines whether the information contained in the optional 4824 transitive attribute is partial (if set to true) or complete 4825 (if set to false). For well-known attributes and for 4826 optional non-transitive attributes, the partial flag 4827 must be set to false. Set in the third high-order bit of 4828 the BGP attribute flags octet."; 4829 reference 4830 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4831 } 4832 leaf extended { 4833 type boolean; 4834 description 4835 "Defines whether the attribute length is one octet 4836 (if set to false) or two octets (if set to true). Set in 4837 the fourth high-order bit of the BGP attribute flags 4838 octet."; 4839 reference 4840 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4841 } 4842 } 4844 grouping bgp-unknown-attr-state { 4845 description 4846 "Operational state data for path attributes not shared 4847 across route entries, common to LOC-RIB and Adj-RIB"; 4848 leaf attr-type { 4849 type uint8; 4850 description 4851 "1-octet value encoding the attribute type code"; 4852 reference 4853 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4854 } 4855 leaf attr-len { 4856 type uint16; 4857 description 4858 "One or two octet attribute length field indicating the 4859 length of the attribute data in octets. If the Extended 4860 Length attribute flag is set, the length field is 2 octets, 4861 otherwise it is 1 octet"; 4862 reference 4863 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4864 } 4865 leaf attr-value { 4866 type binary { 4867 length "0..65535"; 4868 } 4869 description 4870 "Raw attribute value, not including the attribute 4871 flags, type, or length. The maximum length 4872 of the attribute value data is 2^16-1 per the max value 4873 of the attr-len field (2 octets)."; 4874 reference 4875 "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; 4876 } 4877 } 4879 grouping bgp-unknown-attr-top { 4880 description 4881 "Unknown path attributes that are not expected to be shared 4882 across route entries, common to LOC-RIB and Adj-RIB"; 4883 container unknown-attributes { 4884 description 4885 "Unknown path attributes that were received in the UPDATE 4886 message which contained the prefix."; 4887 list unknown-attribute { 4888 key "attr-type"; 4889 description 4890 "This list contains received attributes that are unrecognized 4891 or unsupported by the local router. The list may be empty."; 4892 uses bgp-unknown-attr-flags-state; 4893 uses bgp-unknown-attr-state; 4894 } 4895 } 4896 } 4898 grouping bgp-loc-rib-attr-state { 4899 description 4900 "Path attributes that are not expected to be shared across 4901 route entries, specific to LOC-RIB"; 4902 } 4904 grouping bgp-adj-rib-attr-state { 4905 description 4906 "Path attributes that are not expected to be shared across 4907 route entries, specific to Adj-RIB"; 4908 leaf path-id { 4909 type uint32; 4910 description 4911 "When the BGP speaker supports advertisement of multiple 4912 paths for a prefix, the path identifier is used to 4913 uniquely identify a route based on the combination of the 4914 prefix and path id. In the Adj-RIB-In, the path-id value is 4915 the value received in the update message. In the Loc-RIB, 4916 if used, it should represent a locally generated path-id 4917 value for the corresponding route. In Adj-RIB-Out, it 4918 should be the value sent to a neighbor when add-paths is 4919 used, i.e., the capability has been negotiated."; 4920 reference 4921 "RFC 7911: Advertisement of Multiple Paths in BGP"; 4922 } 4923 } 4924 } 4925 4927 file "ietf-bgp-rib-table-attributes@2020-06-28.yang" 4928 submodule ietf-bgp-rib-table-attributes { 4929 yang-version 1.1; 4930 belongs-to ietf-bgp { 4931 prefix br; 4932 } 4934 // import some basic types 4936 import ietf-yang-types { 4937 prefix types; 4938 reference 4939 "RFC 6991, Common YANG Data Types."; 4940 } 4941 include ietf-bgp-rib-types; 4943 organization 4944 "IETF IDR Working Group"; 4945 contact 4946 "WG Web: 4947 WG List: 4949 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 4950 Keyur Patel (keyur at arrcus.com), 4951 Susan Hares (shares at ndzh.com"; 4952 description 4953 "This submodule contains common data definitions for data 4954 related to a RIB entry, or RIB table. 4956 Copyright (c) 2019 IETF Trust and the persons identified as 4957 authors of the code. All rights reserved. 4959 Redistribution and use in source and binary forms, with or 4960 without modification, is permitted pursuant to, and subject to 4961 the license terms contained in, the Simplified BSD License set 4962 forth in Section 4.c of the IETF Trust's Legal Provisions 4963 Relating to IETF Documents 4964 (https://trustee.ietf.org/license-info). 4966 This version of this YANG module is part of RFC XXXX 4967 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 4968 for full legal notices. 4970 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 4971 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 4972 'MAY', and 'OPTIONAL' in this document are to be interpreted as 4973 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 4974 they appear in all capitals, as shown here."; 4976 revision 2020-06-28 { 4977 description 4978 "Initial version."; 4979 reference 4980 "RFC XXXX: BGP YANG Model for Service Provider Network."; 4981 } 4983 grouping bgp-common-route-annotations-state { 4984 description 4985 "Data definitions for flags and other information attached 4986 to routes in both LOC-RIB and Adj-RIB"; 4987 leaf last-modified { 4988 type types:timeticks; 4989 description 4990 "Timestamp when this path was last modified. 4992 The value is the timestamp in seconds relative to 4993 the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; 4994 } 4995 leaf valid-route { 4996 type boolean; 4997 description 4998 "Indicates that the route is considered valid by the 4999 local router"; 5000 } 5001 leaf invalid-reason { 5002 type identityref { 5003 base invalid-route-reason; 5004 } 5005 description 5006 "If the route is rejected as invalid, this indicates the 5007 reason."; 5009 } 5010 } 5012 grouping bgp-loc-rib-route-annotations-state { 5013 description 5014 "Data definitions for information attached to routes in the 5015 LOC-RIB"; 5016 // placeholder for route metadata specific to the LOC-RIB 5017 } 5019 grouping bgp-adj-rib-in-post-route-annotations-state { 5020 description 5021 "Data definitions for information attached to routes in the 5022 Adj-RIB-in post-policy table"; 5023 leaf best-path { 5024 type boolean; 5025 description 5026 "Current path was selected as the best path."; 5027 } 5028 } 5030 grouping bgp-common-table-attrs-state { 5031 description 5032 "Common attributes attached to all routing tables"; 5033 // placeholder for metadata associated with all tables 5034 } 5036 grouping bgp-common-table-attrs-top { 5037 // no enclosing container as this data will fit under an 5038 // existing LOC-RIB container 5039 uses bgp-common-table-attrs-state; 5040 description 5041 "Operational state data for data related to the entire 5042 LOC-RIB"; 5043 } 5044 } 5045 5047 file "ietf-bgp-rib-tables@2020-06-28.yang" 5048 submodule ietf-bgp-rib-tables { 5049 yang-version 1.1; 5050 belongs-to ietf-bgp { 5051 prefix br; 5052 } 5054 // import some basic types 5055 import ietf-inet-types { 5056 prefix inet; 5057 reference 5058 "RFC 6991: Common YANG Data Types."; 5059 } 5060 import ietf-yang-types { 5061 prefix yang; 5062 reference 5063 "RFC 6991: Common YANG Data Types."; 5064 } 5065 import ietf-routing { 5066 prefix rt; 5067 reference 5068 "RFC 8022: A YANG Data Model for Routing Management"; 5069 } 5070 import ietf-bgp-types { 5071 prefix bt; 5072 reference 5073 "RFC XXXX: BGP YANG Model for Service Provider Network."; 5074 } 5075 include ietf-bgp-rib-ext; 5076 include ietf-bgp-rib-attributes; 5077 include ietf-bgp-rib-table-attributes; 5079 organization 5080 "IETF IDR Working Group"; 5081 contact 5082 "WG Web: 5083 WG List: 5085 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 5086 Authors: Keyur Patel, 5087 Mahesh Jethanandani, 5088 Susan Hares"; 5089 description 5090 "This submodule contains structural data definitions for 5091 BGP routing tables. 5093 Copyright (c) 2019 IETF Trust and the persons identified as 5094 authors of the code. All rights reserved. 5096 Redistribution and use in source and binary forms, with or 5097 without modification, is permitted pursuant to, and subject to 5098 the license terms contained in, the Simplified BSD License set 5099 forth in Section 4.c of the IETF Trust's Legal Provisions 5100 Relating to IETF Documents 5101 (https://trustee.ietf.org/license-info). 5103 This version of this YANG module is part of RFC XXXX 5104 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 5105 for full legal notices. 5107 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 5108 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 5109 'MAY', and 'OPTIONAL' in this document are to be interpreted as 5110 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 5111 they appear in all capitals, as shown here."; 5113 revision 2020-06-28 { 5114 description 5115 "Initial Version"; 5116 reference 5117 "RFC XXXX, BGP YANG Model for Service Provider Network."; 5118 } 5120 grouping bgp-adj-rib-common-attr-refs { 5121 description 5122 "Definitions of common references to attribute sets for 5123 multiple AFI-SAFIs for Adj-RIB tables"; 5124 leaf attr-index { 5125 type leafref { 5126 path "../../../../../../../../../attr-sets/" 5127 + "attr-set/index"; 5128 } 5129 description 5130 "Reference to the common attribute group for the 5131 route"; 5132 } 5133 leaf community-index { 5134 type leafref { 5135 path "../../../../../../../../../communities/community/" 5136 + "index"; 5137 } 5138 description 5139 "Reference to the community attribute for the route"; 5140 } 5141 leaf ext-community-index { 5142 type leafref { 5143 path "../../../../../../../../../ext-communities/" 5144 + "ext-community/index"; 5145 } 5146 description 5147 "Reference to the extended community attribute for the 5148 route"; 5149 } 5150 } 5151 grouping bgp-loc-rib-common-attr-refs { 5152 description 5153 "Definitions of common references to attribute sets for 5154 multiple AFI-SAFIs for LOC-RIB tables"; 5155 leaf attr-index { 5156 type leafref { 5157 path "../../../../../../../attr-sets/attr-set/" 5158 + "index"; 5159 } 5160 description 5161 "Reference to the common attribute group for the 5162 route"; 5163 } 5164 leaf community-index { 5165 type leafref { 5166 path "../../../../../../../communities/community/" 5167 + "index"; 5168 } 5169 description 5170 "Reference to the community attribute for the route"; 5171 } 5172 leaf ext-community-index { 5173 type leafref { 5174 path "../../../../../../../ext-communities/" 5175 + "ext-community/index"; 5176 } 5177 description 5178 "Reference to the extended community attribute for the 5179 route"; 5180 } 5181 } 5183 grouping bgp-loc-rib-common-keys { 5184 description 5185 "Common references used in keys for IPv4 and IPv6 5186 LOC-RIB entries"; 5187 leaf origin { 5188 type union { 5189 type inet:ip-address; 5190 type identityref { 5191 base rt:routing-protocol; 5192 } 5193 } 5194 description 5195 "Indicates the origin of the route. If the route is learned 5196 from a neighbor, this value is the neighbor address. If 5197 the route was injected or redistributed from another 5198 protocol, the origin indicates the source protocol for the 5199 route."; 5200 } 5201 leaf path-id { 5202 type uint32; 5203 description 5204 "If the route is learned from a neighbor, the path-id 5205 corresponds to the path-id for the route in the 5206 corresponding adj-rib-in-post table. If the route is 5207 injected from another protocol, or the neighbor does not 5208 support BGP add-paths, the path-id should be set 5209 to zero, also the default value. 5211 However, YANG does not allow default values to be set 5212 for parameters that form the key, so a default value 5213 cannot be set here."; 5214 } 5215 } 5217 grouping clear-routes { 5218 description 5219 "Action to clear BGP routes."; 5220 container clear-routes { 5221 if-feature "bt:clear-routes"; 5222 action clear { 5223 input { 5224 leaf clear-at { 5225 type yang:date-and-time; 5226 description 5227 "The time, in the future when the clear operation will 5228 be initiated."; 5229 } 5230 } 5231 output { 5232 leaf clear-finished-at { 5233 type yang:date-and-time; 5234 description 5235 "The time when the clear operation finished."; 5236 } 5237 } 5238 } 5239 description 5240 "Action commands to clear routes governed by a if-feature."; 5241 } 5242 } 5244 grouping ipv4-loc-rib { 5245 description 5246 "Top-level grouping for IPv4 routing tables"; 5248 container loc-rib { 5249 config false; 5250 description 5251 "Container for the IPv4 BGP LOC-RIB data"; 5252 uses bgp-common-table-attrs-top; 5253 container routes { 5254 description 5255 "Enclosing container for list of routes in the routing 5256 table."; 5257 list route { 5258 key "prefix origin path-id"; 5259 description 5260 "List of routes in the table, keyed by the route 5261 prefix, the route origin, and path-id. The route 5262 origin can be either the neighbor address from which 5263 the route was learned, or the source protocol that 5264 injected the route. The path-id distinguishes routes 5265 for the same prefix received from a neighbor (e.g., 5266 if add-paths is enabled)."; 5267 leaf prefix { 5268 type inet:ipv4-prefix; 5269 description 5270 "The IPv4 prefix corresponding to the route"; 5271 } 5272 uses bgp-loc-rib-common-keys; 5273 uses bgp-loc-rib-common-attr-refs; 5274 uses bgp-loc-rib-attr-state; 5275 uses bgp-common-route-annotations-state; 5276 uses bgp-loc-rib-route-annotations-state; 5277 uses bgp-unknown-attr-top; 5278 uses rib-ext-route-annotations; 5279 } 5280 uses clear-routes; 5281 } 5282 } 5283 } 5285 grouping ipv6-loc-rib { 5286 description 5287 "Top-level grouping for IPv6 routing tables"; 5288 container loc-rib { 5289 config false; 5290 description 5291 "Container for the IPv6 BGP LOC-RIB data"; 5292 uses bgp-common-table-attrs-top; 5293 container routes { 5294 description 5295 "Enclosing container for list of routes in the routing 5296 table."; 5297 list route { 5298 key "prefix origin path-id"; 5299 description 5300 "List of routes in the table, keyed by the route 5301 prefix, the route origin, and path-id. The route 5302 origin can be either the neighbor address from which 5303 the route was learned, or the source protocol that 5304 injected the route. The path-id distinguishes routes 5305 for the same prefix received from a neighbor (e.g., 5306 if add-paths is enabled)."; 5307 leaf prefix { 5308 type inet:ipv6-prefix; 5309 description 5310 "The IPv6 prefix corresponding to the route"; 5311 } 5312 uses bgp-loc-rib-common-keys; 5313 uses bgp-loc-rib-common-attr-refs; 5314 uses bgp-loc-rib-attr-state; 5315 uses bgp-common-route-annotations-state; 5316 uses bgp-loc-rib-route-annotations-state; 5317 uses bgp-unknown-attr-top; 5318 uses rib-ext-route-annotations; 5319 } 5320 uses clear-routes; 5321 } 5322 } 5323 } 5325 grouping ipv4-adj-rib-common { 5326 description 5327 "Common structural grouping for each IPv4 adj-RIB table"; 5328 uses bgp-common-table-attrs-top; 5329 container routes { 5330 config false; 5331 description 5332 "Enclosing container for list of routes in the routing 5333 table."; 5334 list route { 5335 key "prefix path-id"; 5336 description 5337 "List of routes in the table, keyed by a combination of 5338 the route prefix and path-id to distinguish multiple 5339 routes received from a neighbor for the same prefix, 5340 e.g., when BGP add-paths is enabled."; 5341 leaf prefix { 5342 type inet:ipv4-prefix; 5343 description 5344 "Prefix for the route"; 5345 } 5346 uses bgp-adj-rib-attr-state; 5347 uses bgp-adj-rib-common-attr-refs; 5348 uses bgp-common-route-annotations-state; 5349 uses bgp-unknown-attr-top; 5350 uses rib-ext-route-annotations; 5351 } 5352 uses clear-routes; 5353 } 5354 } 5356 grouping ipv4-adj-rib-in-post { 5357 description 5358 "Common structural grouping for the IPv4 adj-rib-in 5359 post-policy table"; 5360 uses bgp-common-table-attrs-top; 5361 container routes { 5362 config false; 5363 description 5364 "Enclosing container for list of routes in the routing 5365 table."; 5366 list route { 5367 key "prefix path-id"; 5368 description 5369 "List of routes in the table, keyed by a combination of 5370 the route prefix and path-id to distinguish multiple 5371 routes received from a neighbor for the same prefix, 5372 e.g., when BGP add-paths is enabled."; 5373 leaf prefix { 5374 type inet:ipv4-prefix; 5375 description 5376 "Prefix for the route"; 5377 } 5378 uses bgp-adj-rib-attr-state; 5379 uses bgp-adj-rib-common-attr-refs; 5380 uses bgp-common-route-annotations-state; 5381 uses bgp-adj-rib-in-post-route-annotations-state; 5382 uses bgp-unknown-attr-top; 5383 uses rib-ext-route-annotations; 5384 } 5385 } 5386 } 5388 grouping ipv4-adj-rib { 5389 description 5390 "Top-level grouping for Adj-RIB table"; 5391 container neighbors { 5392 config false; 5393 description 5394 "Enclosing container for neighbor list"; 5395 list neighbor { 5396 key "neighbor-address"; 5397 description 5398 "List of neighbors (peers) of the local BGP speaker"; 5399 leaf neighbor-address { 5400 type inet:ip-address; 5401 description 5402 "IP address of the BGP neighbor or peer"; 5403 } 5404 container adj-rib-in-pre { 5405 description 5406 "Per-neighbor table containing the NLRI updates 5407 received from the neighbor before any local input 5408 policy rules or filters have been applied. This can 5409 be considered the 'raw' updates from the neighbor."; 5410 uses ipv4-adj-rib-common; 5411 } 5412 container adj-rib-in-post { 5413 description 5414 "Per-neighbor table containing the paths received from 5415 the neighbor that are eligible for best-path selection 5416 after local input policy rules have been applied."; 5417 uses ipv4-adj-rib-in-post; 5418 } 5419 container adj-rib-out-pre { 5420 description 5421 "Per-neighbor table containing paths eligble for 5422 sending (advertising) to the neighbor before output 5423 policy rules have been applied"; 5424 uses ipv4-adj-rib-common; 5425 } 5426 container adj-rib-out-post { 5427 description 5428 "Per-neighbor table containing paths eligble for 5429 sending (advertising) to the neighbor after output 5430 policy rules have been applied"; 5431 uses ipv4-adj-rib-common; 5432 } 5433 } 5434 } 5435 } 5437 grouping ipv6-adj-rib-common { 5438 description 5439 "Common structural grouping for each IPv6 adj-RIB table"; 5441 uses bgp-common-table-attrs-state; 5442 container routes { 5443 config false; 5444 description 5445 "Enclosing container for list of routes in the routing 5446 table."; 5447 list route { 5448 key "prefix path-id"; 5449 description 5450 "List of routes in the table"; 5451 leaf prefix { 5452 type inet:ipv6-prefix; 5453 description 5454 "Prefix for the route"; 5455 } 5456 uses bgp-adj-rib-attr-state; 5457 uses bgp-adj-rib-common-attr-refs; 5458 uses bgp-common-route-annotations-state; 5459 uses bgp-unknown-attr-top; 5460 uses rib-ext-route-annotations; 5461 } 5462 uses clear-routes; 5463 } 5464 } 5466 grouping ipv6-adj-rib-in-post { 5467 description 5468 "Common structural grouping for the IPv6 adj-rib-in 5469 post-policy table"; 5470 uses bgp-common-table-attrs-state; 5471 container routes { 5472 config false; 5473 description 5474 "Enclosing container for list of routes in the routing 5475 table."; 5476 list route { 5477 key "prefix path-id"; 5478 description 5479 "List of routes in the table"; 5480 leaf prefix { 5481 type inet:ipv6-prefix; 5482 description 5483 "Prefix for the route"; 5484 } 5485 uses bgp-adj-rib-attr-state; 5486 uses bgp-adj-rib-common-attr-refs; 5487 uses bgp-common-route-annotations-state; 5488 uses bgp-adj-rib-in-post-route-annotations-state; 5489 uses bgp-unknown-attr-top; 5490 uses rib-ext-route-annotations; 5491 } 5492 } 5493 } 5495 grouping ipv6-adj-rib { 5496 description 5497 "Top-level grouping for Adj-RIB table"; 5498 container neighbors { 5499 config false; 5500 description 5501 "Enclosing container for neighbor list"; 5502 list neighbor { 5503 key "neighbor-address"; 5504 description 5505 "List of neighbors (peers) of the local BGP speaker"; 5506 leaf neighbor-address { 5507 type inet:ip-address; 5508 description 5509 "IP address of the BGP neighbor or peer"; 5510 } 5511 container adj-rib-in-pre { 5512 description 5513 "Per-neighbor table containing the NLRI updates 5514 received from the neighbor before any local input 5515 policy rules or filters have been applied. This can 5516 be considered the 'raw' updates from the neighbor."; 5517 uses ipv6-adj-rib-common; 5518 } 5519 container adj-rib-in-post { 5520 description 5521 "Per-neighbor table containing the paths received from 5522 the neighbor that are eligible for best-path selection 5523 after local input policy rules have been applied."; 5524 uses ipv6-adj-rib-in-post; 5525 } 5526 container adj-rib-out-pre { 5527 description 5528 "Per-neighbor table containing paths eligble for 5529 sending (advertising) to the neighbor before output 5530 policy rules have been applied"; 5531 uses ipv6-adj-rib-common; 5532 } 5533 container adj-rib-out-post { 5534 description 5535 "Per-neighbor table containing paths eligble for 5536 sending (advertising) to the neighbor after output 5537 policy rules have been applied"; 5538 uses ipv6-adj-rib-common; 5539 } 5540 } 5541 } 5542 } 5543 } 5544 5546 file "ietf-bgp-rib-table-attributes@2020-06-28.yang" 5547 submodule ietf-bgp-rib-table-attributes { 5548 yang-version 1.1; 5549 belongs-to ietf-bgp { 5550 prefix br; 5551 } 5553 // import some basic types 5555 import ietf-yang-types { 5556 prefix types; 5557 reference 5558 "RFC 6991, Common YANG Data Types."; 5559 } 5560 include ietf-bgp-rib-types; 5562 organization 5563 "IETF IDR Working Group"; 5564 contact 5565 "WG Web: 5566 WG List: 5568 Authors: Mahesh Jethanandani (mjethanandani at gmail.com), 5569 Keyur Patel (keyur at arrcus.com), 5570 Susan Hares (shares at ndzh.com"; 5571 description 5572 "This submodule contains common data definitions for data 5573 related to a RIB entry, or RIB table. 5575 Copyright (c) 2019 IETF Trust and the persons identified as 5576 authors of the code. All rights reserved. 5578 Redistribution and use in source and binary forms, with or 5579 without modification, is permitted pursuant to, and subject to 5580 the license terms contained in, the Simplified BSD License set 5581 forth in Section 4.c of the IETF Trust's Legal Provisions 5582 Relating to IETF Documents 5583 (https://trustee.ietf.org/license-info). 5585 This version of this YANG module is part of RFC XXXX 5586 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 5587 for full legal notices. 5589 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 5590 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 5591 'MAY', and 'OPTIONAL' in this document are to be interpreted as 5592 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 5593 they appear in all capitals, as shown here."; 5595 revision 2020-06-28 { 5596 description 5597 "Initial version."; 5598 reference 5599 "RFC XXXX: BGP YANG Model for Service Provider Network."; 5600 } 5602 grouping bgp-common-route-annotations-state { 5603 description 5604 "Data definitions for flags and other information attached 5605 to routes in both LOC-RIB and Adj-RIB"; 5606 leaf last-modified { 5607 type types:timeticks; 5608 description 5609 "Timestamp when this path was last modified. 5611 The value is the timestamp in seconds relative to 5612 the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; 5613 } 5614 leaf valid-route { 5615 type boolean; 5616 description 5617 "Indicates that the route is considered valid by the 5618 local router"; 5619 } 5620 leaf invalid-reason { 5621 type identityref { 5622 base invalid-route-reason; 5623 } 5624 description 5625 "If the route is rejected as invalid, this indicates the 5626 reason."; 5627 } 5628 } 5630 grouping bgp-loc-rib-route-annotations-state { 5631 description 5632 "Data definitions for information attached to routes in the 5633 LOC-RIB"; 5634 // placeholder for route metadata specific to the LOC-RIB 5635 } 5637 grouping bgp-adj-rib-in-post-route-annotations-state { 5638 description 5639 "Data definitions for information attached to routes in the 5640 Adj-RIB-in post-policy table"; 5641 leaf best-path { 5642 type boolean; 5643 description 5644 "Current path was selected as the best path."; 5645 } 5646 } 5648 grouping bgp-common-table-attrs-state { 5649 description 5650 "Common attributes attached to all routing tables"; 5651 // placeholder for metadata associated with all tables 5652 } 5654 grouping bgp-common-table-attrs-top { 5655 // no enclosing container as this data will fit under an 5656 // existing LOC-RIB container 5657 uses bgp-common-table-attrs-state; 5658 description 5659 "Operational state data for data related to the entire 5660 LOC-RIB"; 5661 } 5662 } 5663 5665 8. Contributors 5667 Previous versions of this document saw contributions from Anees 5668 Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr 5669 Zhadkin, and Xyfeng Liu. 5671 9. Acknowledgements 5673 The authors are grateful for valuable contributions to this document 5674 and the associated models from: Ebben Aires, Pavan Beeram, Chris 5675 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 5676 George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee 5677 Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- 5678 Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim 5679 Uttaro, and Gunter Vandevelde. 5681 Credit is also due to authors of the OpenConfig, whose model was 5682 relied upon to come up with this model. 5684 Special thanks to Robert Wilton who helped convert the YANG models to 5685 a NMDA compatible model. 5687 10. References 5689 10.1. Normative references 5691 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 5692 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 5693 . 5695 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5696 Requirement Levels", BCP 14, RFC 2119, 5697 DOI 10.17487/RFC2119, March 1997, 5698 . 5700 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 5701 Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November 5702 1998, . 5704 [RFC2918] Chen, E., "Route Refresh Capability for BGP-4", RFC 2918, 5705 DOI 10.17487/RFC2918, September 2000, 5706 . 5708 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 5709 DOI 10.17487/RFC3688, January 2004, 5710 . 5712 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 5713 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 5714 DOI 10.17487/RFC4271, January 2006, 5715 . 5717 [RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private 5718 Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February 5719 2006, . 5721 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 5722 Reflection: An Alternative to Full Mesh Internal BGP 5723 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 5724 . 5726 [RFC4659] De Clercq, J., Ooms, D., Carugi, M., and F. Le Faucheur, 5727 "BGP-MPLS IP Virtual Private Network (VPN) Extension for 5728 IPv6 VPN", RFC 4659, DOI 10.17487/RFC4659, September 2006, 5729 . 5731 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 5732 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 5733 DOI 10.17487/RFC4724, January 2007, 5734 . 5736 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 5737 "Multiprotocol Extensions for BGP-4", RFC 4760, 5738 DOI 10.17487/RFC4760, January 2007, 5739 . 5741 [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private 5742 LAN Service (VPLS) Using BGP for Auto-Discovery and 5743 Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, 5744 . 5746 [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 5747 System Confederations for BGP", RFC 5065, 5748 DOI 10.17487/RFC5065, August 2007, 5749 . 5751 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5752 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 5753 . 5755 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5756 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 5757 DOI 10.17487/RFC5881, June 2010, 5758 . 5760 [RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5761 (BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883, 5762 June 2010, . 5764 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 5765 the Network Configuration Protocol (NETCONF)", RFC 6020, 5766 DOI 10.17487/RFC6020, October 2010, 5767 . 5769 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 5770 and A. Bierman, Ed., "Network Configuration Protocol 5771 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 5772 . 5774 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 5775 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 5776 . 5778 [RFC6514] Aggarwal, R., Rosen, E., Morin, T., and Y. Rekhter, "BGP 5779 Encodings and Procedures for Multicast in MPLS/BGP IP 5780 VPNs", RFC 6514, DOI 10.17487/RFC6514, February 2012, 5781 . 5783 [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet 5784 Autonomous System (AS) Number Space", RFC 6793, 5785 DOI 10.17487/RFC6793, December 2012, 5786 . 5788 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 5789 Austein, "BGP Prefix Origin Validation", RFC 6811, 5790 DOI 10.17487/RFC6811, January 2013, 5791 . 5793 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 5794 RFC 6991, DOI 10.17487/RFC6991, July 2013, 5795 . 5797 [RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder, 5798 "Advertisement of Multiple Paths in BGP", RFC 7911, 5799 DOI 10.17487/RFC7911, July 2016, 5800 . 5802 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 5803 RFC 7950, DOI 10.17487/RFC7950, August 2016, 5804 . 5806 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 5807 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 5808 . 5810 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 5811 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 5812 May 2017, . 5814 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 5815 Zhang, "YANG Data Model for Key Chains", RFC 8177, 5816 DOI 10.17487/RFC8177, June 2017, 5817 . 5819 [RFC8277] Rosen, E., "Using BGP to Bind MPLS Labels to Address 5820 Prefixes", RFC 8277, DOI 10.17487/RFC8277, October 2017, 5821 . 5823 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 5824 Access Control Model", STD 91, RFC 8341, 5825 DOI 10.17487/RFC8341, March 2018, 5826 . 5828 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 5829 Routing Management (NMDA Version)", RFC 8349, 5830 DOI 10.17487/RFC8349, March 2018, 5831 . 5833 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 5834 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 5835 . 5837 [RFC8528] Bjorklund, M. and L. Lhotka, "YANG Schema Mount", 5838 RFC 8528, DOI 10.17487/RFC8528, March 2019, 5839 . 5841 [RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 5842 Liu, "YANG Data Model for Network Instances", RFC 8529, 5843 DOI 10.17487/RFC8529, March 2019, 5844 . 5846 10.2. Informative references 5848 [I-D.ietf-bfd-yang] 5849 Rahman, R., Zheng, L., Jethanandani, M., Pallagatti, S., 5850 and G. Mirsky, "YANG Data Model for Bidirectional 5851 Forwarding Detection (BFD)", draft-ietf-bfd-yang-17 (work 5852 in progress), August 2018. 5854 [I-D.ietf-rtgwg-policy-model] 5855 Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data 5856 Model for Routing Policy Management", draft-ietf-rtgwg- 5857 policy-model-16 (work in progress), June 2020. 5859 [RFC3765] Huston, G., "NOPEER Community for Border Gateway Protocol 5860 (BGP) Route Scope Control", RFC 3765, 5861 DOI 10.17487/RFC3765, April 2004, 5862 . 5864 [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C. 5865 Pignataro, "The Generalized TTL Security Mechanism 5866 (GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007, 5867 . 5869 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 5870 Authentication Option", RFC 5925, DOI 10.17487/RFC5925, 5871 June 2010, . 5873 [RFC7454] Durand, J., Pepelnjak, I., and G. Doering, "BGP Operations 5874 and Security", BCP 194, RFC 7454, DOI 10.17487/RFC7454, 5875 February 2015, . 5877 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 5878 and R. Wilton, "Network Management Datastore Architecture 5879 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 5880 . 5882 Appendix A. Examples 5884 This section tries to show some examples in how the model can be 5885 used. 5887 A.1. Creating BGP Instance 5889 This example shows how to enable BGP with the IPv4 unicast address 5890 family, while adding one network to advertise. 5892 [note: '\' line wrapping for formatting only] 5894 5895 5896 5898 5899 5900 bgpm:bgp 5902 5903 BGP 5904 5906 5907 64496 5908 5909 5910 5913 bt:ipv4-unicast 5914 5915 5916 5917 5918 5919 5920 5921 5922 5924 A.2. Neighbor Address Family Configuration 5926 This example shows how to configure a BGP peer, where the remote 5927 address is 192.0.2.1, the remote AS number is 64497, and the address 5928 family of the peer is IPv4 unicast. 5930 [note: '\' line wrapping for formatting only] 5932 5936 5937 5938 5940 5941 5942 bgp:bgp 5944 5945 name:BGP 5946 5948 5949 64496 5950 5951 5952 5955 bt:ipv4-unicast 5956 5957 5958 5959 5960 5961 5962 192.0.2.1 5963 64497 5964 5965 true 5966 4.0 5967 3.0 5968 15.0 5969 100 5970 500 5971 1000 5972 5973 "Peer Router B" 5974 5975 5976 5979 bt:ipv4-unicast 5980 5981 5982 5983 5984 5985 5986 5988 5989 5990 5992 A.3. IPv6 Neighbor Configuration 5994 This example shows how to configure a BGP peer, where the remote peer 5995 has a IPv6 address, uses TCP-AO to secure the session with the peer, 5996 and uses non-default timers for hold-time and keepalive. 5998 [note: '\' line wrapping for formatting only] 6000 6001 6002 6004 6005 bgp-key-chain 6006 6007 6008 6010 6011 6012 bgp:bgp 6014 6015 name:BGP 6016 6018 6019 64496 6020 6021 6022 6025 bt:ipv6-unicast 6026 6027 6028 6029 6030 6031 6032 2001:db8:: 6033 true 6034 true 6035 6036 bgp-key-chain 6037 6038 64497 6039 "Peer Router B" 6040 6041 120 6042 70 6043 6044 6045 6046 6049 bt:ipv6-unicast 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6061 A.4. VRF Configuration 6063 This example shows how BGP can be configured for two VRFs, red and 6064 blue. In this case, the two network instances share a common AS, and 6065 distinguish between the instances using the router id. 6067 [note: '\' line wrapping for formatting only] 6069 6070 6071 6073 6074 vrf-red 6075 6076 6078 192.0.2.1 6079 6080 6081 bgpm:bgp 6084 6085 BGP 6086 6088 6089 64496 6090 6091 6092 6095 bt:ipv4-unicast 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 vrf-blue 6108 6109 6111 192.0.2.2 6112 6113 6114 bgpm:bgp 6117 6118 BGP 6119 6121 6122 64496 6123 6124 6125 6128 bt:ipv4-unicast 6129 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6143 Appendix B. How to add a new AFI and Augment a Module 6145 This section explains how a new AFI can be defined in a new module 6146 and how that module can then be augmented. Assume that the new AFI 6147 being defined is called 'foo' which extends the base identity of 6148 'afi-safi-type', and the augmentation is to add a new container for 6149 'foo' under two different XPaths. The example shows how the base 6150 identity can be extended to add this new AFI, and then use the 6151 augmented containers be used to add 'foo' specific information. 6153 module example-newafi-bgp { 6154 yang-version 1.1; 6155 namespace "http://example.com/ns/example-newafi-bgp"; 6156 prefix example-newafi-bgp; 6158 import ietf-routing { 6159 prefix rt; 6160 reference 6161 "RFC 8349, A YANG Data Model for Routing Management 6162 (NMDA Version)"; 6163 } 6165 import ietf-bgp { 6166 prefix "bgp"; 6167 reference 6168 "RFC XXXX: BGP YANG module for Service Provider Network."; 6169 } 6171 import ietf-bgp-types { 6172 prefix "bt"; 6173 } 6175 organization 6176 "Newafi model group."; 6178 contact 6179 "abc@newafi.com"; 6180 description 6181 "This YANG module defines and uses new AFI."; 6183 revision 2020-06-28 { 6184 description 6185 "Creating new AFI and using in this model"; 6187 reference 6188 "RFC XXXX: BGP YANG Model for Service Provider Network."; 6189 } 6191 identity foo { 6192 base bt:afi-safi-type; 6193 description 6194 "New AFI type foo."; 6195 } 6197 augment "/rt:routing/rt:control-plane-protocols/" + 6198 "rt:control-plane-protocol/bgp:bgp/bgp:global/" + 6199 "bgp:afi-safis/bgp:afi-safi" { 6200 when "derived-from-or-self(bgp:afi-safi-name, 'foo')" { 6201 description 6202 "This augmentation is valid for a AFI/SAFI instance 6203 of 'foo'"; 6204 } 6205 container foo { 6206 description 6207 "Container to add 'foo' specific AFI/SAFI information."; 6208 } 6209 } 6211 augment "/rt:routing/rt:control-plane-protocols/" + 6212 "rt:control-plane-protocol/bgp:bgp/" + 6213 "bgp:rib/bgp:afi-safis/bgp:afi-safi" { 6214 when "derived-from-or-self(bgp:afi-safi-name, 'foo')" { 6215 description 6216 "This augmentation is valid for a AFI/SAFI instance 6217 of 'foo'"; 6218 } 6219 container foo { 6220 description 6221 "Container to add 'foo' rib specific information."; 6222 } 6223 } 6224 } 6226 Appendix C. How to deviate a module 6228 This example shows how the BGP can be deviated to indicate two nodes 6229 that the particular implementation is choosing not to support. 6231 module example-newco-bgp { 6232 yang-version 1.1; 6233 namespace "http://example.com/ns/example-newco-bgp"; 6234 prefix example-newco-bgp; 6236 import ietf-bgp { 6237 prefix "bgp"; 6238 } 6240 organization 6241 "Newco model group."; 6243 contact 6244 "abc@newco.com"; 6245 description 6246 "This YANG module deviates IETF BGP YANG module."; 6248 revision 2020-06-28 { 6249 description 6250 "Creating NewCo deviations to ietf-bgp model"; 6252 reference 6253 "RFC XXXX: BGP YANG module for Service Provider Network."; 6254 } 6256 deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + 6257 "bgp:restart-time" { 6258 deviate not-supported; 6259 } 6261 deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + 6262 "bgp:stale-route-time" { 6263 deviate not-supported; 6264 } 6265 } 6267 Authors' Addresses 6269 Mahesh Jethanandani 6270 Kloud Services 6272 Email: mjethanandani@gmail.com 6273 Keyur Patel 6274 Arrcus 6275 CA 6276 USA 6278 Email: keyur@arrcus.com 6280 Susan Hares 6281 Huawei 6282 7453 Hickory Hill 6283 Saline, MI 48176 6284 USA 6286 Email: shares@ndzh.com 6288 Jeffrey Haas 6289 Juniper Networks 6291 Email: jhaas@pfrc.org