idnits 2.17.1 draft-ietf-idr-bgp-model-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 8 instances of too long lines in the document, the longest one being 5 characters in excess of 72. == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1254 has weird spacing: '...unicast speci...' -- The document date (July 18, 2016) is 2831 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) ** Obsolete normative reference: RFC 3065 (Obsoleted by RFC 5065) == Outdated reference: A later version (-31) exists of draft-ietf-rtgwg-policy-model-01 == Outdated reference: A later version (-25) exists of draft-ietf-netmod-routing-cfg-22 == Outdated reference: A later version (-05) exists of draft-rtgyangdt-rtgwg-device-model-04 == Outdated reference: A later version (-01) exists of draft-talwar-rtgwg-grpc-use-cases-00 Summary: 2 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Interdomain Routing A. Shaikh, Ed. 3 Internet-Draft Google 4 Intended status: Standards Track R. Shakir, Ed. 5 Expires: January 19, 2017 Jive Communications 6 K. Patel, Ed. 7 Cisco 8 S. Hares, Ed. 9 Huawei 10 K. D'Souza 11 AT&T 12 D. Bansal 13 Microsoft 14 A. Clemm 15 A. Zhdankin 16 Cisco 17 M. Jethanandani 18 Cisco Systems, Inc 19 X. Liu 20 Ericsson 21 July 18, 2016 23 BGP Model for Service Provider Networks 24 draft-ietf-idr-bgp-model-02 26 Abstract 28 This document defines a YANG data model for configuring and managing 29 BGP, including protocol, policy, and operational aspects based on 30 data center, carrier and content provider operational requirements. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on January 19, 2017. 49 Copyright Notice 51 Copyright (c) 2016 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 67 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 68 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 4 69 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 5 70 2.2. Policy configuration overview . . . . . . . . . . . . . . 6 71 2.3. Operational state overview . . . . . . . . . . . . . . . 7 72 3. Relation to other YANG data models . . . . . . . . . . . . . 8 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 74 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 75 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 9 76 7. BGP main module and submodule for base items . . . . . . . . 9 77 8. BGP types . . . . . . . . . . . . . . . . . . . . . . . . . . 60 78 9. BGP policy data . . . . . . . . . . . . . . . . . . . . . . . 69 79 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 93 80 10.1. Normative references . . . . . . . . . . . . . . . . . . 93 81 10.2. Informative references . . . . . . . . . . . . . . . . . 95 82 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 95 83 Appendix B. Change summary . . . . . . . . . . . . . . . . . . . 96 84 B.1. Changes between revisions -01 and -02 . . . . . . . . . . 96 85 B.2. Changes between revisions -00 and -01 . . . . . . . . . . 96 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 96 88 1. Introduction 90 YANG [RFC6020] is a data modeling language that was introduced to 91 define data for managing networked devices using NETCONF [RFC6241]. 92 YANG is proving relevant beyond its initial confines, as bindings to 93 other interfaces (e.g. ReST) and encodings other than XML (e.g. 94 JSON) are being defined. Furthermore, YANG data models can be used 95 as the basis of implementation for a number of interfaces, such as 96 CLIs and programmatic APIs (e.g., see 97 [I-D.talwar-rtgwg-grpc-use-cases]). 99 This document describes a YANG data model for the BGP [RFC4271] 100 protocol, including various protocol extensions, policy 101 configuration, as well as defining key operational state data. The 102 model is intended to be vendor-neutral, in order to allow operators 103 to manage BGP configuration in heterogeneous environments with 104 routers supplied by multiple vendors. The model is also intended to 105 be readily mapped to existing implementations to facilitate support 106 from as large a set of routing hardware and software vendors as 107 possible. 109 1.1. Goals and approach 111 The model covers the base BGP features that are deployed across major 112 implementations and the common BGP configurations in use across a 113 number of operator network deployments. In particular, this model 114 attempts to cover BGP features defined in [RFC4271], [RFC1997], 115 [RFC4456], [RFC4760], [RFC3065], [RFC2439], [RFC4724], and [RFC6811]. 117 Along with configuration of base BGP features, this model also 118 addresses policy configuration, by providing "hooks" for applying 119 policies, and also defining BGP-specific policy features. The BGP 120 policy features are intended to be used with the general routing 121 policy model defined in [I-D.ietf-rtgwg-policy-model]. The model 122 also supports operational state data to provide a common model for 123 reading BGP-related state from a BGP speaker. 125 For the base BGP features, the focus of the model described in this 126 document is on providing configuration and operational state 127 information relating to: 129 o The global BGP instance, and neighbors whose configuration is 130 specified individually, or templated with the use of peer-groups. 132 o The address families that are supported by peers, and the global 133 configuration which relates to them. 135 o The policy configuration "hooks" and BGP-specific policy features 136 that relate to a neighbor - controlling the import and export of 137 NLRIs. 139 As mentioned earlier, any configuration items that are deemed to be 140 widely available in existing major BGP implementations are included 141 in the model. Additional, more esoteric, configuration items that 142 are not commonly used, or only available from a single 143 implementation, are omitted from the model with an expectation that 144 they will be available in companion modules that augment or extend 145 the current model. This allows clarity in identifying data that is 146 part of the vendor-neutral base model. 148 Where possible, naming in the model follows conventions used in 149 available standards documents, and otherwise tries to be self- 150 explanatory with sufficient descriptions of the intended behavior. 151 Similarly, configuration data value constraints and default values, 152 where used, are based on recommendations in current standards 153 documentation, or those commonly used in multiple implementations. 154 Since implementations can vary widely in this respect, this version 155 of the model specifies only a limited set of defaults and ranges with 156 the expectation of being more prescriptive in future versions based 157 on actual operator use. 159 2. Model overview 161 The BGP model is defined across several YANG modules and submodules, 162 but at a high level is organized into six elements: 164 o base protocol configuration -- configuration affecting BGP 165 protocol-related operations, defined at various levels of 166 hierarchy. 168 o multiprotocol configuration -- configuration affecting individual 169 address-families within BGP [RFC4760]. 171 o neighbor configuration -- configuration affecting an individual 172 neighbor within BGP. 174 o neighbor multiprotocol configuration -- configuration affecting 175 individual address-families for a neighbor within BGP. 177 o policy configuration -- hooks for application of the policies 178 defined in [I-D.ietf-rtgwg-policy-model] that act on routes sent 179 (received) to (from) peers or other routing protocols and BGP- 180 specific policy features. 182 o operational state -- variables used for monitoring and management 183 of BGP operations. 185 These modules also make use of standard Internet types, such as IP 186 addresses and prefixes, autonomous system numbers, etc., defined in 187 RFC 6991 [RFC6991]. 189 Throughout the model, the approach described in 190 [I-D.openconfig-netmod-opstate] is used to represent configuration 191 (intended state), operational and derived state data. That is to 192 say, that each container holds a "config" and "state" sub-container - 193 with the config container being used for configurable parameters, and 194 the state container container holding both the operational state of 195 configurable leaves, and derived counters and statistical 196 information. 198 2.1. BGP protocol configuration 200 The BGP protocol configuration model is organized hierarchically, 201 much like the majority of router implementations. That is, 202 configuration items can be specified at multiple levels, as shown 203 below. 205 +--rw bgp! 206 +--rw global 207 | +-- (global-configuration-options) 208 +--rw neighbors 209 | +--rw neighbor* [neighbor-address] 210 | +-- (neighbor-configuration-options) 211 +--rw peer-groups 212 +--rw peer-group* [peer-group-name] 213 +-- (neighbor-configuration-options) 215 Users may specify configuration at a higher level and have it apply 216 to all lower-level items, or provide overriding configuration at a 217 lower level of the hierarchy. Overriding configuration items are 218 optional, with neighbor specific configuration being the most 219 specific or lowest level, followed by peer-group, and finally global. 220 Global configuration options reflect a subset of the peer-group or 221 neighbor specific configuration options which are relevant to the 222 entire BGP instance. 224 The model makes the simplifying assumption that most of the 225 configuration items are available at all levels of the hierarchy. 226 That is, very little configuration is specific to a particular level 227 in the hierarchy, other than obvious items such as "group-name" only 228 being available for the peer group-level config. A notable exception 229 is for sub-address family configuration where some items are only 230 applicable for a given AFI-SAFI combination. 232 In order to allow common configuration to be applied to a set of 233 neighbors, all neighbor configuration options are available within a 234 peer-group. A neighbor is associated to a particular peer-group 235 through the use of a peer-group leaf (which provides a reference to a 236 configured item in the peer-group list). 238 Address-family configuration is made available in multiple points 239 within the model - primarily within the global container, where 240 instance-wide configuration can be set (for example, global protocol 241 parameters, the BGP best path route selection options, or global 242 policies relating to the address-family); and on a per-neighbor or 243 per-peer-group basis, where address-families can be enabled or 244 disabled, and policy associated with the parent entity applied. 245 Within the afi-safi container, generic configuration that applies to 246 all address-families (e.g., whether the AFI-SAFI is enabled) is 247 presented at the top-level, with address-family specific containers 248 made available for options relating to only that AFI-SAFI. Within 249 the current revision of the model a generic set of address-families, 250 and common configuration and state options are included - further 251 work is expected to add additional parameters to this area of the 252 model. 254 The following address-families are currently supported by the model: 256 +--rw bgp! 257 +--rw global 258 +--rw afi-safis 259 +--rw afi-safi* [afi-safi-name] 260 +--rw afi-safi-name -> ../config/afi-safi-name 261 | 262 +--rw ipv4-unicast 263 | ... 264 +--rw ipv6-unicast 265 | ... 266 +--rw ipv4-labelled-unicast 267 | ... 268 +--rw ipv6-labelled-unicast 269 | ... 270 +--rw l3vpn-ipv4-unicast 271 | ... 272 +--rw l3vpn-ipv6-unicast 273 | ... 274 +--rw l3vpn-ipv4-multicast 275 | ... 276 +--rw l3vpn-ipv6-multicast 277 | ... 278 +--rw l2vpn-vpls 279 | ... 280 +--rw l2vpn-evpn 281 | ... 283 2.2. Policy configuration overview 285 The BGP policy configuration model references the generic YANG 286 routing policy model described in [I-D.ietf-rtgwg-policy-model], 287 which represents a condition-action policy framework for routing. 289 This model adds BGP-specific conditions (e.g., matching on the 290 community attribute), and actions (e.g., setting local preference) to 291 the generic policy framework. 293 Policies that are defined in the routing-policy model are referenced 294 in multiple places within the model: 296 o within the global instance, where a policy applies to all address- 297 families for all peers. 299 o on a global AFI-SAFI basis, where policies apply to all peers for 300 a particular address-family. 302 o on a per-peer-group or per-neighbor basis - where the policy 303 applies to all address-families for the particular group or 304 neighbor. 306 o on a per-afi-safi basis within a neighbor or peer-group context, 307 where the policy is specific to the AFI-SAFI for a a specific 308 neighbor or group. 310 +--rw bgp 311 +--rw global 312 | +--rw afi-safi 313 | | +--rw afi-safi* [afi-safi-name] 314 | | +--rw apply-policy 315 | +--rw apply-policy 316 +--rw neighbors 317 | +--rw neighbor* [neighbor-address] 318 | +--rw afi-safi 319 | | +--rw afi-safi* [afi-safi-name] 320 | | +--rw apply-policy 321 | +--rw apply-policy 322 +--rw peer-groups 323 +--rw peer-group* [peer-group-name] 324 +--rw afi-safi 325 | +--rw afi-safi* [afi-safi-name] 326 | +--rw apply-policy 327 +--rw apply-policy 329 2.3. Operational state overview 331 The BGP operational model contains data which relates to the 332 operational state of the various elements of the BGP router. As 333 noted in Section 2 - the approach described in 334 [I-D.openconfig-netmod-opstate] is utilized for the inclusion of 335 operational and statistical data. To this end, the "-state" 336 groupings (those that contain derived operational parameters) are 337 contained within the BGP operational model - and included within the 338 relevant "state" containers throughout the core BGP model. In some 339 cases, operational information may be relevant to one instance of a 340 common grouping, but not another - for example, the number of 341 received, advertised, and installed prefixes is relevant on a per- 342 neighbor-basis, but is not required (or meaningful) in the peer-group 343 context. Groupings are defined with the appropriate operational 344 state data accordingly. 346 3. Relation to other YANG data models 348 The BGP model is intended to work within a larger framework model, 349 such as the Network Instance model 350 [I-D.openconfig-rtgwg-network-instance] which provides a 351 comprehensive model for defining VRFs, associated routing protocols, 352 multiple protocol instances, and inter-protocol and inter-instance 353 routing policies. The current version of the model imports and 354 instantiates the BGP model in its tree at /network-instances/network- 355 instance/protocols/protocol/bgp/... 357 It is also possible to integrate the BGP model with the Routing 358 Management model [I-D.ietf-netmod-routing-cfg] or the Network Device 359 Organizational Model [I-D.rtgyangdt-rtgwg-device-model], both of 360 which define the notion of routing instances, or VRFs. 362 4. Security Considerations 364 BGP configuration has a significant impact on network operations, and 365 as such any related protocol or model carries potential security 366 risks. 368 YANG data models are generally designed to be used with the NETCONF 369 protocol over an SSH transport. This provides an authenticated and 370 secure channel over which to transfer BGP configuration and 371 operational data. Note that use of alternate transport or data 372 encoding (e.g., JSON over HTTPS) would require similar mechanisms for 373 authenticating and securing access to configuration data. 375 Most of the data elements in the configuration model could be 376 considered sensitive from a security standpoint. Unauthorized access 377 or invalid data could cause major disruption. 379 5. IANA Considerations 381 An appropriate namespace URI will be registered in the IETF XML 382 Registry" [RFC3688]. The BGP YANG modules will be registered in the 383 "YANG Module Names" registry [RFC6020]. 385 6. YANG modules 387 The modules comprising the BGP configuration and operational model 388 are described by the YANG modules and submodules in the sections 389 below. 391 The main module, openconfig-bgp.yang, includes the following 392 submodules: 394 o openconfig-bgp-common - defines the groupings that are common 395 across more than one context (where contexts are neighbor, group, 396 global) 398 o openconfig-bgp-common-multiprotocol - defines the groupings that 399 are common across more than one context, and relate to 400 multiprotocol BGP 402 o openconfig-bgp-common-structure - defines groupings that are 403 shared by multiple contexts, but are used only to create 404 structural elements, i.e., containers (leaf nodes are defined in 405 separate groupings) 407 o openconfig-bgp-global - groupings with data specific to the global 408 context 410 o openconfig-bgp-peer-group - groupings with data specific to the 411 peer group context 413 o openconfig-bgp-neighbor - groupings with data specific to the 414 neighbor context 416 Additional modules include: 418 o openconfig-bgp-types - common type and identity definitions for 419 BGP, including BGP policy 421 o openconfig-bgp-policy - BGP-specific policy data definitions for 422 use with [I-D.ietf-rtgwg-policy-model] (described in more detail 423 Section 2.2) 425 7. BGP main module and submodule for base items 427 file "ietf-bgp.yang" 429 module ietf-bgp { 431 yang-version "1"; 432 // namespace 433 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; 435 prefix "bgp"; 437 // import some basic inet types 438 import openconfig-extensions { prefix oc-ext; } 439 import ietf-routing-policy { prefix rpol; } 441 // Include the OpenConfig BGP submodules 442 // Common: defines the groupings that are common across more than 443 // one context (where contexts are neighbor, group, global) 444 include ietf-bgp-common; 445 // Multiprotocol: defines the groupings that are common across more 446 // than one context, and relate to Multiprotocol 447 include ietf-bgp-common-multiprotocol; 448 // Structure: defines groupings that are shared but are solely used for 449 // structural reasons. 450 include ietf-bgp-common-structure; 451 // Include peer-group/neighbor/global - these define the groupings 452 // that are specific to one context 453 include ietf-bgp-peer-group; 454 include ietf-bgp-neighbor; 455 include ietf-bgp-global; 457 // meta 458 organization 459 "OpenConfig working group"; 461 contact 462 "OpenConfig working group 463 netopenconfig@googlegroups.com"; 465 description 466 "This module describes a YANG model for BGP protocol 467 configuration.It is a limited subset of all of the configuration 468 parameters available in the variety of vendor implementations, 469 hence it is expected that it would be augmented with vendor- 470 specific configuration data as needed. Additional modules or 471 submodules to handle other aspects of BGP configuration, 472 including policy, VRFs, VPNs, and additional address families 473 are also expected. 475 This model supports the following BGP configuration level 476 hierarchy: 478 BGP 479 | 480 +-> [ global BGP configuration ] 481 +-> AFI / SAFI global 482 +-> peer group 483 +-> [ peer group config ] 484 +-> AFI / SAFI [ per-AFI overrides ] 485 +-> neighbor 486 +-> [ neighbor config ] 487 +-> [ optional pointer to peer-group ] 488 +-> AFI / SAFI [ per-AFI overrides ]"; 490 oc-ext:openconfig-version "2.1.1"; 492 revision "2016-06-21" { 493 description 494 "OpenConfig BGP refactor"; 495 reference "2.1.1"; 496 } 498 revision "2016-06-06" { 499 description 500 "OpenConfig public release"; 501 reference "2.1.0"; 502 } 504 revision "2016-03-31" { 505 description 506 "OpenConfig public release"; 507 reference "2.0.1"; 508 } 510 grouping bgp-top { 511 description 512 "Top-level grouping for the BGP model data"; 514 container bgp { 515 description 516 "Top-level configuration and state for the BGP router"; 518 container global { 519 description 520 "Global configuration for the BGP router"; 521 uses bgp-global-base; 522 uses rpol:apply-policy-group; 523 } 525 container neighbors { 526 description 527 "Configuration for BGP neighbors"; 529 uses bgp-neighbor-list; 530 } 532 container peer-groups { 533 description 534 "Configuration for BGP peer-groups"; 535 uses bgp-peer-group-list; 536 } 537 } 538 } 540 uses bgp-top; 542 } 544 546 file "ietf-bgp-common.yang" 548 submodule ietf-bgp-common { 550 belongs-to ietf-bgp { 551 prefix "bgp"; 552 } 554 import openconfig-extensions { prefix oc-ext; } 555 import ietf-bgp-types { prefix oc-bgp-types; } 556 import ietf-routing-policy { prefix rpol; } 557 import ietf-inet-types { prefix inet; } 559 // meta 560 organization 561 "OpenConfig working group"; 563 contact 564 "OpenConfig working group 565 netopenconfig@googlegroups.com"; 567 description 568 "This sub-module contains common groupings that are common across 569 multiple contexts within the BGP module. That is to say that they 570 may be application to a subset of global, peer-group or neighbor 571 contexts."; 573 oc-ext:openconfig-version "2.1.1"; 575 revision "2016-06-21" { 576 description 577 "OpenConfig BGP refactor"; 578 reference "2.1.1"; 579 } 581 grouping bgp-common-neighbor-group-timers-config { 582 description 583 "Config parameters related to timers associated with the BGP 584 peer"; 586 leaf connect-retry { 587 type decimal64 { 588 fraction-digits 2; 589 } 590 default 30; 591 description 592 "Time interval in seconds between attempts to establish a 593 session with the peer."; 594 } 596 leaf hold-time { 597 type decimal64 { 598 fraction-digits 2; 599 } 600 default 90; 601 description 602 "Time interval in seconds that a BGP session will be 603 considered active in the absence of keepalive or other 604 messages from the peer. The hold-time is typically 605 set to 3x the keepalive-interval."; 606 reference 607 "RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; 608 } 610 leaf keepalive-interval { 611 type decimal64 { 612 fraction-digits 2; 613 } 614 default 30; 615 description 616 "Time interval in seconds between transmission of keepalive 617 messages to the neighbor. Typically set to 1/3 the 618 hold-time."; 619 } 621 leaf minimum-advertisement-interval { 622 type decimal64 { 623 fraction-digits 2; 625 } 626 default 30; 627 description 628 "Minimum time which must elapse between subsequent UPDATE 629 messages relating to a common set of NLRI being transmitted 630 to a peer. This timer is referred to as 631 MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to 632 reduce the number of UPDATE messages transmitted when a 633 particular set of NLRI exhibit instability."; 634 reference 635 "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; 636 } 637 } 639 grouping bgp-common-neighbor-group-config { 640 description 641 "Neighbor level configuration items."; 643 leaf peer-as { 644 type inet:as-number; 645 description 646 "AS number of the peer."; 647 } 649 leaf local-as { 650 type inet:as-number; 651 description 652 "The local autonomous system number that is to be used 653 when establishing sessions with the remote peer or peer 654 group, if this differs from the global BGP router 655 autonomous system number."; 656 } 658 leaf peer-type { 659 type oc-bgp-types:peer-type; 660 description 661 "Explicitly designate the peer or peer group as internal 662 (iBGP) or external (eBGP)."; 663 } 665 leaf auth-password { 666 type string; 667 description 668 "Configures an MD5 authentication password for use with 669 neighboring devices."; 670 } 672 leaf remove-private-as { 673 // could also make this a container with a flag to enable 674 // remove-private and separate option. here, option implies 675 // remove-private is enabled. 676 type oc-bgp-types:remove-private-as-option; 677 description 678 "Remove private AS numbers from updates sent to peers - when 679 this leaf is not specified, the AS_PATH attribute should be 680 sent to the peer unchanged"; 681 } 683 leaf route-flap-damping { 684 type boolean; 685 default false; 686 description 687 "Enable route flap damping."; 688 } 690 leaf send-community { 691 type oc-bgp-types:community-type; 692 default "NONE"; 693 description 694 "Specify which types of community should be sent to the 695 neighbor or group. The default is to not send the 696 community attribute"; 697 } 699 leaf description { 700 type string; 701 description 702 "An optional textual description (intended primarily for use 703 with a peer or group"; 704 } 705 } 707 grouping bgp-common-neighbor-group-transport-config { 708 description 709 "Configuration parameters relating to the transport protocol 710 used by the BGP session to the peer"; 712 leaf tcp-mss { 713 type uint16; 714 description 715 "Sets the max segment size for BGP TCP sessions."; 716 } 718 leaf mtu-discovery { 719 type boolean; 720 default false; 721 description 722 "Turns path mtu discovery for BGP TCP sessions on (true) 723 or off (false)"; 724 } 726 leaf passive-mode { 727 type boolean; 728 default false; 729 description 730 "Wait for peers to issue requests to open a BGP session, 731 rather than initiating sessions from the local router."; 732 } 734 leaf local-address { 735 type union { 736 type inet:ip-address; 737 type string; 738 } 739 //TODO: the string should be converted to a leafref type 740 //to point to an interface when YANG 1.1 is available with 741 //leafrefs in union types. 742 description 743 "Set the local IP (either IPv4 or IPv6) address to use 744 for the session when sending BGP update messages. This 745 may be expressed as either an IP address or reference 746 to the name of an interface."; 747 } 748 } 750 grouping bgp-common-neighbor-group-error-handling-config { 751 description 752 "Configuration parameters relating to enhanced error handling 753 behaviours for BGP"; 755 leaf treat-as-withdraw { 756 type boolean; 757 default "false"; 758 description 759 "Specify whether erroneous UPDATE messages for which the 760 NLRI can be extracted are reated as though the NLRI is 761 withdrawn - avoiding session reset"; 762 reference "draft-ietf-idr-error-handling-16"; 763 } 764 } 766 grouping bgp-common-neighbor-group-logging-options-config { 767 description 768 "Configuration parameters specifying the logging behaviour for 769 BGP sessions to the peer"; 771 leaf log-neighbor-state-changes { 772 type boolean; 773 default "true"; 774 description 775 "Configure logging of peer state changes. Default is 776 to enable logging of peer state changes."; 777 } 778 } 780 grouping bgp-common-neighbor-group-multihop-config { 781 description 782 "Configuration parameters specifying the multihop behaviour for 783 BGP sessions to the peer"; 785 leaf enabled { 786 type boolean; 787 default "false"; 788 description 789 "When enabled the referenced group or neighbors are permitted 790 to be indirectly connected - including cases where the TTL 791 can be decremented between the BGP peers"; 792 } 794 leaf multihop-ttl { 795 type uint8; 796 description 797 "Time-to-live value to use when packets are sent to the 798 referenced group or neighbors and ebgp-multihop is enabled"; 799 } 800 } 802 grouping bgp-common-neighbor-group-route-reflector-config { 803 description 804 "Configuration parameters determining whether the behaviour of 805 the local system when acting as a route-reflector"; 807 leaf route-reflector-cluster-id { 808 type oc-bgp-types:rr-cluster-id-type; 809 description 810 "route-reflector cluster id to use when local router is 811 configured as a route reflector. Commonly set at the group 812 level, but allows a different cluster 813 id to be set for each neighbor."; 814 } 816 leaf route-reflector-client { 817 type boolean; 818 default "false"; 819 description 820 "Configure the neighbor as a route reflector client."; 821 } 822 } 824 grouping bgp-common-neighbor-group-as-path-options-config { 825 description 826 "Configuration parameters allowing manipulation of the AS_PATH 827 attribute"; 829 leaf allow-own-as { 830 type uint8; 831 default 0; 832 description 833 "Specify the number of occurrences of the local BGP speaker's 834 AS that can occur within the AS_PATH before it is rejected."; 835 } 837 leaf replace-peer-as { 838 type boolean; 839 default "false"; 840 description 841 "Replace occurrences of the peer's AS in the AS_PATH 842 with the local autonomous system number"; 843 } 844 } 846 grouping bgp-common-neighbor-group-add-paths-config { 847 description 848 "Configuration parameters specfying whether the local system 849 will send or receive multiple paths using ADD_PATHS"; 851 leaf receive { 852 type boolean; 853 default false; 854 description 855 "Enable ability to receive multiple path advertisements 856 for an NLRI from the neighbor or group"; 857 } 859 leaf send-max { 860 type uint8; 861 description 862 "The maximum number of paths to advertise to neighbors 863 for a single NLRI"; 864 } 865 leaf eligible-prefix-policy { 866 type leafref { 867 path "/rpol:routing-policy/rpol:policy-definitions/" + 868 "rpol:policy-definition/rpol:name"; 869 } 870 description 871 "A reference to a routing policy which can be used to 872 restrict the prefixes for which add-paths is enabled"; 873 } 874 } 876 grouping bgp-common-graceful-restart-config { 877 description 878 "Configuration parameters relating to BGP graceful restart."; 880 leaf enabled { 881 type boolean; 882 description 883 "Enable or disable the graceful-restart capability."; 884 } 886 leaf restart-time { 887 type uint16 { 888 range 0..4096; 889 } 890 description 891 "Estimated time (in seconds) for the local BGP speaker to 892 restart a session. This value is advertise in the graceful 893 restart BGP capability. This is a 12-bit value, referred to 894 as Restart Time in RFC4724. Per RFC4724, the suggested 895 default value is <= the hold-time value."; 896 } 898 leaf stale-routes-time { 899 type decimal64 { 900 fraction-digits 2; 901 } 902 description 903 "An upper-bound on the time thate stale routes will be 904 retained by a router after a session is restarted. If an 905 End-of-RIB (EOR) marker is received prior to this timer 906 expiring stale-routes will be flushed upon its receipt - if 907 no EOR is received, then when this timer expires stale paths 908 will be purged. This timer is referred to as the 909 Selection_Deferral_Timer in RFC4724"; 910 } 912 leaf helper-only { 913 type boolean; 914 description 915 "Enable graceful-restart in helper mode only. When this 916 leaf is set, the local system does not retain forwarding 917 its own state during a restart, but supports procedures 918 for the receiving speaker, as defined in RFC4724."; 919 } 920 } 922 grouping bgp-common-use-multiple-paths-config { 923 description 924 "Generic configuration options relating to use of multiple 925 paths for a referenced AFI-SAFI, group or neighbor"; 927 leaf enabled { 928 type boolean; 929 default false; 930 description 931 "Whether the use of multiple paths for the same NLRI is 932 enabled for the neighbor. This value is overridden by 933 any more specific configuration value."; 934 } 935 } 937 grouping bgp-common-use-multiple-paths-ebgp-as-options-config { 938 description 939 "Configuration parameters specific to eBGP multipath applicable 940 to all contexts"; 942 leaf allow-multiple-as { 943 type boolean; 944 default "false"; 945 description 946 "Allow multipath to use paths from different neighbouring 947 ASes. The default is to only consider multiple paths from 948 the same neighbouring AS."; 949 } 950 } 952 grouping bgp-common-global-group-use-multiple-paths { 953 description 954 "Common grouping used for both global and groups which provides 955 configuration and state parameters relating to use of multiple 956 paths"; 958 container use-multiple-paths { 959 description 960 "Parameters related to the use of multiple paths for the 961 same NLRI"; 963 container config { 964 description 965 "Configuration parameters relating to multipath"; 966 uses bgp-common-use-multiple-paths-config; 967 } 968 container state { 969 config false; 970 description 971 "State parameters relating to multipath"; 972 uses bgp-common-use-multiple-paths-config; 973 } 975 container ebgp { 976 description 977 "Multipath parameters for eBGP"; 978 container config { 979 description 980 "Configuration parameters relating to eBGP multipath"; 981 uses bgp-common-use-multiple-paths-ebgp-config; 982 } 983 container state { 984 config false; 985 description 986 "State information relating to eBGP multipath"; 987 uses bgp-common-use-multiple-paths-ebgp-config; 988 } 989 } 991 container ibgp { 992 description 993 "Multipath parameters for iBGP"; 994 container config { 995 description 996 "Configuration parameters relating to iBGP multipath"; 997 uses bgp-common-use-multiple-paths-ibgp-config; 998 } 999 container state { 1000 config false; 1001 description 1002 "State information relating to iBGP multipath"; 1003 uses bgp-common-use-multiple-paths-ibgp-config; 1004 } 1005 } 1006 } 1007 } 1008 grouping bgp-common-use-multiple-paths-ebgp-config { 1009 description 1010 "Configuration parameters relating to multipath for eBGP"; 1012 leaf allow-multiple-as { 1013 type boolean; 1014 default "false"; 1015 description 1016 "Allow multipath to use paths from different neighbouring 1017 ASes. The default is to only consider multiple paths from 1018 the same neighbouring AS."; 1019 } 1021 leaf maximum-paths { 1022 type uint32; 1023 default 1; 1024 description 1025 "Maximum number of parallel paths to consider when using 1026 BGP multipath. The default is use a single path."; 1027 } 1028 } 1030 grouping bgp-common-use-multiple-paths-ibgp-config { 1031 description 1032 "Configuration parmaeters relating to multipath for iBGP"; 1034 leaf maximum-paths { 1035 type uint32; 1036 default 1; 1037 description 1038 "Maximum number of parallel paths to consider when using 1039 iBGP multipath. The default is to use a single path"; 1040 } 1041 } 1043 grouping bgp-common-route-selection-options-config { 1044 description 1045 "Set of configuration options that govern best 1046 path selection."; 1048 leaf always-compare-med { 1049 type boolean; 1050 default "false"; 1051 description 1052 "Compare multi-exit discriminator (MED) value from 1053 different ASes when selecting the best route. The 1054 default behavior is to only compare MEDs for paths 1055 received from the same AS."; 1057 } 1059 leaf ignore-as-path-length { 1060 type boolean; 1061 default "false"; 1062 description 1063 "Ignore the AS path length when selecting the best path. 1064 The default is to use the AS path length and prefer paths 1065 with shorter length."; 1066 } 1068 leaf external-compare-router-id { 1069 type boolean; 1070 default "true"; 1071 description 1072 "When comparing similar routes received from external 1073 BGP peers, use the router-id as a criterion to select 1074 the active path."; 1075 } 1077 leaf advertise-inactive-routes { 1078 type boolean; 1079 default "false"; 1080 description 1081 "Advertise inactive routes to external peers. The 1082 default is to only advertise active routes."; 1083 } 1085 leaf enable-aigp { 1086 type boolean; 1087 default false; 1088 description 1089 "Flag to enable sending / receiving accumulated IGP 1090 attribute in routing updates"; 1091 } 1093 leaf ignore-next-hop-igp-metric { 1094 type boolean; 1095 default "false"; 1096 description 1097 "Ignore the IGP metric to the next-hop when calculating 1098 BGP best-path. The default is to select the route for 1099 which the metric to the next-hop is lowest"; 1100 } 1101 } 1103 grouping bgp-common-route-selection-options { 1104 description 1105 "Configuration and state relating to route selection options"; 1107 container route-selection-options { 1108 description 1109 "Parameters relating to options for route selection"; 1110 container config { 1111 description 1112 "Configuration parameters relating to route selection 1113 options"; 1114 uses bgp-common-route-selection-options-config; 1115 } 1116 container state { 1117 config false; 1118 description 1119 "State information for the route selection options"; 1120 uses bgp-common-route-selection-options-config; 1121 } 1122 } 1123 } 1125 grouping bgp-common-state { 1126 description 1127 "Grouping containing common counters relating to prefixes and 1128 paths"; 1130 leaf total-paths { 1131 type uint32; 1132 description 1133 "Total number of BGP paths within the context"; 1134 } 1136 leaf total-prefixes { 1137 type uint32; 1138 description 1139 "Total number of BGP prefixes received within the context"; 1140 } 1141 } 1143 } 1145 1147 file "ietf-bgp-common-multiprotocol.yang" 1149 submodule ietf-bgp-common-multiprotocol { 1150 belongs-to ietf-bgp { 1151 prefix "bgp"; 1152 } 1154 import openconfig-extensions { prefix oc-ext; } 1155 import ietf-bgp-types { prefix oc-bgp-types; } 1156 import ietf-routing-policy { prefix rpol; } 1157 import openconfig-types { prefix oc-types; } 1159 include ietf-bgp-common; 1161 // meta 1162 organization 1163 "OpenConfig working group"; 1165 contact 1166 "OpenConfig working group 1167 netopenconfig@googlegroups.com"; 1169 description 1170 "This sub-module contains groupings that are related to support 1171 for multiple protocols in BGP. The groupings are common across 1172 multiple contexts."; 1174 oc-ext:openconfig-version "2.1.1"; 1176 revision "2016-06-21" { 1177 description 1178 "OpenConfig BGP refactor"; 1179 reference "2.1.1"; 1180 } 1182 grouping bgp-common-mp-afi-safi-graceful-restart-config { 1183 description 1184 "BGP graceful restart parameters that apply on a per-AFI-SAFI 1185 basis"; 1187 leaf enabled { 1188 type boolean; 1189 default false; 1190 description 1191 "This leaf indicates whether graceful-restart is enabled for 1192 this AFI-SAFI"; 1193 } 1194 } 1196 grouping bgp-common-mp-afi-safi-config { 1197 description 1198 "Configuration parameters used for all BGP AFI-SAFIs"; 1200 leaf afi-safi-name { 1201 type identityref { 1202 base oc-bgp-types:AFI_SAFI_TYPE; 1203 } 1204 description "AFI,SAFI"; 1205 } 1207 leaf enabled { 1208 type boolean; 1209 default false; 1210 description 1211 "This leaf indicates whether the IPv4 Unicast AFI,SAFI is 1212 enabled for the neighbour or group"; 1213 } 1214 } 1216 grouping bgp-common-mp-all-afi-safi-list-contents { 1217 description 1218 "A common grouping used for contents of the list that is used 1219 for AFI-SAFI entries"; 1221 // import and export policy included for the afi/safi 1222 uses rpol:apply-policy-group; 1224 uses bgp-common-mp-ipv4-unicast-group; 1225 uses bgp-common-mp-ipv6-unicast-group; 1226 uses bgp-common-mp-ipv4-labeled-unicast-group; 1227 uses bgp-common-mp-ipv6-labeled-unicast-group; 1228 uses bgp-common-mp-l3vpn-ipv4-unicast-group; 1229 uses bgp-common-mp-l3vpn-ipv6-unicast-group; 1230 uses bgp-common-mp-l3vpn-ipv4-multicast-group; 1231 uses bgp-common-mp-l3vpn-ipv6-multicast-group; 1232 uses bgp-common-mp-l2vpn-vpls-group; 1233 uses bgp-common-mp-l2vpn-evpn-group; 1234 } 1236 // Groupings relating to each address family 1237 grouping bgp-common-mp-ipv4-unicast-group { 1238 description 1239 "Group for IPv4 Unicast configuration options"; 1241 container ipv4-unicast { 1242 when "../afi-safi-name = 'oc-bgp-types:IPV4_UNICAST'" { 1243 description 1244 "Include this container for IPv4 Unicast specific 1245 configuration"; 1247 } 1249 description "IPv4 unicast configuration options"; 1251 // include common IPv[46] unicast options 1252 uses bgp-common-mp-ipv4-ipv6-unicast-common; 1254 // placeholder for IPv4 unicast specific configuration 1255 } 1256 } 1258 grouping bgp-common-mp-ipv6-unicast-group { 1259 description 1260 "Group for IPv6 Unicast configuration options"; 1262 container ipv6-unicast { 1263 when "../afi-safi-name = 'oc-bgp-types:IPV6_UNICAST'" { 1264 description 1265 "Include this container for IPv6 Unicast specific 1266 configuration"; 1267 } 1269 description "IPv6 unicast configuration options"; 1271 // include common IPv[46] unicast options 1272 uses bgp-common-mp-ipv4-ipv6-unicast-common; 1274 // placeholder for IPv6 unicast specific configuration 1275 // options 1276 } 1277 } 1279 grouping bgp-common-mp-ipv4-labeled-unicast-group { 1280 description 1281 "Group for IPv4 Labeled Unicast configuration options"; 1283 container ipv4-labeled-unicast { 1284 when "../afi-safi-name = 'oc-bgp-types:IPV4_LABELED_UNICAST'" { 1285 description 1286 "Include this container for IPv4 Labeled Unicast specific 1287 configuration"; 1288 } 1290 description "IPv4 Labeled Unicast configuration options"; 1292 uses bgp-common-mp-all-afi-safi-common; 1294 // placeholder for IPv4 Labeled Unicast specific config 1295 // options 1296 } 1297 } 1299 grouping bgp-common-mp-ipv6-labeled-unicast-group { 1300 description 1301 "Group for IPv6 Labeled Unicast configuration options"; 1303 container ipv6-labeled-unicast { 1304 when "../afi-safi-name = 'oc-bgp-types:IPV6_LABELED_UNICAST'" { 1305 description 1306 "Include this container for IPv6 Labeled Unicast specific 1307 configuration"; 1308 } 1310 description "IPv6 Labeled Unicast configuration options"; 1312 uses bgp-common-mp-all-afi-safi-common; 1314 // placeholder for IPv6 Labeled Unicast specific config 1315 // options. 1316 } 1317 } 1319 grouping bgp-common-mp-l3vpn-ipv4-unicast-group { 1320 description 1321 "Group for IPv4 Unicast L3VPN configuration options"; 1323 container l3vpn-ipv4-unicast { 1324 when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_UNICAST'" { 1325 description 1326 "Include this container for IPv4 Unicast L3VPN specific 1327 configuration"; 1328 } 1330 description "Unicast IPv4 L3VPN configuration options"; 1332 // include common L3VPN configuration options 1333 uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; 1335 // placeholder for IPv4 Unicast L3VPN specific config options. 1336 } 1337 } 1339 grouping bgp-common-mp-l3vpn-ipv6-unicast-group { 1340 description 1341 "Group for IPv6 Unicast L3VPN configuration options"; 1343 container l3vpn-ipv6-unicast { 1344 when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_UNICAST'" { 1345 description 1346 "Include this container for unicast IPv6 L3VPN specific 1347 configuration"; 1348 } 1350 description "Unicast IPv6 L3VPN configuration options"; 1352 // include common L3VPN configuration options 1353 uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; 1355 // placeholder for IPv6 Unicast L3VPN specific configuration 1356 // options 1357 } 1358 } 1360 grouping bgp-common-mp-l3vpn-ipv4-multicast-group { 1361 description 1362 "Group for IPv4 L3VPN multicast configuration options"; 1364 container l3vpn-ipv4-multicast { 1365 when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_MULTICAST'" { 1366 description 1367 "Include this container for multicast IPv6 L3VPN specific 1368 configuration"; 1369 } 1371 description "Multicast IPv4 L3VPN configuration options"; 1373 // include common L3VPN multicast options 1374 uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; 1376 // placeholder for IPv4 Multicast L3VPN specific configuration 1377 // options 1378 } 1379 } 1381 grouping bgp-common-mp-l3vpn-ipv6-multicast-group { 1382 description 1383 "Group for IPv6 L3VPN multicast configuration options"; 1385 container l3vpn-ipv6-multicast { 1386 when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_MULTICAST'" { 1387 description 1388 "Include this container for multicast IPv6 L3VPN specific 1389 configuration"; 1390 } 1391 description "Multicast IPv6 L3VPN configuration options"; 1393 // include common L3VPN multicast options 1394 uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; 1396 // placeholder for IPv6 Multicast L3VPN specific configuration 1397 // options 1398 } 1399 } 1401 grouping bgp-common-mp-l2vpn-vpls-group { 1402 description 1403 "Group for BGP-signalled VPLS configuration options"; 1405 container l2vpn-vpls { 1406 when "../afi-safi-name = 'oc-bgp-types:L2VPN_VPLS'" { 1407 description 1408 "Include this container for BGP-signalled VPLS specific 1409 configuration"; 1410 } 1412 description "BGP-signalled VPLS configuration options"; 1414 // include common L2VPN options 1415 uses bgp-common-mp-l2vpn-common; 1417 // placeholder for BGP-signalled VPLS specific configuration 1418 // options 1419 } 1420 } 1422 grouping bgp-common-mp-l2vpn-evpn-group { 1423 description 1424 "Group for BGP EVPN configuration options"; 1426 container l2vpn-evpn { 1427 when "../afi-safi-name = 'oc-bgp-types:L2VPN_EVPN'" { 1428 description 1429 "Include this container for BGP EVPN specific 1430 configuration"; 1431 } 1433 description "BGP EVPN configuration options"; 1435 // include common L2VPN options 1436 uses bgp-common-mp-l2vpn-common; 1438 // placeholder for BGP EVPN specific configuration options 1440 } 1441 } 1443 // Common groupings across multiple AFI,SAFIs 1444 grouping bgp-common-mp-all-afi-safi-common { 1445 description 1446 "Grouping for configuration common to all AFI,SAFI"; 1448 container prefix-limit { 1449 description 1450 "Configure the maximum number of prefixes that will be 1451 accepted from a peer"; 1453 container config { 1454 description 1455 "Configuration parameters relating to the prefix 1456 limit for the AFI-SAFI"; 1457 uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; 1458 } 1460 container state { 1461 config false; 1462 description 1463 "State information relating to the prefix-limit for the 1464 AFI-SAFI"; 1465 uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; 1466 } 1467 } 1468 } 1470 grouping bgp-common-mp-ipv4-ipv6-unicast-common { 1471 description 1472 "Common configuration that is applicable for IPv4 and IPv6 1473 unicast"; 1475 // include common afi-safi options. 1476 uses bgp-common-mp-all-afi-safi-common; 1478 // configuration options that are specific to IPv[46] unicast 1479 container config { 1480 description 1481 "Configuration parameters for common IPv4 and IPv6 unicast 1482 AFI-SAFI options"; 1483 uses bgp-common-mp-ipv4-ipv6-unicast-common-config; 1484 } 1485 container state { 1486 config false; 1487 description 1488 "State information for common IPv4 and IPv6 unicast 1489 parameters"; 1490 uses bgp-common-mp-ipv4-ipv6-unicast-common-config; 1491 } 1492 } 1494 grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common { 1495 description 1496 "Common configuration applied across L3VPN for IPv4 1497 and IPv6"; 1499 // placeholder -- specific configuration options that are generic 1500 // across IPv[46] unicast address families. 1501 uses bgp-common-mp-all-afi-safi-common; 1502 } 1504 grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common { 1505 description 1506 "Common configuration applied across L3VPN for IPv4 1507 and IPv6"; 1509 // placeholder -- specific configuration options that are 1510 // generic across IPv[46] multicast address families. 1511 uses bgp-common-mp-all-afi-safi-common; 1512 } 1514 grouping bgp-common-mp-l2vpn-common { 1515 description 1516 "Common configuration applied across L2VPN address 1517 families"; 1519 // placeholder -- specific configuration options that are 1520 // generic across L2VPN address families 1521 uses bgp-common-mp-all-afi-safi-common; 1522 } 1524 // Config groupings for common groups 1525 grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config { 1526 description 1527 "Configuration parameters relating to prefix-limits for an 1528 AFI-SAFI"; 1530 leaf max-prefixes { 1531 type uint32; 1532 description 1533 "Maximum number of prefixes that will be accepted 1534 from the neighbour"; 1535 } 1536 leaf shutdown-threshold-pct { 1537 type oc-types:percentage; 1538 description 1539 "Threshold on number of prefixes that can be received 1540 from a neighbour before generation of warning messages 1541 or log entries. Expressed as a percentage of 1542 max-prefixes"; 1543 } 1545 leaf restart-timer { 1546 type decimal64 { 1547 fraction-digits 2; 1548 } 1549 units "seconds"; 1550 description 1551 "Time interval in seconds after which the BGP session 1552 is re-established after being torn down due to exceeding 1553 the max-prefix limit."; 1554 } 1555 } 1557 grouping bgp-common-mp-ipv4-ipv6-unicast-common-config { 1558 description 1559 "Common configuration parameters for IPv4 and IPv6 Unicast 1560 address families"; 1562 leaf send-default-route { 1563 type boolean; 1564 default "false"; 1565 description 1566 "If set to true, send the default-route to the neighbour(s)"; 1567 } 1568 } 1570 } 1571 1573 file "ietf-bgp-common-structure.yang" 1575 submodule ietf-bgp-common-structure { 1577 belongs-to ietf-bgp { 1578 prefix "bgp"; 1579 } 1581 import openconfig-extensions { prefix oc-ext; } 1582 include ietf-bgp-common-multiprotocol; 1583 include ietf-bgp-common; 1585 // meta 1586 organization 1587 "OpenConfig working group"; 1589 contact 1590 "OpenConfig working group 1591 netopenconfig@googlegroups.com"; 1593 description 1594 "This sub-module contains groupings that are common across multiple BGP 1595 contexts and provide structure around other primitive groupings."; 1597 oc-ext:openconfig-version "2.1.1"; 1599 revision "2016-06-21" { 1600 description 1601 "OpenConfig BGP refactor"; 1602 reference "2.1.1"; 1603 } 1605 grouping bgp-common-structure-neighbor-group-logging-options { 1606 description 1607 "Structural grouping used to include error handling configuration and 1608 state for both BGP neighbors and groups"; 1610 container logging-options { 1611 description 1612 "Logging options for events related to the BGP neighbor or 1613 group"; 1614 container config { 1615 description 1616 "Configuration parameters enabling or modifying logging 1617 for events relating to the BGPgroup"; 1618 uses bgp-common-neighbor-group-logging-options-config; 1619 } 1620 container state { 1621 config false; 1622 description 1623 "State information relating to logging for the BGP neighbor 1624 or group"; 1625 uses bgp-common-neighbor-group-logging-options-config; 1626 } 1627 } 1628 } 1629 grouping bgp-common-structure-neighbor-group-ebgp-multihop { 1630 description 1631 "Structural grouping used to include eBGP multihop configuration and 1632 state for both BGP neighbors and peer groups"; 1634 container ebgp-multihop { 1635 description 1636 "eBGP multi-hop parameters for the BGPgroup"; 1637 container config { 1638 description 1639 "Configuration parameters relating to eBGP multihop for the 1640 BGP group"; 1641 uses bgp-common-neighbor-group-multihop-config; 1642 } 1643 container state { 1644 config false; 1645 description 1646 "State information for eBGP multihop, for the BGP neighbor 1647 or group"; 1648 uses bgp-common-neighbor-group-multihop-config; 1649 } 1650 } 1651 } 1653 grouping bgp-common-structure-neighbor-group-route-reflector { 1654 description 1655 "Structural grouping used to include route reflector configuration and 1656 state for both BGP neighbors and peer groups"; 1658 container route-reflector { 1659 description 1660 "Route reflector parameters for the BGPgroup"; 1661 container config { 1662 description 1663 "Configuraton parameters relating to route reflection 1664 for the BGPgroup"; 1665 uses bgp-common-neighbor-group-route-reflector-config; 1666 } 1667 container state { 1668 config false; 1669 description 1670 "State information relating to route reflection for the 1671 BGPgroup"; 1672 uses bgp-common-neighbor-group-route-reflector-config; 1673 } 1674 } 1675 } 1676 grouping bgp-common-structure-neighbor-group-as-path-options { 1677 description 1678 "Structural grouping used to include AS_PATH manipulation configuration 1679 and state for both BGP neighbors and peer groups"; 1681 container as-path-options { 1682 description 1683 "AS_PATH manipulation parameters for the BGP neighbor or 1684 group"; 1685 container config { 1686 description 1687 "Configuration parameters relating to AS_PATH manipulation 1688 for the BGP peer or group"; 1689 uses bgp-common-neighbor-group-as-path-options-config; 1690 } 1691 container state { 1692 config false; 1693 description 1694 "State information relating to the AS_PATH manipulation 1695 mechanisms for the BGP peer or group"; 1696 uses bgp-common-neighbor-group-as-path-options-config; 1697 } 1698 } 1699 } 1701 grouping bgp-common-structure-neighbor-group-add-paths { 1702 description 1703 "Structural grouping used to include ADD-PATHs configuration and state 1704 for both BGP neighbors and peer groups"; 1706 container add-paths { 1707 description 1708 "Parameters relating to the advertisement and receipt of 1709 multiple paths for a single NLRI (add-paths)"; 1710 container config { 1711 description 1712 "Configuration parameters relating to ADD_PATHS"; 1713 uses bgp-common-neighbor-group-add-paths-config; 1714 } 1715 container state { 1716 config false; 1717 description 1718 "State information associated with ADD_PATHS"; 1719 uses bgp-common-neighbor-group-add-paths-config; 1720 } 1721 } 1722 } 1724 } 1726 1728 file "ietf-bgp-peer-group.yang" 1730 submodule ietf-bgp-peer-group { 1732 belongs-to ietf-bgp { 1733 prefix "bgp"; 1734 } 1736 import openconfig-extensions { prefix oc-ext; } 1737 import ietf-routing-policy { prefix rpol; } 1739 // Include the common submodule 1740 include ietf-bgp-common; 1741 include ietf-bgp-common-multiprotocol; 1742 include ietf-bgp-common-structure; 1744 // meta 1745 organization 1746 "OpenConfig working group"; 1748 contact 1749 "OpenConfig working group 1750 netopenconfig@googlegroups.com"; 1752 description 1753 "This sub-module contains groupings that are specific to the 1754 peer-group context of the OpenConfig BGP module."; 1756 oc-ext:openconfig-version "2.1.1"; 1758 revision "2016-06-21" { 1759 description 1760 "OpenConfig BGP refactor"; 1761 reference "2.1.1"; 1762 } 1764 grouping bgp-peer-group-config { 1765 description 1766 "Configuration parameters relating to a base BGP peer group that 1767 are not also applicable to any other context (e.g., neighbor)"; 1769 leaf peer-group-name { 1770 type string; 1771 description 1772 "Name of the BGP peer-group"; 1773 } 1775 } 1777 grouping bgp-peer-group-afi-safi-list { 1778 description 1779 "List of address-families associated with the BGP peer-group"; 1781 list afi-safi { 1782 key "afi-safi-name"; 1784 description 1785 "AFI,SAFI configuration available for the 1786 neighbour or group"; 1788 leaf afi-safi-name { 1789 type leafref { 1790 path "../config/afi-safi-name"; 1791 } 1792 description 1793 "Reference to the AFI-SAFI name used as a key 1794 for the AFI-SAFI list"; 1795 } 1797 container config { 1798 description 1799 "Configuration parameters for the AFI-SAFI"; 1800 uses bgp-common-mp-afi-safi-config; 1801 } 1802 container state { 1803 config false; 1804 description 1805 "State information relating to the AFI-SAFI"; 1806 uses bgp-common-mp-afi-safi-config; 1807 } 1809 container graceful-restart { 1810 description 1811 "Parameters relating to BGP graceful-restart"; 1812 container config { 1813 description 1814 "Configuration options for BGP graceful-restart"; 1815 uses bgp-common-mp-afi-safi-graceful-restart-config; 1816 } 1817 container state { 1818 config false; 1819 description 1820 "State information for BGP graceful-restart"; 1821 uses bgp-common-mp-afi-safi-graceful-restart-config; 1822 } 1823 } 1825 uses bgp-common-route-selection-options; 1826 uses bgp-common-global-group-use-multiple-paths; 1827 uses bgp-common-mp-all-afi-safi-list-contents; 1828 } 1829 } 1831 grouping bgp-peer-group-base { 1832 description 1833 "Parameters related to a BGP group"; 1835 container config { 1836 description 1837 "Configuration parameters relating to the BGP neighbor or 1838 group"; 1839 uses bgp-peer-group-config; 1840 uses bgp-common-neighbor-group-config; 1841 } 1842 container state { 1843 config false; 1844 description 1845 "State information relating to the BGP peer-group"; 1846 uses bgp-peer-group-config; 1847 uses bgp-common-neighbor-group-config; 1848 uses bgp-common-state; 1849 } 1851 container timers { 1852 description 1853 "Timers related to a BGP peer-group"; 1855 container config { 1856 description 1857 "Configuration parameters relating to timers used for the 1858 BGP neighbor or peer group"; 1859 uses bgp-common-neighbor-group-timers-config; 1860 } 1861 container state { 1862 config false; 1863 description 1864 "State information relating to the timers used for the BGP 1865 group"; 1866 uses bgp-common-neighbor-group-timers-config; 1868 } 1869 } 1871 container transport { 1872 description 1873 "Transport session parameters for the BGP peer-group"; 1875 container config { 1876 description 1877 "Configuration parameters relating to the transport 1878 session(s) used for the BGP neighbor or group"; 1879 uses bgp-common-neighbor-group-transport-config; 1880 } 1881 container state { 1882 config false; 1883 description 1884 "State information relating to the transport session(s) 1885 used for the BGP neighbor or group"; 1886 uses bgp-common-neighbor-group-transport-config; 1887 } 1888 } 1890 container error-handling { 1891 description 1892 "Error handling parameters used for the BGP peer-group"; 1894 container config { 1895 description 1896 "Configuration parameters enabling or modifying the 1897 behavior or enhanced error handling mechanisms for the BGP 1898 group"; 1899 uses bgp-common-neighbor-group-error-handling-config; 1900 } 1901 container state { 1902 config false; 1903 description 1904 "State information relating to enhanced error handling 1905 mechanisms for the BGP group"; 1906 uses bgp-common-neighbor-group-error-handling-config; 1907 } 1908 } 1910 container graceful-restart { 1911 description 1912 "Parameters relating the graceful restart mechanism for BGP"; 1913 container config { 1914 description 1915 "Configuration parameters relating to graceful-restart"; 1917 uses bgp-common-graceful-restart-config; 1918 } 1919 container state { 1920 config false; 1921 description 1922 "State information associated with graceful-restart"; 1923 uses bgp-common-graceful-restart-config; 1924 } 1925 } 1927 uses bgp-common-structure-neighbor-group-logging-options; 1928 uses bgp-common-structure-neighbor-group-ebgp-multihop; 1929 uses bgp-common-structure-neighbor-group-route-reflector; 1930 uses bgp-common-structure-neighbor-group-as-path-options; 1931 uses bgp-common-structure-neighbor-group-add-paths; 1932 uses bgp-common-global-group-use-multiple-paths; 1933 uses rpol:apply-policy-group; 1935 container afi-safis { 1936 description 1937 "Per-address-family configuration parameters associated with 1938 thegroup"; 1939 uses bgp-peer-group-afi-safi-list; 1940 } 1941 } 1943 grouping bgp-peer-group-list { 1944 description 1945 "The list of BGP peer groups"; 1947 list peer-group { 1948 key "peer-group-name"; 1949 description 1950 "List of BGP peer-groups configured on the local system - 1951 uniquely identified by peer-group name"; 1953 leaf peer-group-name { 1954 type leafref { 1955 path "../config/peer-group-name"; 1956 } 1957 description 1958 "Reference to the name of the BGP peer-group used as a 1959 key in the peer-group list"; 1960 } 1962 uses bgp-peer-group-base; 1963 } 1964 } 1966 } 1968 1970 file "ietf-bgp-neighbor.yang" 1972 submodule ietf-bgp-neighbor { 1974 belongs-to ietf-bgp { 1975 prefix "bgp"; 1976 } 1978 import openconfig-extensions { prefix oc-ext; } 1979 import ietf-routing-policy { prefix rpol; } 1980 import openconfig-types { prefix oc-types; } 1981 import ietf-bgp-types { prefix oc-bgp-types; } 1982 import ietf-inet-types { prefix inet; } 1983 import ietf-yang-types { prefix yang; } 1985 // Include the common submodule 1986 include ietf-bgp-common; 1987 include ietf-bgp-common-multiprotocol; 1988 include ietf-bgp-peer-group; 1989 include ietf-bgp-common-structure; 1991 // meta 1992 organization 1993 "OpenConfig working group"; 1995 contact 1996 "OpenConfig working group 1997 netopenconfig@googlegroups.com"; 1999 description 2000 "This sub-module contains groupings that are specific to the 2001 neighbor context of the OpenConfig BGP module."; 2003 oc-ext:openconfig-version "2.1.1"; 2005 revision "2016-06-21" { 2006 description 2007 "OpenConfig BGP refactor"; 2008 reference "2.1.1"; 2009 } 2011 grouping bgp-neighbor-config { 2012 description 2013 "Configuration parameters relating to a base BGP neighbor that 2014 are not also applicable to any other context 2015 (e.g., peer group)"; 2017 leaf peer-group { 2018 type leafref { 2019 path "../../../../peer-groups/peer-group/peer-group-name"; 2020 } 2021 description 2022 "The peer-group with which this neighbor is associated"; 2023 } 2025 leaf neighbor-address { 2026 type inet:ip-address; 2027 description 2028 "Address of the BGP peer, either in IPv4 or IPv6"; 2029 } 2031 leaf enabled { 2032 type boolean; 2033 default true; 2034 description 2035 "Whether the BGP peer is enabled. In cases where the 2036 enabled leaf is set to false, the local system should not 2037 initiate connections to the neighbor, and should not 2038 respond to TCP connections attempts from the neighbor. If 2039 the state of the BGP session is ESTABLISHED at the time 2040 that this leaf is set to false, the BGP session should be 2041 ceased."; 2042 } 2043 } 2045 grouping bgp-neighbor-use-multiple-paths { 2046 description 2047 "Multipath configuration and state applicable to a BGP 2048 neighbor"; 2050 container use-multiple-paths { 2051 description 2052 "Parameters related to the use of multiple-paths for the same 2053 NLRI when they are received only from this neighbor"; 2055 container config { 2056 description 2057 "Configuration parameters relating to multipath"; 2058 uses bgp-common-use-multiple-paths-config; 2059 } 2060 container state { 2061 config false; 2062 description 2063 "State parameters relating to multipath"; 2064 uses bgp-common-use-multiple-paths-config; 2065 } 2067 container ebgp { 2068 description 2069 "Multipath configuration for eBGP"; 2070 container config { 2071 description 2072 "Configuration parameters relating to eBGP multipath"; 2073 uses bgp-common-use-multiple-paths-ebgp-as-options-config; 2074 } 2075 container state { 2076 config false; 2077 description 2078 "State information relating to eBGP multipath"; 2079 uses bgp-common-use-multiple-paths-ebgp-as-options-config; 2080 } 2081 } 2082 } 2083 } 2085 grouping bgp-neighbor-state { 2086 description 2087 "Operational state parameters relating only to a BGP neighbor"; 2089 leaf session-state { 2090 type enumeration { 2091 enum IDLE { 2092 description 2093 "neighbor is down, and in the Idle state of the 2094 FSM"; 2095 } 2096 enum CONNECT { 2097 description 2098 "neighbor is down, and the session is waiting for 2099 the underlying transport session to be established"; 2100 } 2101 enum ACTIVE { 2102 description 2103 "neighbor is down, and the local system is awaiting 2104 a conncetion from the remote peer"; 2105 } 2106 enum OPENSENT { 2107 description 2108 "neighbor is in the process of being established. 2110 The local system has sent an OPEN message"; 2111 } 2112 enum OPENCONFIRM { 2113 description 2114 "neighbor is in the process of being established. 2115 The local system is awaiting a NOTIFICATION or 2116 KEEPALIVE message"; 2117 } 2118 enum ESTABLISHED { 2119 description 2120 "neighbor is up - the BGP session with the peer is 2121 established"; 2122 } 2123 } 2124 description 2125 "Operational state of the BGP peer"; 2126 } 2128 leaf last-established { 2129 type oc-types:timeticks64; 2130 description 2131 "This timestamp indicates the time that the 2132 BGP session last transitioned in or out of the Established 2133 state. The value is the timestamp in seconds relative to 2134 the Unix Epoch (Jan 1, 1970 00:00:00 UTC). 2136 The BGP session uptime can be computed by clients as the 2137 difference between this value and the current time in UTC 2138 (assuming the session is in the ESTABLISHED state, per the 2139 session-state leaf)."; 2140 } 2142 leaf established-transitions { 2143 type yang:counter64; 2144 description 2145 "Number of transitions to the Established state for 2146 the neighbor session. This value is analogous to the 2147 bgpPeerFsmEstablishedTransitions object from the standard 2148 BGP-4 MIB"; 2149 reference 2150 "RFC 4273 - Definitions of Managed Objects for BGP-4"; 2151 } 2153 leaf-list supported-capabilities { 2154 type identityref { 2155 base oc-bgp-types:BGP_CAPABILITY; 2156 } 2157 description 2158 "BGP capabilities negotiated as supported with the peer"; 2159 } 2161 container messages { 2162 description 2163 "Counters for BGP messages sent and received from the 2164 neighbor"; 2165 container sent { 2166 description 2167 "Counters relating to BGP messages sent to the neighbor"; 2168 uses bgp-neighbor-counters-message-types-state; 2169 } 2171 container received { 2172 description 2173 "Counters for BGP messages received from the neighbor"; 2174 uses bgp-neighbor-counters-message-types-state; 2175 } 2176 } 2178 container queues { 2179 description 2180 "Counters related to queued messages associated with the 2181 BGP neighbor"; 2182 uses bgp-neighbor-queue-counters-state; 2183 } 2184 } 2186 grouping bgp-neighbor-counters-message-types-state { 2187 description 2188 "Grouping of BGP message types, included for re-use 2189 across counters"; 2191 leaf UPDATE { 2192 type uint64; 2193 description 2194 "Number of BGP UPDATE messages announcing, withdrawing 2195 or modifying paths exchanged."; 2196 } 2198 leaf NOTIFICATION { 2199 type uint64; 2200 description 2201 "Number of BGP NOTIFICATION messages indicating an 2202 error condition has occurred exchanged."; 2203 } 2204 } 2205 grouping bgp-neighbor-queue-counters-state { 2206 description 2207 "Counters relating to the message queues associated with the 2208 BGP peer"; 2210 leaf input { 2211 type uint32; 2212 description 2213 "The number of messages received from the peer currently 2214 queued"; 2215 } 2217 leaf output { 2218 type uint32; 2219 description 2220 "The number of messages queued to be sent to the peer"; 2221 } 2222 } 2224 grouping bgp-neighbor-transport-state { 2225 description 2226 "Operational state parameters relating to the transport session 2227 used for the BGP session"; 2229 leaf local-port { 2230 type inet:port-number; 2231 description 2232 "Local TCP port being used for the TCP session supporting 2233 the BGP session"; 2234 } 2236 leaf remote-address { 2237 type inet:ip-address; 2238 description 2239 "Remote address to which the BGP session has been 2240 established"; 2241 } 2243 leaf remote-port { 2244 type inet:port-number; 2245 description 2246 "Remote port being used by the peer for the TCP session 2247 supporting the BGP session"; 2248 } 2249 } 2251 grouping bgp-neighbor-error-handling-state { 2252 description 2253 "Operational state parameters relating to enhanced error 2254 error handling for BGP"; 2256 leaf erroneous-update-messages { 2257 type uint32; 2258 description 2259 "The number of BGP UPDATE messages for which the 2260 treat-as-withdraw mechanism has been applied based 2261 on erroneous message contents"; 2262 } 2263 } 2265 grouping bgp-neighbor-timers-state { 2266 description 2267 "Operational state parameters relating to BGP timers associated 2268 with the BGP session"; 2270 leaf negotiated-hold-time { 2271 type decimal64 { 2272 fraction-digits 2; 2273 } 2274 description 2275 "The negotiated hold-time for the BGP session"; 2276 } 2277 } 2279 grouping bgp-neighbor-afi-safi-graceful-restart-state { 2280 description 2281 "Operational state variables relating to the graceful-restart 2282 mechanism on a per-AFI-SAFI basis"; 2284 leaf received { 2285 type boolean; 2286 description 2287 "This leaf indicates whether the neighbor advertised the 2288 ability to support graceful-restart for this AFI-SAFI"; 2289 } 2291 leaf advertised { 2292 type boolean; 2293 description 2294 "This leaf indicates whether the ability to support 2295 graceful-restart has been advertised to the peer"; 2296 } 2297 } 2299 grouping bgp-neighbor-graceful-restart-state { 2300 description 2301 "Operational state information relevant to graceful restart 2302 for BGP"; 2304 leaf peer-restart-time { 2305 type uint16 { 2306 range 0..4096; 2307 } 2308 description 2309 "The period of time (advertised by the peer) that 2310 the peer expects a restart of a BGP session to 2311 take"; 2312 } 2314 leaf peer-restarting { 2315 type boolean; 2316 description 2317 "This flag indicates whether the remote neighbor is currently 2318 in the process of restarting, and hence received routes are 2319 currently stale"; 2320 } 2322 leaf local-restarting { 2323 type boolean; 2324 description 2325 "This flag indicates whether the local neighbor is currently 2326 restarting. The flag is unset after all NLRI have been 2327 advertised to the peer, and the End-of-RIB (EOR) marker has 2328 been unset"; 2329 } 2331 leaf mode { 2332 type enumeration { 2333 enum HELPER_ONLY { 2334 description 2335 "The local router is operating in helper-only mode, and 2336 hence will not retain forwarding state during a local 2337 session restart, but will do so during a restart of the 2338 remote peer"; 2339 } 2340 enum BILATERAL { 2341 description 2342 "The local router is operating in both helper mode, and 2343 hence retains forwarding state during a remote restart, 2344 and also maintains forwarding state during local session 2345 restart"; 2346 } 2347 enum REMOTE_HELPER { 2348 description 2349 "The local system is able to retain routes during restart 2350 but the remote system is only able to act as a helper"; 2351 } 2352 } 2353 description 2354 "Ths leaf indicates the mode of operation of BGP graceful 2355 restart with the peer"; 2356 } 2357 } 2359 grouping bgp-neighbor-afi-safi-state { 2360 description 2361 "Operational state parameters relating to an individual AFI, 2362 SAFI for a neighbor"; 2364 leaf active { 2365 type boolean; 2366 description 2367 "This value indicates whether a particular AFI-SAFI has 2368 been succesfully negotiated with the peer. An AFI-SAFI 2369 may be enabled in the current running configuration, but a 2370 session restart may be required in order to negotiate the new 2371 capability."; 2372 } 2374 container prefixes { 2375 description "Prefix counters for the BGP session"; 2376 leaf received { 2377 type uint32; 2378 description 2379 "The number of prefixes received from the neighbor"; 2380 } 2382 leaf sent { 2383 type uint32; 2384 description 2385 "The number of prefixes advertised to the neighbor"; 2386 } 2388 leaf installed { 2389 type uint32; 2390 description 2391 "The number of advertised prefixes installed in the 2392 Loc-RIB"; 2393 } 2394 } 2395 } 2396 grouping bgp-neighbor-afi-safi-list { 2397 description 2398 "List of address-families associated with the BGP neighbor"; 2400 list afi-safi { 2401 key "afi-safi-name"; 2403 description 2404 "AFI,SAFI configuration available for the 2405 neighbour or group"; 2407 leaf afi-safi-name { 2408 type leafref { 2409 path "../config/afi-safi-name"; 2410 } 2411 description 2412 "Reference to the AFI-SAFI name used as a key 2413 for the AFI-SAFI list"; 2414 } 2416 container config { 2417 description 2418 "Configuration parameters for the AFI-SAFI"; 2419 uses bgp-common-mp-afi-safi-config; 2420 } 2421 container state { 2422 config false; 2423 description 2424 "State information relating to the AFI-SAFI"; 2425 uses bgp-common-mp-afi-safi-config; 2426 uses bgp-neighbor-afi-safi-state; 2427 } 2429 container graceful-restart { 2430 description 2431 "Parameters relating to BGP graceful-restart"; 2432 container config { 2433 description 2434 "Configuration options for BGP graceful-restart"; 2435 uses bgp-common-mp-afi-safi-graceful-restart-config; 2436 } 2437 container state { 2438 config false; 2439 description 2440 "State information for BGP graceful-restart"; 2441 uses bgp-common-mp-afi-safi-graceful-restart-config; 2442 uses bgp-neighbor-afi-safi-graceful-restart-state; 2443 } 2444 } 2446 uses bgp-common-mp-all-afi-safi-list-contents; 2447 uses bgp-neighbor-use-multiple-paths; 2448 } 2449 } 2451 grouping bgp-neighbor-base { 2452 description 2453 "Parameters related to a BGP neighbor"; 2455 container config { 2456 description 2457 "Configuration parameters relating to the BGP neighbor or 2458 group"; 2459 uses bgp-neighbor-config; 2460 uses bgp-common-neighbor-group-config; 2461 } 2462 container state { 2463 config false; 2464 description 2465 "State information relating to the BGP neighbor"; 2466 uses bgp-neighbor-config; 2467 uses bgp-common-neighbor-group-config; 2468 uses bgp-neighbor-state; 2469 } 2471 container timers { 2472 description 2473 "Timers related to a BGP neighbor"; 2474 container config { 2475 description 2476 "Configuration parameters relating to timers used for the 2477 BGP neighbor"; 2478 uses bgp-common-neighbor-group-timers-config; 2479 } 2480 container state { 2481 config false; 2482 description 2483 "State information relating to the timers used for the BGP 2484 neighbor"; 2485 uses bgp-common-neighbor-group-timers-config; 2486 uses bgp-neighbor-timers-state; 2487 } 2488 } 2489 container transport { 2490 description 2491 "Transport session parameters for the BGP neighbor"; 2492 container config { 2493 description 2494 "Configuration parameters relating to the transport 2495 session(s) used for the BGP neighbor"; 2496 uses bgp-common-neighbor-group-transport-config; 2497 } 2498 container state { 2499 config false; 2500 description 2501 "State information relating to the transport session(s) 2502 used for the BGP neighbor"; 2503 uses bgp-common-neighbor-group-transport-config; 2504 uses bgp-neighbor-transport-state; 2505 } 2506 } 2508 container error-handling { 2509 description 2510 "Error handling parameters used for the BGP neighbor or 2511 group"; 2512 container config { 2513 description 2514 "Configuration parameters enabling or modifying the 2515 behavior or enhanced error handling mechanisms for the BGP 2516 neighbor"; 2517 uses bgp-common-neighbor-group-error-handling-config; 2518 } 2519 container state { 2520 config false; 2521 description 2522 "State information relating to enhanced error handling 2523 mechanisms for the BGP neighbor"; 2524 uses bgp-common-neighbor-group-error-handling-config; 2525 uses bgp-neighbor-error-handling-state; 2526 } 2527 } 2529 container graceful-restart { 2530 description 2531 "Parameters relating the graceful restart mechanism for BGP"; 2532 container config { 2533 description 2534 "Configuration parameters relating to graceful-restart"; 2535 uses bgp-common-graceful-restart-config; 2536 } 2537 container state { 2538 config false; 2539 description 2540 "State information associated with graceful-restart"; 2541 uses bgp-common-graceful-restart-config; 2542 uses bgp-neighbor-graceful-restart-state; 2543 } 2544 } 2546 uses bgp-common-structure-neighbor-group-logging-options; 2547 uses bgp-common-structure-neighbor-group-ebgp-multihop; 2548 uses bgp-common-structure-neighbor-group-route-reflector; 2549 uses bgp-common-structure-neighbor-group-as-path-options; 2550 uses bgp-common-structure-neighbor-group-add-paths; 2551 uses bgp-neighbor-use-multiple-paths; 2552 uses rpol:apply-policy-group; 2554 container afi-safis { 2555 description 2556 "Per-address-family configuration parameters associated with 2557 the neighbor"; 2558 uses bgp-neighbor-afi-safi-list; 2559 } 2560 } 2562 grouping bgp-neighbor-list { 2563 description 2564 "The list of BGP neighbors"; 2566 list neighbor { 2567 key "neighbor-address"; 2568 description 2569 "List of BGP neighbors configured on the local system, 2570 uniquely identified by peer IPv[46] address"; 2572 leaf neighbor-address { 2573 type leafref { 2574 path "../config/neighbor-address"; 2575 } 2576 description 2577 "Reference to the address of the BGP neighbor used as 2578 a key in the neighbor list"; 2579 } 2581 uses bgp-neighbor-base; 2582 } 2584 } 2586 } 2588 2590 file "ietf-bgp-global.yang" 2592 submodule ietf-bgp-global { 2594 belongs-to ietf-bgp { 2595 prefix "bgp"; 2596 } 2598 import openconfig-extensions { prefix oc-ext; } 2599 import ietf-inet-types { prefix inet; } 2600 import ietf-yang-types { prefix yang; } 2602 // Include common submodule 2603 include ietf-bgp-common; 2604 include ietf-bgp-common-multiprotocol; 2606 // meta 2607 organization 2608 "OpenConfig working group"; 2610 contact 2611 "OpenConfig working group 2612 netopenconfig@googlegroups.com"; 2614 description 2615 "This sub-module contains groupings that are specific to the 2616 global context of the OpenConfig BGP module"; 2618 oc-ext:openconfig-version "2.1.1"; 2620 revision "2016-06-21" { 2621 description 2622 "OpenConfig BGP refactor"; 2623 reference "2.1.1"; 2624 } 2626 grouping bgp-global-config { 2627 description 2628 "Global configuration options for the BGP router."; 2630 leaf as { 2631 type inet:as-number; 2632 mandatory true; 2633 description 2634 "Local autonomous system number of the router. Uses 2635 the 32-bit as-number type from the model in RFC 6991."; 2636 } 2638 leaf router-id { 2639 type yang:dotted-quad; 2640 description 2641 "Router id of the router - an unsigned 32-bit integer 2642 expressed in dotted quad notation."; 2643 reference 2644 "RFC4271 - A Border Gateway Protocol 4 (BGP-4), 2645 Section 4.2"; 2646 } 2647 } 2649 grouping bgp-global-state { 2650 description 2651 "Operational state parameters for the BGP neighbor"; 2653 uses bgp-common-state; 2654 } 2656 grouping bgp-global-default-route-distance-config { 2657 description 2658 "Configuration options relating to the administrative distance 2659 (or preference) assigned to routes received from different 2660 sources (external, internal, and local)."; 2662 leaf external-route-distance { 2663 type uint8 { 2664 range "1..255"; 2665 } 2666 description 2667 "Administrative distance for routes learned from external 2668 BGP (eBGP)."; 2669 } 2670 leaf internal-route-distance { 2671 type uint8 { 2672 range "1..255"; 2673 } 2674 description 2675 "Administrative distance for routes learned from internal 2676 BGP (iBGP)."; 2677 } 2678 } 2680 grouping bgp-global-confederation-config { 2681 description 2682 "Configuration options specifying parameters when the local 2683 router is within an autonomous system which is part of a BGP 2684 confederation."; 2686 leaf enabled { 2687 type boolean; 2688 description 2689 "When this leaf is set to true it indicates that 2690 the local-AS is part of a BGP confederation"; 2691 } 2693 leaf identifier { 2694 type inet:as-number; 2695 description 2696 "Confederation identifier for the autonomous system."; 2697 } 2699 leaf-list member-as { 2700 type inet:as-number; 2701 description 2702 "Remote autonomous systems that are to be treated 2703 as part of the local confederation."; 2704 } 2705 } 2707 grouping bgp-global-afi-safi-list { 2708 description 2709 "List of address-families associated with the BGP instance"; 2711 list afi-safi { 2712 key "afi-safi-name"; 2714 description 2715 "AFI,SAFI configuration available for the 2716 neighbour or group"; 2718 leaf afi-safi-name { 2719 type leafref { 2720 path "../config/afi-safi-name"; 2721 } 2722 description 2723 "Reference to the AFI-SAFI name used as a key 2724 for the AFI-SAFI list"; 2725 } 2727 container config { 2728 description 2729 "Configuration parameters for the AFI-SAFI"; 2730 uses bgp-common-mp-afi-safi-config; 2731 } 2732 container state { 2733 config false; 2734 description 2735 "State information relating to the AFI-SAFI"; 2736 uses bgp-common-mp-afi-safi-config; 2737 uses bgp-common-state; 2738 } 2740 container graceful-restart { 2741 description 2742 "Parameters relating to BGP graceful-restart"; 2743 container config { 2744 description 2745 "Configuration options for BGP graceful-restart"; 2746 uses bgp-common-mp-afi-safi-graceful-restart-config; 2747 } 2748 container state { 2749 config false; 2750 description 2751 "State information for BGP graceful-restart"; 2752 uses bgp-common-mp-afi-safi-graceful-restart-config; 2753 } 2754 } 2756 uses bgp-common-route-selection-options; 2757 uses bgp-common-global-group-use-multiple-paths; 2758 uses bgp-common-mp-all-afi-safi-list-contents; 2759 } 2760 } 2762 // Structural groupings 2763 grouping bgp-global-base { 2764 description 2765 "Global configuration parameters for the BGP router"; 2767 container config { 2768 description 2769 "Configuration parameters relating to the global BGP router"; 2770 uses bgp-global-config; 2771 } 2772 container state { 2773 config false; 2774 description 2775 "State information relating to the global BGP router"; 2776 uses bgp-global-config; 2777 uses bgp-global-state; 2778 } 2780 container default-route-distance { 2781 description 2782 "Administrative distance (or preference) assigned to 2783 routes received from different sources 2784 (external, internal, and local)."; 2786 container config { 2787 description 2788 "Configuration parameters relating to the default route 2789 distance"; 2790 uses bgp-global-default-route-distance-config; 2791 } 2792 container state { 2793 config false; 2794 description 2795 "State information relating to the default route distance"; 2796 uses bgp-global-default-route-distance-config; 2797 } 2798 } 2800 container confederation { 2801 description 2802 "Parameters indicating whether the local system acts as part 2803 of a BGP confederation"; 2805 container config { 2806 description 2807 "Configuration parameters relating to BGP confederations"; 2808 uses bgp-global-confederation-config; 2809 } 2810 container state { 2811 config false; 2812 description 2813 "State information relating to the BGP confederations"; 2814 uses bgp-global-confederation-config; 2815 } 2816 } 2818 container graceful-restart { 2819 description 2820 "Parameters relating the graceful restart mechanism for BGP"; 2821 container config { 2822 description 2823 "Configuration parameters relating to graceful-restart"; 2824 uses bgp-common-graceful-restart-config; 2826 } 2827 container state { 2828 config false; 2829 description 2830 "State information associated with graceful-restart"; 2831 uses bgp-common-graceful-restart-config; 2832 } 2833 } 2835 uses bgp-common-global-group-use-multiple-paths; 2836 uses bgp-common-route-selection-options; 2838 container afi-safis { 2839 description 2840 "Address family specific configuration"; 2841 uses bgp-global-afi-safi-list; 2842 } 2843 } 2845 } 2846 2848 8. BGP types 2850 file "ietf-bgp-types.yang" 2852 module ietf-bgp-types { 2853 yang-version "1"; 2855 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; 2857 prefix "oc-bgp-types"; 2859 import ietf-inet-types { prefix inet; } 2860 import openconfig-types { prefix oc-types; } 2861 import openconfig-extensions { prefix oc-ext; } 2863 // meta 2864 organization 2865 "OpenConfig working group"; 2867 contact 2868 "OpenConfig working group 2869 netopenconfig@googlegroups.com"; 2871 description 2872 "This module contains general data definitions for use in BGP 2873 policy. It can be imported by modules that make use of BGP 2874 attributes"; 2876 oc-ext:openconfig-version "2.1.1"; 2878 revision "2016-06-21" { 2879 description 2880 "OpenConfig BGP refactor"; 2881 reference "2.1.1"; 2882 } 2884 identity BGP_CAPABILITY { 2885 description "Base identity for a BGP capability"; 2886 } 2888 identity MPBGP { 2889 base BGP_CAPABILITY; 2890 description 2891 "Multi-protocol extensions to BGP"; 2892 reference "RFC2858"; 2893 } 2895 identity ROUTE_REFRESH { 2896 base BGP_CAPABILITY; 2897 description 2898 "The BGP route-refresh functionality"; 2899 reference "RFC2918"; 2900 } 2902 identity ASN32 { 2903 base BGP_CAPABILITY; 2904 description 2905 "4-byte (32-bit) AS number functionality"; 2906 reference "RFC6793"; 2907 } 2909 identity GRACEFUL_RESTART { 2910 base BGP_CAPABILITY; 2911 description 2912 "Graceful restart functionality"; 2913 reference "RFC4724"; 2914 } 2916 identity ADD_PATHS { 2917 base BGP_CAPABILITY; 2918 description 2919 "BGP add-paths"; 2921 reference "draft-ietf-idr-add-paths"; 2922 } 2924 identity AFI_SAFI_TYPE { 2925 description 2926 "Base identity type for AFI,SAFI tuples for BGP-4"; 2927 reference "RFC4760 - multiprotocol extensions for BGP-4"; 2928 } 2930 identity IPV4_UNICAST { 2931 base AFI_SAFI_TYPE; 2932 description 2933 "IPv4 unicast (AFI,SAFI = 1,1)"; 2934 reference "RFC4760"; 2935 } 2937 identity IPV6_UNICAST { 2938 base AFI_SAFI_TYPE; 2939 description 2940 "IPv6 unicast (AFI,SAFI = 2,1)"; 2941 reference "RFC4760"; 2942 } 2944 identity IPV4_LABELED_UNICAST { 2945 base AFI_SAFI_TYPE; 2946 description 2947 "Labeled IPv4 unicast (AFI,SAFI = 1,4)"; 2948 reference "RFC3107"; 2949 } 2951 identity IPV6_LABELED_UNICAST { 2952 base AFI_SAFI_TYPE; 2953 description 2954 "Labeled IPv6 unicast (AFI,SAFI = 2,4)"; 2955 reference "RFC3107"; 2956 } 2958 identity L3VPN_IPV4_UNICAST { 2959 base AFI_SAFI_TYPE; 2960 description 2961 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 2962 reference "RFC4364"; 2963 } 2965 identity L3VPN_IPV6_UNICAST { 2966 base AFI_SAFI_TYPE; 2967 description 2968 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 2970 reference "RFC4659"; 2971 } 2973 identity L3VPN_IPV4_MULTICAST { 2974 base AFI_SAFI_TYPE; 2975 description 2976 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 2977 reference "RFC6514"; 2978 } 2980 identity L3VPN_IPV6_MULTICAST { 2981 base AFI_SAFI_TYPE; 2982 description 2983 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 2984 reference "RFC6514"; 2985 } 2987 identity L2VPN_VPLS { 2988 base AFI_SAFI_TYPE; 2989 description 2990 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 2991 reference "RFC4761"; 2992 } 2994 identity L2VPN_EVPN { 2995 base AFI_SAFI_TYPE; 2996 description 2997 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 2998 } 3000 identity BGP_WELL_KNOWN_STD_COMMUNITY { 3001 description 3002 "Reserved communities within the standard community space 3003 defined by RFC1997. These communities must fall within the 3004 range 0x00000000 to 0xFFFFFFFF"; 3005 reference "RFC1997"; 3006 } 3008 identity NO_EXPORT { 3009 base BGP_WELL_KNOWN_STD_COMMUNITY; 3010 description 3011 "Do not export NLRI received carrying this community outside 3012 the bounds of this autonomous system, or this confederation if 3013 the local autonomous system is a confederation member AS. This 3014 community has a value of 0xFFFFFF01."; 3015 reference "RFC1997"; 3016 } 3017 identity NO_ADVERTISE { 3018 base BGP_WELL_KNOWN_STD_COMMUNITY; 3019 description 3020 "All NLRI received carrying this community must not be 3021 advertised to other BGP peers. This community has a value of 3022 0xFFFFFF02."; 3023 reference "RFC1997"; 3024 } 3026 identity NO_EXPORT_SUBCONFED { 3027 base BGP_WELL_KNOWN_STD_COMMUNITY; 3028 description 3029 "All NLRI received carrying this community must not be 3030 advertised to external BGP peers - including over confederation 3031 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 3032 reference "RFC1997"; 3033 } 3035 identity NOPEER { 3036 base BGP_WELL_KNOWN_STD_COMMUNITY; 3037 description 3038 "An autonomous system receiving NLRI tagged with this community 3039 is advised not to readvertise the NLRI to external bi-lateral 3040 peer autonomous systems. An AS may also filter received NLRI 3041 from bilateral peer sessions when they are tagged with this 3042 community value"; 3043 reference "RFC3765"; 3044 } 3046 typedef bgp-session-direction { 3047 type enumeration { 3048 enum INBOUND { 3049 description 3050 "Refers to all NLRI received from the BGP peer"; 3051 } 3052 enum OUTBOUND { 3053 description 3054 "Refers to all NLRI advertised to the BGP peer"; 3055 } 3056 } 3057 description 3058 "Type to describe the direction of NLRI transmission"; 3059 } 3061 typedef bgp-well-known-community-type { 3062 type identityref { 3063 base BGP_WELL_KNOWN_STD_COMMUNITY; 3064 } 3065 description 3066 "Type definition for well-known IETF community attribute 3067 values"; 3068 reference 3069 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 3070 } 3072 typedef bgp-std-community-type { 3073 // TODO: further refine restrictions and allowed patterns 3074 // 4-octet value: 3075 // 2 octets 3076 // 2 octets 3077 type union { 3078 type uint32 { 3079 // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - 3080 // 0xFFFFFFFF are reserved 3081 range "65536..4294901759"; // 0x00010000..0xFFFEFFFF 3082 } 3083 type string { 3084 pattern '([0-9]+:[0-9]+)'; 3085 } 3086 } 3087 description 3088 "Type definition for standard commmunity attributes"; 3089 reference "RFC 1997 - BGP Communities Attribute"; 3090 } 3092 typedef bgp-ext-community-type { 3093 // TODO: needs more work to make this more precise given the 3094 // variability of extended community attribute specifications 3095 // 8-octet value: 3096 // 2 octects 3097 // 6 octets 3099 type union { 3100 type string { 3101 // Type 1: 2-octet global and 4-octet local 3102 // (AS number) (Integer) 3103 pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 3104 '[1-9][0-9]{1,4}|[0-9]):' + 3105 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 3106 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3107 } 3108 type string { 3109 // Type 2: 4-octet global and 2-octet local 3110 // (ipv4-address) (integer) 3111 pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 3112 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 3113 '2[0-4][0-9]|25[0-5]):' + 3114 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 3115 '[1-9][0-9]{1,4}|[0-9])'; 3116 } 3117 type string { 3118 // route-target with Type 1 3119 // route-target:(ASN):(local-part) 3120 pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' + 3121 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 3122 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 3123 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3124 } 3125 type string { 3126 // route-target with Type 2 3127 // route-target:(IPv4):(local-part) 3128 pattern 'route\-target:' + 3129 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 3130 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 3131 '2[0-4][0-9]|25[0-5]):' + 3132 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 3133 '[1-9][0-9]{1,4}|[0-9])'; 3134 } 3135 type string { 3136 // route-origin with Type 1 3137 pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' + 3138 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 3139 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 3140 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 3141 } 3142 type string { 3143 // route-origin with Type 2 3144 pattern 'route\-origin:' + 3145 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 3146 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 3147 '2[0-4][0-9]|25[0-5]):' + 3148 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 3149 '[1-9][0-9]{1,4}|[0-9])'; 3150 } 3151 } 3152 description 3153 "Type definition for extended community attributes"; 3154 reference "RFC 4360 - BGP Extended Communities Attribute"; 3155 } 3157 typedef bgp-community-regexp-type { 3158 // TODO: needs more work to decide what format these regexps can 3159 // take. 3161 type oc-types:std-regexp; 3162 description 3163 "Type definition for communities specified as regular 3164 expression patterns"; 3165 } 3167 typedef bgp-origin-attr-type { 3168 type enumeration { 3169 enum IGP { 3170 description "Origin of the NLRI is internal"; 3171 } 3172 enum EGP { 3173 description "Origin of the NLRI is EGP"; 3174 } 3175 enum INCOMPLETE { 3176 description "Origin of the NLRI is neither IGP or EGP"; 3177 } 3178 } 3179 description 3180 "Type definition for standard BGP origin attribute"; 3181 reference "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), 3182 Sec 4.3"; 3183 } 3185 typedef peer-type { 3186 type enumeration { 3187 enum INTERNAL { 3188 description "internal (iBGP) peer"; 3189 } 3190 enum EXTERNAL { 3191 description "external (eBGP) peer"; 3192 } 3193 } 3194 description 3195 "labels a peer or peer group as explicitly internal or 3196 external"; 3197 } 3199 identity REMOVE_PRIVATE_AS_OPTION { 3200 description 3201 "Base identity for options for removing private autonomous 3202 system numbers from the AS_PATH attribute"; 3203 } 3205 identity PRIVATE_AS_REMOVE_ALL { 3206 base REMOVE_PRIVATE_AS_OPTION; 3207 description 3208 "Strip all private autonmous system numbers from the AS_PATH. 3210 This action is performed regardless of the other content of the 3211 AS_PATH attribute, and for all instances of private AS numbers 3212 within that attribute."; 3213 } 3215 identity PRIVATE_AS_REPLACE_ALL { 3216 base REMOVE_PRIVATE_AS_OPTION; 3217 description 3218 "Replace all instances of private autonomous system numbers in 3219 the AS_PATH with the local BGP speaker's autonomous system 3220 number. This action is performed regardless of the other 3221 content of the AS_PATH attribute, and for all instances of 3222 private AS number within that attribute."; 3223 } 3225 typedef remove-private-as-option { 3226 type identityref { 3227 base REMOVE_PRIVATE_AS_OPTION; 3228 } 3229 description 3230 "set of options for configuring how private AS path numbers 3231 are removed from advertisements"; 3232 } 3234 typedef percentage { 3235 type uint8 { 3236 range "0..100"; 3237 } 3238 description 3239 "Integer indicating a percentage value"; 3240 } 3242 typedef rr-cluster-id-type { 3243 type union { 3244 type uint32; 3245 type inet:ipv4-address; 3246 } 3247 description 3248 "union type for route reflector cluster ids: 3249 option 1: 4-byte number 3250 option 2: IP address"; 3251 } 3253 typedef community-type { 3254 type enumeration { 3255 enum STANDARD { 3256 description "send only standard communities"; 3257 } 3258 enum EXTENDED { 3259 description "send only extended communities"; 3260 } 3261 enum BOTH { 3262 description "send both standard and extended communities"; 3263 } 3264 enum NONE { 3265 description "do not send any community attribute"; 3266 } 3267 } 3268 description 3269 "type describing variations of community attributes: 3270 STANDARD: standard BGP community [rfc1997] 3271 EXTENDED: extended BGP community [rfc4360] 3272 BOTH: both standard and extended community"; 3273 } 3274 } 3276 3278 9. BGP policy data 3280 file "ietf-bgp-policy.yang" 3282 module ietf-bgp-policy { 3284 yang-version "1"; 3286 // namespace 3287 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; 3289 prefix "oc-bgp-pol"; 3291 // import some basic types 3292 import ietf-inet-types { prefix inet; } 3293 import ietf-routing-policy {prefix rpol; } 3294 import openconfig-policy-types { prefix pol-types; } 3295 import ietf-bgp-types { prefix oc-bgp-types; } 3296 import openconfig-extensions { prefix oc-ext; } 3298 // meta 3299 organization 3300 "OpenConfig working group"; 3302 contact 3303 "OpenConfig working group 3304 netopenconfig@googlegroups.com"; 3306 description 3307 "This module contains data definitions for BGP routing policy. 3308 It augments the base routing-policy module with BGP-specific 3309 options for conditions and actions."; 3311 oc-ext:openconfig-version "2.1.1"; 3313 revision "2016-06-21" { 3314 description 3315 "OpenConfig BGP refactor"; 3316 reference "2.1.1"; 3317 } 3319 // typedef statements 3321 typedef bgp-set-community-option-type { 3322 type enumeration { 3323 enum ADD { 3324 description 3325 "add the specified communities to the existing 3326 community attribute"; 3327 } 3328 enum REMOVE { 3329 description 3330 "remove the specified communities from the 3331 existing community attribute"; 3332 } 3333 enum REPLACE { 3334 description 3335 "replace the existing community attribute with 3336 the specified communities. If an empty set is 3337 specified, this removes the community attribute 3338 from the route."; 3339 } 3340 } 3341 description 3342 "Type definition for options when setting the community 3343 attribute in a policy action"; 3344 } 3346 typedef bgp-next-hop-type { 3347 type union { 3348 type inet:ip-address-no-zone; 3349 type enumeration { 3350 enum SELF { 3351 description "special designation for local router's own 3352 address, i.e., next-hop-self"; 3353 } 3354 } 3355 } 3356 description 3357 "type definition for specifying next-hop in policy actions"; 3358 } 3360 typedef bgp-set-med-type { 3361 type union { 3362 type uint32; 3363 type string { 3364 pattern "^[+-][0-9]+"; 3365 } 3366 type enumeration { 3367 enum IGP { 3368 description "set the MED value to the IGP cost toward the 3369 next hop for the route"; 3370 } 3371 } 3372 } 3373 description 3374 "Type definition for specifying how the BGP MED can 3375 be set in BGP policy actions. The three choices are to set 3376 the MED directly, increment/decrement using +/- notation, 3377 and setting it to the IGP cost (predefined value)."; 3378 } 3380 // grouping statements 3382 grouping match-community-config { 3383 description 3384 "Configuration data for match conditions on communities"; 3386 leaf community-set { 3387 type leafref { 3388 path "/rpol:routing-policy/rpol:defined-sets/" + 3389 "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:community-sets/" + 3390 "oc-bgp-pol:community-set/oc-bgp-pol:community-set-name"; 3391 } 3392 description 3393 "References a defined community set"; 3394 } 3396 uses rpol:match-set-options-group; 3397 } 3398 grouping match-community-state { 3399 description 3400 "Operational state data for match conditions on communities"; 3401 } 3403 grouping match-community-top { 3404 description 3405 "Top-level grouping for match conditions on communities"; 3407 container match-community-set { 3408 description 3409 "Top-level container for match conditions on communities. 3410 Match a referenced community-set according to the logic 3411 defined in the match-set-options leaf"; 3413 container config { 3414 description 3415 "Configuration data for match conditions on communities"; 3417 uses match-community-config; 3418 } 3420 container state { 3422 config false; 3424 description 3425 "Operational state data "; 3427 uses match-community-config; 3428 uses match-community-state; 3429 } 3430 } 3431 } 3433 grouping match-ext-community-config { 3434 description 3435 "Configuration data for match conditions on extended 3436 communities"; 3438 leaf ext-community-set { 3439 type leafref { 3440 path "/rpol:routing-policy/rpol:defined-sets/" + 3441 "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:ext-community-sets/" + 3442 "oc-bgp-pol:ext-community-set/" + 3443 "oc-bgp-pol:ext-community-set-name"; 3444 } 3445 description "References a defined extended community set"; 3447 } 3449 uses rpol:match-set-options-group; 3450 } 3452 grouping match-ext-community-state { 3453 description 3454 "Operational state data for match conditions on extended 3455 communities"; 3456 } 3458 grouping match-ext-community-top { 3459 description 3460 "Top-level grouping for match conditions on extended 3461 communities"; 3463 container match-ext-community-set { 3464 description 3465 "Match a referenced extended community-set according to the 3466 logic defined in the match-set-options leaf"; 3468 container config { 3469 description 3470 "Configuration data for match conditions on extended 3471 communities"; 3473 uses match-ext-community-config; 3474 } 3476 container state { 3478 config false; 3480 description 3481 "Operational state data for match conditions on extended 3482 communities"; 3484 uses match-ext-community-config; 3485 uses match-ext-community-state; 3486 } 3487 } 3488 } 3490 grouping match-as-path-config { 3491 description 3492 "Configuration data for match conditions on AS path set"; 3494 leaf as-path-set { 3495 type leafref { 3496 path "/rpol:routing-policy/rpol:defined-sets/" + 3497 "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:as-path-sets/" + 3498 "oc-bgp-pol:as-path-set/oc-bgp-pol:as-path-set-name"; 3499 } 3500 description "References a defined AS path set"; 3501 } 3502 uses rpol:match-set-options-group; 3503 } 3505 grouping match-as-path-state { 3506 description 3507 "Operational state data for match conditions on AS path set"; 3508 } 3510 grouping match-as-path-top { 3511 description 3512 "Top-level grouping for match conditions on AS path set"; 3514 container match-as-path-set { 3515 description 3516 "Match a referenced as-path set according to the logic 3517 defined in the match-set-options leaf"; 3519 container config { 3520 description 3521 "Configuration data for match conditions on AS path set"; 3523 uses match-as-path-config; 3524 } 3526 container state { 3528 config false; 3530 description 3531 "Operational state data for match conditions on AS 3532 path set"; 3534 uses match-as-path-config; 3535 uses match-as-path-state; 3536 } 3537 } 3538 } 3540 grouping bgp-match-set-conditions { 3541 description 3542 "Condition statement definitions for checking membership in a 3543 defined set"; 3545 uses match-community-top; 3546 uses match-ext-community-top; 3547 uses match-as-path-top; 3548 } 3550 grouping community-count-config { 3551 description 3552 "Configuration data for community count condition"; 3554 uses pol-types:attribute-compare-operators; 3555 } 3557 grouping community-count-state { 3558 description 3559 "Operational state data for community count condition"; 3560 } 3562 grouping community-count-top { 3563 description 3564 "Top-level grouping for community count condition"; 3566 container community-count { 3567 description 3568 "Value and comparison operations for conditions based on the 3569 number of communities in the route update"; 3571 container config { 3572 description 3573 "Configuration data for community count condition"; 3575 uses community-count-config; 3576 } 3578 container state { 3580 config false; 3582 description 3583 "Operational state data for community count condition"; 3585 uses community-count-config; 3586 uses community-count-state; 3587 } 3588 } 3589 } 3590 grouping as-path-length-config { 3591 description 3592 "Configuration data for AS path length condition"; 3594 uses pol-types:attribute-compare-operators; 3595 } 3597 grouping as-path-length-state { 3598 description 3599 "Operational state data for AS path length condition"; 3600 } 3602 grouping as-path-length-top { 3603 description 3604 "Top-level grouping for AS path length condition"; 3606 container as-path-length { 3607 description 3608 "Value and comparison operations for conditions based on the 3609 length of the AS path in the route update"; 3611 container config { 3612 description 3613 "Configuration data for AS path length condition"; 3615 uses as-path-length-config; 3616 } 3618 container state { 3620 config false; 3622 description 3623 "Operational state data for AS path length condition"; 3625 uses as-path-length-config; 3626 uses as-path-length-state; 3627 } 3628 } 3629 } 3631 grouping bgp-conditions-config { 3632 description 3633 "Configuration data for BGP-specific policy conditions"; 3635 leaf med-eq { 3636 type uint32; 3637 description 3638 "Condition to check if the received MED value is equal to 3639 the specified value"; 3640 } 3642 leaf origin-eq { 3643 type oc-bgp-types:bgp-origin-attr-type; 3644 description 3645 "Condition to check if the route origin is equal to the 3646 specified value"; 3647 } 3649 leaf-list next-hop-in { 3650 type inet:ip-address-no-zone; 3651 description 3652 "List of next hop addresses to check for in the route 3653 update"; 3654 } 3656 leaf-list afi-safi-in { 3657 type identityref { 3658 base oc-bgp-types:AFI_SAFI_TYPE; 3659 } 3660 description 3661 "List of address families which the NLRI may be 3662 within"; 3663 } 3665 leaf local-pref-eq { 3666 type uint32; 3667 // TODO: add support for other comparisons if needed 3668 description 3669 "Condition to check if the local pref attribute is equal to 3670 the specified value"; 3671 } 3673 leaf route-type { 3674 // TODO: verify extent of vendor support for this comparison 3675 type enumeration { 3676 enum INTERNAL { 3677 description "route type is internal"; 3678 } 3679 enum EXTERNAL { 3680 description "route type is external"; 3681 } 3682 } 3683 description 3684 "Condition to check the route type in the route update"; 3685 } 3687 } 3689 grouping bgp-conditions-state { 3690 description 3691 "Operational state data for BGP-specific policy conditions"; 3692 } 3694 grouping bgp-conditions-top { 3695 description 3696 "Top-level grouping for BGP-specific policy conditions"; 3698 container bgp-conditions { 3699 description 3700 "Top-level container "; 3702 container config { 3703 description 3704 "Configuration data for BGP-specific policy conditions"; 3706 uses bgp-conditions-config; 3707 } 3709 container state { 3711 config false; 3713 description 3714 "Operational state data for BGP-specific policy 3715 conditions"; 3717 uses bgp-conditions-config; 3718 uses bgp-conditions-state; 3719 } 3721 uses community-count-top; 3722 uses as-path-length-top; 3723 uses bgp-match-set-conditions; 3724 } 3725 } 3727 grouping community-set-config { 3728 description 3729 "Configuration data for BGP community sets"; 3731 leaf community-set-name { 3732 type string; 3733 mandatory true; 3734 description 3735 "name / label of the community set -- this is used to 3736 reference the set in match conditions"; 3737 } 3739 leaf-list community-member { 3740 type union { 3741 type oc-bgp-types:bgp-std-community-type; 3742 type oc-bgp-types:bgp-community-regexp-type; 3743 type oc-bgp-types:bgp-well-known-community-type; 3744 } 3745 description 3746 "members of the community set"; 3747 } 3748 } 3750 grouping community-set-state { 3751 description 3752 "Operational state data for BGP community sets"; 3753 } 3755 grouping community-set-top { 3756 description 3757 "Top-level grouping for BGP community sets"; 3759 container community-sets { 3760 description 3761 "Enclosing container for list of defined BGP community sets"; 3763 list community-set { 3764 key "community-set-name"; 3765 description 3766 "List of defined BGP community sets"; 3768 leaf community-set-name { 3769 type leafref { 3770 path "../config/community-set-name"; 3771 } 3772 description 3773 "Reference to list key"; 3774 } 3776 container config { 3777 description 3778 "Configuration data for BGP community sets"; 3780 uses community-set-config; 3781 } 3782 container state { 3784 config false; 3786 description 3787 "Operational state data for BGP community sets"; 3789 uses community-set-config; 3790 uses community-set-state; 3791 } 3792 } 3793 } 3794 } 3796 grouping ext-community-set-config { 3797 description 3798 "Configuration data for extended BGP community sets"; 3800 leaf ext-community-set-name { 3801 type string; 3802 description 3803 "name / label of the extended community set -- this is 3804 used to reference the set in match conditions"; 3805 } 3807 leaf-list ext-community-member { 3808 type union { 3809 type oc-bgp-types:bgp-ext-community-type; 3810 type oc-bgp-types:bgp-community-regexp-type; 3811 } 3812 description 3813 "members of the extended community set"; 3814 } 3815 } 3817 grouping ext-community-set-state { 3818 description 3819 "Operational state data for extended BGP community sets"; 3820 } 3822 grouping ext-community-set-top { 3823 description 3824 "Top-level grouping for extended BGP community sets"; 3826 container ext-community-sets { 3827 description 3828 "Enclosing container for list of extended BGP community 3829 sets"; 3831 list ext-community-set { 3832 key "ext-community-set-name"; 3833 description 3834 "List of defined extended BGP community sets"; 3836 leaf ext-community-set-name { 3837 type leafref { 3838 path "../config/ext-community-set-name"; 3839 } 3840 description 3841 "Reference to list key"; 3842 } 3844 container config { 3845 description 3846 "Configuration data for extended BGP community sets"; 3848 uses ext-community-set-config; 3849 } 3851 container state { 3853 config false; 3855 description 3856 "Operational state data for extended BGP community sets"; 3858 uses ext-community-set-config; 3859 uses ext-community-set-state; 3860 } 3861 } 3862 } 3863 } 3865 grouping as-path-set-config { 3866 description 3867 "Configuration data for AS path sets"; 3869 leaf as-path-set-name { 3870 type string; 3871 description 3872 "name of the AS path set -- this is used to reference 3873 the set in match conditions"; 3874 } 3876 leaf-list as-path-set-member { 3877 // TODO: need to refine typedef for AS path expressions 3878 type string; 3879 description 3880 "AS path expression -- list of ASes in the set"; 3881 } 3882 } 3884 grouping as-path-set-state { 3885 description 3886 "Operational state data for AS path sets"; 3887 } 3889 grouping as-path-set-top { 3890 description 3891 "Top-level grouping for AS path sets"; 3893 container as-path-sets { 3894 description 3895 "Enclosing container for list of define AS path sets"; 3897 list as-path-set { 3898 key "as-path-set-name"; 3899 description 3900 "List of defined AS path sets"; 3902 leaf as-path-set-name { 3903 type leafref { 3904 path "../config/as-path-set-name"; 3905 } 3906 description 3907 "Reference to list key"; 3908 } 3910 container config { 3911 description 3912 "Configuration data for AS path sets"; 3914 uses as-path-set-config; 3915 } 3917 container state { 3919 config false; 3921 description 3922 "Operational state data for AS path sets"; 3924 uses as-path-set-config; 3925 uses as-path-set-state; 3926 } 3928 } 3929 } 3930 } 3932 // augment statements 3934 augment "/rpol:routing-policy/rpol:defined-sets" { 3935 description "adds BGP defined sets container to routing policy 3936 model"; 3938 container bgp-defined-sets { 3939 description 3940 "BGP-related set definitions for policy match conditions"; 3942 uses community-set-top; 3943 uses ext-community-set-top; 3944 uses as-path-set-top; 3945 } 3946 } 3948 grouping as-path-prepend-config { 3949 description 3950 "Configuration data for the AS path prepend action"; 3952 leaf repeat-n { 3953 type uint8 { 3954 range 1..max; 3955 } 3956 description 3957 "Number of times to prepend the local AS number to the AS 3958 path. The value should be between 1 and the maximum 3959 supported by the implementation."; 3960 } 3961 } 3963 grouping as-path-prepend-state { 3964 description 3965 "Operational state data for the AS path prepend action"; 3966 } 3968 grouping as-path-prepend-top { 3969 description 3970 "Top-level grouping for the AS path prepend action"; 3972 container set-as-path-prepend { 3973 description 3974 "action to prepend local AS number to the AS-path a 3975 specified number of times"; 3977 container config { 3978 description 3979 "Configuration data for the AS path prepend action"; 3981 uses as-path-prepend-config; 3982 } 3984 container state { 3986 config false; 3988 description 3989 "Operational state data for the AS path prepend action"; 3991 uses as-path-prepend-config; 3992 uses as-path-prepend-state; 3993 } 3994 } 3995 } 3997 grouping set-community-action-common { 3998 description 3999 "Common leaves for set-community and set-ext-community 4000 actions"; 4002 leaf method { 4003 type enumeration { 4004 enum INLINE { 4005 description 4006 "The extended communities are specified inline as a 4007 list"; 4008 } 4009 enum REFERENCE { 4010 description 4011 "The extended communities are specified by referencing a 4012 defined ext-community set"; 4013 } 4014 } 4015 description 4016 "Indicates the method used to specify the extended 4017 communities for the set-ext-community action"; 4018 } 4020 leaf options { 4021 type bgp-set-community-option-type; 4022 description 4023 "Options for modifying the community attribute with 4024 the specified values. These options apply to both 4025 methods of setting the community attribute."; 4026 } 4027 } 4029 grouping set-community-inline-config { 4030 description 4031 "Configuration data for inline specification of set-community 4032 action"; 4034 leaf-list communities { 4035 type union { 4036 type oc-bgp-types:bgp-std-community-type; 4037 type oc-bgp-types:bgp-well-known-community-type; 4038 } 4039 description 4040 "Set the community values for the update inline with 4041 a list."; 4042 } 4043 } 4045 grouping set-community-inline-state { 4046 description 4047 "Operational state data or inline specification of 4048 set-community action"; 4049 } 4051 grouping set-community-inline-top { 4052 description 4053 "Top-level grouping or inline specification of set-community 4054 action"; 4056 container inline { 4057 when "../config/method=INLINE" { 4058 description 4059 "Active only when the set-community method is INLINE"; 4060 } 4061 description 4062 "Set the community values for the action inline with 4063 a list."; 4065 container config { 4066 description 4067 "Configuration data or inline specification of set-community 4068 action"; 4070 uses set-community-inline-config; 4071 } 4072 container state { 4074 config false; 4076 description 4077 "Operational state data or inline specification of 4078 set-community action"; 4080 uses set-community-inline-config; 4081 uses set-community-inline-state; 4082 } 4083 } 4084 } 4086 grouping set-community-reference-config { 4087 description 4088 "Configuration data for referening a community-set in the 4089 set-community action"; 4091 leaf community-set-ref { 4092 type leafref { 4093 path "/rpol:routing-policy/rpol:defined-sets/" + 4094 "oc-bgp-pol:bgp-defined-sets/" + 4095 "oc-bgp-pol:community-sets/oc-bgp-pol:community-set/" + 4096 "oc-bgp-pol:community-set-name"; 4097 } 4098 description 4099 "References a defined community set by name"; 4100 } 4101 } 4103 grouping set-community-reference-state { 4104 description 4105 "Operational state data for referening a community-set in the 4106 set-community action"; 4107 } 4109 grouping set-community-reference-top { 4110 description 4111 "Top-level grouping for referening a community-set in the 4112 set-community action"; 4114 container reference { 4115 when "../config/method=REFERENCE" { 4116 description 4117 "Active only when the set-community method is REFERENCE"; 4118 } 4119 description 4120 "Provide a reference to a defined community set for the 4121 set-community action"; 4123 container config { 4124 description 4125 "Configuration data for referening a community-set in the 4126 set-community action"; 4128 uses set-community-reference-config; 4129 } 4131 container state { 4133 config false; 4135 description 4136 "Operational state data for referening a community-set 4137 in the set-community action"; 4139 uses set-community-reference-config; 4140 uses set-community-reference-state; 4141 } 4142 } 4143 } 4145 grouping set-community-action-config { 4146 description 4147 "Configuration data for the set-community action"; 4149 uses set-community-action-common; 4150 } 4152 grouping set-community-action-state { 4153 description 4154 "Operational state data for the set-community action"; 4155 } 4157 grouping set-community-action-top { 4158 description 4159 "Top-level grouping for the set-community action"; 4161 container set-community { 4162 description 4163 "Action to set the community attributes of the route, along 4164 with options to modify how the community is modified. 4165 Communities may be set using an inline list OR 4166 reference to an existing defined set (not both)."; 4168 container config { 4169 description 4170 "Configuration data for the set-community action"; 4172 uses set-community-action-config; 4173 } 4175 container state { 4177 config false; 4179 description 4180 "Operational state data for the set-community action"; 4182 uses set-community-action-config; 4183 uses set-community-action-state; 4184 } 4186 uses set-community-inline-top; 4187 uses set-community-reference-top; 4188 } 4189 } 4191 grouping set-ext-community-inline-config { 4192 description 4193 "Configuration data for inline specification of 4194 set-ext-community action"; 4196 leaf-list communities { 4197 type union { 4198 type oc-bgp-types:bgp-ext-community-type; 4199 type oc-bgp-types:bgp-well-known-community-type; 4200 } 4201 description 4202 "Set the extended community values for the update inline 4203 with a list."; 4204 } 4205 } 4207 grouping set-ext-community-inline-state { 4208 description 4209 "Operational state data or inline specification of 4210 set-ext-community action"; 4211 } 4213 grouping set-ext-community-inline-top { 4214 description 4215 "Top-level grouping or inline specification of set-ext-community 4216 action"; 4218 container inline { 4219 when "../config/method=INLINE" { 4220 description 4221 "Active only when the set-community method is INLINE"; 4222 } 4223 description 4224 "Set the extended community values for the action inline with 4225 a list."; 4227 container config { 4228 description 4229 "Configuration data or inline specification of 4230 set-ext-community action"; 4232 uses set-ext-community-inline-config; 4233 } 4235 container state { 4237 config false; 4239 description 4240 "Operational state data or inline specification of 4241 set-ext-community action"; 4243 uses set-ext-community-inline-config; 4244 uses set-ext-community-inline-state; 4245 } 4246 } 4247 } 4249 grouping set-ext-community-reference-config { 4250 description 4251 "Configuration data for referening a extended community-set 4252 in the set-ext-community action"; 4254 leaf ext-community-set-ref { 4255 type leafref { 4256 path "/rpol:routing-policy/rpol:defined-sets/" + 4257 "oc-bgp-pol:bgp-defined-sets/" + 4258 "oc-bgp-pol:ext-community-sets/" + 4259 "oc-bgp-pol:ext-community-set/" + 4260 "oc-bgp-pol:ext-community-set-name"; 4261 } 4262 description 4263 "References a defined extended community set by 4264 name"; 4265 } 4266 } 4268 grouping set-ext-community-reference-state { 4269 description 4270 "Operational state data for referening an extended 4271 community-set in the set-ext-community action"; 4272 } 4274 grouping set-ext-community-reference-top { 4275 description 4276 "Top-level grouping for referening an extended community-set 4277 in the set-community action"; 4279 container reference { 4280 when "../config/method=REFERENCE" { 4281 description 4282 "Active only when the set-community method is REFERENCE"; 4283 } 4284 description 4285 "Provide a reference to an extended community set for the 4286 set-ext-community action"; 4288 container config { 4289 description 4290 "Configuration data for referening an extended 4291 community-set in the set-ext-community action"; 4293 uses set-ext-community-reference-config; 4294 } 4296 container state { 4298 config false; 4300 description 4301 "Operational state data for referening an extended 4302 community-set in the set-ext-community action"; 4304 uses set-ext-community-reference-config; 4305 uses set-ext-community-reference-state; 4306 } 4307 } 4308 } 4310 grouping set-ext-community-action-config { 4311 description 4312 "Configuration data for the set-ext-community action"; 4314 uses set-community-action-common; 4315 } 4317 grouping set-ext-community-action-state { 4318 description 4319 "Operational state data for the set-ext-community action"; 4320 } 4322 grouping set-ext-community-action-top { 4323 description 4324 "Top-level grouping for the set-ext-community action"; 4326 container set-ext-community { 4327 description 4328 "Action to set the extended community attributes of the 4329 route, along with options to modify how the community is 4330 modified. Extended communities may be set using an inline 4331 list OR a reference to an existing defined set (but not 4332 both)."; 4334 container config { 4335 description 4336 "Configuration data for the set-ext-community action"; 4338 uses set-ext-community-action-config; 4339 } 4341 container state { 4343 config false; 4345 description 4346 "Operational state data for the set-ext-community action"; 4348 uses set-ext-community-action-config; 4349 uses set-ext-community-action-state; 4350 } 4351 uses set-ext-community-inline-top; 4352 uses set-ext-community-reference-top; 4353 } 4354 } 4356 grouping bgp-actions-config { 4357 description 4358 "Configuration data for BGP-specific actions"; 4360 leaf set-route-origin { 4361 type oc-bgp-types:bgp-origin-attr-type; 4362 description "set the origin attribute to the specified 4363 value"; 4364 } 4366 leaf set-local-pref { 4367 type uint32; 4368 description "set the local pref attribute on the route 4369 update"; 4370 } 4372 leaf set-next-hop { 4373 type bgp-next-hop-type; 4374 description "set the next-hop attribute in the route update"; 4375 } 4377 leaf set-med { 4378 type bgp-set-med-type; 4379 description "set the med metric attribute in the route 4380 update"; 4381 } 4382 } 4384 grouping bgp-actions-state { 4385 description 4386 "Operational state data for BGP-specific actions"; 4387 } 4389 grouping bgp-actions-top { 4390 description 4391 "Top-level grouping for BGP-specific actions"; 4393 container bgp-actions { 4394 description 4395 "Top-level container for BGP-specific actions"; 4397 container config { 4398 description 4399 "Configuration data for BGP-specific actions"; 4401 uses bgp-actions-config; 4402 } 4404 container state { 4406 config false; 4407 description 4408 "Operational state data for BGP-specific actions"; 4410 uses bgp-actions-config; 4411 uses bgp-actions-state; 4412 } 4413 uses as-path-prepend-top; 4414 uses set-community-action-top; 4415 uses set-ext-community-action-top; 4416 } 4417 } 4419 augment "/rpol:routing-policy/rpol:policy-definitions/" + 4420 "rpol:policy-definition/rpol:statements/rpol:statement/" + 4421 "rpol:conditions" { 4422 description 4423 "BGP policy conditions added to routing policy module"; 4425 uses bgp-conditions-top; 4426 } 4428 augment "/rpol:routing-policy/rpol:policy-definitions/" + 4429 "rpol:policy-definition/rpol:statements/rpol:statement/" + 4430 "rpol:actions" { 4431 description "BGP policy actions added to routing policy 4432 module"; 4434 uses bgp-actions-top; 4435 } 4437 // rpc statements 4439 // notification statements 4440 } 4442 4444 10. References 4446 10.1. Normative references 4448 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 4449 the Network Configuration Protocol (NETCONF)", RFC 6020, 4450 DOI 10.17487/RFC6020, October 2010, 4451 . 4453 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 4454 and A. Bierman, Ed., "Network Configuration Protocol 4455 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 4456 . 4458 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 4459 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 4460 DOI 10.17487/RFC4271, January 2006, 4461 . 4463 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 4464 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 4465 . 4467 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 4468 Reflection: An Alternative to Full Mesh Internal BGP 4469 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 4470 . 4472 [RFC3065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 4473 System Confederations for BGP", RFC 3065, 4474 DOI 10.17487/RFC3065, February 2001, 4475 . 4477 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 4478 Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November 4479 1998, . 4481 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 4482 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 4483 DOI 10.17487/RFC4724, January 2007, 4484 . 4486 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 4487 Austein, "BGP Prefix Origin Validation", RFC 6811, 4488 DOI 10.17487/RFC6811, January 2013, 4489 . 4491 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 4492 "Multiprotocol Extensions for BGP-4", RFC 4760, 4493 DOI 10.17487/RFC4760, January 2007, 4494 . 4496 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 4497 RFC 6991, DOI 10.17487/RFC6991, July 2013, 4498 . 4500 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 4501 DOI 10.17487/RFC3688, January 2004, 4502 . 4504 10.2. Informative references 4506 [I-D.ietf-rtgwg-policy-model] 4507 Shaikh, A., Shakir, R., D'Souza, K., and C. Chase, 4508 "Routing Policy Configuration Model for Service Provider 4509 Networks", draft-ietf-rtgwg-policy-model-01 (work in 4510 progress), April 2016. 4512 [I-D.openconfig-netmod-opstate] 4513 Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling 4514 of Operational State Data in YANG", draft-openconfig- 4515 netmod-opstate-01 (work in progress), July 2015. 4517 [I-D.ietf-netmod-routing-cfg] 4518 Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 4519 Management", draft-ietf-netmod-routing-cfg-22 (work in 4520 progress), July 2016. 4522 [I-D.rtgyangdt-rtgwg-device-model] 4523 Lindem, A., Berger, L., Bogdanovic, D., and C. Hopps, 4524 "Network Device YANG Organizational Models", draft- 4525 rtgyangdt-rtgwg-device-model-04 (work in progress), May 4526 2016. 4528 [I-D.openconfig-rtgwg-network-instance] 4529 Shakir, R., "A Data Model for Network Instances in Service 4530 Provider Networks", draft-openconfig-rtgwg-network- 4531 instance-01 (work in progress), November 2015. 4533 [I-D.talwar-rtgwg-grpc-use-cases] 4534 Specification, g., Kolhe, J., Shaikh, A., and J. George, 4535 "Use cases for gRPC in network management", draft-talwar- 4536 rtgwg-grpc-use-cases-00 (work in progress), July 2016. 4538 Appendix A. Acknowledgements 4540 The authors are grateful for valuable contributions to this document 4541 and the associated models from: Ebben Aires, Pavan Beeram, Chris 4542 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 4543 George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee 4544 Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- 4545 Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim 4546 Uttaro, and Gunter Vandevelde. 4548 Appendix B. Change summary 4550 B.1. Changes between revisions -01 and -02 4552 o Refactored BGP model such that it is comprised of multiple sub- 4553 modules rather than independent modules. 4555 o Remove the need for self-augmentation of the BGP model to allow 4556 the ability to import the model in wider structures more easily. 4558 o Added new operational state values for BGP session established 4559 transitions and last-established timestamp. Also deprecated 4560 uptime operational state leaf. 4562 o Added ability to select eligible paths for add-paths based on a 4563 policy. 4565 B.2. Changes between revisions -00 and -01 4567 o Updated module namespaces to reflect IETF standard namespace. 4569 o Updated module filenames with ietf- prefix per RFC 6087 4570 guidelines. 4572 Authors' Addresses 4574 Anees Shaikh (editor) 4575 Google 4576 1600 Amphitheatre Pkwy 4577 Mountain View, CA 94043 4578 US 4580 Email: aashaikh@google.com 4582 Rob Shakir (editor) 4583 Jive Communications, Inc. 4584 1275 West 1600 North, Suite 100 4585 Orem, UT 84057 4587 Email: rjs@rob.sh 4588 Keyur Patel (editor) 4589 Cisco 4590 170 W. Tasman Drive 4591 San Jose, CA 95134 4592 USA 4594 Email: keyupate@cisco.com 4596 Susan Hares (editor) 4597 Huawei 4598 7453 Hickory Hill 4599 Saline, MI 48176 4600 USA 4602 Email: shares@ndzh.com 4604 Kevin D'Souza 4605 AT&T 4606 200 S. Laurel Ave 4607 Middletown, NJ 4608 US 4610 Email: kd6913@att.com 4612 Deepak Bansal 4613 Microsoft 4614 205 108th Ave. NE, Suite 400 4615 Bellevue, WA 4616 US 4618 Email: dbansal@microsoft.com 4620 Alexander Clemm 4621 Cisco 4622 170 W. Tasman Drive 4623 San Jose, CA 95134 4624 USA 4626 Email: alex@cisco.com 4627 Aleksandr Zhdankin 4628 Cisco 4629 170 W. Tasman Drive 4630 San Jose, CA 95134 4631 USA 4633 Email: azhdanki@cisco.com 4635 Mahesh Jethanandani 4636 Cisco Systems, Inc 4637 180 W. Tasman Drive 4638 San Jose, CA 95134 4639 USA 4641 Phone: +1 408.526.8763 4642 Email: mjethanandani@gmail.com 4644 Xyfeng Liu 4645 Ericsson 4646 1595 Spring Hill Road, Suite 500 4647 Vienna, VA 22182 4648 USA 4650 Email: xufeng.liu@ericsson.com