idnits 2.17.1 draft-shaikh-idr-bgp-model-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document is more than 15 pages and seems to lack a Table of Contents. 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 2319 has weird spacing: '...unicast speci...' -- The document date (June 14, 2015) is 3236 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 3065 (Obsoleted by RFC 5065) == Outdated reference: A later version (-01) exists of draft-openconfig-netmod-opstate-00 == Outdated reference: A later version (-01) exists of draft-shaikh-rtgwg-policy-model-00 Summary: 2 errors (**), 0 flaws (~~), 5 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Interdomain Routing A. Shaikh, Ed. 3 Internet-Draft Google 4 Intended status: Informational R. Shakir, Ed. 5 Expires: December 16, 2015 BT 6 K. Patel, Ed. 7 Cisco 8 S. Hares, Ed. 9 Huawei 10 K. D'Souza 11 AT&T 12 D. Bansal 13 Microsoft 14 A. Clemm 15 A. Zhdankin 16 Cisco 17 M. Jethanandani 18 Ciena 19 X. Liu 20 Ericsson 21 June 14, 2015 23 BGP Model for Service Provider Networks 24 draft-shaikh-idr-bgp-model-02 26 Abstract 28 This document defines a YANG data model for configuring and managing 29 BGP, including protocol, policy, and operational aspects based on 30 data center, carrier and content provider operational requirements. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at http://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on December 16, 2015. 49 Copyright Notice 51 Copyright (c) 2015 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents 56 (http://trustee.ietf.org/license-info) in effect on the date of 57 publication of this document. Please review these documents 58 carefully, as they describe your rights and restrictions with respect 59 to this document. Code Components extracted from this document must 60 include Simplified BSD License text as described in Section 4.e of 61 the Trust Legal Provisions and are provided without warranty as 62 described in the Simplified BSD License. 64 1. Introduction 66 YANG [RFC6020] is a data modeling language that was introduced to 67 define the contents of a conceptual data store that allows networked 68 devices to be managed using NETCONF [RFC6241]. YANG is proving 69 relevant beyond its initial confines, as bindings to other interfaces 70 (e.g. ReST) and encodings other than XML (e.g. JSON) are being 71 defined. Furthermore, YANG data models can be used as the basis of 72 implementation for a number of interfaces, such as CLIs and 73 programmatic APIs. 75 This document describes a YANG data model for the BGP [RFC4271] 76 protocol, including various protocol extensions, policy 77 configuration, as well as defining key operational state data. The 78 model is intended to be vendor-neutral, in order to allow operators 79 to manage BGP configuration in heterogeneous environments with 80 routers supplied by multiple vendors. The model is also intended to 81 be readily mapped to existing implementations to facilitate support 82 from as large a set of routing hardware and software vendors as 83 possible. 85 1.1. Goals and approach 87 The model covers the base BGP features that are deployed across major 88 implementations and the common BGP configurations in use across a 89 number of operator network deployments. In particular, this model 90 attempts to cover BGP features defined in [RFC4271], [RFC1997], 91 [RFC4456], [RFC4760], [RFC3065], [RFC2439], [RFC4724], and [RFC6811]. 93 Along with configuration of base BGP features, this model also 94 addresses policy configuration, by providing "hooks" for applying 95 policies, and also defining BGP-specific policy features. The BGP 96 policy features are intended to be used with the general routing 97 policy model defined in [I-D.shaikh-rtgwg-policy-model]. The model 98 also supports operational state data to enable a common model for 99 reading BGP-related state from a BGP speaker. 101 For the base BGP features, the focus of the model described in this 102 document is on providing configuration and operational state 103 information relating to: 105 o The global BGP instance, and neighbors whose configuration is 106 specified individually, or templated with the use of peer-groups. 108 o The address families that are supported by peers, and the global 109 configuration which relates to them. 111 o The policy configuration "hooks" and BGP-specific policy features 112 that relate to a neighbor - controlling the import and export of 113 NLRIs. 115 As mentioned earlier, any configuration items that are deemed to be 116 widely available in existing major BGP implementations are included 117 in the model. Additional, more esoteric, configuration items that 118 are not commonly used, or only available from a single 119 implementation, are omitted from the model with an expectation that 120 they will be available in companion modules that augment the current 121 model. This allows clarity in identifying data that is part of the 122 vendor-neutral base model. 124 Where possible, naming in the model follows conventions used in 125 available standards documents, and otherwise tries to be self- 126 explanatory with sufficient descriptions of the intended behavior. 127 Similarly, configuration data value constraints and default values, 128 where used, are based on recommendations in current standards 129 documentation. Since implementations vary widely in this respect, 130 this version of the model specifies only a limited set of defaults 131 and ranges with the expectation of being more prescriptive in future 132 versions based on actual operator use. 134 2. Model overview 136 The BGP model is defined across several YANG modules but at a high 137 level is organized into Six elements: 139 o base protocol configuration -- configuration affecting BGP 140 protocol-related operations, defined at various levels of 141 hierarchy. 143 o multiprotocol configuration -- configuration affecting individual 144 address-families within BGP [RFC4760]. 146 o neighbor configuration -- configuration affecting an individual 147 neighbor within BGP. 149 o neighbor multiprotocol configuration -- configuration affecting 150 individual address-families for a neighbor within BGP. 152 o policy configuration -- hooks for application of the policies 153 defined in [I-D.shaikh-rtgwg-policy-model] that act on routes sent 154 (received) to (from) peers or other routing protocols and BGP- 155 specific policy features. 157 o operational state -- variables used for monitoring, management, 158 etc. of BGP operations. 160 These modules also make use of standard Internet types, such as IP 161 addresses and prefixes, autonomous system numbers, etc., defined in 162 RFC 6991 [RFC6991]. 164 Throughout the model, the approach described in 165 [I-D.openconfig-netmod-opstate] is used to represent configuration 166 (intended state), operational and derived state data. That is to 167 say, that each container holds a "config" and "state" sub-container - 168 with the config container being used for configurable parameters, and 169 the state container container holding representing both the 170 operational state of configurable leaves, and derived counters and 171 statistical information. 173 2.1. BGP protocol configuration 175 The BGP protocol configuration model is organized hierarchically, 176 much like the majority of router implementations. That is, 177 configuration items can be specified at multiple levels, as shown 178 below. 180 +--rw bgp! 181 +--rw global 182 | +-- (global-configuration-options) 183 +--rw neighbors 184 | +--rw neighbor* [neighbor-address] 185 | +-- (neighbor-configuration-options) 186 +--rw peer-groups 187 +--rw peer-group* [peer-group-name] 188 +-- (neighbor-configuration-options) 190 Users may specify configuration at a higher level and have it apply 191 to all lower-level items, or provide overriding configuration at a 192 lower level of the hierarchy. Overriding configuration items are 193 optional, with neighbor specific configuration being the most 194 specific or lowest level, followed by peer-group, and finally global. 195 Global configuration options reflect a subset of the peer-group or 196 neighbor specific configuration options which are relevant to the 197 entire BGP instance. 199 The model makes the simplifying assumption that most of the 200 configuration items are available at all levels of the hierarchy. 201 That is, very little configuration is specific to a particular level 202 in the hierarchy, other than obvious items such as "group-name" only 203 being available for the peer group-level config. A notable exception 204 is for sub-address family configuration where some items are only 205 applicable for a given AFI-SAFI combination. 207 In order to allow common configuration to be applied to a set of 208 neighbors, all neighbor configuration options are available within a 209 peer-group. A neighbor is associated to a particular peer-group 210 through the use of a peer-group leaf (which provides a reference to a 211 configured item in the peer-group list). 213 Address-family configuration is made available in multiple points 214 within the model - primarily within the global container, where 215 instance-wide configuration can be set (for example, global protocol 216 parameters, the BGP best path route selection options, or global 217 policies relating to the address-family); and on a per-neighbor or 218 per-peer-group basis, where address-families can be enabled or 219 disabled, and policy associated with the parent entity applied. 220 Within the afi-safi container, generic configuration that applies to 221 all address-families (e.g., whether the AFI-SAFI is enabled) is 222 presented at the top-level, with address-family specific containers 223 made available for options relating to only that AFI-SAFI. Within 224 the current revision of the model a generic set of address-families, 225 and common configuration and state options are included - further 226 work is expected to add additional parameters to this area of the 227 model. 229 The following address-families are currently supported by the model: 231 +--rw bgp! 232 +--rw global 233 +--rw afi-safis 234 +--rw afi-safi* [afi-safi-name] 235 +--rw afi-safi-name -> ../config/afi-safi-name 236 | 237 +--rw ipv4-unicast 238 | ... 239 +--rw ipv6-unicast 240 | ... 241 +--rw ipv4-labelled-unicast 242 | ... 243 +--rw ipv6-labelled-unicast 244 | ... 245 +--rw l3vpn-ipv4-unicast 246 | ... 247 +--rw l3vpn-ipv6-unicast 248 | ... 249 +--rw l3vpn-ipv4-multicast 250 | ... 251 +--rw l3vpn-ipv6-multicast 252 | ... 253 +--rw l2vpn-vpls 254 | ... 255 +--rw l2vpn-evpn 256 | ... 258 2.2. Policy configuration overview 260 The BGP policy configuration model references the generic YANG 261 routing policy model described in [I-D.shaikh-rtgwg-policy-model], 262 which represents a condition-action policy framework for routing. 263 This model adds BGP-specific conditions (e.g., matching on the 264 community attribute), and actions (e.g., setting local preference) to 265 the generic policy 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 parent entity. 279 o on a per-afi-safi basis within a neighbor or peer-group context, 280 where the policy is specific to the AFI-SAFI for a a specific 281 neighbor or group. 283 +--rw bgp 284 +--rw global 285 | +--rw afi-safi 286 | | +--rw afi-safi* [afi-safi-name] 287 | | +--rw apply-policy 288 | +--rw apply-policy 289 +--rw neighbors 290 | +--rw neighbor* [neighbor-address] 291 | +--rw afi-safi 292 | | +--rw afi-safi* [afi-safi-name] 293 | | +--rw apply-policy 294 | +--rw apply-policy 295 +--rw peer-groups 296 +--rw peer-group* [peer-group-name] 297 +--rw afi-safi 298 | +--rw afi-safi* [afi-safi-name] 299 | +--rw apply-policy 300 +--rw apply-policy 302 2.3. Operational data overview 304 The BGP operational model contains a set of parameters which relate 305 to the operational state of the various elements of the BGP router. 306 As noted in Section 2 - the approach described in 307 [I-D.openconfig-netmod-opstate] is utilized for the inclusion of 308 operational and statistical data. To this end, the "_state" 309 groupings (those that contain derived operational parameters) are 310 contained within the BGP operational model - and included within the 311 relevant "state" containers throughout the core BGP model. In some 312 cases, operational information may be relevant to one instance of a 313 common grouping, but not another - for example, the number of 314 received, advertised, and installed prefixes is relevant on a per- 315 neighbor-basis, but is not required (or meaningful) in the peer-group 316 context. To enable state to be added to particular contexts, the 317 tree is augmented through the base BGP module to add these variables, 318 without requiring separate groupings. 320 3. Security Considerations 322 BGP configuration has a significant impact on network operations, and 323 as such any related protocol or model carries potential security 324 risks. 326 YANG data models are generally designed to be used with the NETCONF 327 protocol over an SSH transport. This provides an authenticated and 328 secure channel over which to transfer BGP configuration and 329 operational data. Note that use of alternate transport or data 330 encoding (e.g., JSON over HTTPS) would require similar mechanisms for 331 authenticating and securing access to configuration data. 333 Most of the data elements in the configuration model could be 334 considered sensitive from a security standpoint. Unauthorized access 335 or invalid data could cause major disruption. 337 4. IANA Considerations 339 This YANG data model and the component modules currently use a 340 temporary ad-hoc namespace. If and when it is redirected for the 341 standards track, an appropriate namespace URI will be registered in 342 the IETF XML Registry" [RFC3688]. The BGP YANG modules will be 343 registered in the "YANG Module Names" registry [RFC6020]. 345 5. YANG modules 347 The modules comprising the BGP configuration and operational model 348 are described by the YANG modules in the sections below. The base 349 module imports the other modules to create the overall model. 351 5.1. BGP base items 353 file bgp.yang 354 module bgp { 356 yang-version "1"; 358 // namespace 359 namespace "http://openconfig.net/yang/bgp"; 361 prefix "bgp"; 363 // import some basic inet types 364 import ietf-inet-types { prefix inet; } 365 import bgp-multiprotocol { prefix bgp-mp; } 366 import routing-policy { prefix rpol; } 367 import bgp-types { prefix bgp-types; } 368 import bgp-operational { prefix bgp-op; } 370 // meta 371 organization 372 "OpenConfig working group"; 374 contact 375 "OpenConfig working group 376 netopenconfig@googlegroups.com"; 378 description 379 "This module describes a YANG model for BGP protocol 380 configuration.It is a limited subset of all of the configuration 381 parameters available in the variety of vendor implementations, 382 hence it is expected that it would be augmented with vendor- 383 specific configuration data as needed. Additional modules or 384 submodules to handle other aspects of BGP configuration, 385 including policy, VRFs, VPNs, and additional address families 386 are also expected. 388 This model supports the following BGP configuration level 389 hierarchy: 391 BGP 392 | 393 +-> [ global BGP configuration ] 394 +-> AFI / SAFI global 395 +-> peer group 396 +-> [ peer group config ] 397 +-> AFI / SAFI [ per-AFI overrides ] 398 +-> neighbor 399 +-> [ neighbor config ] 400 +-> [ optional pointer to peer-group ] 401 +-> AFI / SAFI [ per-AFI overrides ]"; 403 revision "2015-05-15" { 404 description 405 ""; 406 reference "TBD"; 407 } 409 grouping bgp-global_config { 410 description 411 "Global configuration options for the BGP router."; 413 leaf as { 414 type inet:as-number; 415 mandatory "true"; 416 description 417 "Local autonomous system number of the router. Uses 418 the 32-bit as-number type from the model in RFC 6991."; 419 } 420 leaf router-id { 421 type inet:ipv4-address; 422 description 423 "Router id of the router, expressed as an 424 32-bit value, IPv4 address."; 425 } 426 } 428 grouping bgp-default-route-distance_config { 429 description 430 "Configuration options relating to the administrative distance 431 (or preference) assigned to routes received from different 432 sources (external, internal, and local)."; 434 leaf external-route-distance { 435 type uint8 { 436 range "1..255"; 437 } 438 description 439 "Administrative distance for routes learned from external 440 BGP (eBGP)."; 441 } 442 leaf internal-route-distance { 443 type uint8 { 444 range "1..255"; 445 } 446 description 447 "Administrative distance for routes learned from internal 448 BGP (iBGP)."; 449 } 450 } 452 grouping bgp-confederation_config { 453 description 454 "Configuration options specifying parameters when the local 455 router is within an autonomous system which is part of a BGP 456 confederation."; 458 leaf enabled { 459 type boolean; 460 description 461 "When this leaf is set to true it indicates that 462 the local-AS is part of a BGP confederation"; 463 } 465 leaf identifier { 466 type inet:as-number; 467 description 468 "Confederation identifier for the autonomous system."; 469 } 470 leaf-list member-as { 471 type inet:as-number; 472 description 473 "Remote autonomous systems that are to be treated 474 as part of the local confederation."; 475 } 476 } 478 grouping bgp-neighbor_config { 479 description 480 "Neighbor level configuration items."; 482 leaf peer-as { 483 type inet:as-number; 484 description 485 "AS number of the peer."; 486 } 488 leaf local-as { 489 type inet:as-number; 490 description 491 "The local autonomous system number that is to be used 492 when establishing sessions with the remote peer or peer 493 group, if this differs from the global BGP router 494 autonomous system number."; 495 } 497 leaf peer-type { 498 type bgp-types:peer-type; 499 description 500 "Explicitly designate the peer or peer group as internal 501 (iBGP) or external (eBGP)."; 502 } 504 leaf auth-password { 505 type string; 506 description 507 "Configures an MD5 authentication password for use with 508 neighboring devices."; 509 } 511 leaf remove-private-as { 512 // could also make this a container with a flag to enable 513 // remove-private and separate option. here, option implies 514 // remove-private is enabled. 515 type bgp-types:remove-private-as-option; 516 description 517 "Remove private AS numbers from updates sent to peers."; 519 } 521 leaf route-flap-damping { 522 type boolean; 523 default false; 524 description 525 "Enable route flap damping."; 526 } 528 leaf send-community { 529 type bgp-types:community-type; 530 default "NONE"; 531 description 532 "Specify which types of community should be sent to the 533 neighbor or group. The default is to not send the 534 community attribute"; 535 } 537 leaf description { 538 type string; 539 description 540 "An optional textual description (intended primarily for use 541 with a peer or group"; 542 } 543 } 545 grouping bgp-neighbor-timers_config { 546 description 547 "Config parameters related to timers associated with the BGP 548 peer"; 550 leaf connect-retry { 551 type decimal64 { 552 fraction-digits 2; 553 } 554 default 30; 555 description 556 "Time interval in seconds between attempts to establish a 557 session with the peer."; 558 } 560 leaf hold-time { 561 type decimal64 { 562 fraction-digits 2; 563 } 564 default 90; 565 description 566 "Time interval in seconds that a BGP session will be 567 considered active in the absence of keepalive or other 568 messages from the peer. The hold-time is typically 569 set to 3x the keepalive-interval."; 570 reference 571 "RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; 572 } 574 leaf keepalive-interval { 575 type decimal64 { 576 fraction-digits 2; 577 } 578 default 30; 579 description 580 "Time interval in seconds between transmission of keepalive 581 messages to the neighbor. Typically set to 1/3 the 582 hold-time."; 583 } 585 leaf minimum-advertisement-interval { 586 type decimal64 { 587 fraction-digits 2; 588 } 589 default 30; 590 description 591 "Minimum time which must elapse between subsequent UPDATE 592 messages relating to a common set of NLRI being transmitted 593 to a peer. This timer is referred to as 594 MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to 595 reduce the number of UPDATE messages transmitted when a 596 particular set of NLRI exhibit instability."; 597 reference 598 "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; 599 } 600 } 602 grouping bgp-neighbor-transport_config { 603 description 604 "Configuration parameters relating to the transport protocol 605 used by the BGP session to the peer"; 607 leaf tcp-mss { 608 type uint16; 609 description 610 "Sets the max segment size for BGP TCP sessions."; 611 } 613 leaf mtu-discovery { 614 type boolean; 615 default false; 616 description 617 "Turns path mtu discovery for BGP TCP sessions on (true) 618 or off (false)"; 619 } 621 leaf passive-mode { 622 type boolean; 623 default false; 624 description 625 "Wait for peers to issue requests to open a BGP session, 626 rather than initiating sessions from the local router."; 627 } 629 leaf local-address { 630 type union { 631 type inet:ip-address; 632 type string; 633 } 634 //TODO: the string should be converted to a leafref type 635 //to point to an interface when YANG 1.1 is available with 636 //leafrefs in union types. 637 description 638 "Set the local IP (either IPv4 or IPv6) address to use 639 for the session when sending BGP update messages. This 640 may be expressed as either an IP address or reference 641 to the name of an interface."; 642 } 643 } 645 grouping bgp-neighbor-error-handling_config { 646 description 647 "Configuration parameters relating to enhanced error handling 648 behaviours for BGP"; 650 leaf treat-as-withdraw { 651 type boolean; 652 default "false"; 653 description 654 "Specify whether erroneous UPDATE messages for which the 655 NLRI can be extracted are reated as though the NLRI is 656 withdrawn - avoiding session reset"; 657 reference "draft-ietf-idr-error-handling-16"; 658 } 659 } 661 grouping bgp-neighbor-logging-options_config { 662 description 663 "Configuration parameters specifying the logging behaviour for 664 BGP sessions to the peer"; 666 leaf log-neighbor-state-changes { 667 type boolean; 668 default "true"; 669 description 670 "Configure logging of peer state changes. Default is 671 to enable logging of peer state changes."; 672 } 673 } 675 grouping bgp-neighbor-multihop_config { 676 description 677 "Configuration parameters specifying the multihop behaviour for 678 BGP sessions to the peer"; 680 leaf enabled { 681 type boolean; 682 default "false"; 683 description 684 "When enabled the referenced group or neighbors are permitted 685 to be indirectly connected - including cases where the TTL 686 can be decremented between the BGP peers"; 687 } 689 leaf multihop-ttl { 690 type uint8; 691 description 692 "Time-to-live value to use when packets are sent to the 693 referenced group or neighbors and ebgp-multihop is enabled"; 694 } 695 } 697 grouping bgp-neighbor-route-reflector_config { 698 description 699 "Configuration parameters determining whether the behaviour of 700 the local system when acting as a route-reflector"; 702 leaf route-reflector-cluster-id { 703 type bgp-types:rr-cluster-id-type; 704 description 705 "route-reflector cluster id to use when local router is 706 configured as a route reflector. Commonly set at the group 707 level, but allows a different cluster 708 id to be set for each neighbor."; 709 } 710 leaf route-reflector-client { 711 type boolean; 712 default "false"; 713 description 714 "Configure the neighbor as a route reflector client."; 715 } 716 } 718 grouping bgp-neighbor-as-path-options_config { 719 description 720 "Configuration parameters allowing manipulation of the AS_PATH 721 attribute"; 723 leaf allow-own-as { 724 type uint8; 725 default 0; 726 description 727 "Specify the number of occurrences of the local BGP speaker's 728 AS that can occur within the AS_PATH before it is rejected."; 729 } 731 leaf replace-peer-as { 732 type boolean; 733 default "false"; 734 description 735 "Replace occurrences of the peer's AS in the AS_PATH 736 with the local autonomous system number"; 737 } 738 } 740 grouping bgp-neighbor-add-paths_config { 741 description 742 "Configuration parameters specfying whether the local system 743 will send or receive multiple paths using ADD_PATHS"; 745 leaf receive { 746 type boolean; 747 default false; 748 description 749 "Enable ability to receive multiple path advertisements 750 for an NLRI from the neighbor or group"; 751 } 753 leaf send-max { 754 type uint8; 755 description 756 "The maximum number of paths to advertise to neighbors 757 for a single NLRI"; 759 } 760 } 762 grouping bgp-neighbor-peer-group_config { 763 description 764 "Configuration parameters indicating whether the specified peer 765 is to be considered as part of a peer-group - and therefore 766 inherit its configuration"; 768 leaf peer-group { 769 type leafref { 770 // we are at /bgp/neighbors/neighbor/ 771 path "/bgp/peer-groups/peer-group/peer-group-name"; 772 require-instance true; 773 } 774 description 775 "The peer-group with which this neighbor is associated"; 776 } 777 } 779 grouping bgp-graceful-restart { 780 description 781 "Configures BGP graceful restart, which is a negotiated 782 option that indicates that a BGP speaker is able to retain 783 forwarding state when a BGP session restarts"; 785 reference "RFC 4724: Graceful Restart Mechanism for BGP"; 786 container graceful-restart { 787 description 788 "Parameters relating the graceful restart mechanism for BGP"; 789 container config { 790 description 791 "Configuration parameters relating to graceful-restart"; 792 uses bgp-neighbor-graceful-restart_config; 793 } 794 container state { 795 config false; 796 description 797 "State information associated with graceful-restart"; 798 uses bgp-neighbor-graceful-restart_config; 799 } 800 } 801 } 803 grouping bgp-neighbor-graceful-restart_config { 804 description 805 "Configuration parameters relating to BGP graceful restart."; 807 leaf enabled { 808 type boolean; 809 description 810 "Enable or disable the graceful-restart capability."; 811 } 813 leaf restart-time { 814 type uint16 { 815 range 0..4096; 816 } 817 description 818 "Estimated time (in seconds) for the local BGP speaker to 819 restart a session. This value is advertise in the graceful 820 restart BGP capability. This is a 12-bit value, referred to 821 as Restart Time in RFC4724. Per RFC4724, the suggested 822 default value is <= the hold-time value."; 823 } 825 leaf stale-routes-time { 826 type decimal64 { 827 fraction-digits 2; 828 } 829 description 830 "An upper-bound on the time thate stale routes will be 831 retained by a router after a session is restarted. If an 832 End-of-RIB (EOR) marker is received prior to this timer 833 expiring stale-routes will be flushed upon its receipt - if 834 no EOR is received, then when this timer expires stale paths 835 will be purged. This timer is referred to as the 836 Selection_Deferral_Timer in RFC4724"; 837 } 839 leaf helper-only { 840 type boolean; 841 description 842 "Enable graceful-restart in helper mode only. When this 843 leaf is set, the local system does not retain forwarding 844 its own state during a restart, but supports procedures 845 for the receiving speaker, as defined in RFC4724."; 846 } 847 } 849 // ************************************************************ 850 // * configuration context containers * 851 // ************************************************************ 853 grouping bgp-global-base { 854 description 855 "Global configuration parameters for the BGP router"; 857 container config { 858 description 859 "Configuration parameters relating to the global BGP router"; 860 uses bgp-global_config; 861 } 862 container state { 863 config false; 864 description 865 "State information relating to the global BGP router"; 866 uses bgp-global_config; 867 uses bgp-op:bgp-global_state; 868 } 870 uses bgp-mp:bgp-route-selection-options; 872 container default-route-distance { 873 description 874 "Administrative distance (or preference) assigned to 875 routes received from different sources 876 (external, internal, and local)."; 878 container config { 879 description 880 "Configuration parameters relating to the default route 881 distance"; 882 uses bgp-default-route-distance_config; 883 } 884 container state { 885 config false; 886 description 887 "State information relating to the default route distance"; 888 uses bgp-default-route-distance_config; 889 } 890 } 892 container confederation { 893 description 894 "Parameters indicating whether the local system acts as part 895 of a BGP confederation"; 897 container config { 898 description 899 "Configuration parameters relating to BGP confederations"; 900 uses bgp-confederation_config; 901 } 902 container state { 903 config false; 904 description 905 "State information relating to the BGP confederations"; 906 uses bgp-confederation_config; 907 } 908 } 910 uses bgp-mp:bgp-use-multiple-paths; 912 uses bgp-graceful-restart; 914 container afi-safis { 915 description 916 "Address family specific configuration"; 917 uses bgp-mp:bgp-common-afi-safi-list; 918 } 919 } 921 grouping bgp-neighbors { 922 description 923 "BGP neighbors configured on the local system"; 924 list neighbor { 925 key "neighbor-address"; 926 description 927 "List of BGP neighbors configured on the local system, 928 uniquely identified by peer IPv[46] address"; 930 leaf neighbor-address { 931 type leafref { 932 path "../config/neighbor-address"; 933 } 934 description 935 "Reference to the address of the BGP neighbor used as 936 a key in the neighbor list"; 937 } 939 uses bgp-neighbor-group; 940 } 941 } 943 grouping bgp-peer-group { 944 description 945 "BGP peer-groups configured on the local system"; 946 list peer-group { 947 key "peer-group-name"; 948 description 949 "List of BGP peer-groups configured on the local system - 950 uniquely identified by peer-group name"; 952 leaf peer-group-name { 953 type leafref { 954 path "../config/peer-group-name"; 955 } 956 description 957 "Reference to the name of the BGP peer-group used as a 958 key in the peer-group list"; 959 } 961 uses bgp-neighbor-group; 962 } 963 } 965 grouping bgp-neighbor-group { 966 description 967 "Parameters related to a BGP neighbor or group"; 969 container config { 970 description 971 "Configuration parameters relating to the BGP neighbor or 972 group"; 973 uses bgp-neighbor_config; 974 } 975 container state { 976 config false; 977 description 978 "State information relating to the BGP neighbor or group"; 979 uses bgp-neighbor_config; 980 } 982 container timers { 983 description 984 "Timers related to a BGP neighbor or group"; 985 container config { 986 description 987 "Configuration parameters relating to timers used for the 988 BGP neighbor or group"; 989 uses bgp-neighbor-timers_config; 990 } 991 container state { 992 config false; 993 description 994 "State information relating to the timers used for the BGP 995 neighbor or group"; 996 uses bgp-neighbor-timers_config; 997 } 998 } 999 container transport { 1000 description 1001 "Transport session parameters for the BGP neighbor or group"; 1002 container config { 1003 description 1004 "Configuration parameters relating to the transport 1005 session(s) used for the BGP neighbor or group"; 1006 uses bgp-neighbor-transport_config; 1007 } 1008 container state { 1009 config false; 1010 description 1011 "State information relating to the transport session(s) 1012 used for the BGP neighbor or group"; 1013 uses bgp-neighbor-transport_config; 1014 } 1015 } 1017 container error-handling { 1018 description 1019 "Error handling parameters used for the BGP neighbor or 1020 group"; 1021 container config { 1022 description 1023 "Configuration parameters enabling or modifying the 1024 behavior or enhanced error handling mechanisms for the BGP 1025 neighbor or group"; 1026 uses bgp-neighbor-error-handling_config; 1027 } 1028 container state { 1029 config false; 1030 description 1031 "State information relating to enhanced error handling 1032 mechanisms for the BGP neighbor or group"; 1033 uses bgp-neighbor-error-handling_config; 1034 } 1035 } 1037 container logging-options { 1038 description 1039 "Logging options for events related to the BGP neighbor or 1040 group"; 1041 container config { 1042 description 1043 "Configuration parameters enabling or modifying logging 1044 for events relating to the BGP neighbor or group"; 1045 uses bgp-neighbor-logging-options_config; 1046 } 1047 container state { 1048 config false; 1049 description 1050 "State information relating to logging for the BGP neighbor 1051 or group"; 1052 uses bgp-neighbor-logging-options_config; 1053 } 1054 } 1056 container ebgp-multihop { 1057 description 1058 "eBGP multi-hop parameters for the BGP neighbor or group"; 1059 container config { 1060 description 1061 "Configuration parameters relating to eBGP multihop for the 1062 BGP neighbor or group"; 1063 uses bgp-neighbor-multihop_config; 1064 } 1065 container state { 1066 config false; 1067 description 1068 "State information for eBGP multihop, for the BGP neighbor 1069 or group"; 1070 uses bgp-neighbor-multihop_config; 1071 } 1072 } 1074 container route-reflector { 1075 description 1076 "Route reflector parameters for the BGP neighbor or group"; 1077 container config { 1078 description 1079 "Configuraton parameters relating to route reflection 1080 for the BGP neighbor or group"; 1081 uses bgp-neighbor-route-reflector_config; 1082 } 1083 container state { 1084 config false; 1085 description 1086 "State information relating to route reflection for the 1087 BGP neighbor or group"; 1088 uses bgp-neighbor-route-reflector_config; 1089 } 1090 } 1092 container as-path-options { 1093 description 1094 "AS_PATH manipulation parameters for the BGP neighbor or 1095 group"; 1096 container config { 1097 description 1098 "Configuration parameters relating to AS_PATH manipulation 1099 for the BGP peer or group"; 1100 uses bgp-neighbor-as-path-options_config; 1101 } 1102 container state { 1103 config false; 1104 description 1105 "State information relating to the AS_PATH manipulation 1106 mechanisms for the BGP peer or group"; 1107 uses bgp-neighbor-as-path-options_config; 1108 } 1109 } 1111 container add-paths { 1112 description 1113 "Parameters relating to the advertisement and receipt of 1114 multiple paths for a single NLRI (add-paths)"; 1115 container config { 1116 description 1117 "Configuration parameters relating to ADD_PATHS"; 1118 uses bgp-neighbor-add-paths_config; 1119 } 1120 container state { 1121 config false; 1122 description 1123 "State information associated with ADD_PATHS"; 1124 uses bgp-neighbor-add-paths_config; 1125 } 1126 } 1128 container afi-safis { 1129 description 1130 "Per-address-family configuration parameters associated with 1131 the neighbor or group"; 1132 uses bgp-mp:bgp-common-afi-safi-list; 1133 } 1135 uses bgp-graceful-restart; 1137 uses rpol:apply-policy-group; 1138 } 1140 grouping bgp-neighbor-neighbor-address_config { 1141 description 1142 "Configuration options relating to the BGP neighbor address"; 1144 leaf neighbor-address { 1145 type inet:ip-address; 1146 description 1147 "Address of the BGP peer, either in IPv4 or IPv6"; 1148 } 1149 } 1151 grouping bgp-peer-group-peer-group-name_config { 1152 description 1153 "Configuration options relating to the BGP peer-group name"; 1155 leaf peer-group-name { 1156 type string; 1157 description 1158 "Name of the BGP peer-group"; 1159 } 1160 } 1162 // add peer-group pointer only for the neighbor list 1163 augment /bgp/neighbors/neighbor/config { 1164 description 1165 "Augmentation to allow association of a neighbor with a 1166 peer-group"; 1167 uses bgp-neighbor-peer-group_config; 1168 } 1170 augment /bgp/neighbors/neighbor/state { 1171 description 1172 "Augmentation to reflect the association of a neighbor with a 1173 peer-group"; 1174 uses bgp-neighbor-peer-group_config; 1175 } 1177 augment /bgp/peer-groups/peer-group { 1178 description 1179 "Augmentation to add multipath configuration to a peer-group"; 1180 uses bgp-mp:bgp-use-multiple-paths; 1181 } 1183 augment /bgp/neighbors/neighbor { 1184 description 1185 "Augmentation to add the multipath configuration to a 1186 neighbor"; 1187 uses bgp-mp:bgp-use-multiple-paths-neighbor; 1188 } 1190 augment /bgp/peer-groups/peer-group/afi-safis/afi-safi { 1191 description 1192 "Augmentation to add multipath configuration to a peer-group 1193 on a per-AFI-SAFI basis"; 1194 uses bgp-mp:bgp-use-multiple-paths; 1195 } 1197 augment /bgp/neighbors/neighbor/afi-safis/afi-safi { 1198 description 1199 "Augmentation to add multipath configuration to a neighbor 1200 on a per-AFI-SAFI basis"; 1201 uses bgp-mp:bgp-use-multiple-paths-neighbor; 1202 } 1204 augment /bgp/global/afi-safis/afi-safi { 1205 description 1206 "Augmentation to add global instance specific AFI-SAFI 1207 configuration information"; 1208 uses bgp-mp:bgp-global-afi-safi; 1209 uses bgp-mp:bgp-use-multiple-paths; 1210 } 1212 augment /bgp/peer-groups/peer-group/afi-safis/afi-safi { 1213 description 1214 "Augmentation that adds peer-group instance specific 1215 AFI-SAFI configuration information"; 1216 uses bgp-mp:bgp-group-afi-safi; 1217 } 1219 augment /bgp/neighbors/neighbor/config { 1220 description 1221 "Augmentation adding the neighbor address to the 1222 neighbor configuration container"; 1223 uses bgp-neighbor-neighbor-address_config; 1224 } 1226 augment /bgp/neighbors/neighbor/state { 1227 description 1228 "Augmentation adding the neighbor address to the 1229 neighbor state container"; 1230 uses bgp-neighbor-neighbor-address_config; 1231 } 1233 augment /bgp/peer-groups/peer-group/config { 1234 description 1235 "Augmentation adding the peer-group name to the 1236 peer-group configuration container"; 1237 uses bgp-peer-group-peer-group-name_config; 1238 } 1239 augment /bgp/peer-groups/peer-group/state { 1240 description 1241 "Augmentation adding the peer-group name to the 1242 peer-group state container"; 1243 uses bgp-peer-group-peer-group-name_config; 1244 } 1246 // ************************************************************ 1247 // * Augmentations to add state * 1248 // * (rjs: cleaner to have these in the base module to avoid * 1249 // needing to specify which module - e.g. augment of * 1250 // /bgp:bgp/bgp:neighbors/bgp:neighbor...) * 1251 // ************************************************************ 1252 augment /bgp/neighbors/neighbor/state { 1253 description 1254 "Augmentation to add operational state related to a particular 1255 BGP neighbor"; 1256 uses bgp-op:bgp-neighbor_state; 1257 } 1259 augment /bgp/neighbors/bgp:neighbor/state { 1260 description 1261 "Augmentation to add operational state related to a particular 1262 BGP neighbor"; 1264 container messages { 1265 description 1266 "Counters for BGP messages sent and received from the 1267 neighbor"; 1268 container sent { 1269 description 1270 "Counters relating to BGP messages sent to the neighbor"; 1271 uses bgp-op:bgp-neighbor-message-counters-sent_state; 1272 } 1274 container received { 1275 description 1276 "Counters for BGP messages received from the neighbor"; 1277 uses bgp-op:bgp-neighbor-message-counters-received_state; 1278 } 1279 } 1281 container queues { 1282 description 1283 "Counters related to queued messages associated with the 1284 BGP neighbor"; 1285 uses bgp-op:bgp-neighbor-queue-counters_state; 1286 } 1288 } 1290 augment /bgp:bgp/bgp:neighbors/neighbor/timers/state { 1291 description 1292 "Augmentation to add the operational state of timers associated 1293 with the BGP neighbor"; 1294 uses bgp-op:bgp-neighbor-timers_state; 1295 } 1297 augment /bgp/neighbors/neighbor/transport/state { 1298 description 1299 "Augmentation to add the operational state of the transport 1300 session associated with the BGP neighbor"; 1301 uses bgp-op:bgp-neighbor-transport_state; 1302 } 1304 augment /bgp/neighbors/neighbor/error-handling/state { 1305 description 1306 "Augmentation to add the operational state of the error 1307 handling associated with the BGP neighbor"; 1308 uses bgp-op:bgp-neighbor-error-handling_state; 1309 } 1311 augment /bgp/neighbors/neighbor/graceful-restart/state { 1312 description 1313 "Augmentation to add the operational state of graceful-restart 1314 associated with a BGP neighbor"; 1315 uses bgp-op:bgp-afi-safi-graceful-restart_state; 1316 } 1318 augment /bgp/peer-groups/peer-group/state { 1319 description 1320 "Augmentation to add the operational state and counters 1321 relating to a BGP peer-group"; 1322 uses bgp-op:bgp-peer-group_state; 1323 } 1325 augment /bgp/global/afi-safis/afi-safi/state { 1326 description 1327 "Augmentation to add operational state and counters 1328 on a per-AFI-SAFI basis to the global BGP router"; 1329 uses bgp-op:bgp-global-afi-safi_state; 1330 } 1332 augment /bgp/neighbors/neighbor/afi-safis/afi-safi/state { 1333 description 1334 "Augmentation to add per-AFI-SAFI operational state 1335 and counters to the BGP neighbor"; 1337 uses bgp-op:bgp-neighbor-afi-safi_state; 1338 } 1340 augment "/bgp/neighbors/neighbor/afi-safis/afi-safi/" + 1341 "graceful-restart/state" { 1342 description 1343 "Augmentation to add per-AFI-SAFI operational state for BGP 1344 graceful-restart"; 1345 uses bgp-op:bgp-neighbor-afi-safi-graceful-restart_state; 1346 } 1348 // ************************************************************ 1349 // * module structure containers * 1350 // ************************************************************ 1352 container bgp { 1353 presence "Container for BGP protocol hierarchy"; 1354 description 1355 "Top-level configuration and state for the BGP router"; 1357 container global { 1358 description 1359 "Global configuration for the BGP router"; 1360 uses bgp-global-base; 1361 uses rpol:apply-policy-group; 1362 } 1364 container neighbors { 1365 description 1366 "Configuration for BGP neighbors"; 1367 uses bgp-neighbors; 1368 } 1370 container peer-groups { 1371 description 1372 "Configuration for BGP peer-groups"; 1373 uses bgp-peer-group; 1374 } 1375 } 1376 } 1377 1379 5.2. BGP base types 1381 file bgp-types.yang 1382 module bgp-types { 1383 yang-version "1"; 1384 namespace "http://openconfig.net/yang/bgp-types"; 1386 prefix "bgp-types"; 1388 import ietf-inet-types { prefix inet; } 1390 // meta 1391 organization 1392 "OpenConfig working group"; 1394 contact 1395 "OpenConfig working group 1396 netopenconfig@googlegroups.com"; 1398 description 1399 "This module contains general data definitions for use in BGP 1400 policy. It can be imported by modules that make use of BGP 1401 attributes"; 1403 revision "2015-05-15" { 1404 description "Initial revision"; 1405 reference "TBD"; 1406 } 1408 identity bgp-capability { 1409 description "Base identity for a BGP capability"; 1410 } 1412 identity MPBGP { 1413 base "bgp-capability"; 1414 description 1415 "Multi-protocol extensions to BGP"; 1416 reference "RFC2858"; 1417 } 1419 identity ROUTE-REFRESH { 1420 base "bgp-capability"; 1421 description 1422 "The BGP route-refresh functionality"; 1423 reference "RFC2918"; 1424 } 1426 identity ASN32 { 1427 base "bgp-capability"; 1428 description 1429 "4-byte (32-bit) AS number functionality"; 1430 reference "RFC6793"; 1432 } 1434 identity GRACEFUL-RESTART { 1435 base "bgp-capability"; 1436 description 1437 "Graceful restart functionality"; 1438 reference "RFC4724"; 1439 } 1441 identity ADD-PATHS { 1442 base "bgp-capability"; 1443 description 1444 "BGP add-paths"; 1445 reference "draft-ietf-idr-add-paths"; 1446 } 1448 identity afi-safi-type { 1449 description 1450 "Base identity type for AFI,SAFI tuples for BGP-4"; 1451 reference "RFC4760 - multiprotocol extensions for BGP-4"; 1452 } 1454 identity ipv4-unicast { 1455 base afi-safi-type; 1456 description 1457 "IPv4 unicast (AFI,SAFI = 1,1)"; 1458 reference "RFC4760"; 1459 } 1461 identity ipv6-unicast { 1462 base afi-safi-type; 1463 description 1464 "IPv6 unicast (AFI,SAFI = 2,1)"; 1465 reference "RFC4760"; 1466 } 1468 identity ipv4-labelled-unicast { 1469 base afi-safi-type; 1470 description 1471 "Labelled IPv4 unicast (AFI,SAFI = 1,4)"; 1472 reference "RFC3107"; 1473 } 1475 identity ipv6-labelled-unicast { 1476 base afi-safi-type; 1477 description 1478 "Labelled IPv6 unicast (AFI,SAFI = 2,4)"; 1479 reference "RFC3107"; 1481 } 1483 identity l3vpn-ipv4-unicast { 1484 base afi-safi-type; 1485 description 1486 "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; 1487 reference "RFC4364"; 1488 } 1490 identity l3vpn-ipv6-unicast { 1491 base afi-safi-type; 1492 description 1493 "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; 1494 reference "RFC4659"; 1495 } 1497 identity l3vpn-ipv4-multicast { 1498 base afi-safi-type; 1499 description 1500 "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; 1501 reference "RFC6514"; 1502 } 1504 identity l3vpn-ipv6-multicast { 1505 base afi-safi-type; 1506 description 1507 "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; 1508 reference "RFC6514"; 1509 } 1511 identity l2vpn-vpls { 1512 base afi-safi-type; 1513 description 1514 "BGP-signalled VPLS (AFI,SAFI = 25,65)"; 1515 reference "RFC4761"; 1516 } 1518 identity l2vpn-evpn { 1519 base afi-safi-type; 1520 description 1521 "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; 1522 } 1524 identity bgp-well-known-std-community { 1525 description 1526 "Reserved communities within the standard community space 1527 defined by RFC1997. These communities must fall within the 1528 range 0x00000000 to 0xFFFFFFFF"; 1530 reference "RFC1997"; 1531 } 1533 identity NO_EXPORT { 1534 base bgp-well-known-std-community; 1535 description 1536 "Do not export NLRI received carrying this community outside 1537 the bounds of this autonomous system, or this confederation if 1538 the local autonomous system is a confederation member AS. This 1539 community has a value of 0xFFFFFF01."; 1540 reference "RFC1997"; 1541 } 1543 identity NO_ADVERTISE { 1544 base bgp-well-known-std-community; 1545 description 1546 "All NLRI received carrying this community must not be 1547 advertised to other BGP peers. This community has a value of 1548 0xFFFFFF02."; 1549 reference "RFC1997"; 1550 } 1552 identity NO_EXPORT_SUBCONFED { 1553 base bgp-well-known-std-community; 1554 description 1555 "All NLRI received carrying this community must not be 1556 advertised to external BGP peers - including over confederation 1557 sub-AS boundaries. This community has a value of 0xFFFFFF03."; 1558 reference "RFC1997"; 1559 } 1561 identity NOPEER { 1562 base bgp-well-known-std-community; 1563 description 1564 "An autonomous system receiving NLRI tagged with this community 1565 is advised not to readvertise the NLRI to external bi-lateral 1566 peer autonomous systems. An AS may also filter received NLRI 1567 from bilateral peer sessions when they are tagged with this 1568 community value"; 1569 reference "RFC3765"; 1570 } 1572 identity INTERNET { 1573 base bgp-well-known-std-community; 1574 description 1575 "A community used by some implementations with the value 0:0 1576 which represents all possible community values."; 1577 } 1578 typedef bgp-session-direction { 1579 type enumeration { 1580 enum INBOUND { 1581 description 1582 "Refers to all NLRI received from the BGP peer"; 1583 } 1584 enum OUTBOUND { 1585 description 1586 "Refers to all NLRI advertised to the BGP peer"; 1587 } 1588 } 1589 description 1590 "Type to describe the direction of NLRI transmission"; 1591 } 1593 typedef bgp-well-known-community-type { 1594 type identityref { 1595 base bgp-well-known-std-community; 1596 } 1597 description 1598 "Type definition for well-known IETF community attribute 1599 values"; 1600 reference 1601 "IANA Border Gateway Protocol (BGP) Well Known Communities"; 1602 } 1604 typedef bgp-std-community-type { 1605 // TODO: further refine restrictions and allowed patterns 1606 // 4-octet value: 1607 // 2 octets 1608 // 2 octets 1609 type union { 1610 type uint32 { 1611 // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - 1612 // 0xFFFFFFFF are reserved 1613 range "65536..4294901759"; // 0x00010000..0xFFFEFFFF 1614 } 1615 type string { 1616 pattern '([0-9]+:[0-9]+)'; 1617 } 1618 } 1619 description 1620 "Type definition for standard commmunity attributes"; 1621 reference "RFC 1997 - BGP Communities Attribute"; 1622 } 1624 typedef bgp-ext-community-type { 1625 // TODO: needs more work to make this more precise given the 1626 // variability of extended community attribute specifications 1627 // 8-octet value: 1628 // 2 octects 1629 // 6 octets 1630 type string { 1631 pattern '([0-9\.]+(:[0-9]+)?:[0-9]+)'; 1632 } 1633 description 1634 "Type definition for extended community attributes"; 1635 reference "RFC 4360 - BGP Extended Communities Attribute"; 1636 } 1638 typedef bgp-community-regexp-type { 1639 // TODO: needs more work to decide what format these regexps can 1640 // take. 1641 type string; 1642 description 1643 "Type definition for communities specified as regular 1644 expression patterns"; 1645 } 1647 typedef bgp-origin-attr-type { 1648 type enumeration { 1649 enum IGP { 1650 description "Origin of the NLRI is internal"; 1651 } 1652 enum EGP { 1653 description "Origin of the NLRI is EGP"; 1654 } 1655 enum INCOMPLETE { 1656 description "Origin of the NLRI is neither IGP or EGP"; 1657 } 1658 } 1659 description 1660 "Type definition for standard BGP origin attribute"; 1661 reference "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), 1662 Sec 4.3"; 1663 } 1665 typedef peer-type { 1666 type enumeration { 1667 enum INTERNAL { 1668 description "internal (iBGP) peer"; 1669 } 1670 enum EXTERNAL { 1671 description "external (eBGP) peer"; 1672 } 1674 } 1675 description 1676 "labels a peer or peer group as explicitly internal or 1677 external"; 1678 } 1680 typedef remove-private-as-option { 1681 type enumeration { 1682 enum ALL { 1683 description "remove all private ASes in the path"; 1684 } 1685 enum REPLACE { 1686 description "replace private ASes with local AS"; 1687 } 1688 } 1689 description 1690 "set of options for configuring how private AS path numbers 1691 are removed from advertisements"; 1692 } 1694 typedef percentage { 1695 type uint8 { 1696 range "0..100"; 1697 } 1698 description 1699 "Integer indicating a percentage value"; 1700 } 1702 typedef rr-cluster-id-type { 1703 type union { 1704 type uint32; 1705 type inet:ipv4-address; 1706 } 1707 description 1708 "union type for route reflector cluster ids: 1709 option 1: 4-byte number 1710 option 2: IP address"; 1711 } 1713 typedef community-type { 1714 type enumeration { 1715 enum STANDARD { 1716 description "send only standard communities"; 1717 } 1718 enum EXTENDED { 1719 description "send only extended communities"; 1720 } 1721 enum BOTH { 1722 description "send both standard and extended communities"; 1723 } 1724 enum NONE { 1725 description "do not send any community attribute"; 1726 } 1727 } 1728 description 1729 "type describing variations of community attributes: 1730 STANDARD: standard BGP community [rfc1997] 1731 EXTENDED: extended BGP community [rfc4360] 1732 BOTH: both standard and extended community"; 1733 } 1735 } 1736 1738 5.3. BGP policy items 1740 file bgp-policy.yang 1741 module bgp-policy { 1743 yang-version "1"; 1745 // namespace 1746 namespace "http://openconfig.net/yang/bgp-policy"; 1748 prefix "bgp-pol"; 1750 // import some basic types 1751 import ietf-inet-types { prefix inet; } 1752 import routing-policy {prefix rpol; } 1753 import policy-types { prefix pt; } 1754 import bgp-types { prefix bgp-types; } 1756 // meta 1757 organization 1758 "OpenConfig working group"; 1760 contact 1761 "OpenConfig working group 1762 netopenconfig@googlegroups.com"; 1764 description 1765 "This module contains data definitions for BGP routing policy. 1766 It augments the base routing-policy module with BGP-specific 1767 options for conditions and actions."; 1769 revision "2015-05-15" { 1770 description 1771 "Updated model to augment base routing-policy module"; 1772 reference "TBD"; 1773 } 1775 // extension statements 1777 // feature statements 1779 // identity statements 1781 // typedef statements 1783 typedef bgp-as-path-prepend-repeat { 1784 type uint8; 1785 description 1786 "Option for the BGP as-prepend policy action. Prepends the 1787 local AS number repeated n times"; 1788 } 1790 typedef bgp-set-community-option-type { 1791 type enumeration { 1792 enum ADD { 1793 description 1794 "add the specified communities to the existing 1795 community attribute"; 1796 } 1797 enum REMOVE { 1798 description 1799 "remove the specified communities from the 1800 existing community attribute"; 1801 } 1802 enum REPLACE { 1803 description 1804 "replace the existing community attribute with 1805 the specified communities. If an empty set is 1806 specified, this removes the community attribute 1807 from the route."; 1808 } 1809 } 1810 description 1811 "Type definition for options when setting the community 1812 attribute in a policy action"; 1814 } 1816 typedef bgp-next-hop-type { 1817 type union { 1818 type inet:ip-address; 1819 type enumeration { 1820 enum SELF { 1821 description "special designation for local router's own 1822 address, i.e., next-hop-self"; 1823 } 1824 } 1825 } 1826 description 1827 "type definition for specifying next-hop in policy actions"; 1828 } 1830 typedef bgp-set-med-type { 1831 type union { 1832 type uint32; 1833 type string { 1834 pattern "^[+-][0-9]+"; 1835 } 1836 type enumeration { 1837 enum IGP { 1838 description "set the MED value to the IGP cost toward the 1839 next hop for the route"; 1840 } 1841 } 1842 } 1843 description 1844 "Type definition for specifying how the BGP MED can 1845 be set in BGP policy actions. The three choices are to set 1846 the MED directly, increment/decrement using +/- notation, 1847 and setting it to the IGP cost (predefined value)."; 1848 } 1850 // grouping statements 1852 grouping bgp-match-conditions { 1853 description 1854 "Condition statement definitions for checking membership in a 1855 defined set"; 1857 container match-community-set { 1858 presence 1859 "The presence of this container indicates that the routes 1860 should match the referenced community-set"; 1862 description 1863 "Match a referenced community-set according to the logic 1864 defined in the match-set-options leaf"; 1866 leaf community-set { 1867 type leafref { 1868 path "/rpol:routing-policy/rpol:defined-sets/" + 1869 "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/" + 1870 "bgp-pol:community-set/bgp-pol:community-set-name"; 1871 require-instance true; 1872 } 1873 description 1874 "References a defined community set"; 1875 } 1876 uses rpol:match-set-options-group; 1877 } 1879 container match-ext-community-set { 1880 presence 1881 "The presence of this container indicates that the routes 1882 should match the referenced extended community set"; 1884 description 1885 "Match a referenced extended community-set according to the 1886 logic defined in the match-set-options leaf"; 1888 leaf ext-community-set { 1889 type leafref { 1890 path "/rpol:routing-policy/rpol:defined-sets/" + 1891 "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" + 1892 "bgp-pol:ext-community-set/" + 1893 "bgp-pol:ext-community-set-name"; 1894 require-instance true; 1895 } 1896 description "References a defined extended community set"; 1897 } 1898 uses rpol:match-set-options-group; 1899 } 1901 container match-as-path-set { 1902 presence 1903 "The presence of this container indicates that the route 1904 should match the referenced as-path set"; 1906 description 1907 "Match a referenced as-path set according to the logic 1908 defined in the match-set-options leaf"; 1910 leaf as-path-set { 1911 type leafref { 1912 path "/rpol:routing-policy/rpol:defined-sets/" + 1913 "bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/" + 1914 "bgp-pol:as-path-set/bgp-pol:as-path-set-name"; 1915 require-instance true; 1916 } 1917 description "References a defined AS path set"; 1918 } 1919 uses rpol:match-set-options-group; 1920 } 1921 } 1923 grouping bgp-attribute-conditions { 1924 description 1925 "Condition statement definitions for comparing a BGP route 1926 attribute to a specified value"; 1928 leaf med-eq { 1929 type uint32; 1930 description 1931 "Condition to check if the received MED value is equal to 1932 the specified value"; 1933 } 1935 leaf origin-eq { 1936 type bgp-types:bgp-origin-attr-type; 1937 description 1938 "Condition to check if the route origin is equal to the 1939 specified value"; 1940 } 1942 leaf-list next-hop-in { 1943 type inet:ip-address; 1944 description 1945 "List of next hop addresses to check for in the route 1946 update"; 1947 } 1949 leaf local-pref-eq { 1950 type uint32; 1951 // TODO: add support for other comparisons if needed 1952 description 1953 "Condition to check if the local pref attribute is equal to 1954 the specified value"; 1955 } 1957 container community-count { 1958 presence "node is present in the config data to indicate a 1959 community-count condition"; 1961 description 1962 "Value and comparison operations for conditions based on the 1963 number of communities in the route update"; 1965 uses pt:attribute-compare-operators; 1967 } 1969 container as-path-length { 1971 presence "node is present in the config data to indicate a 1972 as-path-length condition"; 1974 description 1975 "Value and comparison operations for conditions based on the 1976 length of the AS path in the route update"; 1978 uses pt:attribute-compare-operators; 1979 } 1981 leaf route-type { 1982 // TODO: verify extent of vendor support for this comparison 1983 type enumeration { 1984 enum INTERNAL { 1985 description "route type is internal"; 1986 } 1987 enum EXTERNAL { 1988 description "route type is external"; 1989 } 1990 } 1991 description 1992 "Condition to check the route type in the route update"; 1993 } 1994 } 1996 // augment statements 1998 augment "/rpol:routing-policy/rpol:defined-sets" { 1999 description "adds BGP defined sets container to routing policy 2000 model"; 2002 container bgp-defined-sets { 2003 description 2004 "BGP-related set definitions for policy match conditions"; 2006 container community-sets { 2007 description 2008 "Enclosing container for community sets"; 2010 list community-set { 2011 key community-set-name; 2012 description 2013 "Definitions for community sets"; 2015 leaf community-set-name { 2016 type string; 2017 mandatory true; 2018 description 2019 "name / label of the community set -- this is used to 2020 reference the set in match conditions"; 2021 } 2023 leaf-list community-member { 2024 type union { 2025 type bgp-types:bgp-std-community-type; 2026 type bgp-types:bgp-community-regexp-type; 2027 type bgp-types:bgp-well-known-community-type; 2028 } 2029 description 2030 "members of the community set"; 2031 } 2032 } 2033 } 2035 container ext-community-sets { 2036 description 2037 "Enclosing container for extended community sets"; 2039 list ext-community-set { 2040 key ext-community-set-name; 2041 description 2042 "Definitions for extended community sets"; 2044 leaf ext-community-set-name { 2045 type string; 2046 description 2047 "name / label of the extended community set -- this is 2048 used to reference the set in match conditions"; 2049 } 2051 leaf-list ext-community-member { 2052 type union { 2053 type bgp-types:bgp-ext-community-type; 2054 // TODO: is regexp support needed for extended 2055 // communities? 2056 type bgp-types:bgp-community-regexp-type; 2057 } 2058 description 2059 "members of the extended community set"; 2060 } 2061 } 2062 } 2064 container as-path-sets { 2065 description 2066 "Enclosing container for AS path sets"; 2068 list as-path-set { 2069 key as-path-set-name; 2070 description 2071 "Definitions for AS path sets"; 2073 leaf as-path-set-name { 2074 type string; 2075 description 2076 "name of the AS path set -- this is used to reference 2077 the set in match conditions"; 2078 } 2080 leaf-list as-path-set-member { 2081 // TODO: need to refine typedef for AS path expressions 2082 type string; 2083 description 2084 "AS path expression -- list of ASes in the set"; 2085 } 2086 } 2087 } 2088 } 2089 } 2091 augment "/rpol:routing-policy/rpol:policy-definitions/" + 2092 "rpol:policy-definition/rpol:statements/rpol:statement/" + 2093 "rpol:conditions" { 2094 description "BGP policy conditions added to routing policy 2095 module"; 2097 container bgp-conditions { 2098 description "Policy conditions for matching 2099 BGP-specific defined sets or comparing BGP-specific 2100 attributes"; 2101 uses bgp-match-conditions; 2102 uses bgp-attribute-conditions; 2103 } 2104 } 2106 augment "/rpol:routing-policy/rpol:policy-definitions/" + 2107 "rpol:policy-definition/rpol:statements/rpol:statement/" + 2108 "rpol:actions" { 2109 description "BGP policy actions added to routing policy 2110 module"; 2112 container bgp-actions { 2113 description 2114 "Definitions for policy action statements that 2115 change BGP-specific attributes of the route"; 2117 container set-as-path-prepend { 2119 presence "node is present in the config data to use the AS 2120 prepend action"; 2121 description 2122 "action to prepend local AS number to the AS-path a 2123 specified number of times"; 2125 leaf repeat-n { 2126 type uint8; 2127 description "number of times to prepend the local AS 2128 number"; 2129 } 2130 } 2132 container set-community { 2133 presence "node is present in the config data when 2134 set-community action is used"; 2135 description 2136 "action to set the community attributes of the route, along 2137 with options to modify how the community is modified"; 2139 choice set-community-method { 2140 description 2141 "Option to set communities using an inline list or 2142 reference to an existing defined set."; 2144 case inline { 2145 leaf-list communities { 2146 type union { 2147 type bgp-types:bgp-std-community-type; 2148 type bgp-types:bgp-well-known-community-type; 2150 } 2151 description 2152 "Set the community values for the update inline with 2153 a list."; 2154 } 2155 } 2156 case reference { 2157 leaf community-set-ref { 2158 type leafref { 2159 path "/rpol:routing-policy/rpol:defined-sets/" + 2160 "bgp-pol:bgp-defined-sets/" + 2161 "bgp-pol:community-sets/bgp-pol:community-set/" + 2162 "bgp-pol:community-set-name"; 2163 require-instance true; 2164 } 2165 description 2166 "References a defined community set by name"; 2167 } 2168 } 2169 } 2170 leaf options { 2171 type bgp-set-community-option-type; 2172 description 2173 "Options for modifying the community attribute with 2174 the specified values. These options apply to both 2175 methods of setting the community attribute."; 2176 } 2177 } 2179 container set-ext-community { 2181 presence "node is present in the config data when 2182 set-community action is used"; 2183 description 2184 "Action to set the extended community attributes of the 2185 route, along with options to modify how the community is 2186 modified"; 2188 choice set-ext-community-method { 2189 description 2190 "Option to set communities using an inline list or 2191 reference to an existing defined set."; 2193 case inline { 2194 leaf-list communities { 2195 type union { 2196 type bgp-types:bgp-ext-community-type; 2197 type bgp-types:bgp-well-known-community-type; 2199 } 2200 description 2201 "Set the community values for the update inline with 2202 a list."; 2203 } 2204 } 2205 case reference { 2206 leaf ext-community-set-ref { 2207 type leafref { 2208 path "/rpol:routing-policy/rpol:defined-sets/" + 2209 "bgp-pol:bgp-defined-sets/" + 2210 "bgp-pol:ext-community-sets/" + 2211 "bgp-pol:ext-community-set/" + 2212 "bgp-pol:ext-community-set-name"; 2213 require-instance true; 2214 } 2215 description 2216 "References a defined extended community set by 2217 name"; 2218 } 2219 } 2220 } 2221 leaf options { 2222 type bgp-set-community-option-type; 2223 description 2224 "options for modifying the extended community 2225 attribute with the specified values. These options 2226 apply to both methods of setting the community 2227 attribute."; 2228 } 2229 } 2231 leaf set-route-origin { 2232 type bgp-types:bgp-origin-attr-type; 2233 description "set the origin attribute to the specified 2234 value"; 2235 } 2237 leaf set-local-pref { 2238 type uint32; 2239 description "set the local pref attribute on the route 2240 update"; 2241 } 2243 leaf set-next-hop { 2244 type bgp-next-hop-type; 2245 description "set the next-hop attribute in the route update"; 2246 } 2247 leaf set-med { 2248 type bgp-set-med-type; 2249 description "set the med metric attribute in the route 2250 update"; 2251 } 2252 } 2253 } 2255 // rpc statements 2257 // notification statements 2258 } 2259 2261 5.4. BGP multiprotocol items 2263 file bgp-multiprotocol.yang 2264 module bgp-multiprotocol { 2266 yang-version "1"; 2268 // namespace 2269 namespace "http://openconfig.net/yang/bgp-multiprotocol"; 2271 prefix "bgp-mp"; 2273 // import some basic inet types 2274 import routing-policy { prefix rpol; } 2275 import bgp-types { prefix bgp-types; } 2276 import bgp-operational { prefix bgp-op; } 2278 // meta 2279 organization 2280 "OpenConfig working group"; 2282 contact 2283 "OpenConfig working group 2284 netopenconfig@googlegroups.com"; 2286 description 2287 "This module is part of a YANG model for BGP protocol 2288 configuration, focusing on configuration of multiprotocol 2289 BGP, in particular various relevant address families (AFI) and 2290 sub-address families (SAFI). 2292 Identities (rather than enumerated types) are used to identify 2293 each AFI / SAFI type to make it easier for users to extend to 2294 pre-standard or custom AFI/SAFI types. This module is only 2295 intended to capture the most"; 2297 revision "2015-05-15" { 2298 description 2299 "Refactored multiprotocol module"; 2300 reference "TBD"; 2301 } 2303 grouping ipv4-unicast-group { 2304 description 2305 "Group for IPv4 Unicast configuration options"; 2307 container ipv4-unicast { 2308 when "../afi-safi-name = 'bgp-mp:ipv4-unicast'" { 2309 description 2310 "Include this container for IPv4 Unicast specific 2311 configuration"; 2312 } 2314 description "IPv4 unicast configuration options"; 2316 // include common IPv[46] unicast options 2317 uses ipv4-ipv6-unicast-common; 2319 // placeholder for IPv4 unicast specific configuration 2320 } 2321 } 2323 grouping ipv6-unicast-group { 2324 description 2325 "Group for IPv6 Unicast configuration options"; 2327 container ipv6-unicast { 2328 when "../afi-safi-name = 'bgp-mp:ipv6-unicast'" { 2329 description 2330 "Include this container for IPv6 Unicast specific 2331 configuration"; 2332 } 2334 description "IPv6 unicast configuration options"; 2336 // include common IPv[46] unicast options 2337 uses ipv4-ipv6-unicast-common; 2339 // placeholder for IPv6 unicast specific configuration 2340 // options 2342 } 2343 } 2345 grouping ipv4-labelled-unicast-group { 2346 description 2347 "Group for IPv4 Labelled Unicast configuration options"; 2349 container ipv4-labelled-unicast { 2350 when "../afi-safi-name = 'bgp-mp:ipv4-labelled-unicast'" { 2351 description 2352 "Include this container for IPv4 Labelled Unicast specific 2353 configuration"; 2354 } 2356 description "IPv4 Labelled Unicast configuration options"; 2358 uses all-afi-safi-common; 2360 // placeholder for IPv4 Labelled Unicast specific config 2361 // options 2362 } 2363 } 2365 grouping ipv6-labelled-unicast-group { 2366 description 2367 "Group for IPv6 Labelled Unicast configuration options"; 2369 container ipv6-labelled-unicast { 2370 when "../afi-safi-name = 'bgp-mp:ipv6-labelled-unicast'" { 2371 description 2372 "Include this container for IPv6 Labelled Unicast specific 2373 configuration"; 2374 } 2376 description "IPv6 Labelled Unicast configuration options"; 2378 uses all-afi-safi-common; 2380 // placeholder for IPv6 Labelled Unicast specific config 2381 // options. 2382 } 2383 } 2385 grouping l3vpn-ipv4-unicast-group { 2386 description 2387 "Group for IPv4 Unicast L3VPN configuration options"; 2389 container l3vpn-ipv4-unicast { 2390 when "../afi-safi-name = 'bgp-mp:l3vpn-ipv4-unicast'" { 2391 description 2392 "Include this container for IPv4 Unicast L3VPN specific 2393 configuration"; 2394 } 2396 description "Unicast IPv4 L3VPN configuration options"; 2398 // include common L3VPN configuration options 2399 uses l3vpn-ipv4-ipv6-unicast-common; 2401 // placeholder for IPv4 Unicast L3VPN specific config options. 2402 } 2403 } 2405 grouping l3vpn-ipv6-unicast-group { 2406 description 2407 "Group for IPv6 Unicast L3VPN configuration options"; 2409 container l3vpn-ipv6-unicast { 2410 when "../afi-safi-name = 'bgp-mp:l3vpn-ipv6-unicast'" { 2411 description 2412 "Include this container for unicast IPv6 L3VPN specific 2413 configuration"; 2414 } 2416 description "Unicast IPv6 L3VPN configuration options"; 2418 // include common L3VPN configuration options 2419 uses l3vpn-ipv4-ipv6-unicast-common; 2421 // placeholder for IPv6 Unicast L3VPN specific configuration 2422 // options 2423 } 2424 } 2426 grouping l3vpn-ipv4-multicast-group { 2427 description 2428 "Group for IPv4 L3VPN multicast configuration options"; 2430 container l3vpn-ipv4-multicast { 2431 when "../afi-safi-name = 'bgp-mp:l3vpn-ipv4-multicast'" { 2432 description 2433 "Include this container for multicast IPv6 L3VPN specific 2434 configuration"; 2435 } 2437 description "Multicast IPv4 L3VPN configuration options"; 2438 // include common L3VPN multicast options 2439 uses l3vpn-ipv4-ipv6-multicast-common; 2441 // placeholder for IPv4 Multicast L3VPN specific configuration 2442 // options 2443 } 2444 } 2446 grouping l3vpn-ipv6-multicast-group { 2447 description 2448 "Group for IPv6 L3VPN multicast configuration options"; 2450 container l3vpn-ipv6-multicast { 2451 when "../afi-safi-name = 'bgp-mp:l3vpn-ipv6-multicast'" { 2452 description 2453 "Include this container for multicast IPv6 L3VPN specific 2454 configuration"; 2455 } 2457 description "Multicast IPv6 L3VPN configuration options"; 2459 // include common L3VPN multicast options 2460 uses l3vpn-ipv4-ipv6-multicast-common; 2462 // placeholder for IPv6 Multicast L3VPN specific configuration 2463 // options 2464 } 2465 } 2467 grouping l2vpn-vpls-group { 2468 description 2469 "Group for BGP-signalled VPLS configuration options"; 2471 container l2vpn-vpls { 2472 when "../afi-safi-name = 'bgp-mp:l2vpn-vpls'" { 2473 description 2474 "Include this container for BGP-signalled VPLS specific 2475 configuration"; 2476 } 2478 description "BGP-signalled VPLS configuration options"; 2480 // include common L2VPN options 2481 uses l2vpn-common; 2483 // placeholder for BGP-signalled VPLS specific configuration 2484 // options 2485 } 2487 } 2489 grouping l2vpn-evpn-group { 2490 description 2491 "Group for BGP EVPN configuration options"; 2493 container l2vpn-evpn { 2494 when "../afi-safi-name = 'bgp-mp:l2vpn-evpn'" { 2495 description 2496 "Include this container for BGP EVPN specific 2497 configuration"; 2498 } 2500 description "BGP EVPN configuration options"; 2502 // include common L2VPN options 2503 uses l2vpn-common; 2505 // placeholder for BGP EVPN specific configuration options 2506 } 2507 } 2509 grouping bgp-route-selection-options_config { 2510 description 2511 "Set of configuration options that govern best 2512 path selection."; 2514 leaf always-compare-med { 2515 type boolean; 2516 default "false"; 2517 description 2518 "Compare multi-exit discriminator (MED) value from 2519 different ASes when selecting the best route. The 2520 default behavior is to only compare MEDs for paths 2521 received from the same AS."; 2522 } 2524 leaf ignore-as-path-length { 2525 type boolean; 2526 default "false"; 2527 description 2528 "Ignore the AS path length when selecting the best path. 2529 The default is to use the AS path length and prefer paths 2530 with shorter length."; 2531 } 2532 leaf external-compare-router-id { 2533 type boolean; 2534 default "true"; 2535 description 2536 "When comparing similar routes received from external 2537 BGP peers, use the router-id as a criterion to select 2538 the active path."; 2539 } 2541 leaf advertise-inactive-routes { 2542 type boolean; 2543 default "false"; 2544 description 2545 "Advertise inactive routes to external peers. The 2546 default is to only advertise active routes."; 2547 } 2549 leaf enable-aigp { 2550 type boolean; 2551 default false; 2552 description 2553 "Flag to enable sending / receiving accumulated IGP 2554 attribute in routing updates"; 2555 } 2557 leaf ignore-next-hop-igp-metric { 2558 type boolean; 2559 default "false"; 2560 description 2561 "Ignore the IGP metric to the next-hop when calculating 2562 BGP best-path. The default is to select the route for 2563 which the metric to the next-hop is lowest"; 2564 } 2565 } 2567 grouping bgp-use-multiple-paths-ebgp-as-options_config { 2568 description 2569 "Configuration parameters specific to eBGP multipath applicable 2570 to all contexts"; 2572 leaf allow-multiple-as { 2573 type boolean; 2574 default "false"; 2575 description 2576 "Allow multipath to use paths from different neighbouring 2577 ASes. The default is to only consider multiple paths from 2578 the same neighbouring AS."; 2579 } 2581 } 2583 grouping bgp-use-multiple-paths-ebgp_config { 2584 description 2585 "Configuration parameters relating to multipath for eBGP"; 2587 uses bgp-use-multiple-paths-ebgp-as-options_config; 2589 leaf maximum-paths { 2590 type uint32; 2591 default 1; 2592 description 2593 "Maximum number of parallel paths to consider when using 2594 BGP multipath. The default is use a single path."; 2595 } 2596 } 2598 grouping bgp-use-multiple-paths-ibgp_config { 2599 description 2600 "Configuration parmaeters relating to multipath for iBGP"; 2602 leaf maximum-paths { 2603 type uint32; 2604 default 1; 2605 description 2606 "Maximum number of parallel paths to consider when using 2607 iBGP multipath. The default is to use a single path"; 2608 } 2609 } 2611 grouping bgp-use-multiple-paths { 2612 description 2613 "Configuration parameters relating to multipath for BGP - both 2614 iBGP and eBGP"; 2616 container use-multiple-paths { 2617 description 2618 "Parameters related to the use of multiple paths for the 2619 same NLRI"; 2621 container config { 2622 description 2623 "Configuration parameters relating to multipath"; 2624 uses bgp-use-multiple-paths_config; 2625 } 2626 container state { 2627 description 2628 "State parameters relating to multipath"; 2630 uses bgp-use-multiple-paths_config; 2631 } 2633 container ebgp { 2634 description 2635 "Multipath parameters for eBGP"; 2636 container config { 2637 description 2638 "Configuration parameters relating to eBGP multipath"; 2639 uses bgp-use-multiple-paths-ebgp_config; 2640 } 2641 container state { 2642 config false; 2643 description 2644 "State information relating to eBGP multipath"; 2645 uses bgp-use-multiple-paths-ebgp_config; 2646 } 2647 } 2649 container ibgp { 2650 description 2651 "Multipath parameters for iBGP"; 2652 container config { 2653 description 2654 "Configuration parameters relating to iBGP multipath"; 2655 uses bgp-use-multiple-paths-ibgp_config; 2656 } 2657 container state { 2658 config false; 2659 description 2660 "State information relating to iBGP multipath"; 2661 uses bgp-use-multiple-paths-ibgp_config; 2662 } 2663 } 2664 } 2665 } 2667 grouping bgp-use-multiple-paths-neighbor { 2668 description 2669 "Per-neighbor configuration for multipath for BGP"; 2671 container use-multiple-paths { 2672 description 2673 "Parameters related to the use of multiple-paths for the same 2674 NLRI when they are received only from this neighbor"; 2676 container config { 2677 description 2678 "Configuration parameters relating to multipath"; 2679 uses bgp-use-multiple-paths_config; 2680 } 2681 container state { 2682 description 2683 "State parameters relating to multipath"; 2684 uses bgp-use-multiple-paths_config; 2685 } 2687 container ebgp { 2688 description 2689 "Multipath configuration for eBGP"; 2690 container config { 2691 description 2692 "Configuration parameters relating to eBGP multipath"; 2693 uses bgp-use-multiple-paths-ebgp-as-options_config; 2694 } 2695 container state { 2696 config false; 2697 description 2698 "State information relating to eBGP multipath"; 2699 uses bgp-use-multiple-paths-ebgp-as-options_config; 2700 } 2701 } 2702 } 2703 } 2705 grouping bgp-use-multiple-paths_config { 2706 description 2707 "Generic configuration options relating to use of multiple 2708 paths for a referenced AFI-SAFI, group or neighbor"; 2710 leaf enabled { 2711 type boolean; 2712 default false; 2713 description 2714 "Whether the use of multiple paths for the same NLRI is 2715 enabled for the neighbor. This value is overridden by 2716 any more specific configuration value."; 2717 } 2718 } 2720 grouping bgp-afi-safi-graceful-restart_config { 2721 description 2722 "BGP graceful restart parameters that apply on a per-AFI-SAFI 2723 basis"; 2725 leaf enabled { 2726 type boolean; 2727 default false; 2728 description 2729 "This leaf indicates whether graceful-restart is enabled for 2730 this AFI-SAFI"; 2731 } 2732 } 2734 grouping bgp-afi-safi_config { 2735 description 2736 "Configuration parameters used for all BGP AFI-SAFIs"; 2738 leaf afi-safi-name { 2739 type identityref { 2740 base bgp-types:afi-safi-type; 2741 } 2742 description "AFI,SAFI"; 2743 } 2745 leaf enabled { 2746 type boolean; 2747 default false; 2748 description 2749 "This leaf indicates whether the IPv4 Unicast AFI,SAFI is 2750 enabled for the neighbour or group"; 2751 } 2752 } 2754 grouping all-afi-safi-common-prefix-limit_config { 2755 description 2756 "Configuration parameters relating to prefix-limits for an 2757 AFI-SAFI"; 2759 leaf max-prefixes { 2760 type uint32; 2761 description 2762 "Maximum number of prefixes that will be accepted 2763 from the neighbour"; 2764 } 2766 leaf shutdown-threshold-pct { 2767 type bgp-types:percentage; 2768 description 2769 "Threshold on number of prefixes that can be received 2770 from a neighbour before generation of warning messages 2771 or log entries. Expressed as a percentage of 2772 max-prefixes"; 2773 } 2774 leaf restart-timer { 2775 type decimal64 { 2776 fraction-digits 2; 2777 } 2778 units "seconds"; 2779 description 2780 "Time interval in seconds after which the BGP session 2781 is re-established after being torn down due to exceeding 2782 the max-prefix limit."; 2783 } 2784 } 2786 grouping ipv4-ipv6-unicast-common_config { 2787 description 2788 "Common configuration parameters for IPv4 and IPv6 Unicast 2789 address families"; 2791 leaf send-default-route { 2792 type boolean; 2793 default "false"; 2794 description 2795 "If set to true, send the default-route to the neighbour(s)"; 2796 } 2797 } 2799 grouping all-afi-safi-common { 2800 description 2801 "Grouping for configuration common to all AFI,SAFI"; 2803 container prefix-limit { 2804 description 2805 "Configure the maximum number of prefixes that will be 2806 accepted from a peer"; 2808 container config { 2809 description 2810 "Configuration parameters relating to the prefix 2811 limit for the AFI-SAFI"; 2812 uses all-afi-safi-common-prefix-limit_config; 2813 } 2814 container state { 2815 config false; 2816 description 2817 "State information relating to the prefix-limit for the 2818 AFI-SAFI"; 2819 uses all-afi-safi-common-prefix-limit_config; 2820 } 2821 } 2823 } 2825 grouping ipv4-ipv6-unicast-common { 2826 description 2827 "Common configuration that is applicable for IPv4 and IPv6 2828 unicast"; 2830 // include common afi-safi options. 2831 uses all-afi-safi-common; 2833 // configuration options that are specific to IPv[46] unicast 2834 container config { 2835 description 2836 "Configuration parameters for common IPv4 and IPv6 unicast 2837 AFI-SAFI options"; 2838 uses ipv4-ipv6-unicast-common_config; 2839 } 2840 container state { 2841 config false; 2842 description 2843 "State information for common IPv4 and IPv6 unicast 2844 parameters"; 2845 uses ipv4-ipv6-unicast-common_config; 2846 } 2847 } 2849 grouping l3vpn-ipv4-ipv6-unicast-common { 2850 description 2851 "Common configuration applied across L3VPN for IPv4 2852 and IPv6"; 2854 // placeholder -- specific configuration options that are generic 2855 // across IPv[46] unicast address families. 2856 uses all-afi-safi-common; 2857 } 2859 grouping l3vpn-ipv4-ipv6-multicast-common { 2860 description 2861 "Common configuration applied across L3VPN for IPv4 2862 and IPv6"; 2864 // placeholder -- specific configuration options that are 2865 // generic across IPv[46] multicast address families. 2866 uses all-afi-safi-common; 2867 } 2869 grouping l2vpn-common { 2870 description 2871 "Common configuration applied across L2VPN address 2872 families"; 2874 // placeholder -- specific configuration options that are 2875 // generic across L2VPN address families 2876 uses all-afi-safi-common; 2877 } 2879 grouping bgp-route-selection-options { 2880 description 2881 "Parameters relating to the BGP route selection process"; 2883 container route-selection-options { 2884 description 2885 "Parameters relating to options for route selection"; 2886 container config { 2887 description 2888 "Configuration parameters relating to route selection 2889 options"; 2890 uses bgp-route-selection-options_config; 2891 } 2892 container state { 2893 config false; 2894 description 2895 "State information for the route selection options"; 2896 uses bgp-route-selection-options_config; 2897 } 2898 } 2899 } 2901 // *********** STRUCTURE GROUPINGS ********************** 2903 grouping bgp-global-afi-safi { 2904 description 2905 "Parameters and route selection options for MP-BGP 2906 specific to the Global AFI-SAFI"; 2907 uses bgp-route-selection-options; 2908 } 2910 grouping bgp-group-afi-safi { 2911 description 2912 "Parameters and route selection options for MP-BGP 2913 specific to peer groups"; 2914 uses bgp-route-selection-options; 2915 } 2917 grouping bgp-common-afi-safi-list { 2918 description 2919 "List of address-families associated with the BGP instance, 2920 a peer-group or neighbor"; 2922 list afi-safi { 2923 key "afi-safi-name"; 2925 description 2926 "AFI,SAFI configuration available for the 2927 neighbour or group"; 2929 leaf afi-safi-name { 2930 type leafref { 2931 path "../config/afi-safi-name"; 2932 } 2933 description 2934 "Reference to the AFI-SAFI name used as a key 2935 for the AFI-SAFI list"; 2936 } 2938 container graceful-restart { 2939 description 2940 "Parameters relating to BGP graceful-restart"; 2941 container config { 2942 description 2943 "Configuration options for BGP graceful-restart"; 2944 uses bgp-afi-safi-graceful-restart_config; 2945 } 2946 container state { 2947 config false; 2948 description 2949 "State information for BGP graceful-restart"; 2950 uses bgp-afi-safi-graceful-restart_config; 2951 } 2952 } 2954 container config { 2955 description 2956 "Configuration parameters for the AFI-SAFI"; 2957 uses bgp-afi-safi_config; 2958 } 2959 container state { 2960 config false; 2961 description 2962 "State information relating to the AFI-SAFI"; 2963 uses bgp-afi-safi_config; 2964 uses bgp-op:bgp-afi-safi_state; 2965 } 2966 // import and export policy included for the afi/safi 2967 uses rpol:apply-policy-group; 2969 uses ipv4-unicast-group; 2970 uses ipv6-unicast-group; 2971 uses ipv4-labelled-unicast-group; 2972 uses ipv6-labelled-unicast-group; 2973 uses l3vpn-ipv4-unicast-group; 2974 uses l3vpn-ipv6-unicast-group; 2975 uses l3vpn-ipv4-multicast-group; 2976 uses l3vpn-ipv6-multicast-group; 2977 uses l2vpn-vpls-group; 2978 uses l2vpn-evpn-group; 2979 } 2980 } 2981 } 2982 2984 5.5. BGP operational data items 2986 file bgp-operational.yang 2987 module bgp-operational { 2989 yang-version "1"; 2991 // namespace 2992 // TODO: change to an ietf or other more generic namespace 2993 namespace "http://openconfig.net/yang/bgp-operational"; 2995 prefix "bgp-op"; 2997 // import some basic inet types 2998 import ietf-inet-types { prefix inet; } 2999 import ietf-yang-types { prefix yang; } 3000 import bgp-types { prefix bgp-types; } 3002 // meta 3004 organization 3005 "OpenConfig working group"; 3007 contact 3008 "OpenConfig working group 3009 netopenconfig@googlegroups.com"; 3011 description 3012 "This module is part of a YANG model for BGP protocol 3013 configuration, focusing on operational data (i.e., state 3014 variables) related to BGP operations"; 3016 revision "2015-05-15" { 3017 description 3018 "Initial revision"; 3019 reference "TBD"; 3020 } 3022 // extension statements 3024 // feature statements 3026 // identity statements 3028 // typedef statements 3030 // grouping statements 3032 grouping bgp-counters-message-types_common { 3033 description 3034 "Grouping of BGP message types, included for re-use 3035 across counters"; 3037 leaf UPDATE { 3038 type uint64; 3039 description 3040 "Number of BGP UPDATE messages announcing, withdrawing 3041 or modifying paths exchanged."; 3042 } 3044 leaf NOTIFICATION { 3045 type uint64; 3046 description 3047 "Number of BGP NOTIFICATION messages indicating an 3048 error condition has occurred exchanged."; 3049 } 3050 } 3052 grouping bgp-context-pfx-path-counters_common { 3053 description 3054 "Grouping containing common counters relating to prefixes and 3055 paths"; 3057 leaf total-paths { 3058 type uint32; 3059 description 3060 "Total number of BGP paths within the context"; 3061 } 3063 leaf total-prefixes { 3064 type uint32; 3065 description 3066 ""; 3067 } 3068 } 3070 grouping bgp-global_state { 3071 description 3072 "Grouping containing operational parameters relating to the 3073 global BGP instance"; 3074 uses bgp-context-pfx-path-counters_common; 3075 } 3077 grouping bgp-global-afi-safi_state { 3078 description 3079 "Grouping containing operational parameters relating to each 3080 AFI-SAFI within the BGP global instance"; 3081 uses bgp-context-pfx-path-counters_common; 3082 } 3084 grouping bgp-peer-group_state { 3085 description 3086 "Grouping containing operational parameters relating to a BGP 3087 peer group"; 3088 uses bgp-context-pfx-path-counters_common; 3089 } 3091 grouping bgp-neighbor_state { 3092 description 3093 "Grouping containing operational state variables relating to a 3094 BGP neighbor"; 3096 leaf session-state { 3097 type enumeration { 3098 enum IDLE { 3099 description 3100 "neighbor is down, and in the Idle state of the 3101 FSM"; 3102 } 3103 enum CONNECT { 3104 description 3105 "neighbor is down, and the session is waiting for 3106 the underlying transport session to be established"; 3108 } 3109 enum ACTIVE { 3110 description 3111 "neighbor is down, and the local system is awaiting 3112 a conncetion from the remote peer"; 3113 } 3114 enum OPENSENT { 3115 description 3116 "neighbor is in the process of being established. 3117 The local system has sent an OPEN message"; 3118 } 3119 enum OPENCONFIRM { 3120 description 3121 "neighbor is in the process of being established. 3122 The local system is awaiting a NOTIFICATION or 3123 KEEPALIVE message"; 3124 } 3125 enum ESTABLISHED { 3126 description 3127 "neighbor is up - the BGP session with the peer is 3128 established"; 3129 } 3130 } 3131 description 3132 "Operational state of the BGP peer"; 3133 } 3135 leaf-list supported-capabilities { 3136 type identityref { 3137 base bgp-types:bgp-capability; 3138 } 3139 description 3140 "BGP capabilities negotiated as supported with the peer"; 3141 } 3142 } 3144 grouping bgp-neighbor-afi-safi_state { 3145 description 3146 "Operational state on a per-AFI-SAFI basis for a BGP 3147 neighbor"; 3149 leaf active { 3150 type boolean; 3151 description 3152 "This value indicates whether a particular AFI-SAFI has 3153 been succesfully negotiated with the peer. An AFI-SAFI 3154 may be enabled in the current running configuration, but a 3155 session restart may be required in order to negotiate the new 3156 capability."; 3157 } 3159 uses bgp-neighbor-prefix-counters_state; 3160 } 3162 grouping bgp-neighbor-prefix-counters_state { 3163 description 3164 "Counters for BGP neighbor sessions"; 3166 container prefixes { 3167 description "Prefix counters for the BGP session"; 3168 leaf received { 3169 type uint32; 3170 description 3171 "The number of prefixes received from the neighbor"; 3172 } 3174 leaf sent { 3175 type uint32; 3176 description 3177 "The number of prefixes advertised to the neighbor"; 3178 } 3180 leaf installed { 3181 type uint32; 3182 description 3183 "The number of advertised prefixes installed in the 3184 Loc-RIB"; 3185 } 3186 } 3187 } 3189 grouping bgp-neighbor-message-counters-sent_state { 3190 description 3191 "Counters relating to messages sent to a BGP neighbor"; 3192 uses bgp-counters-message-types_common; 3193 } 3195 grouping bgp-neighbor-message-counters-received_state { 3196 description 3197 "Counters relating to the mesages received from a BGP 3198 neighbor"; 3199 uses bgp-counters-message-types_common; 3200 } 3202 grouping bgp-neighbor-queue-counters_state { 3203 description 3204 "Counters relating to the message queues associated with the 3205 BGP peer"; 3206 leaf input { 3207 type uint32; 3208 description 3209 "The number of messages received from the peer currently 3210 queued"; 3211 } 3213 leaf output { 3214 type uint32; 3215 description 3216 "The number of messages queued to be sent to the peer"; 3217 } 3218 } 3220 grouping bgp-neighbor-transport_state { 3221 description 3222 "Operational state parameters relating to the transport session 3223 used for the BGP session"; 3225 leaf local-port { 3226 type inet:port-number; 3227 description 3228 "Local TCP port being used for the TCP session supporting 3229 the BGP session"; 3230 } 3232 leaf remote-address { 3233 type inet:ip-address; 3234 description 3235 "Remote port being used by the peer for the TCP session 3236 supporting the BGP session"; 3237 } 3239 leaf remote-port { 3240 type inet:port-number; 3241 description 3242 "Remote address to which the BGP session has been 3243 established"; 3244 } 3245 } 3247 grouping bgp-neighbor-error-handling_state { 3248 description 3249 "Operational state parameters relating to enhanced error 3250 error handling for BGP"; 3252 leaf erroneous-update-messages { 3253 type uint32; 3254 description 3255 "The number of BGP UPDATE messages for which the 3256 treat-as-withdraw mechanism has been applied based 3257 on erroneous message contents"; 3258 } 3259 } 3261 grouping bgp-neighbor-timers_state { 3262 description 3263 "Operational state parameters relating to BGP timers associated 3264 with the BGP session"; 3266 leaf uptime { 3267 type yang:timeticks; 3268 description 3269 "This timer determines the amount of time since the 3270 BGP last transitioned in or out of the Established 3271 state"; 3272 } 3274 leaf negotiated-hold-time { 3275 type decimal64 { 3276 fraction-digits 2; 3277 } 3278 description 3279 "The negotiated hold-time for the BGP session"; 3280 } 3281 } 3283 grouping bgp-afi-safi_state { 3284 description 3285 "Operational state information relevant to all address 3286 families that may be carried by the BGP session"; 3288 // placeholder - options in this container are 3289 // valid in both the global and per-neighbor 3290 // paths 3292 } 3294 grouping bgp-afi-safi-graceful-restart_state { 3295 description 3296 "Operational state information relevant to graceful restart 3297 for BGP"; 3299 leaf peer-restart-time { 3300 type uint16 { 3301 range 0..4096; 3302 } 3303 description 3304 "The period of time (advertised by the peer) that 3305 the peer expects a restart of a BGP session to 3306 take"; 3307 } 3309 leaf peer-restarting { 3310 type boolean; 3311 description 3312 "This flag indicates whether the remote neighbor is currently 3313 in the process of restarting, and hence received routes are 3314 currently stale"; 3315 } 3317 leaf local-restarting { 3318 type boolean; 3319 description 3320 "This flag indicates whether the local neighbor is currently 3321 restarting. The flag is unset after all NLRI have been 3322 advertised to the peer, and the End-of-RIB (EOR) marker has 3323 been unset"; 3324 } 3326 leaf mode { 3327 type enumeration { 3328 enum HELPER-ONLY { 3329 description 3330 "The local router is operating in helper-only mode, and 3331 hence will not retain forwarding state during a local 3332 session restart, but will do so during a restart of the 3333 remote peer"; 3334 } 3335 enum BILATERAL { 3336 description 3337 "The local router is operating in both helper mode, and 3338 hence retains forwarding state during a remote restart, 3339 and also maintains forwarding state during local session 3340 restart"; 3341 } 3342 enum REMOTE-HELPER { 3343 description 3344 "The local system is able to retain routes during restart 3345 but the remote system is only able to act as a helper"; 3346 } 3347 } 3348 description 3349 "Ths leaf indicates the mode of operation of BGP graceful 3350 restart with the peer"; 3351 } 3352 } 3354 grouping bgp-neighbor-afi-safi-graceful-restart_state { 3355 description 3356 "Operational state variables relating to the graceful-restart 3357 mechanism on a per-AFI-SAFI basis"; 3359 leaf received { 3360 type boolean; 3361 description 3362 "This leaf indicates whether the neighbor advertised the 3363 ability to support graceful-restart for this AFI-SAFI"; 3364 } 3366 leaf advertised { 3367 type boolean; 3368 description 3369 "This leaf indicates whether the ability to support 3370 graceful-restart has been advertised to the peer"; 3371 } 3372 } 3374 } 3376 3378 6. References 3380 6.1. Normative references 3382 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 3383 Network Configuration Protocol (NETCONF)", RFC 6020, 3384 October 2010. 3386 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. 3387 Bierman, "Network Configuration Protocol (NETCONF)", RFC 3388 6241, June 2011. 3390 [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway 3391 Protocol 4 (BGP-4)", RFC 4271, January 2006. 3393 [RFC1997] Chandrasekeran, R., Traina, P., and T. Li, "BGP 3394 Communities Attribute", RFC 1997, August 1996. 3396 [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route 3397 Reflection: An Alternative to Full Mesh Internal BGP 3398 (IBGP)", RFC 4456, April 2006. 3400 [RFC3065] Traina, P., McPherson, D., and J. Scudder, "Autonomous 3401 System Confederations for BGP", RFC 3065, February 2001. 3403 [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route 3404 Flap Damping", RFC 2439, November 1998. 3406 [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. 3407 Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, 3408 January 2007. 3410 [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. 3411 Austein, "BGP Prefix Origin Validation", RFC 6811, January 3412 2013. 3414 [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, 3415 "Multiprotocol Extensions for BGP-4", RFC 4760, January 3416 2007. 3418 [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, 3419 July 2013. 3421 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 3422 January 2004. 3424 6.2. Informative references 3426 [I-D.openconfig-netmod-opstate] 3427 Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling 3428 of Operational State Data in YANG", draft-openconfig- 3429 netmod-opstate-00 (work in progress), March 2015. 3431 [I-D.shaikh-rtgwg-policy-model] 3432 Shaikh, A., Shakir, R., D'Souza, K., and C. Chase, 3433 "Routing Policy Configuration Model for Service Provider 3434 Networks", draft-shaikh-rtgwg-policy-model-00 (work in 3435 progress), January 2015. 3437 Appendix A. Acknowledgements 3439 The authors are grateful for valuable contributions to this document 3440 and the associated models from: Ebben Aires, Pavan Beeram, Chris 3441 Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh 3442 George, Vijay Gill, Jeff Haas, Dhanendra Jain, Ina Minei, Carl 3443 Moberg, Ashok Narayanan, Einar Nilsen-Nygaard, Adam Simpson, Puneet 3444 Sood, Jason Sterne, Jim Uttaro, and Gunter Vandevelde. 3446 Appendix B. Change summary 3448 B.1. Changes between revisions -01 and -02 3450 The -02 revision generally does not affect the structure of the 3451 model, but there are a number of changes that improve clarity, or 3452 simplify mappings to implementations. 3454 o Reorganized modules to move BGP-specific types, including policy- 3455 related types, to the bgp-types module. 3457 o Added ability to configure route selection options at the global 3458 level. Removed route selection options from per-neighbor AFI-SAFI 3459 since it is not widely implemented. 3461 o Removed a number of presence containers (e.g., in AFI-SAFI, 3462 graceful-restart, and multipath). Presence has been replaced with 3463 an explicit 'enabled' leaf to simplify semantics of inheritance 3464 and override in other parts of the BGP hieararchy. 3466 o Fixed inconsistencies with use-multiple-paths config. Added 3467 'enabled' leaves with default false. 3469 o Updated top level list key to be a leafref in most lists for 3470 consistency with the operational state modeling approach outlined 3471 in [I-D.openconfig-netmod-opstate]. 3473 o Some minor renaming / restructuring of routing policy defined-sets 3474 and apply-policy container. 3476 o Added ability to increment/decrement MED value in BGP policy 3477 statement actions. 3479 o Changed local-address leaf to be a union which can specify either 3480 an IP address, or be a reference to an interface. 3482 o Changed ebgp-multihop to add 'enabled' leaf and TTL behavior. 3484 o Changed BGP well-known communities from a enumeration to a 3485 identity. Also made consistent with IANA-defined standard well- 3486 known communities. 3488 o Remove enumeration values from BGP origin type given the 3489 disagreement in RFC 4271 and RFC 4273. 3491 o Added an additional match-options enumerated type for sets that 3492 only support ANY | INVERT, but not ALL behavior. 3494 o Modified prefix-sets to use inet:ip-prefix type and removed range 3495 checking on masklength-range (also added 'exact' specifier for 3496 masklength range). 3498 o Removed send-update-delay timer leaf. Desired behavior is 3499 reflected by minimum-advertisement-interval, i.e., MRAI. 3501 o Changed allow-own-as leaf to allow specification of a number of 3502 occurrences -- some implementations only support 0 or 1, i.e., 3503 equivalent of a boolean but several others support multiple 3504 occurrences. 3506 B.2. Changes between revisions -00 and -01 3508 The -01 revision reflects a number of changes, many based on feedback 3509 from implementors of the model on various routing platforms. 3511 o Refactored model to explicitly provide 'config' and 'state' 3512 containers at each leaf node to enable consistent and predictable 3513 access to operational state data corresponding to configuration 3514 data. This is based on the model design in 3515 [I-D.openconfig-netmod-opstate]. 3517 o Refactored multiprotocol module with explicit set of supported 3518 AFI-SAFI combinations (using YANG identities) in a flattened list. 3519 Focus was on common config with more AFI-SAFI specific 3520 configuration forthcoming in future revisions. 3522 o Refactored BGP policy module to work with a new general routing 3523 policy model [I-D.shaikh-rtgwg-policy-model] by augmenting it with 3524 BGP-specific policy options (conditions, actions, and defined 3525 sets). 3527 o Added enclosing containers to lists (e.g., neighbors, peer-groups, 3528 and AFI-SAFI) 3530 o Removed neighbor configuration from the peer-group hierarchy. 3531 Neighbor configuration now has a peer-group leaf which references 3532 the peer group to which the neighbor belongs. 3534 o Several new configuration items added to base bgp module, 3535 including adding some configuration items to the global hierarchy 3536 level. 3538 Authors' Addresses 3540 Anees Shaikh (editor) 3541 Google 3542 1600 Amphitheatre Pkwy 3543 Mountain View, CA 94043 3544 US 3546 Email: aashaikh@google.com 3548 Rob Shakir (editor) 3549 BT 3550 pp. C3L, BT Centre 3551 81, Newgate Street 3552 London EC1A 7AJ 3553 UK 3555 Email: rob.shakir@bt.com 3556 URI: http://www.bt.com/ 3558 Keyur Patel (editor) 3559 Cisco 3560 170 W. Tasman Drive 3561 San Jose, CA 95134 3562 USA 3564 Email: keyupate@cisco.com 3566 Susan Hares (editor) 3567 Huawei 3568 7453 Hickory Hill 3569 Saline, MI 48176 3570 USA 3572 Email: shares@ndzh.com 3573 Kevin D'Souza 3574 AT&T 3575 200 S. Laurel Ave 3576 Middletown, NJ 3577 US 3579 Email: kd6913@att.com 3581 Deepak Bansal 3582 Microsoft 3583 205 108th Ave. NE, Suite 400 3584 Bellevue, WA 3585 US 3587 Email: dbansal@microsoft.com 3589 Alexander Clemm 3590 Cisco 3591 170 W. Tasman Drive 3592 San Jose, CA 95134 3593 USA 3595 Email: alex@cisco.com 3597 Aleksandr Zhdankin 3598 Cisco 3599 170 W. Tasman Drive 3600 San Jose, CA 95134 3601 USA 3603 Email: azhdanki@cisco.com 3605 Mahesh Jethanandani 3606 Ciena 3607 1741 Technology Drive 3608 San Jose, CA 95110 3609 USA 3611 Email: mjethanandani@gmail.com 3612 Xyfeng Liu 3613 Ericsson 3614 1595 Spring Hill Road, Suite 500 3615 Vienna, VA 22182 3616 USA 3618 Email: xufeng.liu@ericsson.com