idnits 2.17.1 draft-ietf-idr-bgp-model-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == 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 1063 has weird spacing: '...unicast speci...' -- The document date (May 10, 2018) is 2176 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 5246 (Obsoleted by RFC 8446) == Outdated reference: A later version (-31) exists of draft-ietf-rtgwg-policy-model-02 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Interdomain Routing K. Patel 3 Internet-Draft Arrcus 4 Intended status: Standards Track M. Jethanandani 5 Expires: November 11, 2018 6 S. Hares 7 Huawei 8 May 10, 2018 10 BGP Model for Service Provider Networks 11 draft-ietf-idr-bgp-model-03 13 Abstract 15 This document defines a YANG data model for configuring and managing 16 BGP, including protocol, policy, and operational aspects based on 17 data center, carrier and content provider operational requirements. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on November 11, 2018. 36 Copyright Notice 38 Copyright (c) 2018 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (https://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 2 55 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 4 56 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 4 57 2.2. Policy configuration overview . . . . . . . . . . . . . . 6 58 3. Relation to other YANG data models . . . . . . . . . . . . . 7 59 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7 60 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 61 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 8 62 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 8 63 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 9 64 7. BGP main module and submodule for base items . . . . . . . . 10 65 8. BGP types . . . . . . . . . . . . . . . . . . . . . . . . . . 49 66 9. BGP policy data . . . . . . . . . . . . . . . . . . . . . . . 58 67 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 72 68 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 72 69 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 72 70 12.1. Normative references . . . . . . . . . . . . . . . . . . 72 71 12.2. Informative references . . . . . . . . . . . . . . . . . 74 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 74 74 1. Introduction 76 This document describes a YANG [RFC7950] data model for the BGP 77 [RFC4271] protocol, including various protocol extensions, policy 78 configuration, as well as defining key operational state data. The 79 model is intended to be vendor-neutral, in order to allow operators 80 to manage BGP configuration in heterogeneous environments with 81 routers supplied by multiple vendors. The model is also intended to 82 be readily mapped to existing implementations to facilitate support 83 from as large a set of routing hardware and software vendors as 84 possible. 86 1.1. Goals and approach 88 The model covers the base BGP features that are deployed across major 89 implementations and the common BGP configurations in use across a 90 number of operator network deployments. In particular, this model 91 attempts to cover BGP features defined in BGP [RFC4271], BGP 92 Communities Attribute [RFC1997], BGP Route Reflection [RFC4456], 93 Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System 94 Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439], 95 Graceful Restart Mechanism for BGP [RFC4724], and BGP Prefix Origin 96 Validation [RFC6811]. 98 Along with configuration of base BGP features, this model also 99 addresses policy configuration, by providing "hooks" for applying 100 policies, and also defining BGP-specific policy features. The BGP 101 policy features are intended to be used with the general routing 102 policy model defined in A YANG Data Model for Routing Policy 103 Management [I-D.ietf-rtgwg-policy-model]. The model supports the 104 NMDA [RFC8342] architecture. 106 For the base BGP features, the focus of the model described in this 107 document is on providing configuration and operational state 108 information relating to: 110 o The global BGP instance, and neighbors whose configuration is 111 specified individually, or templated with the use of peer-groups. 113 o The address families that are supported by peers, and the global 114 configuration which relates to them. 116 o The policy configuration "hooks" and BGP-specific policy features 117 that relate to a neighbor - controlling the import and export of 118 NLRIs. 120 As mentioned earlier, any configuration items that are deemed to be 121 widely available in existing major BGP implementations are included 122 in the model. Additional, more esoteric, configuration items that 123 are not commonly used, or only available from a single 124 implementation, are omitted from the model with an expectation that 125 they will be available in companion modules that augment or extend 126 the current model. This allows clarity in identifying data that is 127 part of the vendor-neutral base model. 129 Where possible, naming in the model follows conventions used in 130 available standards documents, and otherwise tries to be self- 131 explanatory with sufficient descriptions of the intended behavior. 132 Similarly, configuration data value constraints and default values, 133 where used, are based on recommendations in current standards 134 documentation, or those commonly used in multiple implementations. 135 Since implementations can vary widely in this respect, this version 136 of the model specifies only a limited set of defaults and ranges with 137 the expectation of being more prescriptive in future versions based 138 on actual operator use. 140 2. Model overview 142 The BGP model is defined across several YANG modules and submodules, 143 but at a high level is organized into six elements: 145 o base protocol configuration -- configuration affecting BGP 146 protocol-related operations, defined at various levels of 147 hierarchy. 149 o multiprotocol configuration -- configuration affecting individual 150 address-families within BGP Multiprotocl Extensions for BGP-4 151 [RFC4760]. 153 o neighbor configuration -- configuration affecting an individual 154 neighbor within BGP. 156 o neighbor multiprotocol configuration -- configuration affecting 157 individual address-families for a neighbor within BGP. 159 o policy configuration -- hooks for application of the policies 160 defined in A YANG Data Model for Routing Policy Management 161 [I-D.ietf-rtgwg-policy-model] that act on routes sent (received) 162 to (from) peers or other routing protocols and BGP-specific policy 163 features. 165 o operational state -- variables used for monitoring and management 166 of BGP operations. 168 These modules also make use of standard Internet types, such as IP 169 addresses and prefixes, autonomous system numbers, etc., defined in 170 Common YANG Data Types [RFC6991]. 172 2.1. BGP protocol configuration 174 The BGP protocol configuration model is organized hierarchically, 175 much like the majority of router implementations. That is, 176 configuration items can be specified at multiple levels, as shown 177 below. 179 +--rw bgp! 180 +--rw global 181 | +-- (global-configuration-options) 182 +--rw neighbors 183 | +--rw neighbor* [neighbor-address] 184 | +-- (neighbor-configuration-options) 185 +--rw peer-groups 186 +--rw peer-group* [peer-group-name] 187 +-- (neighbor-configuration-options) 189 Users may specify configuration at a higher level and have it apply 190 to all lower-level items, or provide overriding configuration at a 191 lower level of the hierarchy. Overriding configuration items are 192 optional, with neighbor specific configuration being the most 193 specific or lowest level, followed by peer-group, and finally global. 194 Global configuration options reflect a subset of the peer-group or 195 neighbor specific configuration options which are relevant to the 196 entire BGP instance. 198 The model makes the simplifying assumption that most of the 199 configuration items are available at all levels of the hierarchy. 200 That is, very little configuration is specific to a particular level 201 in the hierarchy, other than obvious items such as "group-name" only 202 being available for the peer group-level config. A notable exception 203 is for sub-address family configuration where some items are only 204 applicable for a given AFI-SAFI combination. 206 In order to allow common configuration to be applied to a set of 207 neighbors, all neighbor configuration options are available within a 208 peer-group. A neighbor is associated to a particular peer-group 209 through the use of a peer-group leaf (which provides a reference to a 210 configured item in the peer-group list). 212 Address-family configuration is made available in multiple points 213 within the model - primarily within the global container, where 214 instance-wide configuration can be set (for example, global protocol 215 parameters, the BGP best path route selection options, or global 216 policies relating to the address-family); and on a per-neighbor or 217 per-peer-group basis, where address-families can be enabled or 218 disabled, and policy associated with the parent entity applied. 219 Within the afi-safi container, generic configuration that applies to 220 all address-families (e.g., whether the AFI-SAFI is enabled) is 221 presented at the top-level, with address-family specific containers 222 made available for options relating to only that AFI-SAFI. Within 223 the current revision of the model a generic set of address-families, 224 and common configuration and state options are included - further 225 work is expected to add additional parameters to this area of the 226 model. 228 The following address-families are currently supported by the model: 230 +--rw bgp! 231 +--rw global 232 +--rw afi-safis 233 +--rw afi-safi* [afi-safi-name] 234 +--rw afi-safi-name -> ../config/afi-safi-name 235 | 236 +--rw ipv4-unicast 237 | ... 238 +--rw ipv6-unicast 239 | ... 240 +--rw ipv4-labelled-unicast 241 | ... 242 +--rw ipv6-labelled-unicast 243 | ... 244 +--rw l3vpn-ipv4-unicast 245 | ... 246 +--rw l3vpn-ipv6-unicast 247 | ... 248 +--rw l3vpn-ipv4-multicast 249 | ... 250 +--rw l3vpn-ipv6-multicast 251 | ... 252 +--rw l2vpn-vpls 253 | ... 254 +--rw l2vpn-evpn 255 | ... 257 2.2. Policy configuration overview 259 The BGP policy configuration model references the generic YANG 260 routing policy model described in A YANG Data Model for Routing 261 Policy Management [I-D.ietf-rtgwg-policy-model], which represents a 262 condition-action policy framework for routing. This model adds BGP- 263 specific conditions (e.g., matching on the community attribute), and 264 actions (e.g., setting local preference) to the generic policy 265 framework. 267 Policies that are defined in the routing-policy model are referenced 268 in multiple places within the model: 270 o within the global instance, where a policy applies to all address- 271 families for all peers. 273 o on a global AFI-SAFI basis, where policies apply to all peers for 274 a particular address-family. 276 o on a per-peer-group or per-neighbor basis - where the policy 277 applies to all address-families for the particular group or 278 neighbor. 280 o on a per-afi-safi basis within a neighbor or peer-group context, 281 where the policy is specific to the AFI-SAFI for a a specific 282 neighbor or group. 284 +--rw bgp 285 +--rw global 286 | +--rw afi-safi 287 | | +--rw afi-safi* [afi-safi-name] 288 | | +--rw apply-policy 289 | +--rw apply-policy 290 +--rw neighbors 291 | +--rw neighbor* [neighbor-address] 292 | +--rw afi-safi 293 | | +--rw afi-safi* [afi-safi-name] 294 | | +--rw apply-policy 295 | +--rw apply-policy 296 +--rw peer-groups 297 +--rw peer-group* [peer-group-name] 298 +--rw afi-safi 299 | +--rw afi-safi* [afi-safi-name] 300 | +--rw apply-policy 301 +--rw apply-policy 303 3. Relation to other YANG data models 305 The BGP model is intended to work within a larger framework model, 306 such as the Network Instance model YANG Model for Network Instance 307 [I-D.ietf-rtgwg-ni-model] which provides a comprehensive model for 308 defining VRFs, associated routing protocols, multiple protocol 309 instances, and inter-protocol and inter-instance routing policies. 310 The current version of the model imports and instantiates the BGP 311 model in its tree at /network-instances/network-instance/vrf- 312 root/rt:routing/control-plane-protocols/control-plane-protocol/ 313 bgp/... 315 It is also possible to integrate the BGP model with the Routing 316 Management model A YANG Data Model for Routing Management [RFC8349] 317 which defines the notion of routing instances, or VRFs. 319 4. Security Considerations 321 The YANG module specified in this document defines a schema for data 322 that is designed to be accessed via network management protocols such 323 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 324 is the secure transport layer, and the mandatory-to-implement secure 325 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 326 is HTTPS, and the mandatory-to-implement secure transport is TLS 327 [RFC5246]. The NETCONF Access Control Model (NACM) [RFC8341] 328 provides the means to restrict access for particular NETCONF or 329 RESTCONF users to a preconfigured subset of all available NETCONF or 330 RESTCONF protocol operations and content. 332 There are a number of data nodes defined in this YANG module that are 333 writable/creatable/deletable (i.e., config true, which is the 334 default). These data nodes may be considered sensitive or vulnerable 335 in some network environments. Write operations (e.g., edit-config) 336 to these data nodes without proper protection can have a negative 337 effect on network operations. These are the subtrees and data nodes 338 and their sensitivity/vulnerability: 340 Some of the readable data nodes in this YANG module may be considered 341 sensitive or vulnerable in some network environments. It is thus 342 important to control read access (e.g., via get, get-config, or 343 notification) to these data nodes. These are the subtrees and data 344 nodes and their sensitivity/vulnerability: 346 Some of the RPC operations in this YANG module may be considered 347 sensitive or vulnerable in some network environments. It is thus 348 important to control access to these operations. These are the 349 operations and their sensitivity/vulnerability: 351 5. IANA Considerations 353 This document registers three URIs and three YANG modules. 355 5.1. URI Registration 357 in the IETF XML registry [RFC3688] [RFC3688]. Following the format 358 in RFC 3688, the following registration is requested to be made: 360 URI: urn:ietf:params:xml:ns:yang:ietf-bgp 361 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 362 URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types 364 Registrant Contact: The IESG. XML: N/A, the requested URI is an XML 365 namespace. 367 5.2. YANG Module Name Registration 369 This document registers three YANG module in the YANG Module Names 370 registry YANG [RFC6020]. 372 name: ietf-bgp 373 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp 374 prefix: bgp 375 reference: RFC XXXX 377 name: ietf-bgp-policy 378 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy 379 prefix: bgp-pol 380 reference: RFC XXXX 382 name: ietf-bgp-types 383 namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-types 384 prefix: bgp-types 385 reference: RFC XXXX 387 6. YANG modules 389 The modules comprising the BGP configuration and operational model 390 are described by the YANG modules and submodules in the sections 391 below. 393 The main module, ietf-bgp.yang, includes the following submodules: 395 o ietf-bgp-common - defines the groupings that are common across 396 more than one context (where contexts are neighbor, group, global) 398 o ietf-bgp-common-multiprotocol - defines the groupings that are 399 common across more than one context, and relate to multiprotocol 400 BGP 402 o ietf-bgp-common-structure - defines groupings that are shared by 403 multiple contexts, but are used only to create structural 404 elements, i.e., containers (leaf nodes are defined in separate 405 groupings) 407 o ietf-bgp-global - groupings with data specific to the global 408 context 410 o ietf-bgp-peer-group - groupings with data specific to the peer 411 group context 413 o ietf-bgp-neighbor - groupings with data specific to the neighbor 414 context 416 Additional modules include: 418 o ietf-bgp-types - common type and identity definitions for BGP, 419 including BGP policy 421 o ietf-bgp-policy - BGP-specific policy data definitions for use 422 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@2018-05-09.yang" 428 module ietf-bgp { 429 yang-version "1.1"; 430 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; 431 prefix "bgp"; 433 import ietf-routing-policy { 434 prefix rpol; 435 reference 436 "RFC ZZZZ: A YANG Data Model for Routing Policy Management"; 437 } 439 include ietf-bgp-common; 440 include ietf-bgp-common-multiprotocol; 441 include ietf-bgp-common-structure; 442 include ietf-bgp-neighbor; 443 include ietf-bgp-global; 444 include ietf-bgp-peer-group; 446 organization 447 "IETF IDR Working Group"; 449 contact 450 "WG Web: 451 WG List: 453 Authors: Keyur Patel (keyur at arrcus.com), 454 Mahesh Jethanandani (mjethanandani at gmail.com), 455 Susan Hares (shares at ndzh.com"; 457 description 458 "This module describes a YANG model for BGP protocol 459 configuration. It is a limited subset of all of the configuration 460 parameters available in the variety of vendor implementations, 461 hence it is expected that it would be augmented with vendor- 462 specific configuration data as needed. Additional modules or 463 submodules to handle other aspects of BGP configuration, 464 including policy, VRFs, VPNs, and additional address families 465 are also expected. 467 This model supports the following BGP configuration level 468 hierarchy: 470 BGP 471 | 472 +-> [ global BGP configuration ] 473 +-> AFI / SAFI global 474 +-> peer group 475 +-> [ peer group config ] 476 +-> AFI / SAFI [ per-AFI overrides ] 477 +-> neighbor 478 +-> [ neighbor config ] 479 +-> [ optional pointer to peer-group ] 480 +-> AFI / SAFI [ per-AFI overrides ]"; 482 revision "2018-05-09" { 483 description 484 "Initial Version"; 485 reference 486 "RFC XXXX, BGP Model for Service Provider Network "; 487 } 489 /* 490 * Groupings 491 */ 492 container bgp { 493 description 494 "Top-level configuration for the BGP router"; 496 container global { 497 presence "Enables global configuration of BGP"; 498 description 499 "Global configuration for the BGP router"; 500 uses bgp-global-base; 501 uses rpol:apply-policy-group; 502 } 504 container neighbors { 505 description 506 "Configuration for BGP neighbors"; 507 uses bgp-neighbor-list; 508 } 510 container peer-groups { 511 description 512 "Configuration for BGP peer-groups"; 513 uses bgp-peer-group-list; 514 } 515 } 516 } 517 518 file "ietf-bgp-common@2018-05-09.yang" 519 submodule ietf-bgp-common { 520 yang-version "1.1"; 521 belongs-to ietf-bgp { 522 prefix "bgp"; 523 } 525 import ietf-bgp-types { 526 prefix bgp-types; 527 } 528 import ietf-inet-types { 529 prefix inet; 530 } 532 organization 533 "IETF IDR Working Group"; 535 contact 536 "WG Web: 537 WG List: 539 Authors: Keyur Patel, 540 Mahesh Jethanandani, 541 Susan Hares"; 543 description 544 "This sub-module contains common groupings that are common across 545 multiple contexts within the BGP module. That is to say that 546 they may be application to a subset of global, peer-group or 547 neighbor contexts."; 549 revision "2018-05-09" { 550 description 551 "Initial Version"; 552 reference 553 "RFC XXX, BGP Model for Service Provider Network."; 554 } 556 grouping bgp-common-neighbor-group-timers-config { 557 description 558 "Config parameters related to timers associated with the BGP 559 peer"; 561 leaf connect-retry { 562 type decimal64 { 563 fraction-digits 2; 564 } 565 default 30; 566 description 567 "Time interval in seconds between attempts to establish a 568 session with the peer."; 569 } 571 leaf hold-time { 572 type decimal64 { 573 fraction-digits 2; 574 } 575 default 90; 576 description 577 "Time interval in seconds that a BGP session will be 578 considered active in the absence of keepalive or other 579 messages from the peer. The hold-time is typically set to 580 3x the keepalive-interval."; 581 reference 582 "RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; 583 } 585 leaf keepalive-interval { 586 type decimal64 { 587 fraction-digits 2; 588 } 589 default 30; 590 description 591 "Time interval in seconds between transmission of keepalive 592 messages to the neighbor. Typically set to 1/3 the 593 hold-time."; 594 } 596 leaf minimum-advertisement-interval { 597 type decimal64 { 598 fraction-digits 2; 599 } 600 default 30; 601 description 602 "Minimum time which must elapse between subsequent UPDATE 603 messages relating to a common set of NLRI being transmitted 604 to a peer. This timer is referred to as 605 MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to 606 reduce the number of UPDATE messages transmitted when a 607 particular set of NLRI exhibit instability."; 608 reference 609 "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; 610 } 611 } 613 grouping bgp-common-neighbor-group-config { 614 description 615 "Neighbor level configuration items."; 617 leaf peer-as { 618 type inet:as-number; 619 description 620 "AS number of the peer."; 621 } 623 leaf local-as { 624 type inet:as-number; 625 description 626 "The local autonomous system number that is to be used when 627 establishing sessions with the remote peer or peer group, if 628 this differs from the global BGP router autonomous system 629 number."; 630 } 632 leaf peer-type { 633 type bgp-types:peer-type; 634 description 635 "Explicitly designate the peer or peer group as internal 636 (iBGP) or external (eBGP)."; 637 } 639 leaf auth-password { 640 type string; 641 description 642 "Configures an MD5 authentication password for use with 643 neighboring devices."; 644 } 646 leaf remove-private-as { 647 // could also make this a container with a flag to enable 648 // remove-private and separate option. here, option implies 649 // remove-private is enabled. 650 type bgp-types:remove-private-as-option; 651 description 652 "Remove private AS numbers from updates sent to peers - when 653 this leaf is not specified, the AS_PATH attribute should be 654 sent to the peer unchanged"; 655 } 657 leaf route-flap-damping { 658 type boolean; 659 default false; 660 description 661 "Enable route flap damping."; 663 } 665 leaf send-community { 666 type bgp-types:community-type; 667 default "NONE"; 668 description 669 "Specify which types of community should be sent to the 670 neighbor or group. The default is to not send the community 671 attribute"; 672 } 674 leaf description { 675 type string; 676 description 677 "An optional textual description (intended primarily for use 678 with a peer or group"; 679 } 680 } 682 grouping bgp-common-neighbor-group-transport-config { 683 description 684 "Configuration parameters relating to the transport protocol 685 used by the BGP session to the peer"; 687 leaf tcp-mss { 688 type uint16; 689 description 690 "Sets the max segment size for BGP TCP sessions."; 691 } 693 leaf mtu-discovery { 694 type boolean; 695 default false; 696 description 697 "Turns path mtu discovery for BGP TCP sessions on (true) or 698 off (false)"; 699 } 701 leaf passive-mode { 702 type boolean; 703 default false; 704 description 705 "Wait for peers to issue requests to open a BGP session, 706 rather than initiating sessions from the local router."; 707 } 709 leaf local-address { 710 type union { 711 type inet:ip-address; 712 type string; 713 } 714 //TODO: the string should be converted to a leafref type 715 //to point to an interface when YANG 1.1 is available with 716 //leafrefs in union types. 717 description 718 "Set the local IP (either IPv4 or IPv6) address to use for 719 the session when sending BGP update messages. This may be 720 expressed as either an IP address or reference to the name 721 of an interface."; 722 } 723 } 725 grouping bgp-common-neighbor-group-error-handling-config { 726 description 727 "Configuration parameters relating to enhanced error handling 728 behaviours for BGP"; 730 leaf treat-as-withdraw { 731 type boolean; 732 default "false"; 733 description 734 "Specify whether erroneous UPDATE messages for which the NLRI 735 can be extracted are reated as though the NLRI is withdrawn 736 - avoiding session reset"; 737 reference "draft-ietf-idr-error-handling-16"; 738 } 739 } 741 grouping bgp-common-graceful-restart-config { 742 description 743 "Configuration parameters relating to BGP graceful restart."; 745 leaf enabled { 746 type boolean; 747 description 748 "Enable or disable the graceful-restart capability."; 749 } 751 leaf restart-time { 752 type uint16 { 753 range 0..4096; 754 } 755 description 756 "Estimated time (in seconds) for the local BGP speaker to 757 restart a session. This value is advertise in the graceful 758 restart BGP capability. This is a 12-bit value, referred to 759 as Restart Time in RFC4724. Per RFC4724, the suggested 760 default value is <= the hold-time value."; 761 } 763 leaf stale-routes-time { 764 type decimal64 { 765 fraction-digits 2; 766 } 767 description 768 "An upper-bound on the time that stale routes will be 769 retained by a router after a session is restarted. If an 770 End-of-RIB (EOR) marker is received prior to this timer 771 expiring stale-routes will be flushed upon its receipt - if 772 no EOR is received, then when this timer expires stale paths 773 will be purged. This timer is referred to as the 774 Selection_Deferral_Timer in RFC4724"; 775 } 777 leaf helper-only { 778 type boolean; 779 description 780 "Enable graceful-restart in helper mode only. When this leaf 781 is set, the local system does not retain forwarding its own 782 state during a restart, but supports procedures for the 783 receiving speaker, as defined in RFC4724."; 784 } 785 } 787 grouping bgp-common-use-multiple-paths-config { 788 description 789 "Generic configuration options relating to use of multiple 790 paths for a referenced AFI-SAFI, group or neighbor"; 792 leaf enabled { 793 type boolean; 794 default false; 795 description 796 "Whether the use of multiple paths for the same NLRI is 797 enabled for the neighbor. This value is overridden by any 798 more specific configuration value."; 799 } 800 } 802 grouping bgp-common-use-multiple-paths-ebgp-as-options-config { 803 description 804 "Configuration parameters specific to eBGP multi-path applicable 805 to all contexts"; 807 leaf allow-multiple-as { 808 type boolean; 809 default "false"; 810 description 811 "Allow multi-path to use paths from different neighboring ASes. 812 The default is to only consider multiple paths from the same 813 neighboring AS."; 814 } 815 } 817 grouping bgp-common-global-group-use-multiple-paths { 818 description 819 "Common grouping used for both global and groups which provides 820 configuration and state parameters relating to use of multiple 821 paths"; 823 container use-multiple-paths { 824 description 825 "Parameters related to the use of multiple paths for the 826 same NLRI"; 828 uses bgp-common-use-multiple-paths-config; 830 container ebgp { 831 description 832 "Multi-Path parameters for eBGP"; 834 leaf allow-multiple-as { 835 type boolean; 836 default "false"; 837 description 838 "Allow multi-path to use paths from different neighboring 839 ASes. The default is to only consider multiple paths 840 from the same neighboring AS."; 841 } 843 leaf maximum-paths { 844 type uint32; 845 default 1; 846 description 847 "Maximum number of parallel paths to consider when using 848 BGP multi-path. The default is use a single path."; 849 } 850 } 852 container ibgp { 853 description 854 "Multi-Path parameters for iBGP"; 856 leaf maximum-paths { 857 type uint32; 858 default 1; 859 description 860 "Maximum number of parallel paths to consider when using 861 iBGP multi-path. The default is to use a single path"; 862 } 863 } 864 } 865 } 867 grouping bgp-common-route-selection-options { 868 description 869 "Configuration and state relating to route selection options"; 871 container route-selection-options { 872 description 873 "Parameters relating to options for route selection"; 875 leaf always-compare-med { 876 type boolean; 877 default "false"; 878 description 879 "Compare multi-exit discriminator (MED) value from 880 different ASes when selecting the best route. The default 881 behavior is to only compare MEDs for paths received from 882 the same AS."; 883 } 885 leaf ignore-as-path-length { 886 type boolean; 887 default "false"; 888 description 889 "Ignore the AS path length when selecting the best path. 890 The default is to use the AS path length and prefer paths 891 with shorter length."; 892 } 894 leaf external-compare-router-id { 895 type boolean; 896 default "true"; 897 description 898 "When comparing similar routes received from external BGP 899 peers, use the router-id as a criterion to select the 900 active path."; 901 } 903 leaf advertise-inactive-routes { 904 type boolean; 905 default "false"; 906 description 907 "Advertise inactive routes to external peers. The default 908 is to only advertise active routes."; 909 } 911 leaf enable-aigp { 912 type boolean; 913 default false; 914 description 915 "Flag to enable sending / receiving accumulated IGP 916 attribute in routing updates"; 917 } 919 leaf ignore-next-hop-igp-metric { 920 type boolean; 921 default "false"; 922 description 923 "Ignore the IGP metric to the next-hop when calculating BGP 924 best-path. The default is to select the route for which 925 the metric to the next-hop is lowest"; 926 } 927 } 928 } 930 grouping bgp-common-state { 931 description 932 "Grouping containing common counters relating to prefixes and 933 paths"; 935 leaf total-paths { 936 type uint32; 937 config false; 938 description 939 "Total number of BGP paths within the context"; 940 } 942 leaf total-prefixes { 943 type uint32; 944 config false; 945 description 946 "Total number of BGP prefixes received within the context"; 947 } 948 } 949 } 950 951 file "ietf-bgp-common-multiprotocol@2018-05-09.yang" 952 submodule ietf-bgp-common-multiprotocol { 953 yang-version "1.1"; 954 belongs-to ietf-bgp { 955 prefix "bgp"; 956 } 958 import ietf-bgp-types { 959 prefix bgp-types; 960 } 961 import ietf-routing-policy { 962 prefix rpol; 963 } 965 include ietf-bgp-common; 967 // meta 968 organization 969 "IETF IDR Working Group"; 971 contact 972 "WG Web: 973 WG List: 975 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 976 Authors: Keyur Patel, 977 Mahesh Jethanandani, 978 Susan Hares"; 980 description 981 "This sub-module contains groupings that are related to support 982 for multiple protocols in BGP. The groupings are common across 983 multiple contexts."; 985 revision "2018-05-09" { 986 description 987 "Initial Version"; 988 reference 989 "RFC XXX, BGP Model for Service Provider Network."; 990 } 992 grouping bgp-common-mp-afi-safi-graceful-restart-config { 993 description 994 "BGP graceful restart parameters that apply on a per-AFI-SAFI 995 basis"; 997 leaf enabled { 998 type boolean; 999 default false; 1000 description 1001 "This leaf indicates whether graceful-restart is enabled for 1002 this AFI-SAFI"; 1003 } 1004 } 1006 grouping bgp-common-mp-afi-safi-config { 1007 description 1008 "Configuration parameters used for all BGP AFI-SAFIs"; 1010 leaf afi-safi-name { 1011 type identityref { 1012 base bgp-types:AFI_SAFI_TYPE; 1013 } 1014 description "AFI,SAFI"; 1015 } 1017 leaf enabled { 1018 type boolean; 1019 default false; 1020 description 1021 "This leaf indicates whether the IPv4 Unicast AFI,SAFI is 1022 enabled for the neighbour or group"; 1023 } 1024 } 1026 grouping bgp-common-mp-all-afi-safi-list-contents { 1027 description 1028 "A common grouping used for contents of the list that is used 1029 for AFI-SAFI entries"; 1031 // import and export policy included for the afi/safi 1032 uses rpol:apply-policy-group; 1034 uses bgp-common-mp-ipv4-unicast-group; 1035 uses bgp-common-mp-ipv6-unicast-group; 1036 uses bgp-common-mp-ipv4-labeled-unicast-group; 1037 uses bgp-common-mp-ipv6-labeled-unicast-group; 1038 uses bgp-common-mp-l3vpn-ipv4-unicast-group; 1039 uses bgp-common-mp-l3vpn-ipv6-unicast-group; 1040 uses bgp-common-mp-l3vpn-ipv4-multicast-group; 1041 uses bgp-common-mp-l3vpn-ipv6-multicast-group; 1042 uses bgp-common-mp-l2vpn-vpls-group; 1043 uses bgp-common-mp-l2vpn-evpn-group; 1044 } 1046 // Groupings relating to each address family 1047 grouping bgp-common-mp-ipv4-unicast-group { 1048 description 1049 "Group for IPv4 Unicast configuration options"; 1051 container ipv4-unicast { 1052 when "../afi-safi-name = 'bgp-types:IPV4_UNICAST'" { 1053 description 1054 "Include this container for IPv4 Unicast specific 1055 configuration"; 1056 } 1058 description "IPv4 unicast configuration options"; 1060 // include common IPv[46] unicast options 1061 uses bgp-common-mp-ipv4-ipv6-unicast-common; 1063 // placeholder for IPv4 unicast specific configuration 1064 } 1065 } 1067 grouping bgp-common-mp-ipv6-unicast-group { 1068 description 1069 "Group for IPv6 Unicast configuration options"; 1071 container ipv6-unicast { 1072 when "../afi-safi-name = 'bgp-types:IPV6_UNICAST'" { 1073 description 1074 "Include this container for IPv6 Unicast specific 1075 configuration"; 1076 } 1078 description "IPv6 unicast configuration options"; 1080 // include common IPv[46] unicast options 1081 uses bgp-common-mp-ipv4-ipv6-unicast-common; 1083 // placeholder for IPv6 unicast specific configuration 1084 // options 1085 } 1086 } 1088 grouping bgp-common-mp-ipv4-labeled-unicast-group { 1089 description 1090 "Group for IPv4 Labeled Unicast configuration options"; 1092 container ipv4-labeled-unicast { 1093 when "../afi-safi-name = 'bgp-types:IPV4_LABELED_UNICAST'" { 1094 description 1095 "Include this container for IPv4 Labeled Unicast specific 1096 configuration"; 1097 } 1099 description "IPv4 Labeled Unicast configuration options"; 1101 uses bgp-common-mp-all-afi-safi-common; 1103 // placeholder for IPv4 Labeled Unicast specific config 1104 // options 1105 } 1106 } 1108 grouping bgp-common-mp-ipv6-labeled-unicast-group { 1109 description 1110 "Group for IPv6 Labeled Unicast configuration options"; 1112 container ipv6-labeled-unicast { 1113 when "../afi-safi-name = 'bgp-types:IPV6_LABELED_UNICAST'" { 1114 description 1115 "Include this container for IPv6 Labeled Unicast specific 1116 configuration"; 1117 } 1119 description "IPv6 Labeled Unicast configuration options"; 1121 uses bgp-common-mp-all-afi-safi-common; 1123 // placeholder for IPv6 Labeled Unicast specific config 1124 // options. 1125 } 1126 } 1128 grouping bgp-common-mp-l3vpn-ipv4-unicast-group { 1129 description 1130 "Group for IPv4 Unicast L3VPN configuration options"; 1132 container l3vpn-ipv4-unicast { 1133 when "../afi-safi-name = 'bgp-types:L3VPN_IPV4_UNICAST'" { 1134 description 1135 "Include this container for IPv4 Unicast L3VPN specific 1136 configuration"; 1137 } 1139 description "Unicast IPv4 L3VPN configuration options"; 1141 // include common L3VPN configuration options 1142 uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; 1143 // placeholder for IPv4 Unicast L3VPN specific config options. 1144 } 1145 } 1147 grouping bgp-common-mp-l3vpn-ipv6-unicast-group { 1148 description 1149 "Group for IPv6 Unicast L3VPN configuration options"; 1151 container l3vpn-ipv6-unicast { 1152 when "../afi-safi-name = 'bgp-types:L3VPN_IPV6_UNICAST'" { 1153 description 1154 "Include this container for unicast IPv6 L3VPN specific 1155 configuration"; 1156 } 1158 description "Unicast IPv6 L3VPN configuration options"; 1160 // include common L3VPN configuration options 1161 uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; 1163 // placeholder for IPv6 Unicast L3VPN specific configuration 1164 // options 1165 } 1166 } 1168 grouping bgp-common-mp-l3vpn-ipv4-multicast-group { 1169 description 1170 "Group for IPv4 L3VPN multicast configuration options"; 1172 container l3vpn-ipv4-multicast { 1173 when "../afi-safi-name = 'bgp-types:L3VPN_IPV4_MULTICAST'" { 1174 description 1175 "Include this container for multicast IPv6 L3VPN specific 1176 configuration"; 1177 } 1179 description "Multicast IPv4 L3VPN configuration options"; 1181 // include common L3VPN multicast options 1182 uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; 1184 // placeholder for IPv4 Multicast L3VPN specific configuration 1185 // options 1186 } 1187 } 1189 grouping bgp-common-mp-l3vpn-ipv6-multicast-group { 1190 description 1191 "Group for IPv6 L3VPN multicast configuration options"; 1193 container l3vpn-ipv6-multicast { 1194 when "../afi-safi-name = 'bgp-types:L3VPN_IPV6_MULTICAST'" { 1195 description 1196 "Include this container for multicast IPv6 L3VPN specific 1197 configuration"; 1198 } 1199 description "Multicast IPv6 L3VPN configuration options"; 1201 // include common L3VPN multicast options 1202 uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; 1204 // placeholder for IPv6 Multicast L3VPN specific configuration 1205 // options 1206 } 1207 } 1209 grouping bgp-common-mp-l2vpn-vpls-group { 1210 description 1211 "Group for BGP-signalled VPLS configuration options"; 1213 container l2vpn-vpls { 1214 when "../afi-safi-name = 'bgp-types:L2VPN_VPLS'" { 1215 description 1216 "Include this container for BGP-signalled VPLS specific 1217 configuration"; 1218 } 1220 description "BGP-signalled VPLS configuration options"; 1222 // include common L2VPN options 1223 uses bgp-common-mp-l2vpn-common; 1225 // placeholder for BGP-signalled VPLS specific configuration 1226 // options 1227 } 1228 } 1230 grouping bgp-common-mp-l2vpn-evpn-group { 1231 description 1232 "Group for BGP EVPN configuration options"; 1234 container l2vpn-evpn { 1235 when "../afi-safi-name = 'bgp-types:L2VPN_EVPN'" { 1236 description 1237 "Include this container for BGP EVPN specific 1238 configuration"; 1240 } 1242 description "BGP EVPN configuration options"; 1244 // include common L2VPN options 1245 uses bgp-common-mp-l2vpn-common; 1247 // placeholder for BGP EVPN specific configuration options 1248 } 1249 } 1251 // Common groupings across multiple AFI,SAFIs 1252 grouping bgp-common-mp-all-afi-safi-common { 1253 description 1254 "Grouping for configuration common to all AFI,SAFI"; 1256 container prefix-limit { 1257 description 1258 "Parameters relating to the prefix limit for the AFI-SAFI"; 1259 leaf max-prefixes { 1260 type uint32; 1261 description 1262 "Maximum number of prefixes that will be accepted from the 1263 neighbour"; 1264 } 1265 leaf shutdown-threshold-pct { 1266 type bgp-types:percentage; 1267 description 1268 "Threshold on number of prefixes that can be received from 1269 a neighbour before generation of warning messages or log 1270 entries. Expressed as a percentage of max-prefixes"; 1271 } 1273 leaf restart-timer { 1274 type decimal64 { 1275 fraction-digits 2; 1276 } 1277 units "seconds"; 1278 description 1279 "Time interval in seconds after which the BGP session is 1280 re-established after being torn down due to exceeding the 1281 max-prefix limit."; 1282 } 1283 } 1284 } 1286 grouping bgp-common-mp-ipv4-ipv6-unicast-common { 1287 description 1288 "Common configuration that is applicable for IPv4 and IPv6 1289 unicast"; 1291 // include common afi-safi options. 1292 uses bgp-common-mp-all-afi-safi-common; 1294 // configuration options that are specific to IPv[46] unicast 1295 leaf send-default-route { 1296 type boolean; 1297 default "false"; 1298 description 1299 "If set to true, send the default-route to the neighbour(s)"; 1300 } 1301 } 1303 grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common { 1304 description 1305 "Common configuration applied across L3VPN for IPv4 1306 and IPv6"; 1308 // placeholder -- specific configuration options that are generic 1309 // across IPv[46] unicast address families. 1310 uses bgp-common-mp-all-afi-safi-common; 1311 } 1313 grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common { 1314 description 1315 "Common configuration applied across L3VPN for IPv4 1316 and IPv6"; 1318 // placeholder -- specific configuration options that are 1319 // generic across IPv[46] multicast address families. 1320 uses bgp-common-mp-all-afi-safi-common; 1321 } 1323 grouping bgp-common-mp-l2vpn-common { 1324 description 1325 "Common configuration applied across L2VPN address 1326 families"; 1328 // placeholder -- specific configuration options that are 1329 // generic across L2VPN address families 1330 uses bgp-common-mp-all-afi-safi-common; 1331 } 1333 // Config groupings for common groups 1334 grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config { 1335 description 1336 "Configuration parameters relating to prefix-limits for an 1337 AFI-SAFI"; 1339 } 1340 } 1341 1343 file "ietf-bgp-common-structure@2018-05-09.yang" 1344 submodule ietf-bgp-common-structure { 1345 yang-version "1.1"; 1346 belongs-to ietf-bgp { 1347 prefix "bgp"; 1348 } 1350 import ietf-bgp-types { prefix bgp-types; } 1351 import ietf-routing-policy { prefix rpol; } 1352 include ietf-bgp-common-multiprotocol; 1353 include ietf-bgp-common; 1355 // meta 1356 organization 1357 "IETF IDR Working Group"; 1359 contact 1360 "WG Web: 1361 WG List: 1363 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 1364 Authors: Keyur Patel, 1365 Mahesh Jethanandani, 1366 Susan Hares"; 1368 description 1369 "This sub-module contains groupings that are common across 1370 multiple BGP contexts and provide structure around other 1371 primitive groupings."; 1373 revision "2018-05-09" { 1374 description 1375 "Initial Version"; 1376 reference 1377 "RFC XXX, BGP Model for Service Provider Network."; 1378 } 1380 grouping bgp-common-structure-neighbor-group-logging-options { 1381 description 1382 "Structural grouping used to include error handling 1383 configuration and state for both BGP neighbors and groups"; 1385 container logging-options { 1386 description 1387 "Logging options for events related to the BGP neighbor or 1388 group"; 1390 leaf log-neighbor-state-changes { 1391 type boolean; 1392 default "true"; 1393 description 1394 "Configure logging of peer state changes. Default is to 1395 enable logging of peer state changes."; 1396 } 1397 } 1398 } 1399 grouping bgp-common-structure-neighbor-group-ebgp-multihop { 1400 description 1401 "Structural grouping used to include eBGP multi-hop 1402 configuration and state for both BGP neighbors and peer 1403 groups"; 1405 container ebgp-multihop { 1406 description 1407 "eBGP multi-hop parameters for the BGPgroup"; 1409 leaf enabled { 1410 type boolean; 1411 default "false"; 1412 description 1413 "When enabled the referenced group or neighbors are 1414 permitted to be indirectly connected - including cases 1415 where the TTL can be decremented between the BGP peers"; 1416 } 1418 leaf multihop-ttl { 1419 type uint8; 1420 description 1421 "Time-to-live value to use when packets are sent to the 1422 referenced group or neighbors and ebgp-multihop is 1423 enabled"; 1424 } 1425 } 1426 } 1428 grouping bgp-common-structure-neighbor-group-route-reflector { 1429 description 1430 "Structural grouping used to include route reflector 1431 configuration and state for both BGP neighbors and peer 1432 groups"; 1434 container route-reflector { 1435 description 1436 "Route reflector parameters for the BGPgroup"; 1438 leaf route-reflector-cluster-id { 1439 type bgp-types:rr-cluster-id-type; 1440 description 1441 "route-reflector cluster id to use when local router is 1442 configured as a route reflector. Commonly set at the 1443 group level, but allows a different cluster id to be set 1444 for each neighbor."; 1445 } 1447 leaf route-reflector-client { 1448 type boolean; 1449 default "false"; 1450 description 1451 "Configure the neighbor as a route reflector client."; 1452 } 1453 } 1454 } 1456 grouping bgp-common-structure-neighbor-group-as-path-options { 1457 description 1458 "Structural grouping used to include AS_PATH manipulation 1459 configuration and state for both BGP neighbors and peer 1460 groups"; 1462 container as-path-options { 1463 description 1464 "AS_PATH manipulation parameters for the BGP neighbor or 1465 group"; 1466 leaf allow-own-as { 1467 type uint8; 1468 default 0; 1469 description 1470 "Specify the number of occurrences of the local BGP 1471 speaker's AS that can occur within the AS_PATH before it 1472 is rejected."; 1473 } 1475 leaf replace-peer-as { 1476 type boolean; 1477 default "false"; 1478 description 1479 "Replace occurrences of the peer's AS in the AS_PATH with 1480 the local autonomous system number"; 1481 } 1482 } 1483 } 1485 grouping bgp-common-structure-neighbor-group-add-paths { 1486 description 1487 "Structural grouping used to include ADD-PATHs configuration 1488 and state for both BGP neighbors and peer groups"; 1490 container add-paths { 1491 description 1492 "Parameters relating to the advertisement and receipt of 1493 multiple paths for a single NLRI (add-paths)"; 1495 leaf receive { 1496 type boolean; 1497 default false; 1498 description 1499 "Enable ability to receive multiple path advertisements for 1500 an NLRI from the neighbor or group"; 1501 } 1503 leaf send-max { 1504 type uint8; 1505 description 1506 "The maximum number of paths to advertise to neighbors for 1507 a single NLRI"; 1508 } 1509 leaf eligible-prefix-policy { 1510 type leafref { 1511 path "/rpol:routing-policy/rpol:policy-definitions/" + 1512 "rpol:policy-definition/rpol:name"; 1513 } 1514 description 1515 "A reference to a routing policy which can be used to 1516 restrict the prefixes for which add-paths is enabled"; 1517 } 1518 } 1519 } 1520 } 1521 1523 file "ietf-bgp-peer-group@2018-05-09.yang" 1524 submodule ietf-bgp-peer-group { 1525 yang-version "1.1"; 1526 belongs-to ietf-bgp { 1527 prefix "bgp"; 1528 } 1530 import ietf-routing-policy { 1531 prefix rpol; 1532 } 1534 // Include the common submodule 1535 include ietf-bgp-common; 1536 include ietf-bgp-common-multiprotocol; 1537 include ietf-bgp-common-structure; 1539 // meta 1540 organization 1541 "IETF IDR Working Group"; 1543 contact 1544 "WG Web: 1545 WG List: 1547 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 1548 Authors: Keyur Patel, 1549 Mahesh Jethanandani, 1550 Susan Hares"; 1552 description 1553 "This sub-module contains groupings that are specific to the 1554 peer-group context of the OpenConfig BGP module."; 1556 revision "2018-05-09" { 1557 description 1558 "Initial Version"; 1559 reference 1560 "RFC XXX, BGP Model for Service Provider Network."; 1561 } 1563 grouping bgp-peer-group-config { 1564 description 1565 "Configuration parameters relating to a base BGP peer group 1566 that are not also applicable to any other context (e.g., 1567 neighbor)"; 1569 leaf peer-group-name { 1570 type string; 1571 description 1572 "Name of the BGP peer-group"; 1574 } 1576 } 1578 grouping bgp-peer-group-afi-safi-list { 1579 description 1580 "List of address-families associated with the BGP peer-group"; 1582 list afi-safi { 1583 key "afi-safi-name"; 1585 description 1586 "AFI,SAFI configuration available for the 1587 neighbour or group"; 1589 uses bgp-common-mp-afi-safi-config; 1591 container graceful-restart { 1592 description 1593 "Parameters relating to BGP graceful-restart"; 1595 uses bgp-common-mp-afi-safi-graceful-restart-config; 1596 } 1598 uses bgp-common-route-selection-options; 1599 uses bgp-common-global-group-use-multiple-paths; 1600 uses bgp-common-mp-all-afi-safi-list-contents; 1601 } 1602 } 1604 grouping bgp-peer-group-base { 1605 description 1606 "Parameters related to a BGP group"; 1608 uses bgp-peer-group-config; 1609 uses bgp-common-neighbor-group-config; 1610 uses bgp-common-state; 1612 container timers { 1613 description 1614 "Timers related to a BGP peer-group"; 1616 uses bgp-common-neighbor-group-timers-config; 1617 } 1619 container transport { 1620 description 1621 "Transport session parameters for the BGP peer-group"; 1623 uses bgp-common-neighbor-group-transport-config; 1624 } 1626 container error-handling { 1627 description 1628 "Error handling parameters used for the BGP peer-group"; 1630 uses bgp-common-neighbor-group-error-handling-config; 1631 } 1633 container graceful-restart { 1634 description 1635 "Parameters relating the graceful restart mechanism for BGP"; 1637 uses bgp-common-graceful-restart-config; 1638 } 1640 uses bgp-common-structure-neighbor-group-logging-options; 1641 uses bgp-common-structure-neighbor-group-ebgp-multihop; 1642 uses bgp-common-structure-neighbor-group-route-reflector; 1643 uses bgp-common-structure-neighbor-group-as-path-options; 1644 uses bgp-common-structure-neighbor-group-add-paths; 1645 uses bgp-common-global-group-use-multiple-paths; 1646 uses rpol:apply-policy-group; 1648 container afi-safis { 1649 description 1650 "Per-address-family configuration parameters associated with 1651 thegroup"; 1652 uses bgp-peer-group-afi-safi-list; 1653 } 1654 } 1656 grouping bgp-peer-group-list { 1657 description 1658 "The list of BGP peer groups"; 1660 list peer-group { 1661 key "peer-group-name"; 1662 description 1663 "List of BGP peer-groups configured on the local system - 1664 uniquely identified by peer-group name"; 1666 uses bgp-peer-group-base; 1667 } 1668 } 1669 } 1670 1671 file "ietf-bgp-neighbor@2018-05-09.yang" 1672 submodule ietf-bgp-neighbor { 1673 yang-version "1.1"; 1674 belongs-to ietf-bgp { 1675 prefix "bgp"; 1676 } 1678 import ietf-routing-policy { 1679 prefix rpol; 1680 } 1681 import ietf-bgp-types { 1682 prefix bgp-types; 1683 } 1684 import ietf-inet-types { 1685 prefix inet; 1686 } 1687 import ietf-yang-types { 1688 prefix yang; 1689 } 1691 // Include the common submodule 1692 include ietf-bgp-common; 1693 include ietf-bgp-common-multiprotocol; 1694 include ietf-bgp-peer-group; 1695 include ietf-bgp-common-structure; 1697 // meta 1698 organization 1699 "IETF IDR Working Group"; 1701 contact 1702 "WG Web: 1703 WG List: 1705 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 1706 Authors: Keyur Patel, 1707 Mahesh Jethanandani, 1708 Susan Hares"; 1710 description 1711 "This sub-module contains groupings that are specific to the 1712 neighbor context of the OpenConfig BGP module."; 1714 revision "2018-05-09" { 1715 description 1716 "Initial Version"; 1717 reference 1718 "RFC XXX, BGP Model for Service Provider Network."; 1720 } 1722 grouping bgp-neighbor-use-multiple-paths { 1723 description 1724 "Multi-path configuration and state applicable to a BGP 1725 neighbor"; 1727 container use-multiple-paths { 1728 description 1729 "Parameters related to the use of multiple-paths for the same 1730 NLRI when they are received only from this neighbor"; 1732 uses bgp-common-use-multiple-paths-config; 1734 container ebgp { 1735 description 1736 "Multi-path configuration for eBGP"; 1737 uses bgp-common-use-multiple-paths-ebgp-as-options-config; 1738 } 1739 } 1740 } 1742 grouping bgp-neighbor-counters-message-types-state { 1743 description 1744 "Grouping of BGP message types, included for re-use across 1745 counters"; 1747 leaf UPDATE { 1748 type uint64; 1749 description 1750 "Number of BGP UPDATE messages announcing, withdrawing or 1751 modifying paths exchanged."; 1752 } 1754 leaf NOTIFICATION { 1755 type uint64; 1756 description 1757 "Number of BGP NOTIFICATION messages indicating an error 1758 condition has occurred exchanged."; 1759 } 1760 } 1762 grouping bgp-neighbor-afi-safi-list { 1763 description 1764 "List of address-families associated with the BGP neighbor"; 1766 list afi-safi { 1767 key "afi-safi-name"; 1768 description 1769 "AFI,SAFI configuration available for the neighbour or 1770 group"; 1772 uses bgp-common-mp-afi-safi-config; 1774 leaf active { 1775 type boolean; 1776 config false; 1777 description 1778 "This value indicates whether a particular AFI-SAFI has 1779 been succesfully negotiated with the peer. An AFI-SAFI may 1780 be enabled in the current running configuration, but a 1781 session restart may be required in order to negotiate the 1782 new capability."; 1783 } 1785 container prefixes { 1786 config false; 1787 description "Prefix counters for the BGP session"; 1788 leaf received { 1789 type uint32; 1790 description 1791 "The number of prefixes received from the neighbor"; 1792 } 1794 leaf sent { 1795 type uint32; 1796 description 1797 "The number of prefixes advertised to the neighbor"; 1798 } 1800 leaf installed { 1801 type uint32; 1802 description 1803 "The number of advertised prefixes installed in the 1804 Loc-RIB"; 1805 } 1806 } 1808 container graceful-restart { 1809 description 1810 "Parameters relating to BGP graceful-restart"; 1812 uses bgp-common-mp-afi-safi-graceful-restart-config; 1814 leaf received { 1815 type boolean; 1816 config false; 1817 description 1818 "This leaf indicates whether the neighbor advertised the 1819 ability to support graceful-restart for this AFI-SAFI"; 1820 } 1822 leaf advertised { 1823 type boolean; 1824 config false; 1825 description 1826 "This leaf indicates whether the ability to support 1827 graceful-restart has been advertised to the peer"; 1828 } 1829 } 1831 uses bgp-common-mp-all-afi-safi-list-contents; 1832 uses bgp-neighbor-use-multiple-paths; 1833 } 1834 } 1836 grouping bgp-neighbor-base { 1837 description 1838 "Parameters related to a BGP neighbor"; 1840 leaf peer-group { 1841 type leafref { 1842 path "../../../peer-groups/peer-group/peer-group-name"; 1843 } 1844 description 1845 "The peer-group with which this neighbor is associated"; 1846 } 1848 leaf neighbor-address { 1849 type inet:ip-address; 1850 description 1851 "Address of the BGP peer, either in IPv4 or IPv6"; 1852 } 1854 leaf enabled { 1855 type boolean; 1856 default true; 1857 description 1858 "Whether the BGP peer is enabled. In cases where the enabled 1859 leaf is set to false, the local system should not initiate 1860 connections to the neighbor, and should not respond to TCP 1861 connections attempts from the neighbor. If the state of the 1862 BGP session is ESTABLISHED at the time that this leaf is set 1863 to false, the BGP session should be ceased."; 1865 } 1867 uses bgp-common-neighbor-group-config; 1869 leaf session-state { 1870 type enumeration { 1871 enum IDLE { 1872 description 1873 "neighbor is down, and in the Idle state of the FSM"; 1874 } 1875 enum CONNECT { 1876 description 1877 "neighbor is down, and the session is waiting for the 1878 underlying transport session to be established"; 1879 } 1880 enum ACTIVE { 1881 description 1882 "neighbor is down, and the local system is awaiting a 1883 connection from the remote peer"; 1884 } 1885 enum OPENSENT { 1886 description 1887 "neighbor is in the process of being established. The 1888 local system has sent an OPEN message"; 1889 } 1890 enum OPENCONFIRM { 1891 description 1892 "neighbor is in the process of being established. The 1893 local system is awaiting a NOTIFICATION or KEEPALIVE 1894 message"; 1895 } 1896 enum ESTABLISHED { 1897 description 1898 "neighbor is up - the BGP session with the peer is 1899 established"; 1900 } 1901 } 1902 config false; 1903 description 1904 "Operational state of the BGP peer"; 1905 } 1907 leaf last-established { 1908 // Was oc-types:timeticks64 1909 type uint64; 1910 config false; 1911 description 1912 "This timestamp indicates the time that the BGP session last 1913 transitioned in or out of the Established state. The value 1914 is the timestamp in seconds relative to the Unix Epoch (Jan 1915 1, 1970 00:00:00 UTC). 1917 The BGP session uptime can be computed by clients as the 1918 difference between this value and the current time in UTC 1919 (assuming the session is in the ESTABLISHED state, per the 1920 session-state leaf)."; 1921 } 1923 leaf established-transitions { 1924 type yang:counter64; 1925 config false; 1926 description 1927 "Number of transitions to the Established state for the 1928 neighbor session. This value is analogous to the 1929 bgpPeerFsmEstablishedTransitions object from the standard 1930 BGP-4 MIB"; 1931 reference 1932 "RFC 4273 - Definitions of Managed Objects for BGP-4"; 1933 } 1935 leaf-list supported-capabilities { 1936 type identityref { 1937 base bgp-types:BGP_CAPABILITY; 1938 } 1939 config false; 1940 description 1941 "BGP capabilities negotiated as supported with the peer"; 1942 } 1944 container messages { 1945 config false; 1946 description 1947 "Counters for BGP messages sent and received from the 1948 neighbor"; 1949 container sent { 1950 description 1951 "Counters relating to BGP messages sent to the neighbor"; 1952 uses bgp-neighbor-counters-message-types-state; 1953 } 1955 container received { 1956 description 1957 "Counters for BGP messages received from the neighbor"; 1958 uses bgp-neighbor-counters-message-types-state; 1959 } 1960 } 1961 container queues { 1962 config false; 1963 description 1964 "Counters related to queued messages associated with the BGP 1965 neighbor"; 1967 leaf input { 1968 type uint32; 1969 description 1970 "The number of messages received from the peer currently 1971 queued"; 1972 } 1974 leaf output { 1975 type uint32; 1976 description 1977 "The number of messages queued to be sent to the peer"; 1978 } 1979 } 1981 container timers { 1982 description 1983 "Timers related to a BGP neighbor"; 1985 uses bgp-common-neighbor-group-timers-config; 1987 leaf negotiated-hold-time { 1988 type decimal64 { 1989 fraction-digits 2; 1990 } 1991 config false; 1992 description 1993 "The negotiated hold-time for the BGP session"; 1994 } 1995 } 1997 container transport { 1998 description 1999 "Transport session parameters for the BGP neighbor"; 2001 uses bgp-common-neighbor-group-transport-config; 2003 leaf local-port { 2004 type inet:port-number; 2005 config false; 2006 description 2007 "Local TCP port being used for the TCP session supporting 2008 the BGP session"; 2010 } 2012 leaf remote-address { 2013 type inet:ip-address; 2014 config false; 2015 description 2016 "Remote address to which the BGP session has been 2017 established"; 2018 } 2020 leaf remote-port { 2021 type inet:port-number; 2022 config false; 2023 description 2024 "Remote port being used by the peer for the TCP session 2025 supporting the BGP session"; 2026 } 2027 } 2029 container error-handling { 2030 description 2031 "Error handling parameters used for the BGP neighbor or 2032 group"; 2033 uses bgp-common-neighbor-group-error-handling-config; 2035 leaf erroneous-update-messages { 2036 type uint32; 2037 config false; 2038 description 2039 "The number of BGP UPDATE messages for which the 2040 treat-as-withdraw mechanism has been applied based on 2041 erroneous message contents"; 2042 } 2043 } 2045 container graceful-restart { 2046 description 2047 "Parameters relating the graceful restart mechanism for BGP"; 2049 uses bgp-common-graceful-restart-config; 2051 leaf peer-restart-time { 2052 type uint16 { 2053 range 0..4096; 2054 } 2055 config false; 2056 description 2057 "The period of time (advertised by the peer) that the peer 2058 expects a restart of a BGP session to take"; 2059 } 2061 leaf peer-restarting { 2062 type boolean; 2063 config false; 2064 description 2065 "This flag indicates whether the remote neighbor is 2066 currently in the process of restarting, and hence received 2067 routes are currently stale"; 2068 } 2070 leaf local-restarting { 2071 type boolean; 2072 config false; 2073 description 2074 "This flag indicates whether the local neighbor is 2075 currently restarting. The flag is unset after all NLRI 2076 have been advertised to the peer, and the End-of-RIB (EOR) 2077 marker has been unset"; 2078 } 2080 leaf mode { 2081 type enumeration { 2082 enum HELPER_ONLY { 2083 description 2084 "The local router is operating in helper-only mode, and 2085 hence will not retain forwarding state during a local 2086 session restart, but will do so during a restart of 2087 the remote peer"; 2088 } 2089 enum BILATERAL { 2090 description 2091 "The local router is operating in both helper mode, and 2092 hence retains forwarding state during a remote 2093 restart, and also maintains forwarding state during 2094 local session restart"; 2095 } 2096 enum REMOTE_HELPER { 2097 description 2098 "The local system is able to retain routes during 2099 restart but the remote system is only able to act as a 2100 helper"; 2101 } 2102 } 2103 config false; 2104 description 2105 "This leaf indicates the mode of operation of BGP graceful 2106 restart with the peer"; 2107 } 2108 } 2110 uses bgp-common-structure-neighbor-group-logging-options; 2111 uses bgp-common-structure-neighbor-group-ebgp-multihop; 2112 uses bgp-common-structure-neighbor-group-route-reflector; 2113 uses bgp-common-structure-neighbor-group-as-path-options; 2114 uses bgp-common-structure-neighbor-group-add-paths; 2115 uses bgp-neighbor-use-multiple-paths; 2116 uses rpol:apply-policy-group; 2118 container afi-safis { 2119 description 2120 "Per-address-family configuration parameters associated with 2121 the neighbor"; 2122 uses bgp-neighbor-afi-safi-list; 2123 } 2124 } 2126 grouping bgp-neighbor-list { 2127 description 2128 "The list of BGP neighbors"; 2130 list neighbor { 2131 key "neighbor-address"; 2132 description 2133 "List of BGP neighbors configured on the local system, 2134 uniquely identified by peer IPv[46] address"; 2136 uses bgp-neighbor-base; 2137 } 2138 } 2139 } 2140 2142 file "ietf-bgp-global@2018-05-09.yang" 2143 submodule ietf-bgp-global { 2144 yang-version "1.1"; 2145 belongs-to ietf-bgp { 2146 prefix bgp; 2147 } 2149 import ietf-inet-types { 2150 prefix inet; 2151 } 2152 import ietf-yang-types { 2153 prefix yang; 2154 } 2156 include ietf-bgp-common; 2157 include ietf-bgp-common-multiprotocol; 2159 organization 2160 "IETF IDR Working Group"; 2162 contact 2163 "WG Web: 2164 WG List: 2166 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 2167 Authors: Keyur Patel, 2168 Mahesh Jethanandani, 2169 Susan Hares"; 2171 description 2172 "This sub-module contains groupings that are specific to the 2173 global context of the BGP module"; 2175 revision "2018-05-09" { 2176 description 2177 "Initial Version"; 2178 reference 2179 "RFC XXX, BGP Model for Service Provider Network."; 2180 } 2182 grouping bgp-global-config { 2183 description 2184 "Global configuration options for the BGP router."; 2186 leaf as { 2187 type inet:as-number; 2188 mandatory true; 2189 description 2190 "Local autonomous system number of the router. Uses 2191 the 32-bit as-number type from the model in RFC 6991."; 2192 } 2194 leaf router-id { 2195 type yang:dotted-quad; 2196 description 2197 "Router id of the router - an unsigned 32-bit integer 2198 expressed in dotted quad notation."; 2199 reference 2200 "RFC4271 - A Border Gateway Protocol 4 (BGP-4), 2201 Section 4.2"; 2202 } 2203 } 2205 grouping bgp-global-state { 2206 description 2207 "Operational state parameters for the BGP neighbor"; 2209 uses bgp-common-state; 2210 } 2212 grouping bgp-global-default-route-distance-config { 2213 description 2214 "Configuration options relating to the administrative distance 2215 (or preference) assigned to routes received from different 2216 sources (external, internal, and local)."; 2218 leaf external-route-distance { 2219 type uint8 { 2220 range "1..255"; 2221 } 2222 description 2223 "Administrative distance for routes learned from external 2224 BGP (eBGP)."; 2225 } 2226 leaf internal-route-distance { 2227 type uint8 { 2228 range "1..255"; 2229 } 2230 description 2231 "Administrative distance for routes learned from internal 2232 BGP (iBGP)."; 2233 } 2234 } 2236 grouping bgp-global-confederation-config { 2237 description 2238 "Configuration options specifying parameters when the local 2239 router is within an autonomous system which is part of a BGP 2240 confederation."; 2242 leaf enabled { 2243 type boolean; 2244 description 2245 "When this leaf is set to true it indicates that 2246 the local-AS is part of a BGP confederation"; 2247 } 2248 leaf identifier { 2249 type inet:as-number; 2250 description 2251 "Confederation identifier for the autonomous system."; 2252 } 2254 leaf-list member-as { 2255 type inet:as-number; 2256 description 2257 "Remote autonomous systems that are to be treated 2258 as part of the local confederation."; 2259 } 2260 } 2262 grouping bgp-global-afi-safi-list { 2263 description 2264 "List of address-families associated with the BGP instance"; 2266 list afi-safi { 2267 key "afi-safi-name"; 2269 description 2270 "AFI,SAFI configuration available for the 2271 neighbour or group"; 2273 uses bgp-common-mp-afi-safi-config; 2274 uses bgp-common-state; 2276 container graceful-restart { 2277 description 2278 "Parameters relating to BGP graceful-restart"; 2280 uses bgp-common-mp-afi-safi-graceful-restart-config; 2281 } 2283 uses bgp-common-route-selection-options; 2284 uses bgp-common-global-group-use-multiple-paths; 2285 uses bgp-common-mp-all-afi-safi-list-contents; 2286 } 2287 } 2289 // Structural groupings 2290 grouping bgp-global-base { 2291 description 2292 "Global configuration parameters for the BGP router"; 2294 uses bgp-global-config; 2295 uses bgp-global-state; 2296 container default-route-distance { 2297 description 2298 "Administrative distance (or preference) assigned to 2299 routes received from different sources 2300 (external, internal, and local)."; 2302 uses bgp-global-default-route-distance-config; 2303 } 2305 container confederation { 2306 description 2307 "Parameters indicating whether the local system acts as part 2308 of a BGP confederation"; 2310 uses bgp-global-confederation-config; 2311 } 2313 container graceful-restart { 2314 description 2315 "Parameters relating the graceful restart mechanism for BGP"; 2316 uses bgp-common-graceful-restart-config; 2317 } 2319 uses bgp-common-global-group-use-multiple-paths; 2320 uses bgp-common-route-selection-options; 2322 container afi-safis { 2323 description 2324 "Address family specific configuration"; 2325 uses bgp-global-afi-safi-list; 2326 } 2327 } 2329 } 2330 2332 8. BGP types 2334 file "ietf-bgp-types@2018-05-09.yang" 2335 module ietf-bgp-types { 2336 yang-version "1.1"; 2337 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; 2339 prefix "bgp-types"; 2341 import ietf-inet-types { 2342 prefix inet; 2344 } 2346 // meta 2347 organization 2348 "IETF IDR Working Group"; 2350 contact 2351 "WG Web: 2352 WG List: 2354 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 2355 Authors: Keyur Patel, 2356 Mahesh Jethanandani, 2357 Susan Hares"; 2359 description 2360 "This module contains general data definitions for use in BGP 2361 policy. It can be imported by modules that make use of BGP 2362 attributes"; 2364 revision "2018-05-09" { 2365 description 2366 "Initial Version"; 2367 reference 2368 "RFC XXX, BGP Model for Service Provider Network."; 2369 } 2371 identity BGP_CAPABILITY { 2372 description "Base identity for a BGP capability"; 2373 } 2375 identity MPBGP { 2376 base BGP_CAPABILITY; 2377 description 2378 "Multi-protocol extensions to BGP"; 2379 reference "RFC2858"; 2380 } 2382 identity ROUTE_REFRESH { 2383 base BGP_CAPABILITY; 2384 description 2385 "The BGP route-refresh functionality"; 2386 reference "RFC2918"; 2387 } 2389 identity ASN32 { 2390 base BGP_CAPABILITY; 2391 description 2392 "4-byte (32-bit) AS number functionality"; 2393 reference "RFC6793"; 2394 } 2396 identity GRACEFUL_RESTART { 2397 base BGP_CAPABILITY; 2398 description 2399 "Graceful restart functionality"; 2400 reference "RFC4724"; 2401 } 2403 identity ADD_PATHS { 2404 base BGP_CAPABILITY; 2405 description 2406 "BGP add-paths"; 2407 reference "draft-ietf-idr-add-paths"; 2408 } 2410 identity AFI_SAFI_TYPE { 2411 description 2412 "Base identity type for AFI,SAFI tuples for BGP-4"; 2413 reference "RFC4760 - multi-protocol extensions for BGP-4"; 2414 } 2416 identity IPV4_UNICAST { 2417 base AFI_SAFI_TYPE; 2418 description 2419 "IPv4 unicast (AFI,SAFI = 1,1)"; 2420 reference "RFC4760"; 2421 } 2423 identity IPV6_UNICAST { 2424 base AFI_SAFI_TYPE; 2425 description 2426 "IPv6 unicast (AFI,SAFI = 2,1)"; 2427 reference "RFC4760"; 2428 } 2430 identity IPV4_LABELED_UNICAST { 2431 base AFI_SAFI_TYPE; 2432 description 2433 "Labeled IPv4 unicast (AFI,SAFI = 1,4)"; 2434 reference "RFC3107"; 2435 } 2437 identity IPV6_LABELED_UNICAST { 2438 base AFI_SAFI_TYPE; 2439 description 2440 "Labeled IPv6 unicast (AFI,SAFI = 2,4)"; 2441 reference "RFC3107"; 2442 } 2444 identity L3VPN_IPV4_UNICAST { 2445 base AFI_SAFI_TYPE; 2446 description 2447 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 2448 reference "RFC4364"; 2449 } 2451 identity L3VPN_IPV6_UNICAST { 2452 base AFI_SAFI_TYPE; 2453 description 2454 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 2455 reference "RFC4659"; 2456 } 2458 identity L3VPN_IPV4_MULTICAST { 2459 base AFI_SAFI_TYPE; 2460 description 2461 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 2462 reference "RFC6514"; 2463 } 2465 identity L3VPN_IPV6_MULTICAST { 2466 base AFI_SAFI_TYPE; 2467 description 2468 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 2469 reference "RFC6514"; 2470 } 2472 identity L2VPN_VPLS { 2473 base AFI_SAFI_TYPE; 2474 description 2475 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 2476 reference "RFC4761"; 2477 } 2479 identity L2VPN_EVPN { 2480 base AFI_SAFI_TYPE; 2481 description 2482 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 2483 } 2485 identity BGP_WELL_KNOWN_STD_COMMUNITY { 2486 description 2487 "Reserved communities within the standard community space 2488 defined by RFC1997. These communities must fall within the 2489 range 0x00000000 to 0xFFFFFFFF"; 2490 reference "RFC1997"; 2491 } 2493 identity NO_EXPORT { 2494 base BGP_WELL_KNOWN_STD_COMMUNITY; 2495 description 2496 "Do not export NLRI received carrying this community outside 2497 the bounds of this autonomous system, or this confederation if 2498 the local autonomous system is a confederation member AS. This 2499 community has a value of 0xFFFFFF01."; 2500 reference "RFC1997"; 2501 } 2503 identity NO_ADVERTISE { 2504 base BGP_WELL_KNOWN_STD_COMMUNITY; 2505 description 2506 "All NLRI received carrying this community must not be 2507 advertised to other BGP peers. This community has a value of 2508 0xFFFFFF02."; 2509 reference "RFC1997"; 2510 } 2512 identity NO_EXPORT_SUBCONFED { 2513 base BGP_WELL_KNOWN_STD_COMMUNITY; 2514 description 2515 "All NLRI received carrying this community must not be 2516 advertised to external BGP peers - including over confederation 2517 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 2518 reference "RFC1997"; 2519 } 2521 identity NOPEER { 2522 base BGP_WELL_KNOWN_STD_COMMUNITY; 2523 description 2524 "An autonomous system receiving NLRI tagged with this community 2525 is advised not to re-advertise the NLRI to external bi-lateral 2526 peer autonomous systems. An AS may also filter received NLRI 2527 from bilateral peer sessions when they are tagged with this 2528 community value"; 2529 reference "RFC3765"; 2530 } 2532 typedef bgp-session-direction { 2533 type enumeration { 2534 enum INBOUND { 2535 description 2536 "Refers to all NLRI received from the BGP peer"; 2537 } 2538 enum OUTBOUND { 2539 description 2540 "Refers to all NLRI advertised to the BGP peer"; 2541 } 2542 } 2543 description 2544 "Type to describe the direction of NLRI transmission"; 2545 } 2547 typedef bgp-well-known-community-type { 2548 type identityref { 2549 base BGP_WELL_KNOWN_STD_COMMUNITY; 2550 } 2551 description 2552 "Type definition for well-known IETF community attribute 2553 values"; 2554 reference 2555 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 2556 } 2558 typedef bgp-std-community-type { 2559 // TODO: further refine restrictions and allowed patterns 2560 // 4-octet value: 2561 // 2 octets 2562 // 2 octets 2563 type union { 2564 type uint32 { 2565 // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - 2566 // 0xFFFFFFFF are reserved 2567 range "65536..4294901759"; // 0x00010000..0xFFFEFFFF 2568 } 2569 type string { 2570 pattern '([0-9]+:[0-9]+)'; 2571 } 2572 } 2573 description 2574 "Type definition for standard community attributes"; 2575 reference "RFC 1997 - BGP Communities Attribute"; 2576 } 2578 typedef bgp-ext-community-type { 2579 // TODO: needs more work to make this more precise given the 2580 // variability of extended community attribute specifications 2581 // 8-octet value: 2582 // 2 octects 2583 // 6 octets 2585 type union { 2586 type string { 2587 // Type 1: 2-octet global and 4-octet local 2588 // (AS number) (Integer) 2589 pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2590 '[1-9][0-9]{1,4}|[0-9]):' + 2591 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2592 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2593 } 2594 type string { 2595 // Type 2: 4-octet global and 2-octet local 2596 // (ipv4-address) (integer) 2597 pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2598 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2599 '2[0-4][0-9]|25[0-5]):' + 2600 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2601 '[1-9][0-9]{1,4}|[0-9])'; 2602 } 2603 type string { 2604 // route-target with Type 1 2605 // route-target:(ASN):(local-part) 2606 pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' + 2607 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 2608 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2609 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2610 } 2611 type string { 2612 // route-target with Type 2 2613 // route-target:(IPv4):(local-part) 2614 pattern 'route\-target:' + 2615 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2616 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2617 '2[0-4][0-9]|25[0-5]):' + 2618 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2619 '[1-9][0-9]{1,4}|[0-9])'; 2620 } 2621 type string { 2622 // route-origin with Type 1 2623 pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' + 2624 '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + 2625 '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + 2626 '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; 2627 } 2628 type string { 2629 // route-origin with Type 2 2630 pattern 'route\-origin:' + 2631 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + 2632 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + 2633 '2[0-4][0-9]|25[0-5]):' + 2634 '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + 2635 '[1-9][0-9]{1,4}|[0-9])'; 2636 } 2637 } 2638 description 2639 "Type definition for extended community attributes"; 2640 reference "RFC 4360 - BGP Extended Communities Attribute"; 2641 } 2643 typedef bgp-community-regexp-type { 2644 // TODO: needs more work to decide what format these regexps can 2645 // take. 2646 //type oc-types:std-regexp; 2647 type string; 2648 description 2649 "Type definition for communities specified as regular 2650 expression patterns"; 2651 } 2653 typedef bgp-origin-attr-type { 2654 type enumeration { 2655 enum IGP { 2656 description "Origin of the NLRI is internal"; 2657 } 2658 enum EGP { 2659 description "Origin of the NLRI is EGP"; 2660 } 2661 enum INCOMPLETE { 2662 description "Origin of the NLRI is neither IGP or EGP"; 2663 } 2664 } 2665 description 2666 "Type definition for standard BGP origin attribute"; 2667 reference "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), 2668 Sec 4.3"; 2669 } 2671 typedef peer-type { 2672 type enumeration { 2673 enum INTERNAL { 2674 description "internal (iBGP) peer"; 2675 } 2676 enum EXTERNAL { 2677 description "external (eBGP) peer"; 2678 } 2680 } 2681 description 2682 "labels a peer or peer group as explicitly internal or 2683 external"; 2684 } 2686 identity REMOVE_PRIVATE_AS_OPTION { 2687 description 2688 "Base identity for options for removing private autonomous 2689 system numbers from the AS_PATH attribute"; 2690 } 2692 identity PRIVATE_AS_REMOVE_ALL { 2693 base REMOVE_PRIVATE_AS_OPTION; 2694 description 2695 "Strip all private autonmous system numbers from the AS_PATH. 2696 This action is performed regardless of the other content of the 2697 AS_PATH attribute, and for all instances of private AS numbers 2698 within that attribute."; 2699 } 2701 identity PRIVATE_AS_REPLACE_ALL { 2702 base REMOVE_PRIVATE_AS_OPTION; 2703 description 2704 "Replace all instances of private autonomous system numbers in 2705 the AS_PATH with the local BGP speaker's autonomous system 2706 number. This action is performed regardless of the other 2707 content of the AS_PATH attribute, and for all instances of 2708 private AS number within that attribute."; 2709 } 2711 typedef remove-private-as-option { 2712 type identityref { 2713 base REMOVE_PRIVATE_AS_OPTION; 2714 } 2715 description 2716 "set of options for configuring how private AS path numbers 2717 are removed from advertisements"; 2718 } 2720 typedef percentage { 2721 type uint8 { 2722 range "0..100"; 2723 } 2724 description 2725 "Integer indicating a percentage value"; 2726 } 2727 typedef rr-cluster-id-type { 2728 type union { 2729 type uint32; 2730 type inet:ipv4-address; 2731 } 2732 description 2733 "union type for route reflector cluster ids: 2734 option 1: 4-byte number 2735 option 2: IP address"; 2736 } 2738 typedef community-type { 2739 type enumeration { 2740 enum STANDARD { 2741 description "send only standard communities"; 2742 } 2743 enum EXTENDED { 2744 description "send only extended communities"; 2745 } 2746 enum BOTH { 2747 description "send both standard and extended communities"; 2748 } 2749 enum NONE { 2750 description "do not send any community attribute"; 2751 } 2752 } 2753 description 2754 "type describing variations of community attributes: 2755 STANDARD: standard BGP community [rfc1997] 2756 EXTENDED: extended BGP community [rfc4360] 2757 BOTH: both standard and extended community"; 2758 } 2759 } 2760 2762 9. BGP policy data 2764 file "ietf-bgp-policy@2018-05-09.yang" 2765 module ietf-bgp-policy { 2766 yang-version "1.1"; 2768 // namespace 2769 namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; 2771 prefix "bgp-pol"; 2773 // import some basic types 2774 import ietf-inet-types { 2775 prefix inet; 2776 } 2777 import ietf-routing-policy { 2778 prefix rpol; 2779 } 2780 import ietf-bgp-types { 2781 prefix bgp-types; 2782 } 2784 import ietf-routing-types { 2785 prefix rt-types; 2786 } 2788 // meta 2789 organization 2790 "IETF IDR Working Group"; 2792 contact 2793 "WG Web: 2794 WG List: 2796 Editor: Mahesh Jethanandani (mjethanandani@gmail.com) 2797 Authors: Keyur Patel, 2798 Mahesh Jethanandani, 2799 Susan Hares"; 2801 description 2802 "This module contains data definitions for BGP routing policy. 2803 It augments the base routing-policy module with BGP-specific 2804 options for conditions and actions."; 2806 revision "2018-05-09" { 2807 description 2808 "Initial Version"; 2809 reference 2810 "RFC XXX, BGP Model for Service Provider Network."; 2811 } 2813 // typedef statements 2815 typedef bgp-set-community-option-type { 2816 type enumeration { 2817 enum ADD { 2818 description 2819 "add the specified communities to the existing 2820 community attribute"; 2822 } 2823 enum REMOVE { 2824 description 2825 "remove the specified communities from the 2826 existing community attribute"; 2827 } 2828 enum REPLACE { 2829 description 2830 "replace the existing community attribute with 2831 the specified communities. If an empty set is 2832 specified, this removes the community attribute 2833 from the route."; 2834 } 2835 } 2836 description 2837 "Type definition for options when setting the community 2838 attribute in a policy action"; 2839 } 2841 typedef bgp-next-hop-type { 2842 type union { 2843 type inet:ip-address-no-zone; 2844 type enumeration { 2845 enum SELF { 2846 description "special designation for local router's own 2847 address, i.e., next-hop-self"; 2848 } 2849 } 2850 } 2851 description 2852 "type definition for specifying next-hop in policy actions"; 2853 } 2855 typedef bgp-set-med-type { 2856 type union { 2857 type uint32; 2858 type string { 2859 pattern "^[+-][0-9]+"; 2860 } 2861 type enumeration { 2862 enum IGP { 2863 description "set the MED value to the IGP cost toward the 2864 next hop for the route"; 2865 } 2866 } 2867 } 2868 description 2869 "Type definition for specifying how the BGP MED can 2870 be set in BGP policy actions. The three choices are to set 2871 the MED directly, increment/decrement using +/- notation, 2872 and setting it to the IGP cost (predefined value)."; 2873 } 2875 // grouping statements 2877 grouping match-community-top { 2878 description 2879 "Top-level grouping for match conditions on communities"; 2881 container match-community-set { 2882 description 2883 "Top-level container for match conditions on communities. 2884 Match a referenced community-set according to the logic 2885 defined in the match-set-options leaf"; 2887 leaf community-set { 2888 type leafref { 2889 path 2890 "/rpol:routing-policy/rpol:defined-sets/" + 2891 "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/" + 2892 "bgp-pol:community-set/bgp-pol:community-set-name"; 2893 } 2894 description 2895 "References a defined community set"; 2896 } 2898 uses rpol:match-set-options-group; 2899 } 2900 } 2902 grouping match-ext-community-top { 2903 description 2904 "Top-level grouping for match conditions on extended 2905 communities"; 2907 container match-ext-community-set { 2908 description 2909 "Match a referenced extended community-set according to the 2910 logic defined in the match-set-options leaf"; 2912 leaf ext-community-set { 2913 type leafref { 2914 path 2915 "/rpol:routing-policy/rpol:defined-sets/" + 2916 "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" + 2917 "bgp-pol:ext-community-set/" + 2918 "bgp-pol:ext-community-set-name"; 2919 } 2920 description "References a defined extended community set"; 2921 } 2923 uses rpol:match-set-options-group; 2924 } 2925 } 2927 grouping match-as-path-top { 2928 description 2929 "Top-level grouping for match conditions on AS path set"; 2931 container match-as-path-set { 2932 description 2933 "Match a referenced as-path set according to the logic 2934 defined in the match-set-options leaf"; 2936 leaf as-path-set { 2937 type leafref { 2938 path "/rpol:routing-policy/rpol:defined-sets/" + 2939 "bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/" + 2940 "bgp-pol:as-path-set/bgp-pol:as-path-set-name"; 2941 } 2942 description "References a defined AS path set"; 2943 } 2944 uses rpol:match-set-options-group; 2945 } 2946 } 2948 grouping bgp-match-set-conditions { 2949 description 2950 "Condition statement definitions for checking membership in a 2951 defined set"; 2953 uses match-community-top; 2954 uses match-ext-community-top; 2955 uses match-as-path-top; 2956 } 2958 grouping community-count-top { 2959 description 2960 "Top-level grouping for community count condition"; 2962 container community-count { 2963 description 2964 "Value and comparison operations for conditions based on the 2965 number of communities in the route update"; 2966 } 2967 } 2969 grouping as-path-length-top { 2970 description 2971 "Top-level grouping for AS path length condition"; 2973 container as-path-length { 2974 description 2975 "Value and comparison operations for conditions based on the 2976 length of the AS path in the route update"; 2977 } 2978 } 2980 grouping bgp-conditions-top { 2981 description 2982 "Top-level grouping for BGP-specific policy conditions"; 2984 container bgp-conditions { 2985 description 2986 "Top-level container "; 2988 leaf med-eq { 2989 type uint32; 2990 description 2991 "Condition to check if the received MED value is equal to 2992 the specified value"; 2993 } 2995 leaf origin-eq { 2996 type bgp-types:bgp-origin-attr-type; 2997 description 2998 "Condition to check if the route origin is equal to the 2999 specified value"; 3000 } 3002 leaf-list next-hop-in { 3003 type inet:ip-address-no-zone; 3004 description 3005 "List of next hop addresses to check for in the route 3006 update"; 3007 } 3009 leaf-list afi-safi-in { 3010 type identityref { 3011 base bgp-types:AFI_SAFI_TYPE; 3012 } 3013 description 3014 "List of address families which the NLRI may be within"; 3015 } 3017 leaf local-pref-eq { 3018 type uint32; 3019 // TODO: add support for other comparisons if needed 3020 description 3021 "Condition to check if the local pref attribute is equal to 3022 the specified value"; 3023 } 3025 leaf route-type { 3026 // TODO: verify extent of vendor support for this comparison 3027 type enumeration { 3028 enum INTERNAL { 3029 description "route type is internal"; 3030 } 3031 enum EXTERNAL { 3032 description "route type is external"; 3033 } 3034 } 3035 description 3036 "Condition to check the route type in the route update"; 3037 } 3039 uses community-count-top; 3040 uses as-path-length-top; 3041 uses bgp-match-set-conditions; 3042 } 3043 } 3045 grouping community-set-top { 3046 description 3047 "Top-level grouping for BGP community sets"; 3049 container community-sets { 3050 description 3051 "Enclosing container for list of defined BGP community sets"; 3053 list community-set { 3054 key "community-set-name"; 3055 description 3056 "List of defined BGP community sets"; 3058 leaf community-set-name { 3059 type string; 3060 mandatory true; 3061 description 3062 "name / label of the community set -- this is used to 3063 reference the set in match conditions"; 3064 } 3066 leaf-list community-member { 3067 type union { 3068 type bgp-types:bgp-std-community-type; 3069 type bgp-types:bgp-community-regexp-type; 3070 type bgp-types:bgp-well-known-community-type; 3071 } 3072 description 3073 "members of the community set"; 3074 } 3075 } 3076 } 3077 } 3079 grouping ext-community-set-top { 3080 description 3081 "Top-level grouping for extended BGP community sets"; 3083 container ext-community-sets { 3084 description 3085 "Enclosing container for list of extended BGP community 3086 sets"; 3087 list ext-community-set { 3088 key "ext-community-set-name"; 3089 description 3090 "List of defined extended BGP community sets"; 3092 leaf ext-community-set-name { 3093 type string; 3094 description 3095 "name / label of the extended community set -- this is 3096 used to reference the set in match conditions"; 3097 } 3099 leaf-list ext-community-member { 3100 type union { 3101 type rt-types:route-target; 3102 type bgp-types:bgp-community-regexp-type; 3103 } 3104 description 3105 "members of the extended community set"; 3106 } 3107 } 3108 } 3110 } 3112 grouping as-path-set-top { 3113 description 3114 "Top-level grouping for AS path sets"; 3116 container as-path-sets { 3117 description 3118 "Enclosing container for list of define AS path sets"; 3120 list as-path-set { 3121 key "as-path-set-name"; 3122 description 3123 "List of defined AS path sets"; 3125 leaf as-path-set-name { 3126 type string; 3127 description 3128 "name of the AS path set -- this is used to reference the 3129 set in match conditions"; 3130 } 3132 leaf-list as-path-set-member { 3133 // TODO: need to refine typedef for AS path expressions 3134 type string; 3135 description 3136 "AS path expression -- list of ASes in the set"; 3137 } 3138 } 3139 } 3140 } 3142 // augment statements 3144 augment "/rpol:routing-policy/rpol:defined-sets" { 3145 description "adds BGP defined sets container to routing policy 3146 model"; 3148 container bgp-defined-sets { 3149 description 3150 "BGP-related set definitions for policy match conditions"; 3152 uses community-set-top; 3153 uses ext-community-set-top; 3154 uses as-path-set-top; 3155 } 3156 } 3157 grouping as-path-prepend-top { 3158 description 3159 "Top-level grouping for the AS path prepend action"; 3161 container set-as-path-prepend { 3162 description 3163 "action to prepend local AS number to the AS-path a 3164 specified number of times"; 3166 leaf repeat-n { 3167 type uint8 { 3168 range 1..max; 3169 } 3170 description 3171 "Number of times to prepend the local AS number to the AS 3172 path. The value should be between 1 and the maximum 3173 supported by the implementation."; 3174 } 3175 } 3176 } 3178 grouping set-community-action-common { 3179 description 3180 "Common leaves for set-community and set-ext-community 3181 actions"; 3183 leaf method { 3184 type enumeration { 3185 enum INLINE { 3186 description 3187 "The extended communities are specified inline as a 3188 list"; 3189 } 3190 enum REFERENCE { 3191 description 3192 "The extended communities are specified by referencing a 3193 defined ext-community set"; 3194 } 3195 } 3196 description 3197 "Indicates the method used to specify the extended 3198 communities for the set-ext-community action"; 3199 } 3201 leaf options { 3202 type bgp-set-community-option-type; 3203 description 3204 "Options for modifying the community attribute with 3205 the specified values. These options apply to both 3206 methods of setting the community attribute."; 3207 } 3208 } 3210 grouping set-community-inline-top { 3211 description 3212 "Top-level grouping or inline specification of set-community 3213 action"; 3215 container inline { 3216 when "../config/method=INLINE" { 3217 description 3218 "Active only when the set-community method is INLINE"; 3219 } 3220 description 3221 "Set the community values for the action inline with 3222 a list."; 3224 leaf-list communities { 3225 type union { 3226 type bgp-types:bgp-std-community-type; 3227 type bgp-types:bgp-well-known-community-type; 3228 } 3229 description 3230 "Set the community values for the update inline with a 3231 list."; 3232 } 3233 } 3234 } 3236 grouping set-community-reference-top { 3237 description 3238 "Top-level grouping for referencing a community-set in the 3239 set-community action"; 3241 container reference { 3242 when "../config/method=REFERENCE" { 3243 description 3244 "Active only when the set-community method is REFERENCE"; 3245 } 3246 description 3247 "Provide a reference to a defined community set for the 3248 set-community action"; 3250 leaf community-set-ref { 3251 type leafref { 3252 path "/rpol:routing-policy/rpol:defined-sets/" + 3253 "bgp-pol:bgp-defined-sets/" + 3254 "bgp-pol:community-sets/bgp-pol:community-set/" + 3255 "bgp-pol:community-set-name"; 3256 } 3257 description 3258 "References a defined community set by name"; 3259 } 3260 } 3261 } 3263 grouping set-community-action-top { 3264 description 3265 "Top-level grouping for the set-community action"; 3267 container set-community { 3268 description 3269 "Action to set the community attributes of the route, along 3270 with options to modify how the community is modified. 3271 Communities may be set using an inline list OR 3272 reference to an existing defined set (not both)."; 3274 uses set-community-action-common; 3275 uses set-community-inline-top; 3276 uses set-community-reference-top; 3277 } 3278 } 3280 grouping set-ext-community-inline-top { 3281 description 3282 "Top-level grouping or inline specification of 3283 set-ext-community action"; 3285 container inline { 3286 when "../config/method=INLINE" { 3287 description 3288 "Active only when the set-community method is INLINE"; 3289 } 3290 description 3291 "Set the extended community values for the action inline with 3292 a list."; 3294 leaf-list communities { 3295 type union { 3296 type rt-types:route-target; 3297 type bgp-types:bgp-well-known-community-type; 3298 } 3299 description 3300 "Set the extended community values for the update inline 3301 with a list."; 3302 } 3303 } 3304 } 3306 grouping set-ext-community-reference-top { 3307 description 3308 "Top-level grouping for referening an extended community-set 3309 in the set-community action"; 3311 container reference { 3312 when "../config/method=REFERENCE" { 3313 description 3314 "Active only when the set-community method is REFERENCE"; 3315 } 3316 description 3317 "Provide a reference to an extended community set for the 3318 set-ext-community action"; 3320 leaf ext-community-set-ref { 3321 type leafref { 3322 path 3323 "/rpol:routing-policy/rpol:defined-sets/" + 3324 "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" + 3325 "bgp-pol:ext-community-set/" + 3326 "bgp-pol:ext-community-set-name"; 3327 } 3328 description 3329 "References a defined extended community set by name"; 3330 } 3331 } 3332 } 3334 grouping set-ext-community-action-top { 3335 description 3336 "Top-level grouping for the set-ext-community action"; 3338 container set-ext-community { 3339 description 3340 "Action to set the extended community attributes of the 3341 route, along with options to modify how the community is 3342 modified. Extended communities may be set using an inline 3343 list OR a reference to an existing defined set (but not 3344 both)."; 3346 uses set-community-action-common; 3347 uses set-ext-community-inline-top; 3348 uses set-ext-community-reference-top; 3350 } 3351 } 3353 grouping bgp-actions-top { 3354 description 3355 "Top-level grouping for BGP-specific actions"; 3357 container bgp-actions { 3358 description 3359 "Top-level container for BGP-specific actions"; 3361 leaf set-route-origin { 3362 type bgp-types:bgp-origin-attr-type; 3363 description 3364 "set the origin attribute to the specified value"; 3365 } 3367 leaf set-local-pref { 3368 type uint32; 3369 description 3370 "set the local pref attribute on the route update"; 3371 } 3373 leaf set-next-hop { 3374 type bgp-next-hop-type; 3375 description 3376 "set the next-hop attribute in the route update"; 3377 } 3379 leaf set-med { 3380 type bgp-set-med-type; 3381 description 3382 "set the med metric attribute in the route update"; 3383 } 3384 uses as-path-prepend-top; 3385 uses set-community-action-top; 3386 uses set-ext-community-action-top; 3387 } 3388 } 3390 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3391 "rpol:policy-definition/rpol:statements/rpol:statement/" + 3392 "rpol:conditions" { 3393 description 3394 "BGP policy conditions added to routing policy module"; 3396 uses bgp-conditions-top; 3397 } 3398 augment "/rpol:routing-policy/rpol:policy-definitions/" + 3399 "rpol:policy-definition/rpol:statements/rpol:statement/" + 3400 "rpol:actions" { 3401 description "BGP policy actions added to routing policy 3402 module"; 3404 uses bgp-actions-top; 3405 } 3407 // rpc statements 3409 // notification statements 3410 } 3411 3413 10. Contributors 3415 Previous versions of this document saw contributions from Anees 3416 Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr 3417 Zhadkin, and Xyfeng Liu. 3419 11. Acknowledgements 3421 The authors are grateful for valuable contributions to this document 3422 and the associated models from: Ebben Aires, Pavan Beeram, Chris 3423 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 3424 George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee 3425 Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- 3426 Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim 3427 Uttaro, and Gunter Vandevelde. 3429 12. References 3431 12.1. Normative references 3433 [I-D.ietf-rtgwg-ni-model] 3434 Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. 3435 Liu, "YANG Model for Network Instances", draft-ietf-rtgwg- 3436 ni-model-12 (work in progress), March 2018. 3438 [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities 3439 Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, 3440 . 3442 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 3443 Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November 3444 1998, . 3446 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3447 DOI 10.17487/RFC3688, January 2004, 3448 . 3450 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 3451 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 3452 DOI 10.17487/RFC4271, January 2006, 3453 . 3455 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 3456 Reflection: An Alternative to Full Mesh Internal BGP 3457 (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, 3458 . 3460 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 3461 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 3462 DOI 10.17487/RFC4724, January 2007, 3463 . 3465 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 3466 "Multiprotocol Extensions for BGP-4", RFC 4760, 3467 DOI 10.17487/RFC4760, January 2007, 3468 . 3470 [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 3471 System Confederations for BGP", RFC 5065, 3472 DOI 10.17487/RFC5065, August 2007, 3473 . 3475 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 3476 (TLS) Protocol Version 1.2", RFC 5246, 3477 DOI 10.17487/RFC5246, August 2008, 3478 . 3480 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 3481 the Network Configuration Protocol (NETCONF)", RFC 6020, 3482 DOI 10.17487/RFC6020, October 2010, 3483 . 3485 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 3486 and A. Bierman, Ed., "Network Configuration Protocol 3487 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 3488 . 3490 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 3491 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 3492 . 3494 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 3495 Austein, "BGP Prefix Origin Validation", RFC 6811, 3496 DOI 10.17487/RFC6811, January 2013, 3497 . 3499 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 3500 RFC 6991, DOI 10.17487/RFC6991, July 2013, 3501 . 3503 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 3504 RFC 7950, DOI 10.17487/RFC7950, August 2016, 3505 . 3507 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 3508 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 3509 . 3511 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 3512 Access Control Model", STD 91, RFC 8341, 3513 DOI 10.17487/RFC8341, March 2018, 3514 . 3516 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 3517 Routing Management (NMDA Version)", RFC 8349, 3518 DOI 10.17487/RFC8349, March 2018, 3519 . 3521 12.2. Informative references 3523 [I-D.ietf-rtgwg-policy-model] 3524 Qu, Y., Tantsura, J., Lindem, A., Liu, X., and A. Shaikh, 3525 "A YANG Data Model for Routing Policy Management", draft- 3526 ietf-rtgwg-policy-model-02 (work in progress), March 2018. 3528 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 3529 and R. Wilton, "Network Management Datastore Architecture 3530 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 3531 . 3533 Authors' Addresses 3535 Keyur Patel 3536 Arrcus 3537 CA 3538 USA 3540 Email: keyur@arrcus.com 3541 Mahesh Jethanandani 3543 Email: mjethanandani@gmail.com 3545 Susan Hares 3546 Huawei 3547 7453 Hickory Hill 3548 Saline, MI 48176 3549 USA 3551 Email: shares@ndzh.com