draft-ietf-idr-bgp-model-07.txt   draft-ietf-idr-bgp-model-08.txt 
Interdomain Routing M. Jethanandani Interdomain Routing M. Jethanandani
Internet-Draft VMware Internet-Draft VMware
Intended status: Standards Track K. Patel Intended status: Standards Track K. Patel
Expires: April 6, 2020 Arrcus Expires: August 28, 2020 Arrcus
S. Hares S. Hares
Huawei Huawei
J. Haas J. Haas
Juniper Networks Juniper Networks
October 4, 2019 February 25, 2020
BGP YANG Model for Service Provider Networks BGP YANG Model for Service Provider Networks
draft-ietf-idr-bgp-model-07 draft-ietf-idr-bgp-model-08
Abstract Abstract
This document defines a YANG data model for configuring and managing This document defines a YANG data model for configuring and managing
BGP, including protocol, policy, and operational aspects, such as BGP, including protocol, policy, and operational aspects, such as
RIB, based on data center, carrier and content provider operational RIB, based on data center, carrier and content provider operational
requirements. requirements.
Status of This Memo Status of This Memo
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 6, 2020. This Internet-Draft will expire on August 28, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 32 skipping to change at page 2, line 32
2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12 2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12
2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12 2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12
2.3.5. Post route advertisements per-neighbor . . . . . . . 12 2.3.5. Post route advertisements per-neighbor . . . . . . . 12
3. Relation to other YANG data models . . . . . . . . . . . . . 12 3. Relation to other YANG data models . . . . . . . . . . . . . 12
4. Security Considerations . . . . . . . . . . . . . . . . . . . 13 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14
5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14
6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14
7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15
7.1. Main module and submodules for base items . . . . . . . . 15 7.1. Main module and submodules for base items . . . . . . . . 16
7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 64 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 64
7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 75 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 77
7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 86 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 87
8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 120
8.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 120 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 120
8.2. Neighbor Address Family Configuration . . . . . . . . . . 121 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 123 10.1. Normative references . . . . . . . . . . . . . . . . . . 120
8.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 124 10.2. Informative references . . . . . . . . . . . . . . . . . 124
9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 125 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 125
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 126 A.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 125
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 126 A.2. Neighbor Address Family Configuration . . . . . . . . . . 126
11.1. Normative references . . . . . . . . . . . . . . . . . . 126 A.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 128
11.2. Informative references . . . . . . . . . . . . . . . . . 128 A.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 129
Appendix A. How to add a new AFI and Augment a Module . . . . . 129 Appendix B. How to add a new AFI and Augment a Module . . . . . 131
Appendix B. How to deviate a module . . . . . . . . . . . . . . 131 Appendix C. How to deviate a module . . . . . . . . . . . . . . 133
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 132 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 133
1. Introduction 1. Introduction
This document describes a YANG [RFC7950] data model for the BGP-4 This document describes a YANG [RFC7950] data model for the BGP-4
[RFC4271] protocol, including various protocol extensions, policy [RFC4271] protocol, including various protocol extensions, policy
configuration, as well as defining key operational state data, configuration, as well as defining key operational state data,
including Routing Information Base (RIB). The model is intended to including Routing Information Base (RIB). The model is intended to
be vendor-neutral, in order to allow operators to manage BGP be vendor-neutral, in order to allow operators to manage BGP
configuration in heterogeneous environments with routers supplied by configuration in heterogeneous environments with routers supplied by
multiple vendors. The model is also intended to be readily mapped to multiple vendors. The model is also intended to be readily mapped to
skipping to change at page 3, line 29 skipping to change at page 3, line 29
1.1. Goals and approach 1.1. Goals and approach
The model covers the base BGP features that are deployed across major The model covers the base BGP features that are deployed across major
implementations and the common BGP configurations in use across a implementations and the common BGP configurations in use across a
number of operator network deployments. In particular, this model number of operator network deployments. In particular, this model
attempts to cover BGP features defined in BGP [RFC4271], BGP attempts to cover BGP features defined in BGP [RFC4271], BGP
Communities Attribute [RFC1997], BGP Route Reflection [RFC4456], Communities Attribute [RFC1997], BGP Route Reflection [RFC4456],
Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System
Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439], Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439],
Graceful Restart Mechanism for BGP [RFC4724], and BGP Prefix Origin Graceful Restart Mechanism for BGP [RFC4724], BGP Prefix Origin
Validation [RFC6811]. Validation [RFC6811], and Advertisement of Multiple Paths in BGP
[RFC7911].
Along with configuration of base BGP features, this model also Along with configuration of base BGP features, this model also
addresses policy configuration, by providing "hooks" for applying addresses policy configuration, by providing "hooks" for applying
policies, and also defining BGP-specific policy features. The BGP policies, and also defining BGP-specific policy features. The BGP
policy features are intended to be used with the general routing policy features are intended to be used with the general routing
policy model defined in A YANG Data Model for Routing Policy policy model defined in A YANG Data Model for Routing Policy
Management [I-D.ietf-rtgwg-policy-model]. The model conforms to the Management [I-D.ietf-rtgwg-policy-model]. The model conforms to the
NMDA [RFC8342] architecture and has support for configuring NMDA [RFC8342] architecture and has support for configuring
Bidirectional Forward Detection (BFD) [RFC5880] for fast next hop Bidirectional Forward Detection (BFD) [RFC5880] for fast next hop
liveliness check. liveliness check.
skipping to change at page 4, line 40 skipping to change at page 4, line 40
1.2. Note to RFC Editor 1.2. Note to RFC Editor
This document uses several placeholder values throughout the This document uses several placeholder values throughout the
document. Please replace them as follows and remove this note before document. Please replace them as follows and remove this note before
publication. publication.
RFC XXXX, where XXXX is the number assigned to this document at the RFC XXXX, where XXXX is the number assigned to this document at the
time of publication. time of publication.
2019-10-03 with the actual date of the publication of this document. 2020-02-24 with the actual date of the publication of this document.
RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for
Routing Policy Management [I-D.ietf-rtgwg-policy-model]. Routing Policy Management [I-D.ietf-rtgwg-policy-model].
RFC AAAA, where AAAA is the number assigned to BGP Monitoring RFC AAAA, where AAAA is the number assigned to BGP Monitoring
Protocol [RFC7854]. Protocol [RFC7854].
RFC BBBB, where BBBB is the number assigned to YANG Data Model for RFC BBBB, where BBBB is the number assigned to YANG Data Model for
Bidirectional Forward Detection [I-D.ietf-bfd-yang]. Bidirectional Forward Detection [I-D.ietf-bfd-yang].
skipping to change at page 7, line 15 skipping to change at page 7, line 15
module: ietf-bgp module: ietf-bgp
augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto
col: col:
+--rw bgp +--rw bgp
+--rw global! +--rw global!
| +--rw as inet:as-number | +--rw as inet:as-number
| +--rw identifier? yang:dotted-quad | +--rw identifier? yang:dotted-quad
| +--rw distance | +--rw distance
| +--rw confederation | +--rw confederation
| +--rw graceful-restart {graceful-restart}? | +--rw graceful-restart {bt:graceful-restart}?
| +--rw use-multiple-paths | +--rw use-multiple-paths
| +--rw route-selection-options | +--rw route-selection-options
| +--rw afi-safis | +--rw afi-safis
| +--rw apply-policy | +--rw apply-policy
| +--ro total-paths? uint32 | +--ro total-paths? uint32
| +--ro total-prefixes? uint32 | +--ro total-prefixes? uint32
+--rw neighbors +--rw neighbors
| +--rw neighbor* [remote-address] | +--rw neighbor* [remote-address]
| +---n established | +---n established
| +---n backward-transition | +---n backward-transition
| +--rw clear-neighbors {clear-neighbors}? | +---x clear {bt:clear-neighbors}?
+--rw peer-groups +--rw peer-groups
| +--rw peer-group* [peer-group-name] | +--rw peer-group* [peer-group-name]
+--rw interfaces +--rw interfaces
| +--rw interface* [name] | +--rw interface* [name]
+--ro rib +--ro rib
+--ro attr-sets +--ro attr-sets
+--ro communities +--ro communities
+--ro ext-communities +--ro ext-communities
+--ro afi-safis +--ro afi-safis
skipping to change at page 7, line 50 skipping to change at page 7, line 50
optional, with neighbor specific configuration being the most optional, with neighbor specific configuration being the most
specific or lowest level, followed by peer-group, and finally global. specific or lowest level, followed by peer-group, and finally global.
Global configuration options reflect a subset of the peer-group or Global configuration options reflect a subset of the peer-group or
neighbor specific configuration options which are relevant to the neighbor specific configuration options which are relevant to the
entire BGP instance. entire BGP instance.
The model makes the simplifying assumption that most of the The model makes the simplifying assumption that most of the
configuration items are available at all levels of the hierarchy. configuration items are available at all levels of the hierarchy.
That is, very little configuration is specific to a particular level That is, very little configuration is specific to a particular level
in the hierarchy, other than obvious items such as "group-name" only in the hierarchy, other than obvious items such as "group-name" only
being available for the peer group-level config. A notable exception being available for the peer group-level configuration. A notable
is for sub-address family configuration where some items are only exception is for sub-address family configuration where some items
applicable for a given AFI-SAFI combination. are only applicable for a given AFI-SAFI combination.
In order to allow common configuration to be applied to a set of In order to allow common configuration to be applied to a set of
neighbors, all neighbor configuration options are available within a neighbors, all neighbor configuration options are available within a
peer-group. A neighbor is associated to a particular peer-group peer-group. A neighbor is associated to a particular peer-group
through the use of a peer-group leaf (which provides a reference to a through the use of a peer-group leaf (which provides a reference to a
configured item in the peer-group list). configured item in the peer-group list).
Address-family configuration is made available in multiple points Address-family configuration is made available in multiple points
within the model - primarily within the global container, where within the model - primarily within the global container, where
instance-wide configuration can be set (for example, global protocol instance-wide configuration can be set (for example, global protocol
skipping to change at page 11, line 18 skipping to change at page 11, line 18
+--rw bgp +--rw bgp
+--ro rib +--ro rib
+--ro afi-safis +--ro afi-safis
+--ro afi-safi* [afi-safi-name] +--ro afi-safi* [afi-safi-name]
+--ro afi-safi-name identityref +--ro afi-safi-name identityref
+--ro ipv4-unicast +--ro ipv4-unicast
| +--ro loc-rib | +--ro loc-rib
| | +--ro routes | | +--ro routes
| | +--ro route* [prefix origin path-id] | | +--ro route* [prefix origin path-id]
| | | ... | | | ...
| | +--ro clear-routes {clear-routes}? | | +--ro clear-routes {bt:clear-routes}?
| | ... | | ...
| +--ro neighbors | +--ro neighbors
| +--ro neighbor* [neighbor-address] | +--ro neighbor* [neighbor-address]
| +--ro neighbor-address inet:ip-address | +--ro neighbor-address inet:ip-address
| +--ro adj-rib-in-pre | +--ro adj-rib-in-pre
| | ... | | ...
| +--ro adj-rib-in-post | +--ro adj-rib-in-post
| | ... | | ...
| +--ro adj-rib-out-pre | +--ro adj-rib-out-pre
| | ... | | ...
| +--ro adj-rib-out-post | +--ro adj-rib-out-post
| ... | ...
+--ro ipv6-unicast +--ro ipv6-unicast
+--ro loc-rib +--ro loc-rib
| +--ro routes | +--ro routes
| +--ro route* [prefix origin path-id] | +--ro route* [prefix origin path-id]
| | ... | | ...
| +--ro clear-routes {clear-routes}? | +--ro clear-routes {bt:clear-routes}?
| ... | ...
+--ro neighbors +--ro neighbors
+--ro neighbor* [neighbor-address] +--ro neighbor* [neighbor-address]
+--ro neighbor-address inet:ip-address +--ro neighbor-address inet:ip-address
+--ro adj-rib-in-pre +--ro adj-rib-in-pre
| ... | ...
+--ro adj-rib-in-post +--ro adj-rib-in-post
| ... | ...
+--ro adj-rib-out-pre +--ro adj-rib-out-pre
| ... | ...
skipping to change at page 15, line 33 skipping to change at page 15, line 33
o ietf-bgp-types - common type and identity definitions for BGP, o ietf-bgp-types - common type and identity definitions for BGP,
including BGP policy including BGP policy
o ietf-bgp-policy - BGP-specific policy data definitions for use o ietf-bgp-policy - BGP-specific policy data definitions for use
with [I-D.ietf-rtgwg-policy-model] (described in more detail with [I-D.ietf-rtgwg-policy-model] (described in more detail
Section 2.2) Section 2.2)
7. Structure of the YANG modules 7. Structure of the YANG modules
The YANG model can be subdivided between the main module for base The YANG model can be subdivided between the main module for base
items, types, policy data, and the RIB module. items, types, policy data, and the RIB module. It references BGP
Communities Attribute [RFC1997], , Route Refresh Capability for BGP-4
[RFC2918], , NOPEER Community for BGP [RFC3765], BGP/MPLS IP Virtual
Private Networks (VPNs) [RFC4364], BGP-MPLS IP Virtual Private
Network (VPN) Extension for IPv6 VPN [RFC4659], Graceful Restart
Mechanism for BGP [RFC4724], Multiprotocol Extenstions for BGP-4
[RFC4760], Virtual Private LAN Service (VPLS) Using BGP for Auto-
Discovery and Signaling [RFC4761], Autonomous System Configuration
for BGP [RFC5065], The Generalized TTL Security Mechanism (GTSM)
[RFC5082], Bidirectional Forward Detection (BFD) [RFC5880],
Bidirectional Forward Detection for IPv4 and IPv6 (Single Hop)
[RFC5881], Bidirectional Forwarding Detection (BFD) for Multihop
Paths [RFC5883], The TCP Authentication Option [RFC5925], BGP
Encodings and Procedures for Multicast in MPLS/BGP IP VPNs [RFC6514],
BGP Support for Four-Octet Autonomous System (AS) Number Space
[RFC6793], Advertisement of Multiple Paths in BGP [RFC7911], YANG Key
Chain [RFC8177], and Carrying Label Information in BGP-4 [RFC8277]
YANG Model for Transmission Control Protocol (TCP) Configuration
[I-D.scharf-tcpm-yang-tcp].
7.1. Main module and submodules for base items 7.1. Main module and submodules for base items
<CODE BEGINS> file "ietf-bgp@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp@2020-02-24.yang"
module ietf-bgp { module ietf-bgp {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp";
prefix bgp; prefix bgp;
/* /*
* Import and Include * Import and Include
*/ */
import ietf-routing { import ietf-routing {
skipping to change at page 16, line 34 skipping to change at page 17, line 4
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
import ietf-key-chain {
include ietf-bgp-common; prefix kc;
include ietf-bgp-common-multiprotocol; reference
include ietf-bgp-common-structure; "RFC 8177: YANG Key Chain.";
include ietf-bgp-neighbor; }
include ietf-bgp-peer-group; import ietf-tcp {
include ietf-bgp-rib-types; prefix tcp;
include ietf-bgp-rib; reference
include ietf-bgp-rib-ext; "I-D.scharf-tcpm-yang-tcp: Transmission Control Protocol (TCP)
include ietf-bgp-rib-attributes; YANG Model.";
include ietf-bgp-rib-table-attributes; }
include ietf-bgp-rib-tables; include ietf-bgp-common {
revision-date 2020-02-24;
}
include ietf-bgp-common-multiprotocol {
revision-date 2020-02-24;
}
include ietf-bgp-common-structure {
revision-date 2020-02-24;
}
include ietf-bgp-neighbor {
revision-date 2020-02-24;
}
include ietf-bgp-peer-group {
revision-date 2020-02-24;
}
include ietf-bgp-rib-types {
revision-date 2020-02-24;
}
include ietf-bgp-rib {
revision-date 2020-02-24;
}
include ietf-bgp-rib-ext {
revision-date 2020-02-24;
}
include ietf-bgp-rib-attributes {
revision-date 2020-02-24;
}
include ietf-bgp-rib-table-attributes {
revision-date 2020-02-24;
}
include ietf-bgp-rib-tables {
revision-date 2020-02-24;
}
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
skipping to change at page 17, line 33 skipping to change at page 18, line 34
BGP BGP
| |
+-> [ global BGP configuration ] +-> [ global BGP configuration ]
+-> AFI / SAFI global +-> AFI / SAFI global
+-> peer group +-> peer group
+-> [ peer group config ] +-> [ peer group config ]
+-> AFI / SAFI [ per-AFI overrides ] +-> AFI / SAFI [ per-AFI overrides ]
+-> neighbor +-> neighbor
+-> [ neighbor config ] +-> [ neighbor config ]
+-> [ optional pointer to peer-group ] +-> [ optional pointer to peer-group ]
+-> AFI / SAFI [ per-AFI overrides ]"; +-> AFI / SAFI [ per-AFI overrides ]
revision 2019-10-03 { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP Model for Service Provider Network "; "RFC XXXX, BGP Model for Service Provider Network ";
} }
/* /*
* Identity * Identity
*/ */
identity bgp { identity bgp {
base rt:routing-protocol; base rt:routing-protocol;
description description
"BGP protocol."; "BGP protocol.";
} }
/*
* Feature(s)
*/
feature graceful-restart {
description
"Graceful restart as defined in RFC 4724 is supported.";
}
feature clear-neighbors {
description
"Clearing of BGP neighbors is supported.";
}
feature clear-statistics {
description
"Clearing of BGP statistics is supported.";
}
/* /*
* Containers * Containers
*/ */
augment "/rt:routing/rt:control-plane-protocols/" augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol" { + "rt:control-plane-protocol" {
when "derived-from-or-self(rt:type, 'bgp')" { when "derived-from-or-self(rt:type, 'bgp')" {
description description
"This augmentation is valid for a routing protocol "This augmentation is valid for a routing protocol
skipping to change at page 19, line 42 skipping to change at page 20, line 39
} }
leaf internal { leaf internal {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description description
"Administrative distance for routes learned from "Administrative distance for routes learned from
internal BGP (iBGP)."; internal BGP (iBGP).";
} }
} }
container confederation { container confederation {
description description
"Configuration options specifying parameters when the "Configuration options specifying parameters when the
local router is within an autonomous system which is local router is within an autonomous system which is
part of a BGP confederation."; part of a BGP confederation.";
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"When this leaf is set to true it indicates that "When this leaf is set to true it indicates that
the local-AS is part of a BGP confederation"; the local-AS is part of a BGP confederation";
} }
leaf identifier { leaf identifier {
type inet:as-number; type inet:as-number;
description description
"Confederation identifier for the autonomous system."; "Confederation identifier for the autonomous system.";
} }
leaf-list member-as { leaf-list member-as {
type inet:as-number; type inet:as-number;
description description
"Remote autonomous systems that are to be treated "Remote autonomous systems that are to be treated
as part of the local confederation."; as part of the local confederation.";
} }
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating the graceful restart mechanism for "Parameters relating the graceful restart mechanism for
BGP"; BGP";
uses graceful-restart-config; uses graceful-restart-config;
} }
uses global-group-use-multiple-paths; uses global-group-use-multiple-paths;
uses route-selection-options; uses route-selection-options;
container afi-safis { container afi-safis {
description description
"List of address-families associated with the BGP "List of address-families associated with the BGP
instance"; instance";
list afi-safi { list afi-safi {
key "afi-safi-name"; key "afi-safi-name";
description description
"AFI,SAFI configuration available for the "AFI,SAFI configuration available for the
neighbour or group"; neighbour or group";
uses mp-afi-safi-config; uses mp-afi-safi-config;
uses state; uses state;
container graceful-restart { container graceful-restart {
if-feature graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
uses mp-afi-safi-graceful-restart-config; uses mp-afi-safi-graceful-restart-config;
} }
uses route-selection-options; uses route-selection-options;
uses global-group-use-multiple-paths; uses global-group-use-multiple-paths;
uses mp-all-afi-safi-list-contents; uses mp-all-afi-safi-list-contents;
} }
} }
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
uses state; uses state;
} }
container neighbors { container neighbors {
skipping to change at page 21, line 44 skipping to change at page 22, line 29
leaf local-port { leaf local-port {
type inet:port-number { type inet:port-number {
range "0..65535"; range "0..65535";
} }
config false; config false;
description description
"The local port for the TCP connection between "The local port for the TCP connection between
the BGP peers."; the BGP peers.";
} }
leaf peer-type {
type bt:peer-type;
config false;
description
"The type of peering session associated with this
neighbor.";
reference
"RFC 4271: A Border Gateway Protocol 4 (BGP-4)
Section 1.1 for iBGP and eBGP.
RFC 5065: Autonomous System Configuration
for Confederation internal and external.";
}
leaf peer-group { leaf peer-group {
type leafref { type leafref {
path "../../../peer-groups/peer-group/peer-group-name"; path "../../../peer-groups/peer-group/peer-group-name";
} }
description description
"The peer-group with which this neighbor is associated"; "The peer-group with which this neighbor is associated";
} }
leaf identifier { leaf identifier {
type yang:dotted-quad; type yang:dotted-quad;
skipping to change at page 23, line 11 skipping to change at page 24, line 9
A transition from 'true' to 'false' will cause A transition from 'true' to 'false' will cause
the BGP Manual Stop Event to be generated. the BGP Manual Stop Event to be generated.
This parameter can be used to restart BGP peer This parameter can be used to restart BGP peer
connections. Care should be used in providing connections. Care should be used in providing
write access to this object without adequate write access to this object without adequate
authentication."; authentication.";
reference reference
"RFC 4271, Section 8.1.2."; "RFC 4271, Section 8.1.2.";
} }
leaf secure-session-enable {
type boolean;
default "false";
description
"Does this session need to be secured?";
}
container secure-session {
when "../secure-session-enable = 'true'";
description
"Container for describing how a particular BGP session
is to be secured.";
choice option {
case ao {
uses tcp:ao;
leaf ao-keychain {
type kc:key-chain-ref;
description
"Reference to the key chain that will be used by
this model. Applicable for TCP-AO and TCP-MD5
only";
reference
"RFC 8177: YANG Key Chain.";
}
description
"Uses TCP-AO to secure the session. Parameters for
those are defined as a grouping in the TCP YANG
model.";
reference
"RFC 5925 - The TCP Authentication Option.";
}
case md5 {
uses tcp:md5;
leaf md5-keychain {
type kc:key-chain-ref;
description
"Reference to the key chain that will be used by
this model. Applicable for TCP-AO and TCP-MD5
only";
reference
"RFC 8177: YANG Key Chain.";
}
description
"Uses TCP-MD5 to secure the session. Parameters for
those are defined as a grouping in the TCP YANG
model.";
reference
"RFC 5925 - The TCP Authentication Option.";
}
case ipsec {
leaf sa {
type string;
description
"Security Association (SA) name.";
}
description
"Currently, the IPsec/IKE YANG model has no
grouping defined that this model can use. When
such a grouping is defined, this model can import
the grouping to add the key parameters
needed to kick of IKE.";
}
description
"Choice of authentication options.";
}
}
leaf ttl-security { leaf ttl-security {
if-feature "bt:ttl-security"; if-feature "bt:ttl-security";
type uint8; type uint8;
default "255"; default "255";
description description
"BGP Time To Live (TTL) security check."; "BGP Time To Live (TTL) security check.";
reference reference
"RFC 5082: The Genaralized TTL Security Mechanism "RFC 5082: The Genaralized TTL Security Mechanism
(GTSM), (GTSM),
RFC 7454: BGP Operations and Security."; RFC 7454: BGP Operations and Security.";
skipping to change at page 26, line 15 skipping to change at page 28, line 22
type boolean; type boolean;
default "false"; default "false";
description description
"Specify whether erroneous UPDATE messages for which "Specify whether erroneous UPDATE messages for which
the NLRI can be extracted are treated as though the the NLRI can be extracted are treated as though the
NLRI is withdrawn - avoiding session reset"; NLRI is withdrawn - avoiding session reset";
reference reference
"RFC 7606: Revised Error Handling for BGP UPDATE "RFC 7606: Revised Error Handling for BGP UPDATE
Messages."; Messages.";
} }
leaf erroneous-update-messages { leaf erroneous-update-messages {
type uint32; type uint32;
config false; config false;
description description
"The number of BGP UPDATE messages for which the "The number of BGP UPDATE messages for which the
treat-as-withdraw mechanism has been applied based on treat-as-withdraw mechanism has been applied based on
erroneous message contents"; erroneous message contents";
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating the graceful restart mechanism for "Parameters relating the graceful restart mechanism for
BGP"; BGP";
uses graceful-restart-config; uses graceful-restart-config;
leaf peer-restart-time { leaf peer-restart-time {
type uint16 { type uint16 {
range "0..4096"; range "0..4096";
} }
config false; config false;
description description
"The period of time (advertised by the peer) that the "The period of time (advertised by the peer) that the
peer expects a restart of a BGP session to take"; peer expects a restart of a BGP session to take";
} }
leaf peer-restarting { leaf peer-restarting {
type boolean; type boolean;
config false; config false;
description description
"This flag indicates whether the remote neighbor is "This flag indicates whether the remote neighbor is
currently in the process of restarting, and hence currently in the process of restarting, and hence
received routes are currently stale"; received routes are currently stale";
} }
leaf local-restarting { leaf local-restarting {
type boolean; type boolean;
skipping to change at page 28, line 10 skipping to change at page 30, line 7
uses structure-neighbor-group-as-path-options; uses structure-neighbor-group-as-path-options;
uses structure-neighbor-group-add-paths; uses structure-neighbor-group-add-paths;
uses bgp-neighbor-use-multiple-paths; uses bgp-neighbor-use-multiple-paths;
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
container afi-safis { container afi-safis {
description description
"Per-address-family configuration parameters associated "Per-address-family configuration parameters associated
with the neighbor"; with the neighbor";
uses bgp-neighbor-afi-safi-list; uses bgp-neighbor-afi-safi-list;
} }
container statistics { container statistics {
description
"Statistics per neighbor.";
leaf established-transitions { leaf established-transitions {
type yang:counter64; type yang:counter64;
config false; config false;
description description
"Number of transitions to the Established state for the "Number of transitions to the Established state for
neighbor session. This value is analogous to the the neighbor session. This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the standard bgpPeerFsmEstablishedTransitions object from the
BGP-4 MIB"; standard BGP-4 MIB";
reference reference
"RFC 4273 - Definitions of Managed Objects for BGP-4"; "RFC 4273 - Definitions of Managed Objects for BGP-4";
} }
leaf fsm-established-transitions { leaf fsm-established-transitions {
type yang:counter32; type yang:counter32;
config false; config false;
description description
"The total number of times the BGP FSM "The total number of times the BGP FSM
transitioned into the established state transitioned into the established state
for this peer."; for this peer.";
reference reference
"RFC 4271, Section 8."; "RFC 4271, Section 8.";
} }
container messages { container messages {
config false; config false;
description description
"Counters for BGP messages sent and received from the "Counters for BGP messages sent and received from the
neighbor"; neighbor";
leaf in-total-messages { leaf in-total-messages {
type yang:counter32; type yang:counter32;
config false; config false;
description description
"The total number of messages received "The total number of messages received
from the remote peer on this connection."; from the remote peer on this connection.";
reference reference
"RFC 4271, Section 4."; "RFC 4271, Section 4.";
} }
leaf out-total-messages { leaf out-total-messages {
type yang:counter32; type yang:counter32;
config false; config false;
description description
"The total number of messages transmitted to "The total number of messages transmitted to
the remote peer on this connection."; the remote peer on this connection.";
reference reference
"RFC 4271, Section 4."; "RFC 4271, Section 4.";
} }
leaf in-update-elapsed-time { leaf in-update-elapsed-time {
type yang:gauge32; type yang:gauge32;
units "seconds"; units "seconds";
config false; config false;
description description
"Elapsed time (in seconds) since the last BGP "Elapsed time (in seconds) since the last BGP
UPDATE message was received from the peer. UPDATE message was received from the peer.
Each time in-updates is incremented, Each time in-updates is incremented,
the value of this object is set to zero (0)."; the value of this object is set to zero (0).";
reference reference
"RFC 4271, Section 4.3. "RFC 4271, Section 4.3.
RFC 4271, Section 8.2.2, Established state."; RFC 4271, Section 8.2.2, Established state.";
} }
container sent { container sent {
description description
"Counters relating to BGP messages sent to the "Counters relating to BGP messages sent to the
neighbor"; neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
} }
container received { container received {
description description
"Counters for BGP messages received from the "Counters for BGP messages received from the
neighbor"; neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
} }
} }
container queues { container queues {
config false; config false;
description description
"Counters related to queued messages associated with "Counters related to queued messages associated with
the BGP neighbor"; the BGP neighbor";
leaf input { leaf input {
type uint32; type uint32;
description description
"The number of messages received from the peer "The number of messages received from the peer
currently queued"; currently queued";
} }
leaf output { leaf output {
type uint32; type uint32;
description description
"The number of messages queued to be sent to the "The number of messages queued to be sent to the
peer"; peer";
} }
} }
action clear {
if-feature "bt:clear-statistics";
description
"Clear statistics action command.";
container clear-statistics { input {
if-feature "clear-statistics"; leaf clear-at {
type yang:date-and-time;
action clear { description
input { "Time when the clear action needs to be
leaf clear-at { executed.";
type yang:date-and-time;
description
"Time when the clear action needs to be
executed.";
}
} }
}
output { output {
leaf clear-finished-at { leaf clear-finished-at {
type yang:date-and-time; type yang:date-and-time;
description description
"Time when the clear action command completed."; "Time when the clear action command completed.";
}
} }
} }
description
"Clear statistics action command.";
} }
description
"Statistics per neighbor.";
} }
} }
notification established { notification established {
description
"The established event is generated
when the BGP FSM enters the established state.";
leaf remote-address { leaf remote-address {
type leafref { type leafref {
path "../../neighbor/remote-address"; path "../../neighbor/remote-address";
} }
description description
"IP address of the neighbor that went into established "IP address of the neighbor that went into established
state."; state.";
} }
leaf last-error { leaf last-error {
type leafref { type leafref {
path "../../neighbor/last-error"; path "../../neighbor/last-error";
} }
description description
"The last error code and subcode seen by this "The last error code and subcode seen by this
peer on this connection. If no error has peer on this connection. If no error has
occurred, this field is zero. Otherwise, the occurred, this field is zero. Otherwise, the
first byte of this two byte OCTET STRING first byte of this two byte OCTET STRING
contains the error code, and the second byte contains the error code, and the second byte
skipping to change at page 31, line 25 skipping to change at page 32, line 49
description description
"The last error code and subcode seen by this "The last error code and subcode seen by this
peer on this connection. If no error has peer on this connection. If no error has
occurred, this field is zero. Otherwise, the occurred, this field is zero. Otherwise, the
first byte of this two byte OCTET STRING first byte of this two byte OCTET STRING
contains the error code, and the second byte contains the error code, and the second byte
contains the subcode."; contains the subcode.";
reference reference
"RFC 4271, Section 4.5."; "RFC 4271, Section 4.5.";
} }
leaf session-state { leaf session-state {
type leafref { type leafref {
path "../../neighbor/session-state"; path "../../neighbor/session-state";
} }
description description
"The BGP peer connection state."; "The BGP peer connection state.";
reference reference
"RFC 4271, Section 8.2.2."; "RFC 4271, Section 8.2.2.";
} }
description
"The established event is generated
when the BGP FSM enters the established state.";
} }
notification backward-transition { notification backward-transition {
description
"The backward-transition event is
generated when the BGP FSM moves from a higher
numbered state to a lower numbered state.";
leaf remote-addr { leaf remote-addr {
type leafref { type leafref {
path "../../neighbor/remote-address"; path "../../neighbor/remote-address";
} }
description description
"IP address of the neighbor that went away from "IP address of the neighbor that went away from
established state."; established state.";
} }
leaf last-error { leaf last-error {
type leafref { type leafref {
skipping to change at page 32, line 18 skipping to change at page 33, line 39
description description
"The last error code and subcode seen by this "The last error code and subcode seen by this
peer on this connection. If no error has peer on this connection. If no error has
occurred, this field is zero. Otherwise, the occurred, this field is zero. Otherwise, the
first byte of this two byte OCTET STRING first byte of this two byte OCTET STRING
contains the error code, and the second byte contains the error code, and the second byte
contains the subcode."; contains the subcode.";
reference reference
"RFC 4271, Section 4.5."; "RFC 4271, Section 4.5.";
} }
leaf session-state { leaf session-state {
type leafref { type leafref {
path "../../neighbor/session-state"; path "../../neighbor/session-state";
} }
description description
"The BGP peer connection state."; "The BGP peer connection state.";
reference reference
"RFC 4271, Section 8.2.2."; "RFC 4271, Section 8.2.2.";
} }
description
"The backward-transition event is
generated when the BGP FSM moves from a higher
numbered state to a lower numbered state.";
} }
action clear {
if-feature "bt:clear-neighbors";
description
"Clear neighbors action.";
container clear-neighbors { input {
if-feature "clear-neighbors"; leaf clear-at {
type yang:date-and-time;
action clear { description
input { "Time when the clear action command needs to be
leaf clear-at { executed.";
type yang:date-and-time;
description
"Time when the clear action command needs to be
executed.";
}
} }
}
output { output {
leaf clear-finished-at { leaf clear-finished-at {
type yang:date-and-time; type yang:date-and-time;
description description
"Time when the clear action command completed."; "Time when the clear action command completed.";
}
} }
} }
description
"Clear neighbors action.";
} }
} }
container peer-groups { container peer-groups {
description description
"Configuration for BGP peer-groups"; "Configuration for BGP peer-groups";
uses bgp-peer-group-list; uses bgp-peer-group-list;
} }
container interfaces { container interfaces {
list interface { list interface {
key "name"; key "name";
leaf name { leaf name {
type if:interface-ref; type if:interface-ref;
description description
"Reference to the interface within the routing instance."; "Reference to the interface within the routing instance.";
} }
container bfd { container bfd {
if-feature "bt:bfd"; if-feature "bt:bfd";
uses bfd:client-cfg-parms; uses bfd:client-cfg-parms;
description description
"BFD client configuration."; "BFD client configuration.";
reference reference
"RFC BBBB - YANG Data Model for Bidirectional Forwarding "RFC BBBB - YANG Data Model for Bidirectional Forwarding
Detection."; Detection.";
} }
description description
"List of interfaces within the routing instance."; "List of interfaces within the routing instance.";
} }
skipping to change at page 33, line 46 skipping to change at page 35, line 12
} }
description description
"Interface specific parameters."; "Interface specific parameters.";
} }
uses rib; uses rib;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-common@2020-02-24.yang"
submodule ietf-bgp-common { submodule ietf-bgp-common {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
reference reference
"RFC XXXX: BGP Model for Service Provider Network."; "RFC XXXX: BGP Model for Service Provider Network.";
} }
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
skipping to change at page 34, line 25 skipping to change at page 35, line 37
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com, Susan Hares (shares at ndzh.com,
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This sub-module contains common groupings that are common across "This sub-module contains common groupings that are common across
multiple contexts within the BGP module. That is to say that multiple contexts within the BGP module. That is to say that
they may be application to a subset of global, peer-group or they may be application to a subset of global, peer-group or
neighbor contexts."; neighbor contexts.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP Model for Service Provider Network."; "RFC XXXX, BGP Model for Service Provider Network.";
} }
/*
* Features.
*/
feature damping {
description
"Weighted route dampening is supported.";
}
grouping neighbor-group-timers-config { grouping neighbor-group-timers-config {
description description
"Config parameters related to timers associated with the BGP "Config parameters related to timers associated with the BGP
peer"; peer";
leaf connect-retry-interval { leaf connect-retry-interval {
type uint16 { type uint16 {
range "1..max"; range "1..max";
} }
units "seconds"; units "seconds";
default "120"; default "120";
description description
"Time interval (in seconds) for the ConnectRetryTimer. The "Time interval (in seconds) for the ConnectRetryTimer. The
suggested value for this timer is 120 seconds."; suggested value for this timer is 120 seconds.";
reference reference
skipping to change at page 37, line 24 skipping to change at page 38, line 42
seconds for IBGP connections."; seconds for IBGP connections.";
reference reference
"RFC 4271, Section 9.2.1.1. "RFC 4271, Section 9.2.1.1.
RFC 4271, Section 10."; RFC 4271, Section 10.";
} }
} }
grouping neighbor-group-config { grouping neighbor-group-config {
description description
"Neighbor level configuration items."; "Neighbor level configuration items.";
leaf remote-as { leaf remote-as {
type inet:as-number; type inet:as-number;
description description
"The remote autonomous system number received in "The remote autonomous system number received in
the BGP OPEN message."; the BGP OPEN message.";
reference reference
"RFC 4271, Section 4.2."; "RFC 4271, Section 4.2.";
} }
leaf peer-as { leaf peer-as {
type inet:as-number; type inet:as-number;
description description
"AS number of the peer."; "AS number of the peer.";
} }
leaf local-as { leaf local-as {
type inet:as-number; type inet:as-number;
description description
"The local autonomous system number that is to be used when "The local autonomous system number that is to be used when
establishing sessions with the remote peer or peer group, if establishing sessions with the remote peer or peer group, if
this differs from the global BGP router autonomous system this differs from the global BGP router autonomous system
number."; number.";
} }
leaf peer-type {
type bt:peer-type;
description
"Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP).";
}
leaf remove-private-as { leaf remove-private-as {
// could also make this a container with a flag to enable // could also make this a container with a flag to enable
// remove-private and separate option. here, option implies // remove-private and separate option. here, option implies
// remove-private is enabled. // remove-private is enabled.
type bt:remove-private-as-option; type bt:remove-private-as-option;
description description
"Remove private AS numbers from updates sent to peers - when "Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged"; sent to the peer unchanged";
} }
skipping to change at page 38, line 18 skipping to change at page 39, line 26
leaf remove-private-as { leaf remove-private-as {
// could also make this a container with a flag to enable // could also make this a container with a flag to enable
// remove-private and separate option. here, option implies // remove-private and separate option. here, option implies
// remove-private is enabled. // remove-private is enabled.
type bt:remove-private-as-option; type bt:remove-private-as-option;
description description
"Remove private AS numbers from updates sent to peers - when "Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged"; sent to the peer unchanged";
} }
container route-flap-damping { container route-flap-damping {
if-feature damping; if-feature "bt:damping";
leaf enable { leaf enable {
type boolean; type boolean;
default false; default "false";
description description
"Enable route flap damping."; "Enable route flap damping.";
} }
leaf suppress-above { leaf suppress-above {
type decimal64 { type decimal64 {
fraction-digits 1; fraction-digits 1;
} }
default "3.0"; default "3.0";
description description
"This is the value of the instability metric at which "This is the value of the instability metric at which
route suppression takes place. A route is not installed route suppression takes place. A route is not installed
in the forwarding information base (FIB), or announced in the forwarding information base (FIB), or announced
even if it is reachable during the period that it is even if it is reachable during the period that it is
skipping to change at page 39, line 4 skipping to change at page 40, line 8
leaf reuse-above { leaf reuse-above {
type decimal64 { type decimal64 {
fraction-digits 1; fraction-digits 1;
} }
default "2.0"; default "2.0";
description description
"This is the value of the instability metric at which a "This is the value of the instability metric at which a
suppressed route becomes unsuppressed if it is reachable suppressed route becomes unsuppressed if it is reachable
but currently suppressed. The value assigned to but currently suppressed. The value assigned to
reuse-below must be less than suppress-above."; reuse-below must be less than suppress-above.";
} }
leaf max-flap { leaf max-flap {
type decimal64 { type decimal64 {
fraction-digits 1; fraction-digits 1;
} }
default "16.0"; default "16.0";
description description
"This is the upper limit of the instability metric. This "This is the upper limit of the instability metric. This
value must be greater than the larger of 1 and value must be greater than the larger of 1 and
suppress-above."; suppress-above.";
} }
leaf reach-decay { leaf reach-decay {
type yang:gauge32; type yang:gauge32;
units "seconds"; units "seconds";
default "300"; default "300";
description description
"This value specifies the time desired for the instability "This value specifies the time desired for the instability
metric value to reach one-half of its current value when metric value to reach one-half of its current value when
the route is reachable. This half-life value determines the route is reachable. This half-life value determines
the rate at which the metric value is decayed. A smaller the rate at which the metric value is decayed. A smaller
half-life value makes a suppressed route reusable sooner half-life value makes a suppressed route reusable sooner
skipping to change at page 40, line 29 skipping to change at page 41, line 27
description description
"An optional textual description (intended primarily for use "An optional textual description (intended primarily for use
with a peer or group"; with a peer or group";
} }
} }
grouping neighbor-group-transport-config { grouping neighbor-group-transport-config {
description description
"Configuration parameters relating to the transport protocol "Configuration parameters relating to the transport protocol
used by the BGP session to the peer"; used by the BGP session to the peer";
leaf tcp-mss { leaf tcp-mss {
type uint16; type uint16;
description description
"Sets the max segment size for BGP TCP sessions."; "Sets the max segment size for BGP TCP sessions.";
} }
leaf mtu-discovery { leaf mtu-discovery {
type boolean; type boolean;
default false; default "false";
description description
"Turns path mtu discovery for BGP TCP sessions on (true) or "Turns path mtu discovery for BGP TCP sessions on (true) or
off (false)"; off (false)";
} }
leaf passive-mode { leaf passive-mode {
type boolean; type boolean;
default false; default "false";
description description
"Wait for peers to issue requests to open a BGP session, "Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router."; rather than initiating sessions from the local router.";
} }
leaf local-address { leaf local-address {
type union { type union {
type inet:ip-address; type inet:ip-address;
type leafref { type leafref {
path "../../../../interfaces/interface/name"; path "../../../../interfaces/interface/name";
} }
skipping to change at page 41, line 32 skipping to change at page 42, line 26
type string; type string;
description description
"Configures an MD5 authentication password for use with "Configures an MD5 authentication password for use with
neighboring devices."; neighboring devices.";
} }
} }
grouping graceful-restart-config { grouping graceful-restart-config {
description description
"Configuration parameters relating to BGP graceful restart."; "Configuration parameters relating to BGP graceful restart.";
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"Enable or disable the graceful-restart capability."; "Enable or disable the graceful-restart capability.";
} }
leaf restart-time { leaf restart-time {
type uint16 { type uint16 {
range 0..4096; range "0..4096";
} }
description description
"Estimated time (in seconds) for the local BGP speaker to "Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful restart a session. This value is advertise in the graceful
restart BGP capability. This is a 12-bit value, referred to restart BGP capability. This is a 12-bit value, referred to
as Restart Time in RFC4724. Per RFC4724, the suggested as Restart Time in RFC4724. Per RFC4724, the suggested
default value is <= the hold-time value."; default value is <= the hold-time value.";
reference reference
"RFC 4724: Graceful Restart Mechanism for BGP."; "RFC 4724: Graceful Restart Mechanism for BGP.";
} }
skipping to change at page 42, line 17 skipping to change at page 43, line 8
"An upper-bound on the time that stale routes will be "An upper-bound on the time that stale routes will be
retained by a router after a session is restarted. If an retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724"; Selection_Deferral_Timer in RFC4724";
reference reference
"RFC 4724: Graceful Restart Mechanism for BGP."; "RFC 4724: Graceful Restart Mechanism for BGP.";
} }
leaf helper-only { leaf helper-only {
type boolean; type boolean;
default true; default "true";
description description
"Enable graceful-restart in helper mode only. When this leaf "Enable graceful-restart in helper mode only. When this leaf
is set, the local system does not retain forwarding its own is set, the local system does not retain forwarding its own
state during a restart, but supports procedures for the state during a restart, but supports procedures for the
receiving speaker, as defined in RFC4724."; receiving speaker, as defined in RFC4724.";
reference reference
"RFC 4724: Graceful Restart Mechanism for BGP."; "RFC 4724: Graceful Restart Mechanism for BGP.";
} }
} }
skipping to change at page 42, line 36 skipping to change at page 43, line 26
reference reference
"RFC 4724: Graceful Restart Mechanism for BGP."; "RFC 4724: Graceful Restart Mechanism for BGP.";
} }
} }
grouping global-group-use-multiple-paths { grouping global-group-use-multiple-paths {
description description
"Common grouping used for both global and groups which provides "Common grouping used for both global and groups which provides
configuration and state parameters relating to use of multiple configuration and state parameters relating to use of multiple
paths"; paths";
container use-multiple-paths { container use-multiple-paths {
description description
"Parameters related to the use of multiple paths for the "Parameters related to the use of multiple paths for the
same NLRI"; same NLRI";
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default "false";
description description
"Whether the use of multiple paths for the same NLRI is "Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by any enabled for the neighbor. This value is overridden by any
more specific configuration value."; more specific configuration value.";
} }
container ebgp { container ebgp {
description description
"Multi-Path parameters for eBGP"; "Multi-Path parameters for eBGP";
leaf allow-multiple-as { leaf allow-multiple-as {
type boolean; type boolean;
default "false"; default "false";
description description
"Allow multi-path to use paths from different neighboring "Allow multi-path to use paths from different neighboring
ASes. The default is to only consider multiple paths ASes. The default is to only consider multiple paths
from the same neighboring AS."; from the same neighboring AS.";
} }
leaf maximum-paths { leaf maximum-paths {
type uint32; type uint32;
default 1; default "1";
description description
"Maximum number of parallel paths to consider when using "Maximum number of parallel paths to consider when using
BGP multi-path. The default is use a single path."; BGP multi-path. The default is use a single path.";
} }
} }
container ibgp { container ibgp {
description description
"Multi-Path parameters for iBGP"; "Multi-Path parameters for iBGP";
leaf maximum-paths { leaf maximum-paths {
type uint32; type uint32;
default 1; default "1";
description description
"Maximum number of parallel paths to consider when using "Maximum number of parallel paths to consider when using
iBGP multi-path. The default is to use a single path"; iBGP multi-path. The default is to use a single path";
} }
} }
} }
} }
grouping route-selection-options { grouping route-selection-options {
description description
skipping to change at page 43, line 43 skipping to change at page 44, line 26
"Maximum number of parallel paths to consider when using "Maximum number of parallel paths to consider when using
iBGP multi-path. The default is to use a single path"; iBGP multi-path. The default is to use a single path";
} }
} }
} }
} }
grouping route-selection-options { grouping route-selection-options {
description description
"Configuration and state relating to route selection options"; "Configuration and state relating to route selection options";
container route-selection-options { container route-selection-options {
description description
"Parameters relating to options for route selection"; "Parameters relating to options for route selection";
leaf always-compare-med { leaf always-compare-med {
type boolean; type boolean;
default "false"; default "false";
description description
"Compare multi-exit discriminator (MED) value from "Compare multi-exit discriminator (MED) value from
different ASes when selecting the best route. The default different ASes when selecting the best route. The default
behavior is to only compare MEDs for paths received from behavior is to only compare MEDs for paths received from
the same AS."; the same AS.";
} }
leaf ignore-as-path-length { leaf ignore-as-path-length {
type boolean; type boolean;
default "false"; default "false";
description description
"Ignore the AS path length when selecting the best path. "Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths The default is to use the AS path length and prefer paths
with shorter length."; with shorter length.";
} }
leaf external-compare-router-id { leaf external-compare-router-id {
type boolean; type boolean;
default "true"; default "true";
description description
"When comparing similar routes received from external BGP "When comparing similar routes received from external BGP
peers, use the router-id as a criterion to select the peers, use the router-id as a criterion to select the
active path."; active path.";
} }
leaf advertise-inactive-routes { leaf advertise-inactive-routes {
type boolean; type boolean;
default "false"; default "false";
description description
"Advertise inactive routes to external peers. The default "Advertise inactive routes to external peers. The default
is to only advertise active routes."; is to only advertise active routes.";
reference reference
"I-D.ietf-idr-best-external: Advertisement of the best "I-D.ietf-idr-best-external: Advertisement of the best
external route in BGP."; external route in BGP.";
} }
leaf enable-aigp { leaf enable-aigp {
type boolean; type boolean;
default false; default "false";
description description
"Flag to enable sending / receiving accumulated IGP "Flag to enable sending / receiving accumulated IGP
attribute in routing updates"; attribute in routing updates";
reference reference
"RFC 7311: AIGP Metric Attribute for BGP."; "RFC 7311: AIGP Metric Attribute for BGP.";
} }
leaf ignore-next-hop-igp-metric { leaf ignore-next-hop-igp-metric {
type boolean; type boolean;
default "false"; default "false";
description description
"Ignore the IGP metric to the next-hop when calculating BGP "Ignore the IGP metric to the next-hop when calculating BGP
best-path. The default is to select the route for which best-path. The default is to select the route for which
the metric to the next-hop is lowest"; the metric to the next-hop is lowest";
} }
leaf enable-med { leaf enable-med {
type boolean; type boolean;
default false; default "false";
description description
"Flag to enable sending/receiving of MED metric attribute "Flag to enable sending/receiving of MED metric attribute
in routing updates."; in routing updates.";
} }
} }
} }
grouping state { grouping state {
description description
"Grouping containing common counters relating to prefixes and "Grouping containing common counters relating to prefixes and
paths"; paths";
leaf total-paths { leaf total-paths {
type uint32; type uint32;
config false; config false;
description description
"Total number of BGP paths within the context"; "Total number of BGP paths within the context";
}
}
leaf total-prefixes { leaf total-prefixes {
type uint32; type uint32;
config false; config false;
description description
"Total number of BGP prefixes received within the context"; "Total number of BGP prefixes received within the context";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common-multiprotocol@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-common-multiprotocol@2020-02-24.yang"
submodule ietf-bgp-common-multiprotocol { submodule ietf-bgp-common-multiprotocol {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
} }
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
} }
include ietf-bgp-common; include ietf-bgp-common;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"This sub-module contains groupings that are related to support "This sub-module contains groupings that are related to support
for multiple protocols in BGP. The groupings are common across for multiple protocols in BGP. The groupings are common across
multiple contexts."; multiple contexts.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping mp-afi-safi-graceful-restart-config { grouping mp-afi-safi-graceful-restart-config {
description description
"BGP graceful restart parameters that apply on a per-AFI-SAFI "BGP graceful restart parameters that apply on a per-AFI-SAFI
basis"; basis";
skipping to change at page 46, line 40 skipping to change at page 47, line 30
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping mp-afi-safi-graceful-restart-config { grouping mp-afi-safi-graceful-restart-config {
description description
"BGP graceful restart parameters that apply on a per-AFI-SAFI "BGP graceful restart parameters that apply on a per-AFI-SAFI
basis"; basis";
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default "false";
description description
"This leaf indicates whether graceful-restart is enabled for "This leaf indicates whether graceful-restart is enabled for
this AFI-SAFI"; this AFI-SAFI";
} }
} }
grouping mp-afi-safi-config { grouping mp-afi-safi-config {
description description
"Configuration parameters used for all BGP AFI-SAFIs"; "Configuration parameters used for all BGP AFI-SAFIs";
leaf afi-safi-name { leaf afi-safi-name {
type identityref { type identityref {
base "bt:afi-safi-type"; base bt:afi-safi-type;
} }
description "AFI,SAFI"; description
"AFI,SAFI";
} }
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default "false";
description description
"This leaf indicates whether the IPv4 Unicast AFI,SAFI is "This leaf indicates whether the IPv4 Unicast AFI,SAFI is
enabled for the neighbour or group"; enabled for the neighbour or group";
} }
} }
grouping mp-all-afi-safi-list-contents { grouping mp-all-afi-safi-list-contents {
description description
"A common grouping used for contents of the list that is used "A common grouping used for contents of the list that is used
for AFI-SAFI entries"; for AFI-SAFI entries";
// import and export policy included for the afi/safi // import and export policy included for the afi/safi
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
container ipv4-unicast { container ipv4-unicast {
when "../afi-safi-name = 'bt:ipv4-unicast'" { when "../afi-safi-name = 'bt:ipv4-unicast'" {
description description
"Include this container for IPv4 Unicast specific "Include this container for IPv4 Unicast specific
configuration"; configuration";
} }
description description
"IPv4 unicast configuration options"; "IPv4 unicast configuration options";
// include common IPv[46] unicast options // include common IPv[46] unicast options
uses mp-ipv4-ipv6-unicast-common; uses mp-ipv4-ipv6-unicast-common;
// placeholder for IPv4 unicast specific configuration // placeholder for IPv4 unicast specific configuration
} }
container ipv6-unicast { container ipv6-unicast {
when "../afi-safi-name = 'bt:ipv6-unicast'" { when "../afi-safi-name = 'bt:ipv6-unicast'" {
description description
"Include this container for IPv6 Unicast specific "Include this container for IPv6 Unicast specific
configuration"; configuration";
} }
description description
"IPv6 unicast configuration options"; "IPv6 unicast configuration options";
// include common IPv[46] unicast options // include common IPv[46] unicast options
uses mp-ipv4-ipv6-unicast-common; uses mp-ipv4-ipv6-unicast-common;
// placeholder for IPv6 unicast specific configuration // placeholder for IPv6 unicast specific configuration
// options // options
} }
container ipv4-labeled-unicast { container ipv4-labeled-unicast {
when "../afi-safi-name = 'bt:ipv4-labeled-unicast'" { when "../afi-safi-name = 'bt:ipv4-labeled-unicast'" {
description description
"Include this container for IPv4 Labeled Unicast specific "Include this container for IPv4 Labeled Unicast specific
configuration"; configuration";
} }
description description
"IPv4 Labeled Unicast configuration options"; "IPv4 Labeled Unicast configuration options";
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
// placeholder for IPv4 Labeled Unicast specific config // placeholder for IPv4 Labeled Unicast specific config
// options // options
}
}
container ipv6-labeled-unicast { container ipv6-labeled-unicast {
when "../afi-safi-name = 'bt:ipv6-labeled-unicast'" { when "../afi-safi-name = 'bt:ipv6-labeled-unicast'" {
description description
"Include this container for IPv6 Labeled Unicast specific "Include this container for IPv6 Labeled Unicast specific
configuration"; configuration";
} }
description description
"IPv6 Labeled Unicast configuration options"; "IPv6 Labeled Unicast configuration options";
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
// placeholder for IPv6 Labeled Unicast specific config // placeholder for IPv6 Labeled Unicast specific config
// options. // options.
} }
container l3vpn-ipv4-unicast { container l3vpn-ipv4-unicast {
when "../afi-safi-name = 'bt:l3vpn-ipv4-unicast'" { when "../afi-safi-name = 'bt:l3vpn-ipv4-unicast'" {
description description
"Include this container for IPv4 Unicast L3VPN specific "Include this container for IPv4 Unicast L3VPN specific
configuration"; configuration";
} }
description description
"Unicast IPv4 L3VPN configuration options"; "Unicast IPv4 L3VPN configuration options";
// include common L3VPN configuration options // include common L3VPN configuration options
uses mp-l3vpn-ipv4-ipv6-unicast-common; uses mp-l3vpn-ipv4-ipv6-unicast-common;
// placeholder for IPv4 Unicast L3VPN specific config options. // placeholder for IPv4 Unicast L3VPN specific config options.
} }
container l3vpn-ipv6-unicast { container l3vpn-ipv6-unicast {
when "../afi-safi-name = 'bt:l3vpn-ipv6-unicast'" { when "../afi-safi-name = 'bt:l3vpn-ipv6-unicast'" {
description description
"Include this container for unicast IPv6 L3VPN specific "Include this container for unicast IPv6 L3VPN specific
configuration"; configuration";
} }
description description
"Unicast IPv6 L3VPN configuration options"; "Unicast IPv6 L3VPN configuration options";
// include common L3VPN configuration options // include common L3VPN configuration options
uses mp-l3vpn-ipv4-ipv6-unicast-common; uses mp-l3vpn-ipv4-ipv6-unicast-common;
// placeholder for IPv6 Unicast L3VPN specific configuration // placeholder for IPv6 Unicast L3VPN specific configuration
// options // options
} }
container l3vpn-ipv4-multicast { container l3vpn-ipv4-multicast {
when "../afi-safi-name = 'bt:l3vpn-ipv4-multicast'" { when "../afi-safi-name = 'bt:l3vpn-ipv4-multicast'" {
description description
"Include this container for multicast IPv6 L3VPN specific "Include this container for multicast IPv6 L3VPN specific
configuration"; configuration";
} }
description description
"Multicast IPv4 L3VPN configuration options"; "Multicast IPv4 L3VPN configuration options";
// include common L3VPN multicast options // include common L3VPN multicast options
uses mp-l3vpn-ipv4-ipv6-multicast-common; uses mp-l3vpn-ipv4-ipv6-multicast-common;
// placeholder for IPv4 Multicast L3VPN specific configuration // placeholder for IPv4 Multicast L3VPN specific configuration
// options // options
} }
container l3vpn-ipv6-multicast { container l3vpn-ipv6-multicast {
when "../afi-safi-name = 'bt:l3vpn-ipv6-multicast'" { when "../afi-safi-name = 'bt:l3vpn-ipv6-multicast'" {
description description
"Include this container for multicast IPv6 L3VPN specific "Include this container for multicast IPv6 L3VPN specific
configuration"; configuration";
} }
description description
"Multicast IPv6 L3VPN configuration options"; "Multicast IPv6 L3VPN configuration options";
// include common L3VPN multicast options // include common L3VPN multicast options
uses mp-l3vpn-ipv4-ipv6-multicast-common; uses mp-l3vpn-ipv4-ipv6-multicast-common;
// placeholder for IPv6 Multicast L3VPN specific configuration // placeholder for IPv6 Multicast L3VPN specific configuration
// options // options
} }
container l2vpn-vpls { container l2vpn-vpls {
when "../afi-safi-name = 'bt:l2vpn-vpls'" { when "../afi-safi-name = 'bt:l2vpn-vpls'" {
description description
"Include this container for BGP-signalled VPLS specific "Include this container for BGP-signalled VPLS specific
configuration"; configuration";
} }
description description
"BGP-signalled VPLS configuration options"; "BGP-signalled VPLS configuration options";
// include common L2VPN options // include common L2VPN options
uses mp-l2vpn-common; uses mp-l2vpn-common;
// placeholder for BGP-signalled VPLS specific configuration // placeholder for BGP-signalled VPLS specific configuration
// options // options
} }
container l2vpn-evpn { container l2vpn-evpn {
when "../afi-safi-name = 'bt:l2vpn-evpn'" { when "../afi-safi-name = 'bt:l2vpn-evpn'" {
description description
"Include this container for BGP EVPN specific "Include this container for BGP EVPN specific
configuration"; configuration";
} }
description description
"BGP EVPN configuration options"; "BGP EVPN configuration options";
// include common L2VPN options // include common L2VPN options
uses mp-l2vpn-common; uses mp-l2vpn-common;
// placeholder for BGP EVPN specific configuration options // placeholder for BGP EVPN specific configuration options
} }
} }
// Common groupings across multiple AFI,SAFIs // Common groupings across multiple AFI,SAFIs
grouping mp-all-afi-safi-common { grouping mp-all-afi-safi-common {
description description
"Grouping for configuration common to all AFI,SAFI"; "Grouping for configuration common to all AFI,SAFI";
container prefix-limit { container prefix-limit {
description description
"Parameters relating to the prefix limit for the AFI-SAFI"; "Parameters relating to the prefix limit for the AFI-SAFI";
leaf max-prefixes { leaf max-prefixes {
type uint32; type uint32;
description description
skipping to change at page 51, line 37 skipping to change at page 51, line 35
"Time interval in seconds after which the BGP session is "Time interval in seconds after which the BGP session is
re-established after being torn down due to exceeding the re-established after being torn down due to exceeding the
max-prefix limit."; max-prefix limit.";
} }
} }
} }
grouping mp-ipv4-ipv6-unicast-common { grouping mp-ipv4-ipv6-unicast-common {
description description
"Common configuration that is applicable for IPv4 and IPv6 "Common configuration that is applicable for IPv4 and IPv6
unicast"; unicast";
// include common afi-safi options. // include common afi-safi options.
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
// configuration options that are specific to IPv[46] unicast // configuration options that are specific to IPv[46] unicast
leaf send-default-route { leaf send-default-route {
type boolean; type boolean;
default "false"; default "false";
description description
"If set to true, send the default-route to the neighbour(s)"; "If set to true, send the default-route to the neighbour(s)";
} }
} }
grouping mp-l3vpn-ipv4-ipv6-unicast-common { grouping mp-l3vpn-ipv4-ipv6-unicast-common {
skipping to change at page 52, line 7 skipping to change at page 51, line 51
default "false"; default "false";
description description
"If set to true, send the default-route to the neighbour(s)"; "If set to true, send the default-route to the neighbour(s)";
} }
} }
grouping mp-l3vpn-ipv4-ipv6-unicast-common { grouping mp-l3vpn-ipv4-ipv6-unicast-common {
description description
"Common configuration applied across L3VPN for IPv4 "Common configuration applied across L3VPN for IPv4
and IPv6"; and IPv6";
// placeholder -- specific configuration options that are generic // placeholder -- specific configuration options that are generic
// across IPv[46] unicast address families. // across IPv[46] unicast address families.
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
} }
grouping mp-l3vpn-ipv4-ipv6-multicast-common { grouping mp-l3vpn-ipv4-ipv6-multicast-common {
description description
"Common configuration applied across L3VPN for IPv4 "Common configuration applied across L3VPN for IPv4
and IPv6"; and IPv6";
// placeholder -- specific configuration options that are // placeholder -- specific configuration options that are
// generic across IPv[46] multicast address families. // generic across IPv[46] multicast address families.
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
} }
grouping mp-l2vpn-common { grouping mp-l2vpn-common {
description description
"Common configuration applied across L2VPN address "Common configuration applied across L2VPN address
families"; families";
// placeholder -- specific configuration options that are // placeholder -- specific configuration options that are
// generic across L2VPN address families // generic across L2VPN address families
uses mp-all-afi-safi-common; uses mp-all-afi-safi-common;
} }
// Config groupings for common groups // Config groupings for common groups
grouping mp-all-afi-safi-common-prefix-limit-config { grouping mp-all-afi-safi-common-prefix-limit-config {
description description
"Configuration parameters relating to prefix-limits for an "Configuration parameters relating to prefix-limits for an
AFI-SAFI"; AFI-SAFI";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common-structure@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-common-structure@2020-02-24.yang"
submodule ietf-bgp-common-structure { submodule ietf-bgp-common-structure {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
} }
import ietf-bgp-types { prefix bt; } import ietf-routing-policy {
import ietf-routing-policy { prefix rpol; } prefix rpol;
reference
"RFC ZZZZ, A YANG Data Model for Routing Policy Management";
}
import ietf-bgp-types {
prefix bt;
reference
"RFC XXXX, BGP YANG Model for Service Provider Network.";
}
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
include ietf-bgp-common; include ietf-bgp-common;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This sub-module contains groupings that are common across "This sub-module contains groupings that are common across
multiple BGP contexts and provide structure around other multiple BGP contexts and provide structure around other
primitive groupings."; primitive groupings.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping structure-neighbor-group-logging-options { grouping structure-neighbor-group-logging-options {
description description
"Structural grouping used to include error handling "Structural grouping used to include error handling
configuration and state for both BGP neighbors and groups"; configuration and state for both BGP neighbors and groups";
container logging-options { container logging-options {
description description
"Logging options for events related to the BGP neighbor or "Logging options for events related to the BGP neighbor or
group"; group";
leaf log-neighbor-state-changes { leaf log-neighbor-state-changes {
type boolean; type boolean;
default "true"; default "true";
description description
"Configure logging of peer state changes. Default is to "Configure logging of peer state changes. Default is to
enable logging of peer state changes. enable logging of peer state changes.
Note: Documenting out of ESTABLISHED state is desirable, Note: Documenting out of ESTABLISHED state is desirable,
but documenting all backward transitions is but documenting all backward transitions is
problematic, and should be avoided."; problematic, and should be avoided.";
skipping to change at page 55, line 13 skipping to change at page 55, line 24
leaf route-reflector-cluster-id { leaf route-reflector-cluster-id {
when "../route-reflector-client = 'false'"; when "../route-reflector-client = 'false'";
type bt:rr-cluster-id-type; type bt:rr-cluster-id-type;
description description
"Route Reflector cluster id to use when local router is "Route Reflector cluster id to use when local router is
configured as a route reflector. Commonly set at the configured as a route reflector. Commonly set at the
group level, but allows a different cluster id to be set group level, but allows a different cluster id to be set
for each neighbor."; for each neighbor.";
reference reference
"RFC 4456: BGP Route Reflection: An Alternative to "RFC 4456: BGP Route Reflection: An Alternative to
Full Mesh."; Full Mesh.";
} }
leaf no-client-reflect { leaf no-client-reflect {
type boolean; type boolean;
default "false"; default "false";
description description
"When set to 'true', this disables route redistribution "When set to 'true', this disables route redistribution
by the Route Reflector. It is set 'true' when the client is by the Route Reflector. It is set 'true' when the client is
fully meshed to prevent sending of redundant route fully meshed to prevent sending of redundant route
advertisements."; advertisements.";
reference reference
"TODO: Add reference when IETF writes a draft describing "TODO: Add reference when IETF writes a draft describing
skipping to change at page 55, line 26 skipping to change at page 55, line 36
leaf no-client-reflect { leaf no-client-reflect {
type boolean; type boolean;
default "false"; default "false";
description description
"When set to 'true', this disables route redistribution "When set to 'true', this disables route redistribution
by the Route Reflector. It is set 'true' when the client is by the Route Reflector. It is set 'true' when the client is
fully meshed to prevent sending of redundant route fully meshed to prevent sending of redundant route
advertisements."; advertisements.";
reference reference
"TODO: Add reference when IETF writes a draft describing "TODO: Add reference when IETF writes a draft describing
this."; this.";
} }
leaf route-reflector-client { leaf route-reflector-client {
type boolean; type boolean;
default "false"; default "false";
description description
"Configure the neighbor as a route reflector client."; "Configure the neighbor as a route reflector client.";
reference reference
"RFC 4456: BGP Route Reflection: An Alternative to "RFC 4456: BGP Route Reflection: An Alternative to
Full Mesh."; Full Mesh.";
} }
} }
} }
grouping structure-neighbor-group-as-path-options { grouping structure-neighbor-group-as-path-options {
description description
"Structural grouping used to include AS_PATH manipulation "Structural grouping used to include AS_PATH manipulation
configuration and state for both BGP neighbors and peer configuration and state for both BGP neighbors and peer
groups"; groups";
container as-path-options { container as-path-options {
description description
"AS_PATH manipulation parameters for the BGP neighbor or "AS_PATH manipulation parameters for the BGP neighbor or
group"; group";
leaf allow-own-as { leaf allow-own-as {
type uint8; type uint8;
default 0; default "0";
description description
"Specify the number of occurrences of the local BGP "Specify the number of occurrences of the local BGP
speaker's AS that can occur within the AS_PATH before it speaker's AS that can occur within the AS_PATH before it
is rejected."; is rejected.";
} }
leaf replace-peer-as { leaf replace-peer-as {
type boolean; type boolean;
default "false"; default "false";
description description
"Replace occurrences of the peer's AS in the AS_PATH with "Replace occurrences of the peer's AS in the AS_PATH with
the local autonomous system number"; the local autonomous system number";
} }
} }
} }
skipping to change at page 56, line 28 skipping to change at page 56, line 33
"Replace occurrences of the peer's AS in the AS_PATH with "Replace occurrences of the peer's AS in the AS_PATH with
the local autonomous system number"; the local autonomous system number";
} }
} }
} }
grouping structure-neighbor-group-add-paths { grouping structure-neighbor-group-add-paths {
description description
"Structural grouping used to include ADD-PATHs configuration "Structural grouping used to include ADD-PATHs configuration
and state for both BGP neighbors and peer groups"; and state for both BGP neighbors and peer groups";
container add-paths { container add-paths {
if-feature "bt:add-paths";
description description
"Parameters relating to the advertisement and receipt of "Parameters relating to the advertisement and receipt of
multiple paths for a single NLRI (add-paths)"; multiple paths for a single NLRI (add-paths)";
reference reference
"RFC 7911: ADD-PATH."; "RFC 7911: Advertisements of Multiple Paths in BGP.";
leaf receive { leaf receive {
type boolean; type boolean;
default false; default "false";
description description
"Enable ability to receive multiple path advertisements for "Enable ability to receive multiple path advertisements for
an NLRI from the neighbor or group"; an NLRI from the neighbor or group";
} }
choice send { choice send {
default "all"; default "all";
description description
"Choice of sending the max. number of paths or to send all."; "Choice of sending the max. number of paths or to send all.";
case max { case max {
leaf max { leaf max {
type uint8; type uint8;
description description
"The maximum number of paths to advertise to neighbors "The maximum number of paths to advertise to neighbors
for a single NLRI"; for a single NLRI";
} }
} }
case all { case all {
leaf all { leaf all {
type empty; type empty;
description description
"Send all the path advertisements to neighbors for a "Send all the path advertisements to neighbors for a
single NLRI."; single NLRI.";
} }
} }
} }
leaf eligible-prefix-policy { leaf eligible-prefix-policy {
type leafref { type leafref {
path "/rpol:routing-policy/rpol:policy-definitions/" + path "/rpol:routing-policy/rpol:policy-definitions/"
"rpol:policy-definition/rpol:name"; + "rpol:policy-definition/rpol:name";
} }
description description
"A reference to a routing policy which can be used to "A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled"; restrict the prefixes for which add-paths is enabled";
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-peer-group@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-peer-group@2020-02-24.yang"
submodule ietf-bgp-peer-group { submodule ietf-bgp-peer-group {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
} }
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
} }
import ietf-bgp-types {
prefix bt;
reference
"RFC XXXX, BGP Model for Service Provider Network.";
}
// Include the common submodule // Include the common submodule
include ietf-bgp-common; include ietf-bgp-common;
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
include ietf-bgp-common-structure; include ietf-bgp-common-structure;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This sub-module contains groupings that are specific to the "This sub-module contains groupings that are specific to the
peer-group context of the BGP module."; peer-group context of the BGP module.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-peer-group-afi-safi-list { grouping bgp-peer-group-afi-safi-list {
description description
"List of address-families associated with the BGP peer-group"; "List of address-families associated with the BGP peer-group";
list afi-safi { list afi-safi {
key "afi-safi-name"; key "afi-safi-name";
description description
"AFI, SAFI configuration available for the "AFI, SAFI configuration available for the
neighbour or group"; neighbour or group";
uses mp-afi-safi-config; uses mp-afi-safi-config;
container graceful-restart { container graceful-restart {
if-feature graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
uses mp-afi-safi-graceful-restart-config; uses mp-afi-safi-graceful-restart-config;
} }
uses route-selection-options; uses route-selection-options;
uses global-group-use-multiple-paths; uses global-group-use-multiple-paths;
uses mp-all-afi-safi-list-contents; uses mp-all-afi-safi-list-contents;
} }
} }
grouping bgp-peer-group-base { grouping bgp-peer-group-base {
description description
"Parameters related to a BGP group."; "Parameters related to a BGP group.";
leaf peer-group-name { leaf peer-group-name {
type string; type string;
description description
"Name of the BGP peer-group"; "Name of the BGP peer-group";
} }
uses neighbor-group-config; uses neighbor-group-config;
container timers { container timers {
description description
"Timers related to a BGP peer-group."; "Timers related to a BGP peer-group.";
uses neighbor-group-timers-config; uses neighbor-group-timers-config;
} }
container transport { container transport {
description description
"Transport session parameters for the BGP peer-group."; "Transport session parameters for the BGP peer-group.";
uses neighbor-group-transport-config; uses neighbor-group-transport-config;
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating the graceful restart mechanism for BGP."; "Parameters relating the graceful restart mechanism for BGP.";
uses graceful-restart-config; uses graceful-restart-config;
} }
uses structure-neighbor-group-ebgp-multihop; uses structure-neighbor-group-ebgp-multihop;
uses structure-neighbor-group-route-reflector; uses structure-neighbor-group-route-reflector;
uses structure-neighbor-group-as-path-options; uses structure-neighbor-group-as-path-options;
uses structure-neighbor-group-add-paths; uses structure-neighbor-group-add-paths;
uses global-group-use-multiple-paths; uses global-group-use-multiple-paths;
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
container afi-safis { container afi-safis {
description description
"Per-address-family configuration parameters associated with "Per-address-family configuration parameters associated with
the group."; the group.";
uses bgp-peer-group-afi-safi-list; uses bgp-peer-group-afi-safi-list;
} }
} }
grouping bgp-peer-group-list { grouping bgp-peer-group-list {
description description
"The list of BGP peer groups"; "The list of BGP peer groups";
list peer-group { list peer-group {
key "peer-group-name"; key "peer-group-name";
description description
"List of BGP peer-groups configured on the local system - "List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name"; uniquely identified by peer-group name";
uses bgp-peer-group-base; uses bgp-peer-group-base;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-neighbor@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-neighbor@2020-02-24.yang"
submodule ietf-bgp-neighbor { submodule ietf-bgp-neighbor {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
}
import ietf-bgp-types {
prefix bt;
reference
"RFC XXXX, BGP Model for Service Provider Network.";
} }
// Include the common submodule // Include the common submodule
include ietf-bgp-common; include ietf-bgp-common;
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
include ietf-bgp-peer-group; include ietf-bgp-peer-group;
include ietf-bgp-common-structure; include ietf-bgp-common-structure;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This sub-module contains groupings that are specific to the "This sub-module contains groupings that are specific to the
neighbor context of the BGP module."; neighbor context of the BGP module.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-neighbor-use-multiple-paths { grouping bgp-neighbor-use-multiple-paths {
description description
"Multi-path configuration and state applicable to a BGP "Multi-path configuration and state applicable to a BGP
neighbor"; neighbor";
skipping to change at page 61, line 14 skipping to change at page 61, line 49
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-neighbor-use-multiple-paths { grouping bgp-neighbor-use-multiple-paths {
description description
"Multi-path configuration and state applicable to a BGP "Multi-path configuration and state applicable to a BGP
neighbor"; neighbor";
container use-multiple-paths { container use-multiple-paths {
description description
"Parameters related to the use of multiple-paths for the same "Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor"; NLRI when they are received only from this neighbor";
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default "false";
description description
"Whether the use of multiple paths for the same NLRI is "Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by any enabled for the neighbor. This value is overridden by any
more specific configuration value."; more specific configuration value.";
} }
container ebgp { container ebgp {
description description
"Multi-path configuration for eBGP"; "Multi-path configuration for eBGP";
leaf allow-multiple-as { leaf allow-multiple-as {
type boolean; type boolean;
default "false"; default "false";
description description
"Allow multi-path to use paths from different neighboring "Allow multi-path to use paths from different neighboring
ASes. The default is to only consider multiple paths ASes. The default is to only consider multiple paths
from the same neighboring AS."; from the same neighboring AS.";
} }
} }
} }
skipping to change at page 61, line 49 skipping to change at page 62, line 32
from the same neighboring AS."; from the same neighboring AS.";
} }
} }
} }
} }
grouping bgp-neighbor-counters-message-types-state { grouping bgp-neighbor-counters-message-types-state {
description description
"Grouping of BGP message types, included for re-use across "Grouping of BGP message types, included for re-use across
counters"; counters";
leaf updates-received { leaf updates-received {
type uint64; type uint64;
description description
"Number of BGP UPDATE messages received from this neighbor."; "Number of BGP UPDATE messages received from this neighbor.";
reference reference
"RFC 4273: bgpPeerInUpdates."; "RFC 4273: bgpPeerInUpdates.";
} }
leaf updates-sent { leaf updates-sent {
type uint64; type uint64;
description description
"Number of BGP UPDATE messages sent to this neighbor"; "Number of BGP UPDATE messages sent to this neighbor";
reference reference
"RFC 4273 - bgpPeerOutUpdates"; "RFC 4273 - bgpPeerOutUpdates";
} }
leaf messages-received { leaf messages-received {
type uint64; type uint64;
description description
"Number of BGP messages received from thsi neighbor"; "Number of BGP messages received from thsi neighbor";
reference reference
"RFC 4273 - bgpPeerInTotalMessages"; "RFC 4273 - bgpPeerInTotalMessages";
}
}
leaf messages-sent { leaf messages-sent {
type uint64; type uint64;
description description
"Number of BGP messages received from thsi neighbor"; "Number of BGP messages received from thsi neighbor";
reference reference
"RFC 4273 - bgpPeerOutTotalMessages"; "RFC 4273 - bgpPeerOutTotalMessages";
} }
leaf notification { leaf notification {
type uint64; type uint64;
description description
"Number of BGP NOTIFICATION messages indicating an error "Number of BGP NOTIFICATION messages indicating an error
condition has occurred exchanged."; condition has occurred exchanged.";
} }
} }
grouping bgp-neighbor-afi-safi-list { grouping bgp-neighbor-afi-safi-list {
description description
skipping to change at page 63, line 17 skipping to change at page 63, line 40
leaf active { leaf active {
type boolean; type boolean;
config false; config false;
description description
"This value indicates whether a particular AFI-SAFI has "This value indicates whether a particular AFI-SAFI has
been successfully negotiated with the peer. An AFI-SAFI may been successfully negotiated with the peer. An AFI-SAFI may
be enabled in the current running configuration, but a be enabled in the current running configuration, but a
session restart may be required in order to negotiate the session restart may be required in order to negotiate the
new capability."; new capability.";
} }
container prefixes { container prefixes {
config false; config false;
description description
"Prefix counters for the BGP session"; "Prefix counters for the BGP session";
leaf received { leaf received {
type uint32; type uint32;
description description
"The number of prefixes received from the neighbor"; "The number of prefixes received from the neighbor";
} }
leaf sent { leaf sent {
type uint32; type uint32;
description description
"The number of prefixes advertised to the neighbor"; "The number of prefixes advertised to the neighbor";
}
}
leaf installed { leaf installed {
type uint32; type uint32;
description description
"The number of advertised prefixes installed in the "The number of advertised prefixes installed in the
Loc-RIB"; Loc-RIB";
} }
} }
container graceful-restart { container graceful-restart {
if-feature bgp:graceful-restart; if-feature "bt:graceful-restart";
description description
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
uses mp-afi-safi-graceful-restart-config; uses mp-afi-safi-graceful-restart-config;
leaf received { leaf received {
type boolean; type boolean;
config false; config false;
description description
"This leaf indicates whether the neighbor advertised the "This leaf indicates whether the neighbor advertised the
ability to support graceful-restart for this AFI-SAFI"; ability to support graceful-restart for this AFI-SAFI";
} }
leaf advertised { leaf advertised {
type boolean; type boolean;
config false; config false;
description description
"This leaf indicates whether the ability to support "This leaf indicates whether the ability to support
graceful-restart has been advertised to the peer"; graceful-restart has been advertised to the peer";
} }
} }
uses mp-all-afi-safi-list-contents; uses mp-all-afi-safi-list-contents;
uses bgp-neighbor-use-multiple-paths; uses bgp-neighbor-use-multiple-paths;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
7.2. BGP types 7.2. BGP types
<CODE BEGINS> file "ietf-bgp-types@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-types@2020-02-24.yang"
module ietf-bgp-types { module ietf-bgp-types {
yang-version "1.1"; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types"; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types";
prefix bt;
prefix "bt";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This module contains general data definitions for use in BGP "This module contains general data definitions for use in BGP
policy. It can be imported by modules that make use of BGP policy. It can be imported by modules that make use of BGP
attributes"; attributes";
revision "2019-10-03" { revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
/*
* Features.
*/
feature graceful-restart {
description
"Graceful restart as defined in RFC 4724 is supported.";
}
feature clear-neighbors {
description
"Clearing of BGP neighbors is supported.";
}
feature clear-statistics {
description
"Clearing of BGP statistics is supported.";
}
feature send-communities {
description
"Enable the propogation of communities.";
}
feature ttl-security {
description
"BGP Time To Live (TTL) security check support.";
reference
"RFC 5082, The Generalized TTL Security Mechanism (GTSM).";
}
feature bfd {
description
"Support for BFD detection of BGP neighbor reachability.";
reference
"RFC 5880, Bidirectional Forward Detection (BFD),
RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6
(Single Hop),
RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop
Paths.";
}
feature damping {
description
"Weighted route dampening is supported.";
}
feature clear-routes {
description
"Clearing of BGP routes is supported.";
}
feature add-paths {
description
"Advertisement of multiple paths for the same address prefix
without the new paths implicitly replacing any previous ones.";
reference
"RFC 7911: Advertisement of Multiple Paths in BGP.";
}
/*
* Identities.
*/
identity bgp-capability { identity bgp-capability {
description "Base identity for a BGP capability"; description
"Base identity for a BGP capability";
} }
identity mp-bgp { identity mp-bgp {
base bgp-capability; base bgp-capability;
description description
"Multi-protocol extensions to BGP"; "Multi-protocol extensions to BGP";
reference reference
"RFC 4760"; "RFC 4760: Multiprotocol Extenstions for BGP-4.";
} }
identity route-refresh { identity route-refresh {
base bgp-capability; base bgp-capability;
description description
"The BGP route-refresh functionality"; "The BGP route-refresh functionality";
reference reference
"RFC2918"; "RFC 2918: Route Refresh Capability for BGP-4.";
} }
identity asn32 { identity asn32 {
base bgp-capability; base bgp-capability;
description description
"4-byte (32-bit) AS number functionality"; "4-byte (32-bit) AS number functionality";
reference reference
"RFC6793"; "RFC6793: BGP Support for Four-Octet Autonomous System (AS)
Number Space.";
} }
identity graceful-restart { identity graceful-restart {
if-feature "graceful-restart";
base bgp-capability; base bgp-capability;
description description
"Graceful restart functionality"; "Graceful restart functionality";
reference reference
"RFC4724"; "RFC 4724: Graceful Restart Mechanism for BGP.";
} }
identity add-paths { identity add-paths {
if-feature "add-paths";
base bgp-capability; base bgp-capability;
description description
"BGP add-paths"; "Advertisement of multiple paths for the same address prefix
without the new paths implicitly replacing any previous ones.";
reference reference
"RFC 7911."; "RFC 7911: Advertisement of Multiple Paths in BGP.";
} }
identity afi-safi-type { identity afi-safi-type {
description description
"Base identity type for AFI,SAFI tuples for BGP-4"; "Base identity type for AFI,SAFI tuples for BGP-4";
reference reference
"RFC4760 - multi-protocol extensions for BGP-4"; "RFC4760: Multi-protocol extensions for BGP-4";
} }
identity ipv4-unicast { identity ipv4-unicast {
base afi-safi-type; base afi-safi-type;
description description
"IPv4 unicast (AFI,SAFI = 1,1)"; "IPv4 unicast (AFI,SAFI = 1,1)";
reference reference
"RFC4760"; "RFC4760: Multi-protocol extensions for BGP-4";
} }
identity ipv6-unicast { identity ipv6-unicast {
base afi-safi-type; base afi-safi-type;
description description
"IPv6 unicast (AFI,SAFI = 2,1)"; "IPv6 unicast (AFI,SAFI = 2,1)";
reference reference
"RFC4760"; "RFC4760: Multi-protocol extensions for BGP-4";
} }
identity ipv4-labeled-unicast { identity ipv4-labeled-unicast {
base afi-safi-type; base afi-safi-type;
description description
"Labeled IPv4 unicast (AFI,SAFI = 1,4)"; "Labeled IPv4 unicast (AFI,SAFI = 1,4)";
reference reference
"RFC3107"; "RFC 3107: Carrying Label Information in BGP-4.";
} }
identity ipv6-labeled-unicast { identity ipv6-labeled-unicast {
base afi-safi-type; base afi-safi-type;
description description
"Labeled IPv6 unicast (AFI,SAFI = 2,4)"; "Labeled IPv6 unicast (AFI,SAFI = 2,4)";
reference reference
"RFC3107"; "RFC 3107: Carrying Label Information in BGP-4.";
} }
identity l3vpn-ipv4-unicast { identity l3vpn-ipv4-unicast {
base afi-safi-type; base afi-safi-type;
description description
"Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)"; "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)";
reference reference
"RFC4364"; "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).";
} }
identity l3vpn-ipv6-unicast { identity l3vpn-ipv6-unicast {
base afi-safi-type; base afi-safi-type;
description description
"Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)"; "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)";
reference reference
"RFC4659"; "RFC 4659: BGP-MPLS IP Virtual Private Network (VPN) Extension
for IPv6 VPN.";
} }
identity l3vpn-ipv4-multicast { identity l3vpn-ipv4-multicast {
base afi-safi-type; base afi-safi-type;
description description
"Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)"; "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)";
reference reference
"RFC6514"; "RFC 6514: BGP Encodings and Procedures for Multicast in
MPLS/BGP IP VPNs.";
} }
identity l3vpn-ipv6-multicast { identity l3vpn-ipv6-multicast {
base afi-safi-type; base afi-safi-type;
description description
"Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)"; "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)";
reference reference
"RFC6514"; "RFC 6514: BGP Encodings and Procedures for Multicast in
MPLS/BGP IP VPNs.";
} }
identity l2vpn-vpls { identity l2vpn-vpls {
base afi-safi-type; base afi-safi-type;
description description
"BGP-signalled VPLS (AFI,SAFI = 25,65)"; "BGP-signalled VPLS (AFI,SAFI = 25,65)";
reference reference
"RFC4761"; "RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for
Auto-Discovery and Signaling.";
} }
identity l2vpn-evpn { identity l2vpn-evpn {
base afi-safi-type; base afi-safi-type;
description description
"BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)"; "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)";
} }
identity bgp-well-known-std-community { identity bgp-well-known-std-community {
description description
skipping to change at page 69, line 49 skipping to change at page 71, line 38
identity as-confed-set { identity as-confed-set {
base as-path-segment-type; base as-path-segment-type;
description description
"Unordered set of Member Autonomous Systems in the local "Unordered set of Member Autonomous Systems in the local
confederation that the UPDATE message has traversed."; confederation that the UPDATE message has traversed.";
reference reference
"RFC 5065, Autonomous System Configuration for BGP."; "RFC 5065, Autonomous System Configuration for BGP.";
} }
/* /*
* Features. * Typedefs.
*/ */
feature send-communities {
description
"Enable the propogation of communities.";
}
feature ttl-security {
description
"BGP Time To Live (TTL) security check support.";
reference
"RFC 5082, The Generalized TTL Security Mechanism (GTSM)";
}
feature bfd {
description
"Support for BFD detection of BGP neighbor reachability.";
reference
"RFC 5880, Bidirectional Forward Detection (BFD),
RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6
(Single Hop).
RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop
Paths";
}
typedef bgp-session-direction { typedef bgp-session-direction {
type enumeration { type enumeration {
enum INBOUND { enum INBOUND {
description description
"Refers to all NLRI received from the BGP peer"; "Refers to all NLRI received from the BGP peer";
} }
enum OUTBOUND { enum OUTBOUND {
description description
"Refers to all NLRI advertised to the BGP peer"; "Refers to all NLRI advertised to the BGP peer";
skipping to change at page 71, line 4 skipping to change at page 72, line 18
typedef bgp-well-known-community-type { typedef bgp-well-known-community-type {
type identityref { type identityref {
base bgp-well-known-std-community; base bgp-well-known-std-community;
} }
description description
"Type definition for well-known IETF community attribute "Type definition for well-known IETF community attribute
values"; values";
reference reference
"IANA Border Gateway Protocol (BGP) Well Known Communities"; "IANA Border Gateway Protocol (BGP) Well Known Communities";
} }
typedef bgp-std-community-type { typedef bgp-std-community-type {
// TODO: further refine restrictions and allowed patterns // TODO: further refine restrictions and allowed patterns
// 4-octet value: // 4-octet value:
// <as number> 2 octets // <as number> 2 octets
// <community value> 2 octets // <community value> 2 octets
type union { type union {
type uint32 { type uint32 {
// per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 -
// 0xFFFFFFFF are reserved // 0xFFFFFFFF are reserved
range "65536..4294901759"; // 0x00010000..0xFFFEFFFF range "65536..4294901759";
// 0x00010000..0xFFFEFFFF
} }
type string { type string {
pattern '([0-9]+:[0-9]+)'; pattern '([0-9]+:[0-9]+)';
} }
} }
description description
"Type definition for standard community attributes"; "Type definition for standard community attributes";
reference reference
"RFC 1997 - BGP Communities Attribute"; "RFC 1997 - BGP Communities Attribute";
} }
skipping to change at page 71, line 31 skipping to change at page 72, line 47
reference reference
"RFC 1997 - BGP Communities Attribute"; "RFC 1997 - BGP Communities Attribute";
} }
typedef bgp-ext-community-type { typedef bgp-ext-community-type {
// TODO: needs more work to make this more precise given the // TODO: needs more work to make this more precise given the
// variability of extended community attribute specifications // variability of extended community attribute specifications
// 8-octet value: // 8-octet value:
// <type> 2 octects // <type> 2 octects
// <value> 6 octets // <value> 6 octets
type union { type union {
type string { type string {
// Type 1: 2-octet global and 4-octet local // Type 1: 2-octet global and 4-octet local
// (AS number) (Integer) // (AS number) (Integer)
pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|'
'[1-9][0-9]{1,4}|[0-9]):' + + '[1-9][0-9]{1,4}|[0-9]):'
'(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|'
'[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
} }
type string { type string {
// Type 2: 4-octet global and 2-octet local // Type 2: 4-octet global and 2-octet local
// (ipv4-address) (integer) // (ipv4-address) (integer)
pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
'25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
'2[0-4][0-9]|25[0-5]):' + + '2[0-4][0-9]|25[0-5]):'
'(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|'
'[1-9][0-9]{1,4}|[0-9])'; + '[1-9][0-9]{1,4}|[0-9])';
} }
type string { type string {
// route-target with Type 1 // route-target with Type 1
// route-target:(ASN):(local-part) // route-target:(ASN):(local-part)
pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' + pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|'
'[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):'
'(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|'
'[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
} }
type string { type string {
// route-target with Type 2 // route-target with Type 2
// route-target:(IPv4):(local-part) // route-target:(IPv4):(local-part)
pattern 'route\-target:' + pattern 'route\-target:'
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
'25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
'2[0-4][0-9]|25[0-5]):' + + '2[0-4][0-9]|25[0-5]):'
'(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|'
'[1-9][0-9]{1,4}|[0-9])'; + '[1-9][0-9]{1,4}|[0-9])';
} }
type string { type string {
// route-origin with Type 1 // route-origin with Type 1
pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' + pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|'
'[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' + + '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):'
'(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' + + '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|'
'[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])'; + '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
} }
type string { type string {
// route-origin with Type 2 // route-origin with Type 2
pattern 'route\-origin:' + pattern 'route\-origin:'
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
'25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
'2[0-4][0-9]|25[0-5]):' + + '2[0-4][0-9]|25[0-5]):'
'(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' + + '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|'
'[1-9][0-9]{1,4}|[0-9])'; + '[1-9][0-9]{1,4}|[0-9])';
} }
} }
description description
"Type definition for extended community attributes"; "Type definition for extended community attributes";
reference reference
"RFC 4360 - BGP Extended Communities Attribute"; "RFC 4360 - BGP Extended Communities Attribute";
} }
typedef bgp-community-regexp-type { typedef bgp-community-regexp-type {
// TODO: needs more work to decide what format these regexps can // TODO: needs more work to decide what format these regexps can
skipping to change at page 73, line 4 skipping to change at page 74, line 18
} }
typedef bgp-community-regexp-type { typedef bgp-community-regexp-type {
// TODO: needs more work to decide what format these regexps can // TODO: needs more work to decide what format these regexps can
// take. // take.
type string; type string;
description description
"Type definition for communities specified as regular "Type definition for communities specified as regular
expression patterns"; expression patterns";
} }
typedef bgp-origin-attr-type { typedef bgp-origin-attr-type {
type enumeration { type enumeration {
enum igp { enum igp {
description "Origin of the NLRI is internal"; description
"Origin of the NLRI is internal";
} }
enum egp { enum egp {
description "Origin of the NLRI is EGP"; description
"Origin of the NLRI is EGP";
} }
enum incomplete { enum incomplete {
description "Origin of the NLRI is neither IGP or EGP"; description
"Origin of the NLRI is neither IGP or EGP";
} }
} }
description description
"Type definition for standard BGP origin attribute"; "Type definition for standard BGP origin attribute";
reference reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3"; "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3";
} }
typedef peer-type { typedef peer-type {
type enumeration { type enumeration {
enum internal { enum internal {
description description
"internal (iBGP) peer"; "Internal (iBGP) peer";
} }
enum external { enum external {
description description
"external (eBGP) peer"; "External (eBGP) peer";
} }
enum confederation { enum confederation {
description description
"Confederation as peer"; "Confederation as peer";
} }
} }
description description
"Labels a peer or peer group as explicitly internal, "Labels a peer or peer group as explicitly internal,
external or confederation."; external or confederation.";
} }
identity REMOVE_PRIVATE_AS_OPTION { identity REMOVE_PRIVATE_AS_OPTION {
description description
"Base identity for options for removing private autonomous "Base identity for options for removing private autonomous
skipping to change at page 75, line 31 skipping to change at page 77, line 7
description description
"Type describing variations of community attributes. "Type describing variations of community attributes.
The community types can be combined and a value of 0 The community types can be combined and a value of 0
implies 'none'"; implies 'none'";
} }
} }
<CODE ENDS> <CODE ENDS>
7.3. BGP policy data 7.3. BGP policy data
<CODE BEGINS> file "ietf-bgp-policy@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-policy@2020-02-24.yang"
module ietf-bgp-policy { module ietf-bgp-policy {
yang-version "1.1"; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy";
prefix "bp"; prefix bp;
// import some basic types // import some basic types
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
} }
import ietf-routing-types { import ietf-routing-types {
prefix rt-types; prefix rt-types;
} }
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This module contains data definitions for BGP routing policy. "This module contains data definitions for BGP routing policy.
It augments the base routing-policy module with BGP-specific It augments the base routing-policy module with BGP-specific
options for conditions and actions."; options for conditions and actions.";
revision "2019-10-03" { revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
// typedef statements // typedef statements
typedef bgp-set-community-option-type { typedef bgp-set-community-option-type {
type enumeration { type enumeration {
skipping to change at page 77, line 26 skipping to change at page 78, line 47
} }
} }
description description
"Type definition for specifying next-hop in policy actions"; "Type definition for specifying next-hop in policy actions";
} }
typedef bgp-set-med-type { typedef bgp-set-med-type {
type union { type union {
type uint32; type uint32;
type string { type string {
pattern "^[+-]([0-9]{1,8}|[0-3][0-9]{1,9}|4[0-1][0-9]{1,8}|" + pattern '^[+-]([0-9]{1,8}|[0-3][0-9]{1,9}|4[0-1][0-9]{1,8}|'
"428[0-9]{1,7}|429[0-3][0-9]{1,6}|42948[0-9]{1,5}|" + + '428[0-9]{1,7}|429[0-3][0-9]{1,6}|42948[0-9]{1,5}|'
"42949[0-5][0-9]{1,4}|429496[0-6][0-9]{1,3}|" + + '42949[0-5][0-9]{1,4}|429496[0-6][0-9]{1,3}|'
"4294971[0-9]{1,2}|42949728[0-9]|42949729[0-5])$"; + '4294971[0-9]{1,2}|42949728[0-9]|42949729[0-5])$';
} }
type enumeration { type enumeration {
enum igp { enum igp {
description description
"Set the MED value to the IGP cost toward the "Set the MED value to the IGP cost toward the
next hop for the route"; next hop for the route";
} }
enum med-plus-igp { enum med-plus-igp {
description description
"Before comparing MED values for path selection, adds to "Before comparing MED values for path selection, adds to
skipping to change at page 79, line 35 skipping to change at page 80, line 48
leaf-list member { leaf-list member {
type union { type union {
type rt-types:route-target; type rt-types:route-target;
type bt:bgp-community-regexp-type; type bt:bgp-community-regexp-type;
} }
description description
"Members of the extended community set"; "Members of the extended community set";
} }
} }
} }
container as-path-sets { container as-path-sets {
description description
"Enclosing container for list of define AS path sets"; "Enclosing container for list of define AS path sets";
list as-path-set { list as-path-set {
key "name"; key "name";
description description
"List of defined AS path sets"; "List of defined AS path sets";
leaf name { leaf name {
type string; type string;
description description
"Name of the AS path set -- this is used to reference the "Name of the AS path set -- this is used to reference the
set in match conditions"; set in match conditions";
} }
leaf-list member { leaf-list member {
// TODO: need to refine typedef for AS path expressions
type string; type string;
description description
"AS path expression -- list of ASes in the set"; "AS path expression -- list of ASes in the set";
} }
} }
} }
} }
} }
grouping set-community-action-common { grouping set-community-action-common {
skipping to change at page 80, line 37 skipping to change at page 81, line 44
enum reference { enum reference {
description description
"The extended communities are specified by referencing a "The extended communities are specified by referencing a
defined ext-community set"; defined ext-community set";
} }
} }
description description
"Indicates the method used to specify the extended "Indicates the method used to specify the extended
communities for the set-ext-community action"; communities for the set-ext-community action";
} }
leaf options { leaf options {
type bgp-set-community-option-type; type bgp-set-community-option-type;
description description
"Options for modifying the community attribute with "Options for modifying the community attribute with
the specified values. These options apply to both the specified values. These options apply to both
methods of setting the community attribute."; methods of setting the community attribute.";
} }
} }
augment "/rpol:routing-policy/rpol:policy-definitions/"
augment "/rpol:routing-policy/rpol:policy-definitions/" + + "rpol:policy-definition/rpol:statements/rpol:statement/"
"rpol:policy-definition/rpol:statements/rpol:statement/" + + "rpol:conditions" {
"rpol:conditions" {
description description
"BGP policy conditions added to routing policy module"; "BGP policy conditions added to routing policy module";
container bgp-conditions { container bgp-conditions {
description description
"Top-level container for BGP specific policy conditions "; "Top-level container for BGP specific policy conditions ";
leaf med-eq { leaf med-eq {
type uint32; type uint32;
description description
"Condition to check if the received MED value is equal to "Condition to check if the received MED value is equal to
the specified value"; the specified value";
} }
leaf origin-eq { leaf origin-eq {
type bt:bgp-origin-attr-type; type bt:bgp-origin-attr-type;
description description
"Condition to check if the route origin is equal to the "Condition to check if the route origin is equal to the
specified value"; specified value";
} }
leaf-list next-hop-in { leaf-list next-hop-in {
type inet:ip-address-no-zone; type inet:ip-address-no-zone;
description description
"List of next hop addresses to check for in the route "List of next hop addresses to check for in the route
update"; update";
} }
leaf-list afi-safi-in { leaf-list afi-safi-in {
type identityref { type identityref {
base bt:afi-safi-type; base bt:afi-safi-type;
} }
description description
"List of address families which the NLRI may be within"; "List of address families which the NLRI may be within";
} }
leaf local-pref-eq { leaf local-pref-eq {
type uint32; type uint32;
// TODO: add support for other comparisons if needed // TODO: add support for other comparisons if needed
description description
"Condition to check if the local pref attribute is equal to "Condition to check if the local pref attribute is equal to
the specified value"; the specified value";
} }
leaf route-type { leaf route-type {
// TODO: verify extent of vendor support for this comparison // TODO: verify extent of vendor support for this comparison
type enumeration { type enumeration {
enum internal { enum internal {
description "route type is internal"; description
"route type is internal";
} }
enum external { enum external {
description "route type is external"; description
"route type is external";
} }
} }
description description
"Condition to check the route type in the route update"; "Condition to check the route type in the route update";
} }
container community-count { container community-count {
description description
"Value and comparison operations for conditions based on the "Value and comparison operations for conditions based on the
number of communities in the route update"; number of communities in the route update";
} }
container as-path-length { container as-path-length {
description description
"Value and comparison operations for conditions based on the "Value and comparison operations for conditions based on the
length of the AS path in the route update"; length of the AS path in the route update.
}
The as-path-length SHALL be calculated and SHALL follow
RFC 4271 rules.";
reference
"RFC 4271: BGP-4.";
}
container match-community-set { container match-community-set {
description description
"Top-level container for match conditions on communities. "Top-level container for match conditions on communities.
Match a referenced community-set according to the logic Match a referenced community-set according to the logic
defined in the match-set-options leaf"; defined in the match-set-options leaf";
leaf community-set { leaf community-set {
type leafref { type leafref {
path path "/rpol:routing-policy/rpol:defined-sets/"
"/rpol:routing-policy/rpol:defined-sets/" + + "bp:bgp-defined-sets/bp:community-sets/"
"bp:bgp-defined-sets/bp:community-sets/" + + "bp:community-set/bp:name";
"bp:community-set/bp:name";
} }
description description
"References a defined community set"; "References a defined community set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
container match-ext-community-set { container match-ext-community-set {
description description
"Match a referenced extended community-set according to the "Match a referenced extended community-set according to the
logic defined in the match-set-options leaf"; logic defined in the match-set-options leaf";
leaf ext-community-set { leaf ext-community-set {
type leafref { type leafref {
path path "/rpol:routing-policy/rpol:defined-sets/"
"/rpol:routing-policy/rpol:defined-sets/" + + "bp:bgp-defined-sets/bp:ext-community-sets/"
"bp:bgp-defined-sets/bp:ext-community-sets/" + + "bp:ext-community-set/bp:name";
"bp:ext-community-set/bp:name";
} }
description "References a defined extended community set"; description
"References a defined extended community set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
container match-as-path-set { container match-as-path-set {
description description
"Match a referenced as-path set according to the logic "Match a referenced as-path set according to the logic
defined in the match-set-options leaf"; defined in the match-set-options leaf";
leaf as-path-set { leaf as-path-set {
type leafref { type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" + path "/rpol:routing-policy/rpol:defined-sets/"
"bp:bgp-defined-sets/bp:as-path-sets/" + + "bp:bgp-defined-sets/bp:as-path-sets/"
"bp:as-path-set/bp:name"; + "bp:as-path-set/bp:name";
} }
description description
"References a defined AS path set"; "References a defined AS path set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
} }
} }
augment "/rpol:routing-policy/rpol:policy-definitions/" + augment "/rpol:routing-policy/rpol:policy-definitions/"
"rpol:policy-definition/rpol:statements/rpol:statement/" + + "rpol:policy-definition/rpol:statements/rpol:statement/"
"rpol:actions" { + "rpol:actions" {
description description
"BGP policy actions added to routing policy module."; "BGP policy actions added to routing policy module.";
container bgp-actions { container bgp-actions {
description description
"Top-level container for BGP-specific actions"; "Top-level container for BGP-specific actions";
leaf set-route-origin { leaf set-route-origin {
type bt:bgp-origin-attr-type; type bt:bgp-origin-attr-type;
description description
"Set the origin attribute to the specified value"; "Set the origin attribute to the specified value";
} }
leaf set-local-pref { leaf set-local-pref {
type uint32; type uint32;
description description
"Set the local pref attribute on the route update"; "Set the local pref attribute on the route update";
} }
leaf set-next-hop { leaf set-next-hop {
type bgp-next-hop-type; type bgp-next-hop-type;
description description
"Set the next-hop attribute in the route update"; "Set the next-hop attribute in the route update";
} }
leaf set-med { leaf set-med {
type bgp-set-med-type; type bgp-set-med-type;
description description
"Set the med metric attribute in the route update"; "Set the med metric attribute in the route update";
} }
container set-as-path-prepend { container set-as-path-prepend {
description description
"Action to prepend local AS number to the AS-path a "Action to prepend local AS number to the AS-path a
specified number of times"; specified number of times";
leaf repeat-n { leaf repeat-n {
type uint8 { type uint8 {
range 1..max; range "1..max";
} }
description description
"Number of times to prepend the local AS number to the AS "Number of times to prepend the local AS number to the AS
path. The value should be between 1 and the maximum path. The value should be between 1 and the maximum
supported by the implementation."; supported by the implementation.";
} }
} }
container set-community { container set-community {
description description
"Action to set the community attributes of the route, along "Action to set the community attributes of the route, along
with options to modify how the community is modified. with options to modify how the community is modified.
Communities may be set using an inline list OR Communities may be set using an inline list OR
reference to an existing defined set (not both)."; reference to an existing defined set (not both).";
uses set-community-action-common; uses set-community-action-common;
container inline { container inline {
when "../method = 'inline'" { when "../method = 'inline'" {
description description
"Active only when the set-community method is inline"; "Active only when the set-community method is inline";
} }
description description
"Set the community values for the action inline with "Set the community values for the action inline with
a list."; a list.";
leaf-list communities { leaf-list communities {
type union { type union {
type bt:bgp-std-community-type; type bt:bgp-std-community-type;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the community values for the update inline with a "Set the community values for the update inline with a
list."; list.";
} }
} }
skipping to change at page 85, line 13 skipping to change at page 85, line 46
leaf-list communities { leaf-list communities {
type union { type union {
type bt:bgp-std-community-type; type bt:bgp-std-community-type;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the community values for the update inline with a "Set the community values for the update inline with a
list."; list.";
} }
} }
container reference { container reference {
when "../method = 'reference'" { when "../method = 'reference'" {
description description
"Active only when the set-community method is reference"; "Active only when the set-community method is reference";
} }
description description
"Provide a reference to a defined community set for the "Provide a reference to a defined community set for the
set-community action"; set-community action";
leaf community-set-ref { leaf community-set-ref {
type leafref { type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" + path "/rpol:routing-policy/rpol:defined-sets/"
"bp:bgp-defined-sets/" + + "bp:bgp-defined-sets/"
"bp:community-sets/bp:community-set/bp:name"; + "bp:community-sets/bp:community-set/bp:name";
} }
description description
"References a defined community set by name"; "References a defined community set by name";
} }
} }
} }
container set-ext-community { container set-ext-community {
description description
"Action to set the extended community attributes of the "Action to set the extended community attributes of the
route, along with options to modify how the community is route, along with options to modify how the community is
modified. Extended communities may be set using an inline modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not list OR a reference to an existing defined set (but not
both)."; both).";
uses set-community-action-common; uses set-community-action-common;
container inline { container inline {
when "../method = 'inline'" { when "../method = 'inline'" {
description description
"Active only when the set-community method is inline"; "Active only when the set-community method is inline";
} }
description description
"Set the extended community values for the action inline "Set the extended community values for the action inline
with a list."; with a list.";
leaf-list communities { leaf-list communities {
type union { type union {
type rt-types:route-target; type rt-types:route-target;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the extended community values for the update inline "Set the extended community values for the update inline
with a list."; with a list.";
} }
} }
skipping to change at page 86, line 15 skipping to change at page 86, line 43
leaf-list communities { leaf-list communities {
type union { type union {
type rt-types:route-target; type rt-types:route-target;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the extended community values for the update inline "Set the extended community values for the update inline
with a list."; with a list.";
} }
} }
container reference { container reference {
when "../method = 'reference'" { when "../method = 'reference'" {
description description
"Active only when the set-community method is reference"; "Active only when the set-community method is reference";
} }
description description
"Provide a reference to an extended community set for the "Provide a reference to an extended community set for the
set-ext-community action"; set-ext-community action";
leaf ext-community-set-ref { leaf ext-community-set-ref {
type leafref { type leafref {
path path "/rpol:routing-policy/rpol:defined-sets/"
"/rpol:routing-policy/rpol:defined-sets/" + + "bp:bgp-defined-sets/bp:ext-community-sets/"
"bp:bgp-defined-sets/bp:ext-community-sets/" + + "bp:ext-community-set/bp:name";
"bp:ext-community-set/bp:name";
} }
description description
"References a defined extended community set by name"; "References a defined extended community set by name";
} }
} }
} }
} }
} }
// rpc statements // rpc statements
skipping to change at page 86, line 41 skipping to change at page 87, line 18
} }
description description
"References a defined extended community set by name"; "References a defined extended community set by name";
} }
} }
} }
} }
} }
// rpc statements // rpc statements
// notification statements // notification statements
} }
<CODE ENDS> <CODE ENDS>
7.4. RIB modules 7.4. RIB modules
<CODE BEGINS> file "ietf-bgp-rib@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib@2020-02-24.yang"
submodule ietf-bgp-rib { submodule ietf-bgp-rib {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
/* /*
* Import and Include * Import and Include
*/ */
import ietf-bgp-types { import ietf-bgp-types {
prefix "bt"; prefix bt;
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Networks."; "RFC XXXX: BGP YANG Model for Service Provider Networks.";
} }
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Types."; "RFC 6991: Common YANG Types.";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Types."; "RFC 6991: Common YANG Types.";
} }
import ietf-routing-types { import ietf-routing-types {
prefix "rt"; prefix rt;
reference reference
"RFC 8294: Routing Area YANG Types."; "RFC 8294: Routing Area YANG Types.";
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
include ietf-bgp-rib-tables; include ietf-bgp-rib-tables;
// groupings of attributes in three categories: // groupings of attributes in three categories:
// - shared across multiple routes // - shared across multiple routes
// - common to LOC-RIB and Adj-RIB, but not shared across routes // - common to LOC-RIB and Adj-RIB, but not shared across routes
// - specific to LOC-RIB or Adj-RIB // - specific to LOC-RIB or Adj-RIB
include ietf-bgp-rib-attributes; include ietf-bgp-rib-attributes;
// groupings of annotations for each route or table // groupings of annotations for each route or table
include ietf-bgp-rib-table-attributes; include ietf-bgp-rib-table-attributes;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"Defines a submodule for representing BGP routing table (RIB) "Defines a submodule for representing BGP routing table (RIB)
contents. The submodule supports 5 logical RIBs per address contents. The submodule supports 5 logical RIBs per address
family: family:
loc-rib: This is the main BGP routing table for the local routing loc-rib: This is the main BGP routing table for the local routing
instance, containing best-path selections for each prefix. The instance, containing best-path selections for each prefix. The
loc-rib table may contain multiple routes for a given prefix, loc-rib table may contain multiple routes for a given prefix,
with an attribute to indicate which was selected as the best with an attribute to indicate which was selected as the best
path. Note that multiple paths may be used or advertised even if path. Note that multiple paths may be used or advertised even if
skipping to change at page 88, line 39 skipping to change at page 89, line 13
routes received from the neighbor that are eligible for routes received from the neighbor that are eligible for
best-path selection after local input policy rules have been best-path selection after local input policy rules have been
applied. applied.
adj-rib-out-pre: This is a per-neighbor table containing routes adj-rib-out-pre: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor before output eligible for sending (advertising) to the neighbor before output
policy rules have been applied. policy rules have been applied.
adj-rib-out-post: This is a per-neighbor table containing routes adj-rib-out-post: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor after output eligible for sending (advertising) to the neighbor after output
policy rules have been applied."; policy rules have been applied.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP YANG Model for Service Provider Network."; "RFC XXXX, BGP YANG Model for Service Provider Network.";
} }
grouping rib { grouping rib {
description description
"Grouping for rib."; "Grouping for rib.";
container rib { container rib {
config false; config false;
container attr-sets { container attr-sets {
description description
"Enclosing container for the list of path attribute sets"; "Enclosing container for the list of path attribute sets";
list attr-set { list attr-set {
key "index"; key "index";
description description
"List of path attributes that may be in use by multiple "List of path attributes that may be in use by multiple
routes in the table"; routes in the table";
leaf index { leaf index {
type uint64; type uint64;
description description
"System generated index for each attribute set. The "System generated index for each attribute set. The
index is used to reference an attribute set from a index is used to reference an attribute set from a
specific path. Multiple paths may reference the same specific path. Multiple paths may reference the same
attribute set."; attribute set.";
} }
leaf origin { leaf origin {
type bt:bgp-origin-attr-type; type bt:bgp-origin-attr-type;
description description
"BGP attribute defining the origin of the path "BGP attribute defining the origin of the path
information."; information.";
} }
leaf atomic-aggregate { leaf atomic-aggregate {
type boolean; type boolean;
description description
"BGP attribute indicating that the prefix is an atomic "BGP attribute indicating that the prefix is an atomic
aggregate; i.e., the peer selected a less specific aggregate; i.e., the peer selected a less specific
route without selecting a more specific route that is route without selecting a more specific route that is
included in it."; included in it.";
reference reference
"RFC 4271: Section 5.1.6."; "RFC 4271: Section 5.1.6.";
} }
skipping to change at page 92, line 31 skipping to change at page 93, line 7
description description
"This is the path encoded with 4-octet "This is the path encoded with 4-octet
AS numbers in the optional transitive AS4_PATH attribute. AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent This value is populated with the received or sent
attribute in Adj-RIB-In or Adj-RIB-Out, respectively. attribute in Adj-RIB-In or Adj-RIB-Out, respectively.
It should not be populated in Loc-RIB since the Loc-RIB It should not be populated in Loc-RIB since the Loc-RIB
is expected to store the effective AS-Path in the is expected to store the effective AS-Path in the
as-path leaf regardless of being 4-octet or 2-octet."; as-path leaf regardless of being 4-octet or 2-octet.";
reference reference
"RFC 6793 - BGP Support for Four-octet AS Number Space"; "RFC 6793 - BGP Support for Four-octet AS Number Space";
list segment { list segment {
key "type"; key "type";
config false; config false;
uses bgp-as-path-attr; uses bgp-as-path-attr;
description description
"List of AS PATH segments"; "List of AS PATH segments";
} }
} }
} }
} }
container communities { container communities {
description description
"Enclosing container for the list of community attribute "Enclosing container for the list of community attribute
sets"; sets";
list community { list community {
key "index"; key "index";
config false; config false;
description description
"List of path attributes that may be in use by multiple "List of path attributes that may be in use by multiple
routes in the table"; routes in the table";
leaf index { leaf index {
type uint64; type uint64;
description description
"System generated index for each attribute set. The "System generated index for each attribute set. The
index is used to reference an attribute set from a index is used to reference an attribute set from a
specific path. Multiple paths may reference the same specific path. Multiple paths may reference the same
attribute set."; attribute set.";
} }
uses bgp-community-attr-state; uses bgp-community-attr-state;
} }
} }
container ext-communities { container ext-communities {
description description
"Enclosing container for the list of extended community "Enclosing container for the list of extended community
attribute sets"; attribute sets";
list ext-community { list ext-community {
key "index"; key "index";
config false; config false;
description description
"List of path attributes that may be in use by multiple "List of path attributes that may be in use by multiple
routes in the table"; routes in the table";
leaf index { leaf index {
type uint64; type uint64;
description description
"System generated index for each attribute set. The "System generated index for each attribute set. The
index is used to reference an attribute set from a index is used to reference an attribute set from a
specific path. Multiple paths may reference the same specific path. Multiple paths may reference the same
attribute set."; attribute set.";
} }
leaf-list ext-community { leaf-list ext-community {
type rt:route-target; type rt:route-target;
description description
"List of BGP extended community attributes. The received "List of BGP extended community attributes. The received
extended community may be an explicitly modeled extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value type or unknown, represented by an 8-octet value
formatted according to RFC 4360."; formatted according to RFC 4360.";
reference reference
"RFC 4360 - BGP Extended Communities Attribute"; "RFC 4360 - BGP Extended Communities Attribute";
} }
skipping to change at page 94, line 8 skipping to change at page 94, line 20
description description
"List of BGP extended community attributes. The received "List of BGP extended community attributes. The received
extended community may be an explicitly modeled extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value type or unknown, represented by an 8-octet value
formatted according to RFC 4360."; formatted according to RFC 4360.";
reference reference
"RFC 4360 - BGP Extended Communities Attribute"; "RFC 4360 - BGP Extended Communities Attribute";
} }
} }
} }
container afi-safis { container afi-safis {
config false; config false;
description description
"Enclosing container for address family list"; "Enclosing container for address family list";
list afi-safi { list afi-safi {
key "afi-safi-name"; key "afi-safi-name";
description description
"List of afi-safi types."; "List of afi-safi types.";
leaf afi-safi-name { leaf afi-safi-name {
type identityref { type identityref {
base bt:afi-safi-type; base bt:afi-safi-type;
} }
description "AFI,SAFI name."; description
"AFI,SAFI name.";
} }
container ipv4-unicast { container ipv4-unicast {
when "../afi-safi-name = 'bt:ipv4-unicast'" { when "../afi-safi-name = 'bt:ipv4-unicast'" {
description description
"Include this container for IPv4 unicast RIB"; "Include this container for IPv4 unicast RIB";
} }
description description
"Routing tables for IPv4 unicast -- active when the "Routing tables for IPv4 unicast -- active when the
afi-safi name is ipv4-unicast"; afi-safi name is ipv4-unicast";
uses ipv4-loc-rib; uses ipv4-loc-rib;
uses ipv4-adj-rib; uses ipv4-adj-rib;
} }
container ipv6-unicast { container ipv6-unicast {
when "../afi-safi-name = 'bt:ipv6-unicast'" { when "../afi-safi-name = 'bt:ipv6-unicast'" {
description description
"Include this container for IPv6 unicast RIB"; "Include this container for IPv6 unicast RIB";
} }
description description
"Routing tables for IPv6 unicast -- active when the "Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast"; afi-safi name is ipv6-unicast";
uses ipv6-loc-rib; uses ipv6-loc-rib;
uses ipv6-adj-rib; uses ipv6-adj-rib;
} }
} }
} }
description description
"Top level container for BGP RIB"; "Top level container for BGP RIB";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-ext@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib-ext@2020-02-24.yang"
submodule ietf-bgp-rib-ext { submodule ietf-bgp-rib-ext {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bre"; prefix bre;
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"Defines additional data nodes for the BGP RIB model. "Defines additional data nodes for the BGP RIB model.
These items reflect extensions that are desirable features but These items reflect extensions that are desirable features but
are not currently supported in a majority of BGP are not currently supported in a majority of BGP
implementations."; implementations.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Revision."; "Initial Revision.";
reference reference
"RFC XXXX: BGP YANG Model for Service Providers."; "RFC XXXX: BGP YANG Model for Service Providers.";
} }
grouping rib-ext-route-annotations { grouping rib-ext-route-annotations {
description description
"Extended annotations for routes in the routing tables"; "Extended annotations for routes in the routing tables";
leaf reject-reason { leaf reject-reason {
type union { type union {
type identityref { type identityref {
base bgp-not-selected-bestpath; base bgp-not-selected-bestpath;
} }
type identityref { type identityref {
base bgp-not-selected-policy; base bgp-not-selected-policy;
} }
} }
description description
skipping to change at page 96, line 20 skipping to change at page 96, line 43
} }
} }
description description
"Indicates the reason the route is not used, either due to "Indicates the reason the route is not used, either due to
policy filtering or bestpath selection"; policy filtering or bestpath selection";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-types@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib-types@2020-02-24.yang"
submodule ietf-bgp-rib-types { submodule ietf-bgp-rib-types {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com), Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org)."; Jeffrey Haas (jhaas at pfrc.org).";
description description
"Defines identity and type definitions associated with "Defines identity and type definitions associated with
the BGP RIB modules"; the BGP RIB modules.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP Model for Service Provider Network."; "RFC XXXX, BGP Model for Service Provider Network.";
} }
identity invalid-route-reason { identity invalid-route-reason {
description description
"Base identity for reason code for routes that are rejected as "Base identity for reason code for routes that are rejected as
invalid. Some derived entities are based on BMP v3"; invalid. Some derived entities are based on BMP v3";
skipping to change at page 99, line 29 skipping to change at page 100, line 23
} }
identity rejected-import-policy { identity rejected-import-policy {
base bgp-not-selected-policy; base bgp-not-selected-policy;
description description
"Route was rejected after apply import policies"; "Route was rejected after apply import policies";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-attributes@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib-attributes@2020-02-24.yang"
submodule ietf-bgp-rib-attributes { submodule ietf-bgp-rib-attributes {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
// import some basic types // import some basic types
import ietf-bgp-types { import ietf-bgp-types {
prefix bgpt; prefix bgpt;
} }
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"This submodule contains common data definitions for BGP "This submodule contains common data definitions for BGP
skipping to change at page 100, line 15 skipping to change at page 101, line 7
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"This submodule contains common data definitions for BGP "This submodule contains common data definitions for BGP
attributes for use in BGP RIB tables."; attributes for use in BGP RIB tables.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Network"; "RFC XXXX: BGP YANG Model for Service Provider Network";
} }
grouping bgp-as-path-attr { grouping bgp-as-path-attr {
description description
"Data for representing BGP AS-PATH attribute"; "Data for representing BGP AS-PATH attribute";
leaf type { leaf type {
type identityref { type identityref {
base bgpt:as-path-segment-type; base bgpt:as-path-segment-type;
} }
description description
"The type of AS-PATH segment"; "The type of AS-PATH segment";
} }
leaf-list member { leaf-list member {
type inet:as-number; type inet:as-number;
description description
"List of the AS numbers in the AS-PATH segment"; "List of the AS numbers in the AS-PATH segment";
} }
} }
grouping bgp-community-attr-state { grouping bgp-community-attr-state {
description description
"Common definition of BGP community attributes"; "Common definition of BGP community attributes";
leaf-list community { leaf-list community {
type union { type union {
type bgpt:bgp-well-known-community-type; type bgpt:bgp-well-known-community-type;
type bgpt:bgp-std-community-type; type bgpt:bgp-std-community-type;
} }
description description
"List of standard or well-known BGP community "List of standard or well-known BGP community
attributes."; attributes.";
} }
} }
skipping to change at page 102, line 37 skipping to change at page 103, line 39
leaf attr-len { leaf attr-len {
type uint16; type uint16;
description description
"One or two octet attribute length field indicating the "One or two octet attribute length field indicating the
length of the attribute data in octets. If the Extended length of the attribute data in octets. If the Extended
Length attribute flag is set, the length field is 2 octets, Length attribute flag is set, the length field is 2 octets,
otherwise it is 1 octet"; otherwise it is 1 octet";
reference reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
} }
leaf attr-value { leaf attr-value {
type binary { type binary {
length 0..65535; length "0..65535";
} }
description description
"Raw attribute value, not including the attribute "Raw attribute value, not including the attribute
flags, type, or length. The maximum length flags, type, or length. The maximum length
of the attribute value data is 2^16-1 per the max value of the attribute value data is 2^16-1 per the max value
of the attr-len field (2 octets)."; of the attr-len field (2 octets).";
reference reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4)"; "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
} }
} }
skipping to change at page 104, line 4 skipping to change at page 104, line 47
paths for a prefix, the path identifier is used to paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the uniquely identify a route based on the combination of the
prefix and path id. In the Adj-RIB-In, the path-id value is prefix and path id. In the Adj-RIB-In, the path-id value is
the value received in the update message. In the Loc-RIB, the value received in the update message. In the Loc-RIB,
if used, it should represent a locally generated path-id if used, it should represent a locally generated path-id
value for the corresponding route. In Adj-RIB-Out, it value for the corresponding route. In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated."; used, i.e., the capability has been negotiated.";
reference reference
"RFC 7911: Advertisement of Multiple Paths in BGP"; "RFC 7911: Advertisement of Multiple Paths in BGP";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-table-attributes@2020-02-24.yang"
<CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-10-03.yang"
submodule ietf-bgp-rib-table-attributes { submodule ietf-bgp-rib-table-attributes {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
// import some basic types // import some basic types
import ietf-yang-types { import ietf-yang-types {
prefix types; prefix types;
reference reference
"RFC 6991, Common YANG Data Types."; "RFC 6991, Common YANG Data Types.";
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com"; Susan Hares (shares at ndzh.com";
description description
"This submodule contains common data definitions for data "This submodule contains common data definitions for data
related to a RIB entry, or RIB table."; related to a RIB entry, or RIB table.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial version."; "Initial version.";
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Network."; "RFC XXXX: BGP YANG Model for Service Provider Network.";
} }
grouping bgp-common-route-annotations-state { grouping bgp-common-route-annotations-state {
description description
"Data definitions for flags and other information attached "Data definitions for flags and other information attached
to routes in both LOC-RIB and Adj-RIB"; to routes in both LOC-RIB and Adj-RIB";
skipping to change at page 105, line 36 skipping to change at page 106, line 44
description description
"If the route is rejected as invalid, this indicates the "If the route is rejected as invalid, this indicates the
reason."; reason.";
} }
} }
grouping bgp-loc-rib-route-annotations-state { grouping bgp-loc-rib-route-annotations-state {
description description
"Data definitions for information attached to routes in the "Data definitions for information attached to routes in the
LOC-RIB"; LOC-RIB";
// placeholder for route metadata specific to the LOC-RIB
// placeholder for route metadata specific to the LOC-RIB
} }
grouping bgp-adj-rib-in-post-route-annotations-state { grouping bgp-adj-rib-in-post-route-annotations-state {
description description
"Data definitions for information attached to routes in the "Data definitions for information attached to routes in the
Adj-RIB-in post-policy table"; Adj-RIB-in post-policy table";
leaf best-path { leaf best-path {
type boolean; type boolean;
description description
"Current path was selected as the best path."; "Current path was selected as the best path.";
} }
} }
grouping bgp-common-table-attrs-state { grouping bgp-common-table-attrs-state {
description description
"Common attributes attached to all routing tables"; "Common attributes attached to all routing tables";
// placeholder for metadata associated with all tables
// placeholder for metadata associated with all tables
} }
grouping bgp-common-table-attrs-top { grouping bgp-common-table-attrs-top {
// no enclosing container as this data will fit under an // no enclosing container as this data will fit under an
// existing LOC-RIB container // existing LOC-RIB container
uses bgp-common-table-attrs-state; uses bgp-common-table-attrs-state;
description description
"Operational state data for data related to the entire "Operational state data for data related to the entire
LOC-RIB"; LOC-RIB";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-tables@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib-tables@2020-02-24.yang"
submodule ietf-bgp-rib-tables { submodule ietf-bgp-rib-tables {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
// import some basic types // import some basic types
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types."; "RFC 6991: Common YANG Data Types.";
} }
import ietf-routing { import ietf-routing {
prefix "rt"; prefix rt;
reference reference
"RFC 8022: A YANG Data Model for Routing Management"; "RFC 8022: A YANG Data Model for Routing Management";
} }
import ietf-bgp-types {
prefix bt;
reference
"RFC XXXX: BGP YANG Model for Service Provider Network.";
}
include ietf-bgp-rib-ext; include ietf-bgp-rib-ext;
include ietf-bgp-rib-attributes; include ietf-bgp-rib-attributes;
include ietf-bgp-rib-table-attributes; include ietf-bgp-rib-table-attributes;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Editor: Mahesh Jethanandani (mjethanandani@gmail.com) Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel, Authors: Keyur Patel,
Mahesh Jethanandani, Mahesh Jethanandani,
Susan Hares"; Susan Hares";
description description
"This submodule contains structural data definitions for "This submodule contains structural data definitions for
BGP routing tables."; BGP routing tables.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP YANG Model for Service Provider Network."; "RFC XXXX, BGP YANG Model for Service Provider Network.";
} }
/*
* Feature(s)
*/
feature clear-routes {
description
"Clearing of BGP routes is supported.";
}
grouping bgp-adj-rib-common-attr-refs { grouping bgp-adj-rib-common-attr-refs {
description description
"Definitions of common references to attribute sets for "Definitions of common references to attribute sets for
multiple AFI-SAFIs for Adj-RIB tables"; multiple AFI-SAFIs for Adj-RIB tables";
leaf attr-index { leaf attr-index {
type leafref { type leafref {
path "../../../../../../../../../attr-sets/" + path "../../../../../../../../../attr-sets/"
"attr-set/index"; + "attr-set/index";
} }
description description
"Reference to the common attribute group for the "Reference to the common attribute group for the
route"; route";
} }
leaf community-index { leaf community-index {
type leafref { type leafref {
path "../../../../../../../../../communities/community/" + path "../../../../../../../../../communities/community/"
"index"; + "index";
} }
description description
"Reference to the community attribute for the route"; "Reference to the community attribute for the route";
} }
leaf ext-community-index { leaf ext-community-index {
type leafref { type leafref {
path "../../../../../../../../../ext-communities/" + path "../../../../../../../../../ext-communities/"
"ext-community/index"; + "ext-community/index";
} }
description description
"Reference to the extended community attribute for the "Reference to the extended community attribute for the
route"; route";
} }
} }
grouping bgp-loc-rib-common-attr-refs { grouping bgp-loc-rib-common-attr-refs {
description description
"Definitions of common references to attribute sets for "Definitions of common references to attribute sets for
skipping to change at page 108, line 28 skipping to change at page 109, line 40
description description
"Reference to the extended community attribute for the "Reference to the extended community attribute for the
route"; route";
} }
} }
grouping bgp-loc-rib-common-attr-refs { grouping bgp-loc-rib-common-attr-refs {
description description
"Definitions of common references to attribute sets for "Definitions of common references to attribute sets for
multiple AFI-SAFIs for LOC-RIB tables"; multiple AFI-SAFIs for LOC-RIB tables";
leaf attr-index { leaf attr-index {
type leafref { type leafref {
path "../../../../../../../attr-sets/attr-set/" + path "../../../../../../../attr-sets/attr-set/"
"index"; + "index";
} }
description description
"Reference to the common attribute group for the "Reference to the common attribute group for the
route"; route";
} }
leaf community-index { leaf community-index {
type leafref { type leafref {
path "../../../../../../../communities/community/" + path "../../../../../../../communities/community/"
"index"; + "index";
} }
description description
"Reference to the community attribute for the route"; "Reference to the community attribute for the route";
} }
leaf ext-community-index { leaf ext-community-index {
type leafref { type leafref {
path "../../../../../../../ext-communities/" + path "../../../../../../../ext-communities/"
"ext-community/index"; + "ext-community/index";
} }
description description
"Reference to the extended community attribute for the "Reference to the extended community attribute for the
route"; route";
} }
} }
grouping bgp-loc-rib-common-keys { grouping bgp-loc-rib-common-keys {
description description
"Common references used in keys for IPv4 and IPv6 "Common references used in keys for IPv4 and IPv6
skipping to change at page 109, line 31 skipping to change at page 110, line 38
base rt:routing-protocol; base rt:routing-protocol;
} }
} }
description description
"Indicates the origin of the route. If the route is learned "Indicates the origin of the route. If the route is learned
from a neighbor, this value is the neighbor address. If from a neighbor, this value is the neighbor address. If
the route was injected or redistributed from another the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the protocol, the origin indicates the source protocol for the
route."; route.";
} }
leaf path-id { leaf path-id {
type uint32; type uint32;
// TODO: YANG does not allow default values for key
// default 0;
description description
"If the route is learned from a neighbor, the path-id "If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the corresponds to the path-id for the route in the
corresponding adj-rib-in-post table. If the route is corresponding adj-rib-in-post table. If the route is
injected from another protocol, or the neighbor does not injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set support BGP add-paths, the path-id should be set
to zero, also the default value."; to zero, also the default value.
However, YANG does not allow default values to be set
for parameters that form the key, so a default value
cannot be set here.";
} }
} }
grouping clear-routes { grouping clear-routes {
description description
"Action to clear BGP routes."; "Action to clear BGP routes.";
container clear-routes { container clear-routes {
if-feature "clear-routes"; if-feature "bt:clear-routes";
action clear { action clear {
input { input {
leaf clear-at { leaf clear-at {
type yang:date-and-time; type yang:date-and-time;
description description
"The time, in the future when the clear operation will "The time, in the future when the clear operation will
be initiated."; be initiated.";
} }
} }
output { output {
leaf clear-finished-at { leaf clear-finished-at {
type yang:date-and-time; type yang:date-and-time;
description description
"The time when the clear operation finished."; "The time when the clear operation finished.";
} }
} }
} }
description description
"Action commands to clear routes governed by a if-feature."; "Action commands to clear routes governed by a if-feature.";
skipping to change at page 116, line 46 skipping to change at page 116, line 45
uses bgp-adj-rib-in-post-route-annotations-state; uses bgp-adj-rib-in-post-route-annotations-state;
uses bgp-unknown-attr-top; uses bgp-unknown-attr-top;
uses rib-ext-route-annotations; uses rib-ext-route-annotations;
} }
} }
} }
grouping ipv6-adj-rib { grouping ipv6-adj-rib {
description description
"Top-level grouping for Adj-RIB table"; "Top-level grouping for Adj-RIB table";
container neighbors { container neighbors {
config false; config false;
description description
"Enclosing container for neighbor list"; "Enclosing container for neighbor list";
list neighbor { list neighbor {
key "neighbor-address"; key "neighbor-address";
description description
"List of neighbors (peers) of the local BGP speaker"; "List of neighbors (peers) of the local BGP speaker";
leaf neighbor-address { leaf neighbor-address {
type inet:ip-address; type inet:ip-address;
description description
"IP address of the BGP neighbor or peer"; "IP address of the BGP neighbor or peer";
} }
container adj-rib-in-pre { container adj-rib-in-pre {
description description
"Per-neighbor table containing the NLRI updates "Per-neighbor table containing the NLRI updates
received from the neighbor before any local input received from the neighbor before any local input
policy rules or filters have been applied. This can policy rules or filters have been applied. This can
be considered the 'raw' updates from the neighbor."; be considered the 'raw' updates from the neighbor.";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
container adj-rib-in-post { container adj-rib-in-post {
description description
"Per-neighbor table containing the paths received from "Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection the neighbor that are eligible for best-path selection
after local input policy rules have been applied."; after local input policy rules have been applied.";
uses ipv6-adj-rib-in-post; uses ipv6-adj-rib-in-post;
} }
container adj-rib-out-pre { container adj-rib-out-pre {
description description
"Per-neighbor table containing paths eligble for "Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output sending (advertising) to the neighbor before output
policy rules have been applied"; policy rules have been applied";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
container adj-rib-out-post { container adj-rib-out-post {
description description
"Per-neighbor table containing paths eligble for "Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output sending (advertising) to the neighbor after output
policy rules have been applied"; policy rules have been applied";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-10-03.yang" <CODE BEGINS> file "ietf-bgp-rib-table-attributes@2020-02-24.yang"
submodule ietf-bgp-rib-table-attributes { submodule ietf-bgp-rib-table-attributes {
yang-version "1.1"; yang-version 1.1;
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix br;
} }
// import some basic types // import some basic types
import ietf-yang-types { import ietf-yang-types {
prefix types; prefix types;
reference reference
"RFC 6991, Common YANG Data Types."; "RFC 6991, Common YANG Data Types.";
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com"; Susan Hares (shares at ndzh.com";
description description
"This submodule contains common data definitions for data "This submodule contains common data definitions for data
related to a RIB entry, or RIB table."; related to a RIB entry, or RIB table.
revision "2019-10-03" { Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-02-24 {
description description
"Initial version."; "Initial version.";
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Network."; "RFC XXXX: BGP YANG Model for Service Provider Network.";
} }
grouping bgp-common-route-annotations-state { grouping bgp-common-route-annotations-state {
description description
"Data definitions for flags and other information attached "Data definitions for flags and other information attached
to routes in both LOC-RIB and Adj-RIB"; to routes in both LOC-RIB and Adj-RIB";
leaf last-modified { leaf last-modified {
type types:timeticks; type types:timeticks;
description description
"Timestamp when this path was last modified. "Timestamp when this path was last modified.
The value is the timestamp in seconds relative to The value is the timestamp in seconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
} }
leaf valid-route { leaf valid-route {
type boolean; type boolean;
description description
"Indicates that the route is considered valid by the "Indicates that the route is considered valid by the
local router"; local router";
} }
leaf invalid-reason { leaf invalid-reason {
type identityref { type identityref {
base invalid-route-reason; base invalid-route-reason;
} }
description description
"If the route is rejected as invalid, this indicates the "If the route is rejected as invalid, this indicates the
reason."; reason.";
} }
} }
skipping to change at page 119, line 38 skipping to change at page 119, line 36
description description
"If the route is rejected as invalid, this indicates the "If the route is rejected as invalid, this indicates the
reason."; reason.";
} }
} }
grouping bgp-loc-rib-route-annotations-state { grouping bgp-loc-rib-route-annotations-state {
description description
"Data definitions for information attached to routes in the "Data definitions for information attached to routes in the
LOC-RIB"; LOC-RIB";
// placeholder for route metadata specific to the LOC-RIB
// placeholder for route metadata specific to the LOC-RIB
} }
grouping bgp-adj-rib-in-post-route-annotations-state { grouping bgp-adj-rib-in-post-route-annotations-state {
description description
"Data definitions for information attached to routes in the "Data definitions for information attached to routes in the
Adj-RIB-in post-policy table"; Adj-RIB-in post-policy table";
leaf best-path { leaf best-path {
type boolean; type boolean;
description description
"Current path was selected as the best path."; "Current path was selected as the best path.";
} }
} }
grouping bgp-common-table-attrs-state { grouping bgp-common-table-attrs-state {
description description
"Common attributes attached to all routing tables"; "Common attributes attached to all routing tables";
// placeholder for metadata associated with all tables
// placeholder for metadata associated with all tables
} }
grouping bgp-common-table-attrs-top { grouping bgp-common-table-attrs-top {
// no enclosing container as this data will fit under an // no enclosing container as this data will fit under an
// existing LOC-RIB container // existing LOC-RIB container
uses bgp-common-table-attrs-state; uses bgp-common-table-attrs-state;
description description
"Operational state data for data related to the entire "Operational state data for data related to the entire
LOC-RIB"; LOC-RIB";
} }
} }
<CODE ENDS> <CODE ENDS>
8. Examples 8. Contributors
This section tries to show some examples in how the model can be
used.
8.1. Creating BGP Instance
This example shows how to enable BGP with the IPv4 unicast address
family, while adding one network to advertise.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-\
unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
8.2. Neighbor Address Family Configuration
This example shows how to configure a BGP peer, where the remote
address is 192.0.2.1, the remote AS number is 64497, and the address
family of the peer is IPv4 unicast.
[note: '\' line wrapping for formatting only]
<!--
This example shows a neighbor configuration with damping.
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type>
<name>name:BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-\
unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<remote-address>192.0.2.1</remote-address>
<peer-as>64497</peer-as>
<route-flap-damping>
<enable>true</enable>
<suppress-above>4.0</suppress-above>
<reuse-above>3.0</reuse-above>
<max-flap>15.0</max-flap>
<reach-decay>100</reach-decay>
<unreach-decay>500</unreach-decay>
<keep-history>1000</keep-history>
</route-flap-damping>
<description>"Peer Router B"</description>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv\
4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</neighbor>
</neighbors>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
8.3. IPv6 Neighbor Configuration
This example shows how to configure a BGP peer, where the remote peer
has a IPv6 address, and uses non-default timers for hold-time and
keepalive.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type>
<name>name:BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv6-\
unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<remote-address>2001:db8::</remote-address>
<enabled>true</enabled>
<peer-as>64497</peer-as>
<description>"Peer Router B"</description>
<timers>
<hold-time>120</hold-time>
<keepalive>70</keepalive>
</timers>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv\
6-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</neighbor>
</neighbors>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
8.4. VRF Configuration
This example shows how BGP can be configured for two VRFs, red and
blue. In this case, the two network instances share a common AS, and
distinguish between the instances using the router id.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-instance">
<network-instance>
<name>vrf-red</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.1</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-u\
nicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
<network-instance>
<name>vrf-blue</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.2</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-u\
nicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
</network-instances>
</config>
9. Contributors
Previous versions of this document saw contributions from Anees Previous versions of this document saw contributions from Anees
Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr
Zhadkin, and Xyfeng Liu. Zhadkin, and Xyfeng Liu.
10. Acknowledgements 9. Acknowledgements
The authors are grateful for valuable contributions to this document The authors are grateful for valuable contributions to this document
and the associated models from: Ebben Aires, Pavan Beeram, Chris and the associated models from: Ebben Aires, Pavan Beeram, Chris
Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh
George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee
Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen- Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen-
Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim
Uttaro, and Gunter Vandevelde. Uttaro, and Gunter Vandevelde.
Credit is also due to authors of the OpenConfig, whose model was Credit is also due to authors of the OpenConfig, whose model was
relied upon to come up with this model. relied upon to come up with this model.
Special thanks to Robert Wilton who helped convert the YANG models to Special thanks to Robert Wilton who helped convert the YANG models to
a NMDA compatible model. a NMDA compatible model.
11. References 10. References
11.1. Normative references 10.1. Normative references
[I-D.scharf-tcpm-yang-tcp]
Scharf, M., Murgai, V., and M. Jethanandani, "YANG Model
for Transmission Control Protocol (TCP) Configuration",
draft-scharf-tcpm-yang-tcp-04 (work in progress), February
2020.
[RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities
Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996, Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996,
<https://www.rfc-editor.org/info/rfc1997>. <https://www.rfc-editor.org/info/rfc1997>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route
Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November
1998, <https://www.rfc-editor.org/info/rfc2439>. 1998, <https://www.rfc-editor.org/info/rfc2439>.
[RFC2918] Chen, E., "Route Refresh Capability for BGP-4", RFC 2918,
DOI 10.17487/RFC2918, September 2000,
<https://www.rfc-editor.org/info/rfc2918>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", RFC 4271, Border Gateway Protocol 4 (BGP-4)", RFC 4271,
DOI 10.17487/RFC4271, January 2006, DOI 10.17487/RFC4271, January 2006,
<https://www.rfc-editor.org/info/rfc4271>. <https://www.rfc-editor.org/info/rfc4271>.
[RFC4364] Rosen, E. and Y. Rekhter, "BGP/MPLS IP Virtual Private
Networks (VPNs)", RFC 4364, DOI 10.17487/RFC4364, February
2006, <https://www.rfc-editor.org/info/rfc4364>.
[RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route
Reflection: An Alternative to Full Mesh Internal BGP Reflection: An Alternative to Full Mesh Internal BGP
(IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006,
<https://www.rfc-editor.org/info/rfc4456>. <https://www.rfc-editor.org/info/rfc4456>.
[RFC4659] De Clercq, J., Ooms, D., Carugi, M., and F. Le Faucheur,
"BGP-MPLS IP Virtual Private Network (VPN) Extension for
IPv6 VPN", RFC 4659, DOI 10.17487/RFC4659, September 2006,
<https://www.rfc-editor.org/info/rfc4659>.
[RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724,
DOI 10.17487/RFC4724, January 2007, DOI 10.17487/RFC4724, January 2007,
<https://www.rfc-editor.org/info/rfc4724>. <https://www.rfc-editor.org/info/rfc4724>.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760, "Multiprotocol Extensions for BGP-4", RFC 4760,
DOI 10.17487/RFC4760, January 2007, DOI 10.17487/RFC4760, January 2007,
<https://www.rfc-editor.org/info/rfc4760>. <https://www.rfc-editor.org/info/rfc4760>.
[RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private
LAN Service (VPLS) Using BGP for Auto-Discovery and
Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007,
<https://www.rfc-editor.org/info/rfc4761>.
[RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous
System Confederations for BGP", RFC 5065, System Confederations for BGP", RFC 5065,
DOI 10.17487/RFC5065, August 2007, DOI 10.17487/RFC5065, August 2007,
<https://www.rfc-editor.org/info/rfc5065>. <https://www.rfc-editor.org/info/rfc5065>.
[RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
(BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
<https://www.rfc-editor.org/info/rfc5880>.
[RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
(BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881,
DOI 10.17487/RFC5881, June 2010,
<https://www.rfc-editor.org/info/rfc5881>.
[RFC5883] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
(BFD) for Multihop Paths", RFC 5883, DOI 10.17487/RFC5883,
June 2010, <https://www.rfc-editor.org/info/rfc5883>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>. <https://www.rfc-editor.org/info/rfc6020>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
<https://www.rfc-editor.org/info/rfc6242>. <https://www.rfc-editor.org/info/rfc6242>.
[RFC6514] Aggarwal, R., Rosen, E., Morin, T., and Y. Rekhter, "BGP
Encodings and Procedures for Multicast in MPLS/BGP IP
VPNs", RFC 6514, DOI 10.17487/RFC6514, February 2012,
<https://www.rfc-editor.org/info/rfc6514>.
[RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet
Autonomous System (AS) Number Space", RFC 6793,
DOI 10.17487/RFC6793, December 2012,
<https://www.rfc-editor.org/info/rfc6793>.
[RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R. [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
Austein, "BGP Prefix Origin Validation", RFC 6811, Austein, "BGP Prefix Origin Validation", RFC 6811,
DOI 10.17487/RFC6811, January 2013, DOI 10.17487/RFC6811, January 2013,
<https://www.rfc-editor.org/info/rfc6811>. <https://www.rfc-editor.org/info/rfc6811>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013, RFC 6991, DOI 10.17487/RFC6991, July 2013,
<https://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
[RFC7911] Walton, D., Retana, A., Chen, E., and J. Scudder,
"Advertisement of Multiple Paths in BGP", RFC 7911,
DOI 10.17487/RFC7911, July 2016,
<https://www.rfc-editor.org/info/rfc7911>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J.
Zhang, "YANG Data Model for Key Chains", RFC 8177,
DOI 10.17487/RFC8177, June 2017,
<https://www.rfc-editor.org/info/rfc8177>.
[RFC8277] Rosen, E., "Using BGP to Bind MPLS Labels to Address
Prefixes", RFC 8277, DOI 10.17487/RFC8277, October 2017,
<https://www.rfc-editor.org/info/rfc8277>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341, Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018, DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>. <https://www.rfc-editor.org/info/rfc8341>.
[RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
Routing Management (NMDA Version)", RFC 8349, Routing Management (NMDA Version)", RFC 8349,
DOI 10.17487/RFC8349, March 2018, DOI 10.17487/RFC8349, March 2018,
<https://www.rfc-editor.org/info/rfc8349>. <https://www.rfc-editor.org/info/rfc8349>.
skipping to change at page 128, line 32 skipping to change at page 124, line 23
[RFC8528] Bjorklund, M. and L. Lhotka, "YANG Schema Mount", [RFC8528] Bjorklund, M. and L. Lhotka, "YANG Schema Mount",
RFC 8528, DOI 10.17487/RFC8528, March 2019, RFC 8528, DOI 10.17487/RFC8528, March 2019,
<https://www.rfc-editor.org/info/rfc8528>. <https://www.rfc-editor.org/info/rfc8528>.
[RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X. [RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X.
Liu, "YANG Data Model for Network Instances", RFC 8529, Liu, "YANG Data Model for Network Instances", RFC 8529,
DOI 10.17487/RFC8529, March 2019, DOI 10.17487/RFC8529, March 2019,
<https://www.rfc-editor.org/info/rfc8529>. <https://www.rfc-editor.org/info/rfc8529>.
11.2. Informative references 10.2. Informative references
[I-D.ietf-bfd-yang] [I-D.ietf-bfd-yang]
Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and Rahman, R., Zheng, L., Jethanandani, M., Pallagatti, S.,
G. Mirsky, "YANG Data Model for Bidirectional Forwarding and G. Mirsky, "YANG Data Model for Bidirectional
Detection (BFD)", draft-ietf-bfd-yang-17 (work in Forwarding Detection (BFD)", draft-ietf-bfd-yang-17 (work
progress), August 2018. in progress), August 2018.
[I-D.ietf-rtgwg-policy-model] [I-D.ietf-rtgwg-policy-model]
Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data Qu, Y., Tantsura, J., Lindem, A., and X. Liu, "A YANG Data
Model for Routing Policy Management", draft-ietf-rtgwg- Model for Routing Policy Management", draft-ietf-rtgwg-
policy-model-07 (work in progress), September 2019. policy-model-08 (work in progress), January 2020.
[RFC3765] Huston, G., "NOPEER Community for Border Gateway Protocol
(BGP) Route Scope Control", RFC 3765,
DOI 10.17487/RFC3765, April 2004,
<https://www.rfc-editor.org/info/rfc3765>.
[RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C. [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C.
Pignataro, "The Generalized TTL Security Mechanism Pignataro, "The Generalized TTL Security Mechanism
(GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007, (GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007,
<https://www.rfc-editor.org/info/rfc5082>. <https://www.rfc-editor.org/info/rfc5082>.
[RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
(BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
<https://www.rfc-editor.org/info/rfc5880>.
[RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP
Authentication Option", RFC 5925, DOI 10.17487/RFC5925, Authentication Option", RFC 5925, DOI 10.17487/RFC5925,
June 2010, <https://www.rfc-editor.org/info/rfc5925>. June 2010, <https://www.rfc-editor.org/info/rfc5925>.
[RFC7454] Durand, J., Pepelnjak, I., and G. Doering, "BGP Operations [RFC7454] Durand, J., Pepelnjak, I., and G. Doering, "BGP Operations
and Security", BCP 194, RFC 7454, DOI 10.17487/RFC7454, and Security", BCP 194, RFC 7454, DOI 10.17487/RFC7454,
February 2015, <https://www.rfc-editor.org/info/rfc7454>. February 2015, <https://www.rfc-editor.org/info/rfc7454>.
[RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP [RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP
Monitoring Protocol (BMP)", RFC 7854, Monitoring Protocol (BMP)", RFC 7854,
DOI 10.17487/RFC7854, June 2016, DOI 10.17487/RFC7854, June 2016,
<https://www.rfc-editor.org/info/rfc7854>. <https://www.rfc-editor.org/info/rfc7854>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>. <https://www.rfc-editor.org/info/rfc8342>.
Appendix A. How to add a new AFI and Augment a Module Appendix A. Examples
This section tries to show some examples in how the model can be
used.
A.1. Creating BGP Instance
This example shows how to enable BGP with the IPv4 unicast address
family, while adding one network to advertise.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
A.2. Neighbor Address Family Configuration
This example shows how to configure a BGP peer, where the remote
address is 192.0.2.1, the remote AS number is 64497, and the address
family of the peer is IPv4 unicast.
[note: '\' line wrapping for formatting only]
<!--
This example shows a neighbor configuration with damping.
-->
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type>
<name>name:BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<remote-address>192.0.2.1</remote-address>
<peer-as>64497</peer-as>
<route-flap-damping>
<enable>true</enable>
<suppress-above>4.0</suppress-above>
<reuse-above>3.0</reuse-above>
<max-flap>15.0</max-flap>
<reach-decay>100</reach-decay>
<unreach-decay>500</unreach-decay>
<keep-history>1000</keep-history>
</route-flap-damping>
<description>"Peer Router B"</description>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</neighbor>
</neighbors>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
A.3. IPv6 Neighbor Configuration
This example shows how to configure a BGP peer, where the remote peer
has a IPv6 address, uses TCP-AO to secure the session with the peer,
and uses non-default timers for hold-time and keepalive.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<key-chains
xmlns="urn:ietf:params:xml:ns:yang:ietf-key-chain">
<key-chain>
<name>bgp-key-chain</name>
</key-chain>
</key-chains>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type>
<name>name:BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv6-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<remote-address>2001:db8::</remote-address>
<enabled>true</enabled>
<secure-session-enable>true</secure-session-enable>
<secure-session>
<ao-keychain>bgp-key-chain</ao-keychain>
</secure-session>
<peer-as>64497</peer-as>
<description>"Peer Router B"</description>
<timers>
<hold-time>120</hold-time>
<keepalive>70</keepalive>
</timers>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv6-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</neighbor>
</neighbors>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
A.4. VRF Configuration
This example shows how BGP can be configured for two VRFs, red and
blue. In this case, the two network instances share a common AS, and
distinguish between the instances using the router id.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-instance">
<network-instance>
<name>vrf-red</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.1</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm=
"urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
<network-instance>
<name>vrf-blue</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.2</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm=
"urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt=
"urn:ietf:params:xml:ns:yang:ietf-bgp-types">
bt:ipv4-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
</network-instances>
</config>
Appendix B. How to add a new AFI and Augment a Module
This section explains how a new AFI can be defined in a new module This section explains how a new AFI can be defined in a new module
and how that module can then be augmented. Assume that the new AFI and how that module can then be augmented. Assume that the new AFI
being defined is called 'foo' which extends the base identity of being defined is called 'foo' which extends the base identity of
'afi-safi-type', and the augmentation is to add a new container for 'afi-safi-type', and the augmentation is to add a new container for
'foo' under two different XPaths. The example shows how the base 'foo' under two different XPaths. The example shows how the base
identity can be extended to add this new AFI, and then use the identity can be extended to add this new AFI, and then use the
augmented containers be used to add 'foo' specific information. augmented containers be used to add 'foo' specific information.
module example-newafi-bgp { module example-newafi-bgp {
skipping to change at page 130, line 15 skipping to change at page 132, line 10
} }
organization organization
"Newafi model group."; "Newafi model group.";
contact contact
"abc@newafi.com"; "abc@newafi.com";
description description
"This YANG module defines and uses new AFI."; "This YANG module defines and uses new AFI.";
revision 2019-10-03 { revision 2020-02-24 {
description description
"Creating new AFI and using in this model"; "Creating new AFI and using in this model";
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Network."; "RFC XXXX: BGP YANG Model for Service Provider Network.";
} }
identity foo { identity foo {
base bt:afi-safi-type; base bt:afi-safi-type;
description description
skipping to change at page 131, line 9 skipping to change at page 133, line 5
"This augmentation is valid for a AFI/SAFI instance "This augmentation is valid for a AFI/SAFI instance
of 'foo'"; of 'foo'";
} }
container foo { container foo {
description description
"Container to add 'foo' rib specific information."; "Container to add 'foo' rib specific information.";
} }
} }
} }