draft-ietf-idr-bgp-model-09.txt   draft-ietf-idr-bgp-model-10.txt 
Interdomain Routing M. Jethanandani Interdomain Routing M. Jethanandani
Internet-Draft Kloud Services Internet-Draft Kloud Services
Intended status: Standards Track K. Patel Intended status: Standards Track K. Patel
Expires: December 30, 2020 Arrcus Expires: May 20, 2021 Arrcus
S. Hares S. Hares
Huawei Huawei
J. Haas J. Haas
Juniper Networks Juniper Networks
June 28, 2020 November 16, 2020
BGP YANG Model for Service Provider Networks BGP YANG Model for Service Provider Networks
draft-ietf-idr-bgp-model-09 draft-ietf-idr-bgp-model-10
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
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 December 30, 2020. This Internet-Draft will expire on May 20, 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 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
skipping to change at page 2, line 27 skipping to change at page 2, line 27
2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6
2.2. Policy configuration overview . . . . . . . . . . . . . . 9 2.2. Policy configuration overview . . . . . . . . . . . . . . 9
2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10 2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10
2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12 2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12
2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12 2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12
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 . . . . . . . . . . . . . . . . . . . . . 14
5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14
5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 15
6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 15
7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 16
7.1. Main module and submodules for base items . . . . . . . . 16 7.1. Main module and submodules for base items . . . . . . . . 16
7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 64 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 65
7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 76 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 77
7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 86 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 89
8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 120 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 120
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 120 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 120
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 121 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 121
10.1. Normative references . . . . . . . . . . . . . . . . . . 121 10.1. Normative references . . . . . . . . . . . . . . . . . . 121
10.2. Informative references . . . . . . . . . . . . . . . . . 124 10.2. Informative references . . . . . . . . . . . . . . . . . 124
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 125 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 125
A.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 125 A.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 125
A.2. Neighbor Address Family Configuration . . . . . . . . . . 126 A.2. Neighbor Address Family Configuration . . . . . . . . . . 126
A.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 128 A.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 128
A.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 129 A.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 129
Appendix B. How to add a new AFI and Augment a Module . . . . . 131 Appendix B. How to add a new AFI and Augment a Module . . . . . 131
Appendix C. How to deviate a module . . . . . . . . . . . . . . 133 Appendix C. How to deviate a module . . . . . . . . . . . . . . 133
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 133 Appendix D. Complete tree diagram . . . . . . . . . . . . . . . 133
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 153
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 a 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
existing implementations to facilitate support from as large a set of existing implementations to facilitate support from as large a set of
routing hardware and software vendors as possible. This module does routing hardware and software vendors as possible. This module does
not support previous versions of BGP, and cannot support establishing not support previous versions of BGP, and cannot support establishing
and maintaining state information of neighbors with previous versions and maintaining state information of neighbors with previous versions
of BGP. of BGP.
1.1. Goals and approach 1.1. Goals and approach
skipping to change at page 3, line 43 skipping to change at page 3, line 43
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]. Management [I-D.ietf-rtgwg-policy-model].
The model conforms to the NMDA [RFC8342] architecture. It has The model conforms to the NMDA [RFC8342] architecture. It has
support for securing BGP sessions using TCP-AO [RFC5925] or TCP-MD5, support for securing BGP sessions using TCP-AO [RFC5925] or TCP-MD5,
and for configuring Bidirectional Forward Detection (BFD) [RFC5880] and for configuring Bidirectional Forward Detection (BFD) [RFC5880]
for fast next hop liveliness check. for fast next hop liveliness checking.
For the base BGP features, the focus of the model described in this For the base BGP features, the focus of the model described in this
document is on providing configuration and operational state document is on providing configuration and operational state
information relating to: information relating to:
o The global BGP instance, and neighbors whose configuration is o The global BGP instance, and neighbors whose configuration is
specified individually, or templated with the use of peer-groups. specified individually, or templated with the use of peer-groups.
o The address families that are supported by peers, and the global o The address families that are supported by peers, and the global
configuration which relates to them. configuration which relates to them.
o The policy configuration "hooks" and BGP-specific policy features o The policy configuration "hooks" and BGP-specific policy features
that relate to a neighbor - controlling the import and export of that relate to a neighbor - controlling the import and export of
NLRIs. NLRIs.
o RIB contents. o BGP RIB contents.
As mentioned earlier, any configuration items that are deemed to be As mentioned earlier, any configuration items that are deemed to be
widely available in existing major BGP implementations are included widely available in existing major BGP implementations are included
in the model. Additional, more esoteric, configuration items that in the model. Additional, more esoteric, configuration items that
are not commonly used, or only available from a single are not commonly used, or only available from a single
implementation, are omitted from the model with an expectation that implementation, are omitted from the model with an expectation that
they will be available in companion modules that augment or extend they will be available in companion modules that augment or extend
the current model. This allows clarity in identifying data that is the current model. This allows clarity in identifying data that is
part of the vendor-neutral base model. part of the vendor-neutral base model.
skipping to change at page 4, line 43 skipping to change at page 4, line 43
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.
2020-06-28 with the actual date of the publication of this document. 2020-11-15 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 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].
1.3. Terminology 1.3. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
skipping to change at page 7, line 40 skipping to change at page 7, line 40
| +--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
Users may specify configuration at a higher level and have it apply Users may specify configuration at a higher level and have it apply
to all lower-level items, or provide overriding configuration at a to all lower-level items, or provide overriding configuration at a
lower level of the hierarchy. Overriding configuration items are lower level of the hierarchy. Overriding configuration items are
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 config. A notable exception
is for sub-address family configuration where some items are only is for sub-address family configuration where some items are only
applicable for a given AFI-SAFI combination. 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
parameters, the BGP best path route selection options, or global parameters, the BGP best-path route selection options, or global
policies relating to the address-family); and on a per-neighbor or policies relating to the address-family); and on a per-neighbor or
per-peer-group basis, where address-families can be enabled or per-peer-group basis, where address-families can be enabled or
disabled, and policy associated with the parent entity applied. disabled, and policy associated with the parent entity applied.
Within the afi-safi container, generic configuration that applies to Within the afi-safi container, generic configuration that applies to
all address-families (e.g., whether the AFI-SAFI is enabled) is all address-families (e.g., whether the AFI-SAFI is enabled) is
presented at the top-level, with address-family specific containers presented at the top-level, with address-family specific containers
made available for options relating to only that AFI-SAFI. Within made available for options relating to only that AFI-SAFI. Within
the current revision of the model a generic set of address-families, the current revision of the model a generic set of address-families,
and common configuration and state options are included - further and common configuration and state options are included - further
work is expected to add additional parameters to this area of the work is expected to add additional parameters to this area of the
model. model.
The following address-families are currently supported by the model: The model supports ipv4-unicast and ipv6-unicast address-families and
defers the remaining AFI/SAFI to other or future drafts:
+--rw bgp +--rw bgp
+--rw global! +--rw global!
+--rw afi-safis +--rw afi-safis
+--rw afi-safi* [afi-safi-name] +--rw afi-safi* [afi-safi-name]
+--rw afi-safi-name identityref +--rw afi-safi-name identityref
| |
+--rw ipv4-unicast +--rw ipv4-unicast
| ... | ...
+--rw ipv6-unicast +--rw ipv6-unicast
skipping to change at page 10, line 33 skipping to change at page 10, line 33
/rpol:policy-definition/rpol:policy-statements /rpol:policy-definition/rpol:policy-statements
/rpol:statement/rpol:actions: /rpol:statement/rpol:actions:
+--rw bgp-actions +--rw bgp-actions
... ...
2.3. BGP RIB overview 2.3. BGP RIB overview
The RIB data model represents the BGP RIB contents. The model The RIB data model represents the BGP RIB contents. The model
supports five logical RIBs per address family. supports five logical RIBs per address family.
A abridged version of the tree shows the RIB portion of the tree An abridged version of the tree shows the RIB portion of the tree
diagram. diagram.
module: ietf-bgp module: ietf-bgp
augment /rt:routing/rt:control-plane-protocols augment /rt:routing/rt:control-plane-protocols
/rt:control-plane-protocol: /rt:control-plane-protocol:
+--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
skipping to change at page 12, line 10 skipping to change at page 12, line 10
+--ro adj-rib-out-pre +--ro adj-rib-out-pre
| ... | ...
+--ro adj-rib-out-post +--ro adj-rib-out-post
... ...
2.3.1. Local Routing 2.3.1. Local Routing
The loc-rib is the main BGP routing table for the local routing The loc-rib is the main BGP routing table for the local routing
instance, containing best-path selections for each prefix. The loc- instance, containing best-path selections for each prefix. The loc-
rib table may contain multiple routes for a given prefix, with an rib table may contain multiple routes for a given prefix, with an
attribute to indicate which was selected as the best path. Note that attribute to indicate which was selected as the best-path. Note that
multiple paths may be used or advertised even if only one path is multiple paths may be used or advertised even if only one path is
marked as best, e.g., when using BGP add-paths. An implementation marked as best, e.g., when using BGP add-paths. An implementation
may choose to mark multiple paths in the RIB as best path by setting may choose to mark multiple paths in the RIB as best-path by setting
the flag to true for multiple entries. the flag to true for multiple entries.
2.3.2. Pre updates per-neighbor 2.3.2. Pre updates per-neighbor
The adj-rib-in-pre table is a per-neighbor table containing the NLRI The adj-rib-in-pre table is a per-neighbor table containing the NLRI
updates received from the neighbor before any local input policy updates received from the neighbor before any local input policy
rules or filters have been applied. This can be considered the 'raw' rules or filters have been applied. This can be considered the 'raw'
updates from a given neighbor. updates from a given neighbor.
2.3.3. Post updates per-neighbor 2.3.3. Post updates per-neighbor
skipping to change at page 12, line 39 skipping to change at page 12, line 39
2.3.4. Pre route advertisements per-neighbor 2.3.4. Pre route advertisements per-neighbor
The adj-rib-out-pre table is a per-neighbor table containing routes The adj-rib-out-pre table 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.
2.3.5. Post route advertisements per-neighbor 2.3.5. Post route advertisements per-neighbor
The adj-rib-out-post table is a per-neighbor table containing routes The adj-rib-out-post table 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.
3. Relation to other YANG data models 3. Relation to other YANG data models
The BGP model augments the Routing Management model A YANG Data Model The BGP model augments the Routing Management model A YANG Data Model
for Routing Management [RFC8349] which defines the notion of routing, for Routing Management [RFC8349] which defines the notion of routing,
routing protocols, and RIBs. The notion of Virtual Routing and routing protocols, and RIBs. The notion of Virtual Routing and
Forwarding (VRF) is derived by using the YANG Schema Mount [RFC8528] Forwarding (VRF) is derived by using the YANG Schema Mount [RFC8528]
to mount the Routing Management module under the YANG Data Model for to mount the Routing Management module under the YANG Data Model for
Network Instances [RFC8529]. Network Instances [RFC8529].
skipping to change at page 13, line 23 skipping to change at page 13, line 23
[RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341]
provides the means to restrict access for particular NETCONF or provides the means to restrict access for particular NETCONF or
RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content. RESTCONF protocol operations and content.
There are a number of data nodes defined in this YANG module that are There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the writable/creatable/deletable (i.e., config true, which is the
default). These data nodes may be considered sensitive or vulnerable default). These data nodes may be considered sensitive or vulnerable
in some network environments. Write operations (e.g., edit-config) in some network environments. Write operations (e.g., edit-config)
to these data nodes without proper protection can have a negative to these data nodes without proper protection can have a negative
effect on network operations. These are the subtrees and data nodes effect on network operations. Some of the subtrees and data nodes
and their sensitivity/vulnerability: and their sensitivity/vulnerability are described here.
- The attribute 'as'. If a user is allowed to change this attribute,
it will have the net effect of bringing down the entire routing
instance, causing it to delete all the current routing entries, and
learning new ones.
- The attribute 'identifier'. If a user is allowed to change this
attribute, it will have the net effect of this routing instance re-
advertising all its routes.
- The attribute 'distance'. If a user is allowed to change this
attribute, it will cause the preference for routes, e.g. external vs
internal to change.
- The attribute 'enabled' in the 'confederation' container. This
attribute defines whether a local-AS is part of a BGP federation.
- Finally, there are a whole set of route selection options such as
'always-compare-med', 'ignore-as-path-length' that affect the way the
system picks up a particular route. Being able to change will
adversely affect how the route selection happens.
Some of the readable data nodes in this YANG module may be considered Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data notification) to these data nodes. Some of the subtrees and data
nodes and their sensitivity/vulnerability: nodes and their sensitivity/vulnerability are:
- The list of neighbors, and their attributes. Allowing a user to
read these attributes, in particular the address/port information may
allow a malicious user to launch an attack at the particular address/
port.
- The 'rib' container. This container contains sensitive information
such as attribute sets, communities and external communities. Being
able to read the contents of this container will allow a malicious
user to understand how the system decide how to route a packet, and
thus try to affect a change.
Some of the RPC operations in this YANG module may be considered Some of the RPC operations in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus sensitive or vulnerable in some network environments. It is thus
important to control access to these operations. These are the important to control access to these operations. These are the
operations and their sensitivity/vulnerability: operations and their sensitivity/vulnerability:
- The model allows for routes to be cleared using the 'clear' RPC
operations, causing the entire RIB table to be cleared.
- The model allows for statistics to be cleared by the 'clear' RPC
operation, causing all the individual statistics to be cleared.
- The model also allows for neighbors that have been learnt by the
system to be cleared by using the 'clear' RPC operation.
BGP OPSEC [RFC7454] describes several policies that can be used to BGP OPSEC [RFC7454] describes several policies that can be used to
secure a BGP. In particular, it recommends securing the underlying secure a BGP. In particular, it recommends securing the underlying
TCP session and to use Generalized TTL Security Mechanism (GTSM) TCP session and to use Generalized TTL Security Mechanism (GTSM)
[RFC5082] capability to make it harder to spoof a BGP session. This [RFC5082] capability to make it harder to spoof a BGP session. This
module allows implementations that want to support the capability to module allows implementations that want to support the capability to
configure a TTL value, under a feature flag. It also defines a configure a TTL value, under a feature flag. It also defines a
container 'secure-session' that can be augmented with TCP- container 'secure-session' that can be augmented with TCP-
Authentication Option (TCP-AO) [RFC5925], or other methods to secure Authentication Option (TCP-AO) [RFC5925], or other methods to secure
a BGP session, and will be developed in a future version of this a BGP session, and will be developed in a future version of this
draft. draft.
5. IANA Considerations 5. IANA Considerations
This document registers three URIs and three YANG modules. This document registers three URIs and three YANG modules.
5.1. URI Registration 5.1. URI Registration
in the IETF XML registry [RFC3688] [RFC3688]. Following the format Following the format in the IETF XML registry [RFC3688] [RFC3688],
in RFC 3688, the following registration is requested to be made: the following registration is requested to be made:
URI: urn:ietf:params:xml:ns:yang:ietf-bgp URI: urn:ietf:params:xml:ns:yang:ietf-bgp
URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy URI: urn:ietf:params:xml:ns:yang:ietf-bgp-policy
URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types
Registrant Contact: The IESG. XML: N/A, the requested URI is an XML Registrant Contact: The IESG. XML: N/A, the requested URI is an XML
namespace. namespace.
5.2. YANG Module Name Registration 5.2. YANG Module Name Registration
This document registers three YANG module in the YANG Module Names This document registers three YANG modules in the YANG Module Names
registry YANG [RFC6020]. registry YANG [RFC6020].
name: ietf-bgp name: ietf-bgp
namespace: urn:ietf:params:xml:ns:yang:ietf-bgp namespace: urn:ietf:params:xml:ns:yang:ietf-bgp
prefix: bgp prefix: bgp
reference: RFC XXXX reference: RFC XXXX
name: ietf-bgp-policy name: ietf-bgp-policy
namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy
prefix: bp prefix: bp
skipping to change at page 15, line 35 skipping to change at page 16, line 24
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. It references BGP items, types, policy data, and the RIB module. It references BGP
Communities Attribute [RFC1997], Route Refresh Capability for BGP-4 Communities Attribute [RFC1997], Route Refresh Capability for BGP-4
[RFC2918], , NOPEER Community for BGP [RFC3765], BGP/MPLS IP Virtual [RFC2918], NOPEER Community for BGP [RFC3765], BGP/MPLS IP Virtual
Private Networks (VPNs) [RFC4364], BGP-MPLS IP Virtual Private Private Networks (VPNs) [RFC4364], BGP-MPLS IP Virtual Private
Network (VPN) Extension for IPv6 VPN [RFC4659], Graceful Restart Network (VPN) Extension for IPv6 VPN [RFC4659], Graceful Restart
Mechanism for BGP [RFC4724], Multiprotocol Extenstions for BGP-4 Mechanism for BGP [RFC4724], Multiprotocol Extentions for BGP-4
[RFC4760], Virtual Private LAN Service (VPLS) Using BGP for Auto- [RFC4760], Virtual Private LAN Service (VPLS) Using BGP for Auto-
Discovery and Signaling [RFC4761], Autonomous System Configuration Discovery and Signaling [RFC4761], Autonomous System Configuration
for BGP [RFC5065], The Generalized TTL Security Mechanism (GTSM) for BGP [RFC5065], The Generalized TTL Security Mechanism (GTSM)
[RFC5082], Bidirectional Forward Detection (BFD) [RFC5880], [RFC5082], Bidirectional Forward Detection (BFD) [RFC5880],
Bidirectional Forward Detection for IPv4 and IPv6 (Single Hop) Bidirectional Forward Detection for IPv4 and IPv6 (Single Hop)
[RFC5881], Bidirectional Forwarding Detection (BFD) for Multihop [RFC5881], Bidirectional Forwarding Detection (BFD) for Multihop
Paths [RFC5883], The TCP Authentication Option [RFC5925], BGP Paths [RFC5883], The TCP Authentication Option [RFC5925], BGP
Encodings and Procedures for Multicast in MPLS/BGP IP VPNs [RFC6514], Encodings and Procedures for Multicast in MPLS/BGP IP VPNs [RFC6514],
BGP Support for Four-Octet Autonomous System (AS) Number Space BGP Support for Four-Octet Autonomous System (AS) Number Space
[RFC6793], Advertisement of Multiple Paths in BGP [RFC7911], YANG Key [RFC6793], Advertisement of Multiple Paths in BGP [RFC7911], YANG Key
Chain [RFC8177], and Carrying Label Information in BGP-4 [RFC8277]. Chain [RFC8177], and Carrying Label Information in BGP-4 [RFC8277].
7.1. Main module and submodules for base items 7.1. Main module and submodules for base items
<CODE BEGINS> file "ietf-bgp@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp@2020-11-15.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 {
prefix rt; prefix rt;
reference reference
"RFC 8349, A YANG Data Model for Routing Management "RFC 8349, A YANG Data Model for Routing Management
(NMDA Version)"; (NMDA Version).";
} }
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
reference reference
"RFC ZZZZ, A YANG Data Model for Routing Policy Management"; "RFC ZZZZ, A YANG Data Model for Routing Policy Management.";
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
reference reference
"RFC 8343, A YANG Data Model for Interface Management."; "RFC 8343, A YANG Data Model for Interface Management.";
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
reference reference
"RFC XXXX, BGP YANG Model for Service Provider Network."; "RFC XXXX, BGP YANG Model for Service Provider Network.";
skipping to change at page 17, line 16 skipping to change at page 17, line 51
reference reference
"RFC 8177: YANG Key Chain."; "RFC 8177: YANG Key Chain.";
} }
import ietf-tcp { import ietf-tcp {
prefix tcp; prefix tcp;
reference reference
"I-D.scharf-tcpm-yang-tcp: Transmission Control Protocol (TCP) "I-D.scharf-tcpm-yang-tcp: Transmission Control Protocol (TCP)
YANG Model."; YANG Model.";
} }
include ietf-bgp-common { include ietf-bgp-common {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-common-multiprotocol { include ietf-bgp-common-multiprotocol {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-common-structure { include ietf-bgp-common-structure {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-neighbor { include ietf-bgp-neighbor {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-peer-group { include ietf-bgp-peer-group {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-rib-types { include ietf-bgp-rib-types {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-rib { include ietf-bgp-rib {
revision-date 2020-06-28; revision-date 2020-11-15;
}
include ietf-bgp-rib-ext {
revision-date 2020-06-28;
} }
include ietf-bgp-rib-attributes { include ietf-bgp-rib-attributes {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-rib-table-attributes { include ietf-bgp-rib-table-attributes {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
include ietf-bgp-rib-tables { include ietf-bgp-rib-tables {
revision-date 2020-06-28; revision-date 2020-11-15;
} }
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),
skipping to change at page 18, line 36 skipping to change at page 19, line 20
+-> [ 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 ]
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2020 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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
*/ */
skipping to change at page 19, line 41 skipping to change at page 20, line 24
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
instance of BGP."; instance of BGP.";
} }
description description
"BGP protocol augmentation of ietf-routing module "BGP protocol augmentation of ietf-routing module
control-plane-protocol."; control-plane-protocol.";
container bgp { container bgp {
description description
"Top-level configuration for the BGP router"; "Top-level configuration for the BGP router.";
container global { container global {
presence "Enables global configuration of BGP"; presence "Enables global configuration of BGP";
description description
"Global configuration for the BGP router"; "Global configuration for the BGP router.";
leaf as { leaf as {
type inet:as-number; type inet:as-number;
mandatory true; mandatory true;
description description
"Local autonomous system number of the router. Uses "Local autonomous system number of the router. Uses
the 32-bit as-number type from the model in RFC 6991."; the 32-bit as-number type from the model in RFC 6991.";
} }
leaf identifier { leaf identifier {
type yang:dotted-quad; type yang:dotted-quad;
description description
"BGP Identifier of the router - an unsigned 32-bit, "BGP Identifier of the router - an unsigned 32-bit,
non-zero integer that should be unique within an AS. non-zero integer that should be unique within an AS.
The value of the BGP Identifier for a BGP speaker is The value of the BGP Identifier for a BGP speaker is
determined upon startup and is the same for every local determined upon startup and is the same for every local
interface and BGP peer."; interface and BGP peer.";
reference reference
skipping to change at page 20, line 19 skipping to change at page 20, line 49
"BGP Identifier of the router - an unsigned 32-bit, "BGP Identifier of the router - an unsigned 32-bit,
non-zero integer that should be unique within an AS. non-zero integer that should be unique within an AS.
The value of the BGP Identifier for a BGP speaker is The value of the BGP Identifier for a BGP speaker is
determined upon startup and is the same for every local determined upon startup and is the same for every local
interface and BGP peer."; interface and BGP peer.";
reference reference
"RFC 6286: AS-Wide Unique BGP ID for BGP-4. Section 2.1"; "RFC 6286: AS-Wide Unique BGP ID for BGP-4. Section 2.1";
} }
container distance { container distance {
description description
"Administrative distance (or preference) assigned to "Administrative distances (or preferences) assigned to
routes received from different sources routes received from different sources (external, and
(external, internal, and local)."; internal).";
leaf external { leaf external {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description description
"Administrative distance for routes learned from "Administrative distances for routes learned from
external BGP (eBGP)."; external BGP (eBGP).";
} }
leaf internal { leaf internal {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description description
"Administrative distance for routes learned from "Administrative distances 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 "bt: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"; neighbor or group.";
uses mp-afi-safi-config; uses mp-afi-safi-config;
uses state; uses state;
container graceful-restart { container graceful-restart {
if-feature "bt: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 {
description description
"Configuration for BGP neighbors"; "Configuration for BGP neighbors.";
list neighbor { list neighbor {
key "remote-address"; key "remote-address";
description description
"List of BGP neighbors configured on the local system, "List of BGP neighbors configured on the local system,
uniquely identified by remote IPv[46] address"; uniquely identified by remote IPv[46] address.";
leaf local-address { leaf local-address {
type inet:ip-address; type inet:ip-address;
config false; config false;
description description
"The local IP address of this entry's BGP connection."; "The local IP address of this entry's BGP connection.";
} }
leaf local-port { leaf local-port {
type inet:port-number { type inet:port-number {
skipping to change at page 23, line 7 skipping to change at page 23, line 39
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;
config false; config false;
description description
"The BGP Identifier of this entry's BGP peer. "The BGP Identifier of this entry's BGP peer.
This entry MUST be 0.0.0.0 unless the This entry MUST be 0.0.0.0 unless the
sessionstate is in the openconfirm or the session state is in the openconfirm or the
established state."; established state.";
reference reference
"RFC 4271, Section 4.2, 'BGP Identifier'."; "RFC 4271, Section 4.2, 'BGP Identifier'.";
} }
leaf remote-address { leaf remote-address {
type inet:ip-address; type inet:ip-address;
description description
"The remote IP address of this entry's BGP peer."; "The remote IP address of this entry's BGP peer.";
} }
skipping to change at page 25, line 38 skipping to change at page 26, line 19
"Choice of authentication options."; "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 Generalized TTL Security Mechanism
(GTSM), (GTSM),
RFC 7454: BGP Operations and Security."; RFC 7454: BGP Operations and Security.";
} }
uses neighbor-group-config; uses neighbor-group-config;
uses route-selection-options; uses route-selection-options;
leaf session-state { leaf session-state {
type enumeration { type enumeration {
enum idle { enum idle {
description description
"Neighbor is down, and in the Idle state of the FSM"; "Neighbor is down, and in the Idle state of the FSM";
skipping to change at page 26, line 49 skipping to change at page 27, line 31
"This timestamp indicates the time that the BGP session "This timestamp indicates the time that the BGP session
last transitioned in or out of the Established state. last transitioned in or out of the Established state.
The value is the timestamp in seconds relative to the The value is the timestamp in seconds relative to the
Unix Epoch (Jan 1, 1970 00:00:00 UTC). Unix Epoch (Jan 1, 1970 00:00:00 UTC).
The BGP session uptime can be computed by clients as The BGP session uptime can be computed by clients as
the difference between this value and the current time the difference between this value and the current time
in UTC (assuming the session is in the ESTABLISHED in UTC (assuming the session is in the ESTABLISHED
state, per the session-state leaf)."; state, per the session-state leaf).";
} }
leaf-list supported-capabilities { leaf-list negotiated-capabilities {
type identityref { type identityref {
base bt:bgp-capability; base bt:bgp-capability;
} }
config false; config false;
description description
"BGP capabilities negotiated as supported with the peer"; "Negotiated BGP capabilities.";
} }
leaf negotiated-hold-time { leaf negotiated-hold-time {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
config false; config false;
description description
"The negotiated hold-time for the BGP session"; "The negotiated hold-time for the BGP session";
} }
leaf last-error { leaf last-error {
skipping to change at page 28, line 43 skipping to change at page 29, line 24
"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;
config false; config false;
description description
"This flag indicates whether the local neighbor is "This flag indicates whether the local neighbor is
currently restarting. The flag is unset after all NLRI currently restarting. The flag is cleared after all NLRI
have been advertised to the peer, and the End-of-RIB have been advertised to the peer, and the End-of-RIB
(EOR) marker has been unset"; (EOR) marker has been cleared.";
} }
leaf mode { leaf mode {
type enumeration { type enumeration {
enum helper-only { enum helper-only {
description description
"The local router is operating in helper-only "The local router is operating in helper-only
mode, and hence will not retain forwarding state mode, and hence will not retain forwarding state
during a local session restart, but will do so during a local session restart, but will do so
during a restart of the remote peer"; during a restart of the remote peer";
} }
skipping to change at page 30, line 11 skipping to change at page 30, line 41
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 description
"Statistics per neighbor."; "Statistics per neighbor.";
leaf established-transitions { leaf peer-fsm-established-transitions {
type yang:counter64; type yang:counter64;
config false; config false;
description description
"Number of transitions to the Established state for "Number of transitions to the Established state for
the neighbor session. This value is analogous to the the neighbor session. This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the bgpPeerFsmEstablishedTransitions object from the
standard 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";
} }
skipping to change at page 32, line 46 skipping to change at page 33, line 28
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 octet of this two byte OCTET STRING
contains the error code, and the second byte contains the error code, and the second octet
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.";
skipping to change at page 33, line 22 skipping to change at page 34, line 4
} }
description description
"The established event is generated "The established event is generated
when the BGP FSM enters the established state."; when the BGP FSM enters the established state.";
} }
notification backward-transition { notification backward-transition {
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 changed its state from
established state."; established 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
skipping to change at page 35, line 15 skipping to change at page 35, line 45
} }
description description
"Interface specific parameters."; "Interface specific parameters.";
} }
uses rib; uses rib;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-common@2020-11-15.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 36, line 5 skipping to change at page 36, line 36
"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.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2020 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP Model for Service Provider Network."; "RFC XXXX, BGP Model for Service Provider Network.";
} }
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";
skipping to change at page 37, line 51 skipping to change at page 38, line 33
speaker with this peer. The value of this object will only speaker with this peer. The value of this object will only
determine the KEEPALIVE messages' frequency relative to determine the KEEPALIVE messages' frequency relative to
the value specified in configured value for hold-time. the value specified in configured value for hold-time.
If the value of this object is zero (0), no periodical If the value of this object is zero (0), no periodical
KEEPALIVE messages are sent to the peer after the BGP KEEPALIVE messages are sent to the peer after the BGP
connection has been established. The suggested value for connection has been established. The suggested value for
this timer is 30 seconds.; this timer is 30 seconds.;
The actual time interval for the KEEPALIVE messages is The actual time interval for the KEEPALIVE messages is
indicated by operational value of keepalive. That value indicated by operational value of keepalive. The value
of this object is calculated by this BGP speaker such that, of this object is calculated by this BGP speaker such that,
when compared with hold-time, it has the same proportion when compared with hold-time, it has the same proportion
that keepalive has, compared with hold-time. A that keepalive has, compared with hold-time. A
reasonable maximum value for this timer would be one third reasonable maximum value for this timer would be one third
of that of hold-time."; of that of hold-time.";
reference reference
"RFC 4271, Section 4.4. "RFC 4271, Section 4.4.
RFC 4271, Section 10."; RFC 4271, Section 10.";
} }
leaf min-as-origination-interval { leaf min-as-origination-interval {
skipping to change at page 40, line 20 skipping to change at page 40, line 50
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
skipping to change at page 41, line 16 skipping to change at page 41, line 46
directly affected by this value."; directly affected by this value.";
} }
description description
"Routes learned via BGP are subject to weighted route "Routes learned via BGP are subject to weighted route
dampening."; dampening.";
} }
leaf send-community { leaf send-community {
if-feature "bt:send-communities"; if-feature "bt:send-communities";
type bt:community-type; type bt:community-type;
description description
"When supported, this tells the router to propogate any "When supported, this tells the router to propagate any
prefixes that are attached to this community. The value prefixes that are attached to this community. The value
of 0 implies 'none'."; of 0 implies 'none'.";
} }
leaf description { leaf description {
type string; type string;
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 "true";
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).";
reference
"RFC 1191: Path MTU discovery.";
} }
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 {
skipping to change at page 42, line 21 skipping to change at page 43, line 5
the session when sending BGP update messages. This may be the session when sending BGP update messages. This may be
expressed as either an IP address or reference to the name expressed as either an IP address or reference to the name
of an interface."; of an interface.";
} }
leaf auth-password { leaf auth-password {
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.";
reference
"RFC 2385: Protection of BGP Sessions via the TCP MD5
Signature Option.";
} }
} }
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.";
skipping to change at page 42, line 51 skipping to change at page 43, line 38
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.";
} }
leaf stale-routes-time { leaf stale-routes-time {
type uint32; type uint32;
description description
"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
skipping to change at page 44, line 46 skipping to change at page 45, line 33
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 a 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.";
} }
skipping to change at page 45, line 40 skipping to change at page 46, line 28
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;
skipping to change at page 46, line 16 skipping to change at page 47, line 4
} }
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@2020-11-15.yang"
<CODE BEGINS> file "ietf-bgp-common-multiprotocol@2020-06-28.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;
} }
import ietf-routing-types {
prefix rt-types;
}
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).";
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.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2020 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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 48, line 8 skipping to change at page 48, line 46
base bt:afi-safi-type; base bt:afi-safi-type;
} }
description description
"AFI,SAFI"; "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 neighbor 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 {
skipping to change at page 51, line 13 skipping to change at page 51, line 50
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
"Maximum number of prefixes that will be accepted from the "Maximum number of prefixes that will be accepted from the
neighbour"; neighbor";
} }
leaf shutdown-threshold-pct { leaf shutdown-threshold-pct {
type bt:percentage; type rt-types:percentage;
description description
"Threshold on number of prefixes that can be received from "Threshold on number of prefixes that can be received from
a neighbour before generation of warning messages or log a neighbor before generation of warning messages or log
entries. Expressed as a percentage of max-prefixes"; entries. Expressed as a percentage of max-prefixes";
} }
leaf restart-timer { leaf restart-timer {
type uint32; type uint32;
units "seconds"; units "seconds";
description description
"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.";
} }
skipping to change at page 51, line 44 skipping to change at page 52, line 33
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 neighbor(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
skipping to change at page 52, line 38 skipping to change at page 53, line 27
// 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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-common-structure@2020-11-15.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-routing-policy {
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;
// meta
organization import ietf-routing-policy {
"IETF IDR Working Group"; prefix rpol;
contact reference
"WG Web: <http://tools.ietf.org/wg/idr> "RFC ZZZZ, A YANG Data Model for Routing Policy Management";
WG List: <idr@ietf.org> }
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;
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), // meta
Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description
"This sub-module contains groupings that are common across
multiple BGP contexts and provide structure around other
primitive groupings.
Copyright (c) 2019 IETF Trust and the persons identified as organization
authors of the code. All rights reserved. "IETF IDR Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org>
Redistribution and use in source and binary forms, with or Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
without modification, is permitted pursuant to, and subject to Keyur Patel (keyur at arrcus.com),
the license terms contained in, the Simplified BSD License set Susan Hares (shares at ndzh.com),
forth in Section 4.c of the IETF Trust's Legal Provisions Jeffrey Haas (jhaas at pfrc.org).";
Relating to IETF Documents description
(https://trustee.ietf.org/license-info). "This sub-module contains groupings that are common across
multiple BGP contexts and provide structure around other
primitive groupings.
This version of this YANG module is part of RFC XXXX Copyright (c) 2019 IETF Trust and the persons identified as
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself authors of the code. All rights reserved.
for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL Redistribution and use in source and binary forms, with or
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', without modification, is permitted pursuant to, and subject to
'MAY', and 'OPTIONAL' in this document are to be interpreted as the license terms contained in, the Simplified BSD License set
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, forth in Section 4.c of the IETF Trust's Legal Provisions
they appear in all capitals, as shown here."; Relating to IETF Documents
(https://trustee.ietf.org/license-info).
revision 2020-06-28 { This version of this YANG module is part of RFC XXXX
description (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
"Initial Version"; for full legal notices.
reference
"RFC XXX, BGP Model for Service Provider Network.";
} 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.";
grouping structure-neighbor-group-logging-options { revision 2020-11-15 {
description description
"Structural grouping used to include error handling "Initial Version";
configuration and state for both BGP neighbors and groups"; reference
container logging-options { "RFC XXX, BGP Model for Service Provider Network.";
description }
"Logging options for events related to the BGP neighbor or
group";
leaf log-neighbor-state-changes {
type boolean;
default "true";
description
"Configure logging of peer state changes. Default is to
enable logging of peer state changes.
Note: Documenting out of ESTABLISHED state is desirable, grouping structure-neighbor-group-logging-options {
but documenting all backward transitions is description
problematic, and should be avoided."; "Structural grouping used to include error handling
} configuration and state for both BGP neighbors and groups";
} container logging-options {
} description
"Logging options for events related to the BGP neighbor or
group";
leaf log-neighbor-state-changes {
type boolean;
default "true";
description
"Configure logging of peer state changes. Default is to
enable logging of peer state changes.
grouping structure-neighbor-group-ebgp-multihop { Note: Documenting demotion from ESTABLISHED state is desirable,
description but documenting all backward transitions is
"Structural grouping used to include eBGP multi-hop problematic, and should be avoided.";
configuration and state for both BGP neighbors and peer }
groups"; }
container ebgp-multihop { }
description
"eBGP multi-hop parameters for the BGPgroup";
leaf enabled {
type boolean;
default "false";
description
"When enabled the referenced group or neighbors are
permitted to be indirectly connected - including cases
where the TTL can be decremented between the BGP peers";
}
leaf multihop-ttl {
type uint8;
description
"Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is
enabled";
}
}
} grouping structure-neighbor-group-ebgp-multihop {
description
"Structural grouping used to include eBGP multi-hop
configuration and state for both BGP neighbors and peer
groups";
container ebgp-multihop {
description
"eBGP multi-hop parameters for the BGP peer-group";
leaf enabled {
type boolean;
default "false";
description
"When enabled, the referenced group or neighbors are
permitted to be indirectly connected - including cases
where the TTL can be decremented between the BGP peers";
}
leaf multihop-ttl {
type uint8;
description
"Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is
enabled";
}
}
}
grouping structure-neighbor-group-route-reflector { grouping structure-neighbor-group-route-reflector {
description description
"Structural grouping used to include route reflector "Structural grouping used to include route reflector
configuration and state for both BGP neighbors and peer configuration and state for both BGP neighbors and peer
groups"; groups";
container route-reflector { container route-reflector {
description description
"Route reflector parameters for the BGPgroup"; "Route reflector parameters for the BGP peer-group";
reference reference
"RFC 4456: BGP Route Reflection."; "RFC 4456: BGP Route Reflection.";
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.";
} }
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";
} }
} }
} }
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"; 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: Advertisements of Multiple Paths in BGP."; "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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-peer-group@2020-11-15.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 { import ietf-bgp-types {
skipping to change at page 58, line 44 skipping to change at page 59, line 32
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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"; neighbor or group";
uses mp-afi-safi-config; uses mp-afi-safi-config;
container graceful-restart { container graceful-restart {
if-feature "bt: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
skipping to change at page 59, line 26 skipping to change at page 60, line 15
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 peer-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;
skipping to change at page 60, line 10 skipping to change at page 60, line 47
} }
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 peer-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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-neighbor@2020-11-15.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 { 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.";
skipping to change at page 61, line 38 skipping to change at page 62, line 26
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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.";
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
skipping to change at page 63, line 43 skipping to change at page 64, line 30
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 AFI/SAFI in this 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 "bt:graceful-restart"; if-feature "bt:graceful-restart";
skipping to change at page 64, line 42 skipping to change at page 65, line 28
} }
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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-types@2020-11-15.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),
skipping to change at page 65, line 16 skipping to change at page 66, line 4
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 It can be imported by modules that make use of BGP attributes.
attributes";
revision 2020-06-28 { Copyright (c) 2020 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-11-15 {
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. * Features.
*/ */
skipping to change at page 65, line 45 skipping to change at page 67, line 4
} }
feature clear-neighbors { feature clear-neighbors {
description description
"Clearing of BGP neighbors is supported."; "Clearing of BGP neighbors is supported.";
} }
feature clear-statistics { feature clear-statistics {
description description
"Clearing of BGP statistics is supported."; "Clearing of BGP statistics is supported.";
} }
feature send-communities { feature send-communities {
description description
"Enable the propogation of communities."; "Enable the propagation of communities.";
} }
feature ttl-security { feature ttl-security {
description description
"BGP Time To Live (TTL) security check support."; "BGP Time To Live (TTL) security check support.";
reference reference
"RFC 5082, The Generalized TTL Security Mechanism (GTSM)."; "RFC 5082, The Generalized TTL Security Mechanism (GTSM).";
} }
feature bfd { feature bfd {
description description
"Support for BFD detection of BGP neighbor reachability."; "Support for BFD detection of BGP neighbor reachability.";
skipping to change at page 67, line 6 skipping to change at page 68, line 13
identity bgp-capability { identity bgp-capability {
description description
"Base identity for a BGP capability"; "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: Multiprotocol Extenstions for BGP-4."; "RFC 4760: Multiprotocol Extentions 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
"RFC 2918: Route Refresh Capability for BGP-4."; "RFC 2918: Route Refresh Capability for BGP-4.";
} }
skipping to change at page 67, line 44 skipping to change at page 69, line 4
identity add-paths { identity add-paths {
if-feature "add-paths"; if-feature "add-paths";
base bgp-capability; base bgp-capability;
description description
"Advertisement of multiple paths for the same address prefix "Advertisement of multiple paths for the same address prefix
without the new paths implicitly replacing any previous ones."; without the new paths implicitly replacing any previous ones.";
reference reference
"RFC 7911: Advertisement of Multiple Paths in BGP."; "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: Multiprotocol Extentions 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: Multi-protocol extensions for BGP-4"; "RFC4760: Multiprotocol Extentions 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: Multi-protocol extensions for BGP-4"; "RFC4760: Multiprotocol Extentions 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
"RFC 3107: Carrying Label Information in BGP-4."; "RFC 3107: Carrying Label Information in BGP-4.";
} }
skipping to change at page 69, line 40 skipping to change at page 70, line 48
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
"Base identity for reserved communities within the standard "Base identity for reserved communities within the standard
community space defined by RFC1997. These communities must community space defined by RFC 1997. These communities must
fall within the range 0xFFFF0000 to 0xFFFFFFFF"; fall within the range 0xFFFF0000 to 0xFFFFFFFF";
reference reference
"RFC 1997: BGP Communities Attribute."; "RFC 1997: BGP Communities Attribute.";
} }
identity no-export { identity no-export {
base bgp-well-known-std-community; base bgp-well-known-std-community;
description description
"Do not export NLRI received carrying this community outside "Do not export NLRI received carrying this community outside
the bounds of this autonomous system, or this confederation if the bounds of this autonomous system, or this confederation (if
the local autonomous system is a confederation member AS. This the local autonomous system is a confederation member AS). This
community has a value of 0xFFFFFF01."; community has a value of 0xFFFFFF01.";
reference reference
"RFC 1997: BGP Communities Attribute."; "RFC 1997: BGP Communities Attribute.";
} }
identity no-advertise { identity no-advertise {
base bgp-well-known-std-community; base bgp-well-known-std-community;
description description
"All NLRI received carrying this community must not be "All NLRI received carrying this community must not be
advertised to other BGP peers. This community has a value of advertised to other BGP peers. This community has a value of
skipping to change at page 70, line 33 skipping to change at page 71, line 42
advertised to external BGP peers - including over confederation advertised to external BGP peers - including over confederation
sub-AS boundaries. This community has a value of 0xFFFFFF03."; sub-AS boundaries. This community has a value of 0xFFFFFF03.";
reference reference
"RFC 1997: BGP Communities Attribute."; "RFC 1997: BGP Communities Attribute.";
} }
identity no-peer { identity no-peer {
base bgp-well-known-std-community; base bgp-well-known-std-community;
description description
"An autonomous system receiving NLRI tagged with this community "An autonomous system receiving NLRI tagged with this community
is advised not to re-advertise the NLRI to external bi-lateral is advised not to re-advertise the NLRI to external bilateral
peer autonomous systems. An AS may also filter received NLRI peer autonomous systems. An AS may also filter received NLRI
from bilateral peer sessions when they are tagged with this from bilateral peer sessions when they are tagged with this
community value"; community value. This community has a value of 0xFFFFFF04.";
reference reference
"RFC 3765: NOPEER Community for BGP."; "RFC 3765: NOPEER Community for BGP.";
} }
identity as-path-segment-type { identity as-path-segment-type {
description description
"Base AS Path Segment Type. In [BGP-4], the path segment type "Base AS Path Segment Type. In [BGP-4], the path segment type
is a 1-octet field with the following values defined."; is a 1-octet field with the following values defined.";
reference reference
"RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3."; "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3.";
skipping to change at page 71, line 43 skipping to change at page 72, line 51
reference reference
"RFC 5065, Autonomous System Configuration for BGP."; "RFC 5065, Autonomous System Configuration for BGP.";
} }
/* /*
* Typedefs. * Typedefs.
*/ */
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 oubound {
description description
"Refers to all NLRI advertised to the BGP peer"; "Refers to all NLRI advertised to the BGP peer";
} }
} }
description description
"Type to describe the direction of NLRI transmission"; "Type to describe the direction of NLRI transmission";
} }
typedef bgp-well-known-community-type { typedef bgp-well-known-community-type {
type identityref { type identityref {
skipping to change at page 74, line 29 skipping to change at page 75, line 39
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
system numbers from the AS_PATH attribute"; system numbers from the AS_PATH attribute";
} }
identity PRIVATE_AS_REMOVE_ALL { identity private-as-remove-all {
base REMOVE_PRIVATE_AS_OPTION; base remove-private-as-option;
description description
"Strip all private autonomous system numbers from the AS_PATH. "Strip all private autonomous system numbers from the AS_PATH.
This action is performed regardless of the other content of the This action is performed regardless of the other content of the
AS_PATH attribute, and for all instances of private AS numbers AS_PATH attribute, and for all instances of private AS numbers
within that attribute."; within that attribute.";
} }
identity PRIVATE_AS_REPLACE_ALL { identity private-as-replace-all {
base REMOVE_PRIVATE_AS_OPTION; base remove-private-as-option;
description description
"Replace all instances of private autonomous system numbers in "Replace all instances of private autonomous system numbers in
the AS_PATH with the local BGP speaker's autonomous system the AS_PATH with the local BGP speaker's autonomous system
number. This action is performed regardless of the other number. This action is performed regardless of the other
content of the AS_PATH attribute, and for all instances of content of the AS_PATH attribute, and for all instances of
private AS number within that attribute."; private AS number within that attribute.";
} }
typedef remove-private-as-option { typedef remove-private-as-option {
type identityref { type identityref {
base REMOVE_PRIVATE_AS_OPTION; base remove-private-as-option;
} }
description description
"Set of options for configuring how private AS path numbers "Set of options for configuring how private AS path numbers
are removed from advertisements"; are removed from advertisements";
} }
typedef percentage {
type uint8 {
range "0..100";
}
description
"Integer indicating a percentage value";
}
typedef rr-cluster-id-type { typedef rr-cluster-id-type {
type union { type union {
type uint32; type uint32;
type inet:ipv4-address; type inet:ipv4-address;
} }
description description
"Union type for route reflector cluster ids: "Union type for route reflector cluster ids:
option 1: 4-byte number option 1: 4-byte number
option 2: IP address"; option 2: IP address";
} }
skipping to change at page 76, line 34 skipping to change at page 77, line 35
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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-policy@2020-11-15.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 ietf-inet-types {
prefix inet;
}
import ietf-routing-policy {
prefix rpol;
}
import ietf-bgp-types {
prefix bt;
}
import ietf-routing-types {
prefix rt-types;
}
organization
"IETF IDR Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description
"This module contains data definitions for BGP routing policy.
It augments the base routing-policy module with BGP-specific
options for conditions and actions.";
revision 2020-06-28 {
description
"Initial Version";
reference
"RFC XXX, BGP Model for Service Provider Network.";
}
// typedef statements
typedef bgp-set-community-option-type {
type enumeration {
enum add {
description
"Add the specified communities to the existing
community attribute";
}
enum remove {
description
"Remove the specified communities from the
existing community attribute";
}
enum replace {
description
"Replace the existing community attribute with
the specified communities. If an empty set is
specified, this removes the community attribute
from the route.";
}
}
description
"Type definition for options when setting the community
attribute in a policy action";
}
typedef bgp-next-hop-type {
type union {
type inet:ip-address-no-zone;
type enumeration {
enum self {
description
"Special designation for local router's own
address, i.e., next-hop-self";
}
}
}
description
"Type definition for specifying next-hop in policy actions";
}
typedef bgp-set-med-type {
type union {
type uint32;
type string {
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}|'
+ '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])$';
}
type enumeration {
enum igp {
description
"Set the MED value to the IGP cost toward the
next hop for the route";
}
enum med-plus-igp {
description
"Before comparing MED values for path selection, adds to
the MED the cost of the IGP route to the BGP next-hop
destination.
This option replaces the MED value for the router,
but does not affect the IGP metric comparison. As a
result, when multiple routes have the same value
after the MED-plus-IPG comparison, and route selection
continues, the IGP route metric is also compared, even
though it was added to the MED value and compared
earlier in the selection process.
Useful when the downstream AS requires the complete
cost of a certain route that is received across
multiple ASs.";
}
}
}
description
"Type definition for specifying how the BGP MED can
be set in BGP policy actions. The three choices are to set
the MED directly, increment/decrement using +/- notation,
and setting it to the IGP cost (predefined value).";
reference
"None. WG needs to decide if this is going to be a standard.";
}
// augment statements
augment "/rpol:routing-policy/rpol:defined-sets" { // import some basic types
description
"Adds BGP defined sets container to routing policy model.";
container bgp-defined-sets {
description
"BGP-related set definitions for policy match conditions";
container community-sets {
description
"Enclosing container for list of defined BGP community sets";
list community-set {
key "name";
description
"List of defined BGP community sets";
leaf name {
type string;
mandatory true;
description
"Name / label of the community set -- this is used to
reference the set in match conditions";
}
leaf-list member {
type union {
type bt:bgp-std-community-type;
type bt:bgp-community-regexp-type;
type bt:bgp-well-known-community-type;
}
description
"Members of the community set";
}
}
}
container ext-community-sets {
description
"Enclosing container for list of extended BGP community
sets";
list ext-community-set {
key "name";
description
"List of defined extended BGP community sets";
leaf name {
type string;
description
"Name / label of the extended community set -- this is
used to reference the set in match conditions";
}
leaf-list member {
type union {
type rt-types:route-target;
type bt:bgp-community-regexp-type;
}
description
"Members of the extended community set";
}
}
}
container as-path-sets {
description
"Enclosing container for list of define AS path sets";
list as-path-set {
key "name";
description
"List of defined AS path sets";
leaf name {
type string;
description
"Name of the AS path set -- this is used to reference the
set in match conditions";
}
leaf-list member {
type string;
description
"AS path expression -- list of ASes in the set";
}
}
}
}
}
grouping set-community-action-common { import ietf-inet-types {
description prefix inet;
"Common leaves for set-community and set-ext-community }
actions"; import ietf-routing-policy {
leaf method { prefix rpol;
type enumeration { }
enum inline { import ietf-bgp-types {
description prefix bt;
"The extended communities are specified inline as a
list";
}
enum reference {
description
"The extended communities are specified by referencing a
defined ext-community set";
}
}
description
"Indicates the method used to specify the extended
communities for the set-ext-community action";
}
leaf options {
type bgp-set-community-option-type;
description
"Options for modifying the community attribute with
the specified values. These options apply to both
methods of setting the community attribute.";
}
}
augment "/rpol:routing-policy/rpol:policy-definitions/" + }
"rpol:policy-definition/rpol:policy-statements/" + import ietf-routing-types {
"rpol:statement/rpol:conditions" { prefix rt-types;
description }
"BGP policy conditions added to routing policy module";
container bgp-conditions {
description
"Top-level container for BGP specific policy conditions ";
leaf med-eq {
type uint32;
description
"Condition to check if the received MED value is equal to
the specified value";
}
leaf origin-eq {
type bt:bgp-origin-attr-type;
description
"Condition to check if the route origin is equal to the
specified value";
} organization
leaf-list next-hop-in { "IETF IDR Working Group";
type inet:ip-address-no-zone; contact
description "WG Web: <http://tools.ietf.org/wg/idr>
"List of next hop addresses to check for in the route WG List: <idr@ietf.org>
update";
}
leaf-list afi-safi-in {
type identityref {
base bt:afi-safi-type;
}
description
"List of address families which the NLRI may be within";
}
leaf local-pref-eq {
type uint32;
description
"Condition to check if the local pref attribute is equal to
the specified value";
}
leaf route-type {
type enumeration {
enum internal {
description
"route type is internal";
}
enum external {
description
"route type is external";
}
}
description
"Condition to check the route type in the route update";
}
container community-count {
description
"Value and comparison operations for conditions based on the
number of communities in the route update";
}
container as-path-length {
description
"Value and comparison operations for conditions based on the
length of the AS path in the route update.
The as-path-length SHALL be calculated and SHALL follow Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
RFC 4271 rules."; Keyur Patel (keyur at arrcus.com),
reference Susan Hares (shares at ndzh.com),
"RFC 4271: BGP-4."; Jeffrey Haas (jhaas at pfrc.org).";
description
"This module contains data definitions for BGP routing policy.
It augments the base routing-policy module with BGP-specific
options for conditions and actions.
} Copyright (c) 2020 IETF Trust and the persons identified as
container match-community-set { authors of the code. All rights reserved.
description
"Top-level container for match conditions on communities.
Match a referenced community-set according to the logic
defined in the match-set-options leaf";
leaf community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:community-sets/"
+ "bp:community-set/bp:name";
}
description
"References a defined community set";
}
uses rpol:match-set-options-group;
}
container match-ext-community-set {
description
"Match a referenced extended community-set according to the
logic defined in the match-set-options leaf";
leaf ext-community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:ext-community-sets/"
+ "bp:ext-community-set/bp:name";
}
description
"References a defined extended community set";
}
uses rpol:match-set-options-group;
}
container match-as-path-set {
description
"Match a referenced as-path set according to the logic
defined in the match-set-options leaf";
leaf as-path-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:as-path-sets/"
+ "bp:as-path-set/bp:name";
}
description
"References a defined AS path set";
}
uses rpol:match-set-options-group;
}
}
} 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).
augment "/rpol:routing-policy/rpol:policy-definitions/" + This version of this YANG module is part of RFC XXXX
"rpol:policy-definition/rpol:policy-statements/" + (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
"rpol:statement/rpol:actions" { for full legal notices.
description
"BGP policy actions added to routing policy module.";
container bgp-actions {
description
"Top-level container for BGP-specific actions";
leaf set-route-origin {
type bt:bgp-origin-attr-type;
description
"Set the origin attribute to the specified value";
}
leaf set-local-pref {
type uint32;
description
"Set the local pref attribute on the route update";
}
leaf set-next-hop {
type bgp-next-hop-type;
description
"Set the next-hop attribute in the route update";
}
leaf set-med {
type bgp-set-med-type;
description
"Set the med metric attribute in the route update";
}
container set-as-path-prepend {
description
"Action to prepend local AS number to the AS-path a
specified number of times";
leaf repeat-n {
type uint8 {
range "1..max";
}
description
"Number of times to prepend the local AS number to the AS
path. The value should be between 1 and the maximum
supported by the implementation.";
}
}
container set-community {
description
"Action to set the community attributes of the route, along
with options to modify how the community is modified.
Communities may be set using an inline list OR The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
reference to an existing defined set (not both)."; NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
uses set-community-action-common; 'MAY', and 'OPTIONAL' in this document are to be interpreted as
container inline { described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
when "../method = 'inline'" { they appear in all capitals, as shown here.";
description
"Active only when the set-community method is inline";
}
description
"Set the community values for the action inline with
a list.";
leaf-list communities {
type union {
type bt:bgp-std-community-type;
type bt:bgp-well-known-community-type;
}
description
"Set the community values for the update inline with a
list.";
}
}
container reference {
when "../method = 'reference'" {
description
"Active only when the set-community method is reference";
}
description
"Provide a reference to a defined community set for the
set-community action";
leaf community-set-ref {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/"
+ "bp:community-sets/bp:community-set/bp:name";
}
description
"References a defined community set by name";
}
}
}
container set-ext-community {
description
"Action to set the extended community attributes of the
route, along with options to modify how the community is
modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not
both).";
uses set-community-action-common;
container inline {
when "../method = 'inline'" {
description
"Active only when the set-community method is inline";
}
description
"Set the extended community values for the action inline
with a list.";
leaf-list communities {
type union {
type rt-types:route-target;
type bt:bgp-well-known-community-type;
}
description
"Set the extended community values for the update inline
with a list.";
}
}
container reference {
when "../method = 'reference'" {
description
"Active only when the set-community method is reference";
}
description
"Provide a reference to an extended community set for the
set-ext-community action";
leaf ext-community-set-ref {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:ext-community-sets/"
+ "bp:ext-community-set/bp:name";
}
description
"References a defined extended community set by name";
}
}
}
}
}
}
<CODE ENDS>
7.4. RIB modules revision 2020-11-15 {
description
"Initial Version";
reference
"RFC XXX, BGP Model for Service Provider Network.";
}
<CODE BEGINS> file "ietf-bgp-rib@2020-06-28.yang" // typedef statements
submodule ietf-bgp-rib { typedef bgp-set-community-option-type {
yang-version 1.1; type enumeration {
belongs-to ietf-bgp { enum add {
prefix br; description
"Add the specified communities to the existing
community attribute";
}
enum remove {
description
"Remove the specified communities from the
existing community attribute";
}
enum replace {
description
"Replace the existing community attribute with
the specified communities. If an empty set is
specified, this removes the community attribute
from the route.";
}
} }
description
"Type definition for options when setting the community
attribute in a policy action";
}
/* typedef bgp-next-hop-type {
* Import and Include type union {
*/ type inet:ip-address-no-zone;
type enumeration {
import ietf-bgp-types { enum self {
prefix bt; description
reference "Special designation for local router's own
"RFC XXXX: BGP YANG Model for Service Provider Networks."; address, i.e., next-hop-self";
} }
import ietf-inet-types { }
prefix inet;
reference
"RFC 6991: Common YANG Types.";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Types.";
}
import ietf-routing-types {
prefix rt;
reference
"RFC 8294: Routing Area YANG Types.";
} }
include ietf-bgp-rib-types; description
include ietf-bgp-rib-tables; "Type definition for specifying next-hop in policy actions";
}
// groupings of attributes in three categories: typedef bgp-set-med-type {
// - shared across multiple routes type union {
// - common to LOC-RIB and Adj-RIB, but not shared across routes type uint32;
// - specific to LOC-RIB or Adj-RIB type string {
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}|'
+ '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])$';
include ietf-bgp-rib-attributes; }
type enumeration {
enum igp {
description
"Set the MED value to the IGP cost toward the
next hop for the route";
}
enum med-plus-igp {
description
"Before comparing MED values for path selection, adds to
the MED the cost of the IGP route to the BGP next-hop
destination.
// groupings of annotations for each route or table This option replaces the MED value for the router,
but does not affect the IGP metric comparison. As a
result, when multiple routes have the same value
after the MED-plus-IPG comparison, and route selection
continues, the IGP route metric is also compared, even
though it was added to the MED value and compared
earlier in the selection process.
include ietf-bgp-rib-table-attributes; Useful when the downstream AS requires the complete
cost of a certain route that is received across
multiple ASs.";
}
}
}
description
"Type definition for specifying how the BGP MED can
be set in BGP policy actions. The three choices are to set
the MED directly, increment/decrement using +/- notation,
and setting it to the IGP cost (predefined value).";
}
organization // augment statements
"IETF IDR Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), augment "/rpol:routing-policy/rpol:defined-sets" {
Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)";
description description
"Defines a submodule for representing BGP routing table (RIB) "Adds BGP defined sets container to routing policy model.";
contents. The submodule supports 5 logical RIBs per address container bgp-defined-sets {
family: description
"BGP-related set definitions for policy match conditions";
container community-sets {
description
"Enclosing container for list of defined BGP community sets";
list community-set {
key "name";
description
"List of defined BGP community sets";
leaf name {
type string;
mandatory true;
description
"Name / label of the community set -- this is used to
reference the set in match conditions";
}
leaf-list member {
type union {
type bt:bgp-std-community-type;
type bt:bgp-community-regexp-type;
type bt:bgp-well-known-community-type;
}
description
"Members of the community set";
}
}
}
container ext-community-sets {
description
"Enclosing container for list of extended BGP community
sets";
list ext-community-set {
key "name";
description
"List of defined extended BGP community sets";
leaf name {
type string;
description
"Name / label of the extended community set -- this is
used to reference the set in match conditions";
}
leaf-list member {
type union {
type rt-types:route-target;
type bt:bgp-community-regexp-type;
}
description
"Members of the extended community set";
}
}
}
container as-path-sets {
description
"Enclosing container for list of define AS path sets";
list as-path-set {
key "name";
description
"List of defined AS path sets";
leaf name {
type string;
description
"Name of the AS path set -- this is used to reference the
set in match conditions";
}
leaf-list member {
type string;
description
"AS path expression -- list of ASes in the set";
}
}
}
}
}
loc-rib: This is the main BGP routing table for the local routing augment "/rpol:routing-policy/rpol:policy-definitions/" +
instance, containing best-path selections for each prefix. The "rpol:policy-definition/rpol:policy-statements/" +
loc-rib table may contain multiple routes for a given prefix, "rpol:statement/rpol:conditions" {
with an attribute to indicate which was selected as the best description
path. Note that multiple paths may be used or advertised even if "BGP policy conditions added to routing policy module.";
only one path is marked as best, e.g., when using BGP
add-paths. An implementation may choose to mark multiple
paths in the RIB as best path by setting the flag to true for
multiple entries.
adj-rib-in-pre: This is a per-neighbor table containing the NLRI container bgp-conditions {
updates received from the neighbor before any local input policy description
rules or filters have been applied. This can be considered the "Top-level container for BGP specific policy conditions.";
'raw' updates from a given neighbor.
adj-rib-in-post: This is a per-neighbor table containing the leaf med-eq {
routes received from the neighbor that are eligible for type uint32;
best-path selection after local input policy rules have been description
applied. "Condition to check if the received MED value is equal to
the specified value.";
}
adj-rib-out-pre: This is a per-neighbor table containing routes leaf origin-eq {
eligible for sending (advertising) to the neighbor before output type bt:bgp-origin-attr-type;
policy rules have been applied. description
"Condition to check if the route origin is equal to the
specified value.";
}
adj-rib-out-post: This is a per-neighbor table containing routes leaf-list next-hop-in {
eligible for sending (advertising) to the neighbor after output type inet:ip-address-no-zone;
policy rules have been applied. description
"List of next hop addresses to check for in the route
update.";
}
leaf-list afi-safi-in {
type identityref {
base bt:afi-safi-type;
}
description
"List of address families which the NLRI may be within.";
}
Copyright (c) 2019 IETF Trust and the persons identified as leaf local-pref-eq {
authors of the code. All rights reserved. type uint32;
description
"Condition to check if the local pref attribute is equal to
the specified value.";
}
Redistribution and use in source and binary forms, with or leaf route-type {
without modification, is permitted pursuant to, and subject to type enumeration {
the license terms contained in, the Simplified BSD License set enum internal {
forth in Section 4.c of the IETF Trust's Legal Provisions description
Relating to IETF Documents "route type is internal";
(https://trustee.ietf.org/license-info). }
enum external {
description
"route type is external";
}
}
description
"Condition to check the route type in the route update";
}
This version of this YANG module is part of RFC XXXX container community-count {
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself description
for full legal notices. "Value and comparison operations for conditions based on the
number of communities in the route update.";
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL leaf community-count {
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', type uint32;
'MAY', and 'OPTIONAL' in this document are to be interpreted as description
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, "Value for the number of communities in the route update.";
they appear in all capitals, as shown here."; }
revision 2020-06-28 { choice operation {
description case eq {
"Initial Version"; leaf eq {
reference type empty;
"RFC XXXX, BGP YANG Model for Service Provider Network."; description
} "Check to see if the value is equal.";
}
grouping attr-set-attributes { }
description
"A grouping for all attribute set parameters.";
container attr-set-attributes { case lt-or-eq {
description leaf lt-or-eq {
"A container for attribute set parameters."; type empty;
description
"Check to see if the value is less than or equal.";
}
}
leaf origin { case gt-or-eq {
type bt:bgp-origin-attr-type; leaf gt-or-eq {
description type empty;
"BGP attribute defining the origin of the path description
information."; "Check to see if the value is greater than or equal.";
} }
leaf atomic-aggregate { }
type boolean;
description
"BGP attribute indicating that the prefix is an atomic
aggregate; i.e., the peer selected a less specific
route without selecting a more specific route that is
included in it.";
reference
"RFC 4271: Section 5.1.6.";
}
leaf next-hop {
type inet:ip-address;
description
"BGP next hop attribute defining the IP address of the
router that should be used as the next hop to the
destination";
reference
"RFC 4271: Section 5.1.3.";
}
leaf med {
type uint32;
description description
"BGP multi-exit discriminator attribute used in BGP route "Choice of operations on the value of community-count.";
selection process";
reference
"RFC 4271: Section 5.1.4.";
} }
leaf local-pref { }
container as-path-length {
description
"Value and comparison operations for conditions based on the
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.";
leaf as-path-length {
type uint32; type uint32;
description description
"BGP local preference attribute sent to internal peers to "Value of the AS path length in the route update.";
indicate the degree of preference for externally learned
routes. The route with the highest local preference
value is preferred.";
reference
"RFC 4271: Section 5.1.5.";
}
leaf originator-id {
type yang:dotted-quad;
description
"BGP attribute that provides the id as an IPv4 address
of the originator of the announcement.";
reference
"RFC 4456 - BGP Route Reflection: An Alternative to Full
Mesh Internal BGP (IBGP)";
}
leaf-list cluster-list {
type yang:dotted-quad;
description
"Represents the reflection path that the route has
passed.";
reference
"RFC 4456 - BGP Route Reflection: An Alternative to Full
Mesh Internal BGP (IBGP)";
}
leaf aigp-metric {
type uint64;
description
"BGP path attribute representing the accumulated IGP
metric for the path";
reference
"RFC 7311 - The Accumulated IGP Metric Attribute for BGP";
} }
container aggregator {
config false; choice operation {
description case eq {
"BGP attribute indicating the prefix has been leaf eq {
aggregated by the specified AS and router."; type empty;
reference description
"RFC 4271: Section 5.1.7."; "Check to see if the value is equal.";
leaf as { }
type inet:as-number;
description
"AS number of the autonomous system that performed the
aggregation.";
} }
leaf as4 {
type inet:as-number; case lt-or-eq {
description leaf lt-or-eq {
"AS number of the autonomous system that performed the type empty;
aggregation (4-octet representation). This value is description
populated if an upstream router is not 4-octet capable. "Check to see if the value is less than or equal.";
Its semantics are similar to the AS4_PATH optional }
transitive attribute";
reference
"RFC 6793 - BGP Support for Four-octet AS Number Space";
} }
leaf address {
type inet:ipv4-address; case gt-or-eq {
description leaf gt-or-eq {
"IP address of the router that performed the type empty;
aggregation."; description
"Check to see if the value is greater than or equal.";
}
} }
}
container as-path {
description description
"Enclosing container for the list of AS path segments. "Choice of operations on the value of as-path-len.";
}
In the Adj-RIB-In or Adj-RIB-Out, this list should show }
the received or sent AS_PATH, respectively. For
example, if the local router is not 4-byte capable, this
value should consist of 2-octet ASNs or the AS_TRANS
(AS 23456) values received or sent in route updates.
In the Loc-RIB, this list should reflect the effective
AS path for the route, e.g., a 4-octet value if the
local router is 4-octet capable.";
reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4)
RFC 6793 - BGP Support for Four-octet AS Number Space
RFC 5065 - Autonomous System Confederations for BGP";
list segment {
key "index";
config false;
uses bgp-as-path-attr;
description
"List of AS PATH segments";
container match-community-set {
description
"Top-level container for match conditions on communities.
Match a referenced community-set according to the logic
defined in the match-set-options leaf.";
leaf community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:community-sets/"
+ "bp:community-set/bp:name";
} }
}
container as4-path {
description description
"This is the path encoded with 4-octet "References a defined community set.";
AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent
attribute in Adj-RIB-In or Adj-RIB-Out, respectively.
It should not be populated in Loc-RIB since the Loc-RIB
is expected to store the effective AS-Path in the
as-path leaf regardless of being 4-octet or 2-octet.";
reference
"RFC 6793 - BGP Support for Four-octet AS Number Space";
list segment {
key "index";
config false;
uses bgp-as-path-attr;
description
"List of AS PATH segments";
}
} }
uses rpol:match-set-options-group;
} }
}
grouping attr-set { container match-ext-community-set {
description description
"A grouping for all path attributes."; "Match a referenced extended community-set according to the
logic defined in the match-set-options leaf.";
leaf ext-community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:ext-community-sets/"
+ "bp:ext-community-set/bp:name";
}
description
"References a defined extended community set.";
list attr-set { }
key "index"; uses rpol:match-set-options-group;
}
container match-as-path-set {
description description
"List of path attributes that may be in use by multiple "Match a referenced as-path set according to the logic
routes in the table"; defined in the match-set-options leaf.";
leaf index { leaf as-path-set {
type uint64; type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:as-path-sets/"
+ "bp:as-path-set/bp:name";
}
description description
"System generated index for each attribute set. The "References a defined AS path set";
index is used to reference an attribute set from a
specific path. Multiple paths may reference the same
attribute set.";
} }
uses attr-set-attributes; uses rpol:match-set-options-group;
} }
} }
}
grouping attr-sets { augment "/rpol:routing-policy/rpol:policy-definitions/" +
"rpol:policy-definition/rpol:policy-statements/" +
"rpol:statement/rpol:actions" {
description
"BGP policy actions added to routing policy module.";
container bgp-actions {
description description
"A grouping for all sets of path attributes."; "Top-level container for BGP-specific actions";
leaf set-route-origin {
container attr-sets { type bt:bgp-origin-attr-type;
description description
"Enclosing container for the list of path attribute sets"; "Set the origin attribute to the specified value";
uses attr-set;
} }
} leaf set-local-pref {
type uint32;
grouping ext-community-attributes {
description
"A grouping for all external community parameters.";
leaf-list ext-community {
type rt:route-target;
description description
"List of BGP extended community attributes. The received "Set the local pref attribute on the route.";
extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value
formatted according to RFC 4360.";
reference
"RFC 4360 - BGP Extended Communities Attribute";
} }
} leaf set-next-hop {
type bgp-next-hop-type;
description
"Set the next-hop attribute in the route.";
}
leaf set-med {
type bgp-set-med-type;
description
"Set the med metric attribute in the route.";
grouping rib { }
description container set-as-path-prepend {
"Grouping for rib."; description
container rib { "Action to prepend local AS number to the AS-path a
config false; specified number of times";
uses attr-sets; leaf repeat-n {
container communities { type uint8 {
range "1..max";
}
description description
"Enclosing container for the list of community attribute "Number of times to prepend the local AS number to the AS
sets"; path. The value should be between 1 and the maximum
list community { supported by the implementation.";
key "index"; }
config false; }
description
"List of path attributes that may be in use by multiple
routes in the table";
leaf index {
type uint64;
description
"System generated index for each attribute set. The
index is used to reference an attribute set from a
specific path. Multiple paths may reference the same
attribute set.";
}
uses bgp-community-attr-state;
} container set-community {
description
"Action to set the community attributes of the route, along
with options to modify how the community is modified.
Communities may be set using an inline list OR
reference to an existing defined set (not both).";
leaf options {
type bgp-set-community-option-type;
description
"Options for modifying the community attribute with
the specified values. These options apply to both
methods of setting the community attribute.";
} }
container ext-communities {
choice method {
description description
"Enclosing container for the list of extended community "Indicates the method used to specify the extended
attribute sets"; communities for the set-community action";
list ext-community { case inline {
key "index"; leaf-list communities {
config false; type union {
description type bt:bgp-std-community-type;
"List of path attributes that may be in use by multiple type bt:bgp-well-known-community-type;
routes in the table"; }
leaf index {
type uint64;
description description
"System generated index for each attribute set. The "Set the community values for the update inline with a
index is used to reference an attribute set from a list.";
specific path. Multiple paths may reference the same
attribute set.";
} }
uses ext-community-attributes;
} }
}
container afi-safis { case reference {
config false; leaf community-set-ref {
description type leafref {
"Enclosing container for address family list"; path "/rpol:routing-policy/rpol:defined-sets/"
list afi-safi { + "bp:bgp-defined-sets/"
key "afi-safi-name"; + "bp:community-sets/bp:community-set/bp:name";
description
"List of afi-safi types.";
leaf afi-safi-name {
type identityref {
base bt:afi-safi-type;
} }
description description
"AFI,SAFI name."; "References a defined community set by name";
} }
container ipv4-unicast { }
when "../afi-safi-name = 'bt:ipv4-unicast'" { }
description }
"Include this container for IPv4 unicast RIB";
container set-ext-community {
description
"Action to set the extended community attributes of the
route, along with options to modify how the community is
modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not
both).";
leaf options {
type bgp-set-community-option-type;
description
"Options for modifying the community attribute with
the specified values. These options apply to both
methods of setting the community attribute.";
}
choice method {
description
"Indicates the method used to specify the extended
communities for the set-ext-community action";
case inline {
leaf-list communities {
type union {
type rt-types:route-target;
type bt:bgp-well-known-community-type;
} }
description description
"Routing tables for IPv4 unicast -- active when the "Set the extended community values for the update inline
afi-safi name is ipv4-unicast"; with a list.";
uses ipv4-loc-rib;
uses ipv4-adj-rib;
} }
container ipv6-unicast { }
when "../afi-safi-name = 'bt:ipv6-unicast'" { case reference {
description leaf ext-community-set-ref {
"Include this container for IPv6 unicast RIB"; type leafref {
path "/rpol:routing-policy/rpol:defined-sets/"
+ "bp:bgp-defined-sets/bp:ext-community-sets/"
+ "bp:ext-community-set/bp:name";
} }
description description
"Routing tables for IPv6 unicast -- active when the "References a defined extended community set by name";
afi-safi name is ipv6-unicast";
uses ipv6-loc-rib;
uses ipv6-adj-rib;
} }
} }
} }
description
"Top level container for BGP RIB";
} }
} }
} }
<CODE ENDS> }
<CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-ext@2020-06-28.yang" 7.4. RIB modules
submodule ietf-bgp-rib-ext {
yang-version 1.1;
belongs-to ietf-bgp {
prefix bre;
}
include ietf-bgp-rib-types; <CODE BEGINS> file "ietf-bgp-rib@2020-11-15.yang"
submodule ietf-bgp-rib {
yang-version 1.1;
belongs-to ietf-bgp {
prefix br;
}
organization /*
"IETF IDR Working Group"; * Import and Include
contact */
"WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), import ietf-bgp-types {
Keyur Patel (keyur at arrcus.com), prefix bt;
Susan Hares (shares at ndzh.com), reference
Jeffrey Haas (jhaas at pfrc.org)."; "RFC XXXX: BGP YANG Model for Service Provider Networks.";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Types.";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Types.";
}
import ietf-routing-types {
prefix rt;
reference
"RFC 8294: Routing Area YANG Types.";
}
include ietf-bgp-rib-types;
include ietf-bgp-rib-tables;
// groupings of attributes in three categories:
// - shared across multiple routes
// - common to LOC-RIB and Adj-RIB, but not shared across routes
// - specific to LOC-RIB or Adj-RIB
include ietf-bgp-rib-attributes;
// groupings of annotations for each route or table
include ietf-bgp-rib-table-attributes;
organization
"IETF IDR Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)";
description
"Defines a submodule for representing BGP routing table (RIB)
contents. The submodule supports 5 logical RIBs per address
family:
loc-rib: This is the main BGP routing table for the local routing
instance, containing best-path selections for each prefix. The
loc-rib table may contain multiple routes for a given prefix,
with an attribute to indicate which was selected as the best
path. Note that multiple paths may be used or advertised even if
only one path is marked as best, e.g., when using BGP
add-paths. An implementation may choose to mark multiple
paths in the RIB as best path by setting the flag to true for
multiple entries.
adj-rib-in-pre: This is a per-neighbor table containing the NLRI
updates received from the neighbor before any local input policy
rules or filters have been applied. This can be considered the
'raw' updates from a given neighbor.
adj-rib-in-post: This is a per-neighbor table containing the
routes received from the neighbor that are eligible for
best-path selection after local input policy rules have been
applied.
adj-rib-out-pre: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor before output
policy rules have been applied.
adj-rib-out-post: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor after output
policy rules have been applied.
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-11-15 {
description description
"Defines additional data nodes for the BGP RIB model. "Initial Version";
These items reflect extensions that are desirable features but reference
are not currently supported in a majority of BGP "RFC XXXX, BGP YANG Model for Service Provider Network.";
implementations. }
Copyright (c) 2019 IETF Trust and the persons identified as grouping attr-set-attributes {
authors of the code. All rights reserved. description
"A grouping for all attribute set parameters.";
Redistribution and use in source and binary forms, with or container attr-set-attributes {
without modification, is permitted pursuant to, and subject to description
the license terms contained in, the Simplified BSD License set "A container for attribute set parameters.";
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 leaf origin {
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself type bt:bgp-origin-attr-type;
for full legal notices. description
"BGP attribute defining the origin of the path
information.";
}
leaf atomic-aggregate {
type boolean;
description
"BGP attribute indicating that the prefix is an atomic
aggregate; i.e., the peer selected is a less specific
route without selecting a more specific route that is
subsumed by it.";
reference
"RFC 4271: Section 5.1.6.";
}
leaf next-hop {
type inet:ip-address;
description
"BGP next hop attribute defining the IP address of the
router that should be used as the next hop to the
destination";
reference
"RFC 4271: Section 5.1.3.";
}
leaf med {
type uint32;
description
"BGP multi-exit discriminator attribute used in the BGP route
selection process";
reference
"RFC 4271: Section 5.1.4.";
}
leaf local-pref {
type uint32;
description
"BGP local preference attribute sent to internal peers to
indicate the degree of preference for externally learned
routes. The route with the highest local preference
value is preferred.";
reference
"RFC 4271: Section 5.1.5.";
}
leaf originator-id {
type yang:dotted-quad;
description
"BGP attribute that provides the id as an IPv4 address
of the originator of the announcement.";
reference
"RFC 4456 - BGP Route Reflection: An Alternative to Full
Mesh Internal BGP (IBGP)";
}
leaf-list cluster-list {
type yang:dotted-quad;
description
"Represents the reflection path that the route has
passed.";
reference
"RFC 4456 - BGP Route Reflection: An Alternative to Full
Mesh Internal BGP (IBGP)";
}
leaf aigp-metric {
type uint64;
description
"BGP path attribute representing the accumulated IGP
metric for the path";
reference
"RFC 7311 - The Accumulated IGP Metric Attribute for BGP";
}
container aggregator {
config false;
description
"BGP attribute indicating the prefix has been
aggregated by the specified AS and router.";
reference
"RFC 4271: Section 5.1.7.";
leaf as {
type inet:as-number;
description
"AS number of the autonomous system that performed the
aggregation.";
}
leaf as4 {
type inet:as-number;
description
"AS number of the autonomous system that performed the
aggregation (4-octet representation). This value is
populated if an upstream router is not 4-octet capable.
Its semantics are similar to the AS4_PATH optional
transitive attribute";
reference
"RFC 6793 - BGP Support for Four-octet AS Number Space";
}
leaf address {
type inet:ipv4-address;
description
"IP address of the router that performed the
aggregation.";
}
}
container as-path {
description
"Enclosing container for the list of AS path segments.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL In the Adj-RIB-In or Adj-RIB-Out, this list should show
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', the received or sent AS_PATH, respectively. For
'MAY', and 'OPTIONAL' in this document are to be interpreted as example, if the local router is not 4-byte capable, this
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, value should consist of 2-octet ASNs or the AS_TRANS
they appear in all capitals, as shown here."; (AS 23456) values received or sent in route updates.
revision 2020-06-28 { In the Loc-RIB, this list should reflect the effective
AS path for the route, e.g., a 4-octet value if the
local router is 4-octet capable.";
reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4)
RFC 6793 - BGP Support for Four-octet AS Number Space
RFC 5065 - Autonomous System Confederations for BGP";
list segment {
key "index";
config false;
uses bgp-as-path-attr;
description
"List of AS PATH segments";
}
}
container as4-path {
description
"This is the path encoded with 4-octet
AS numbers in the optional transitive AS4_PATH attribute.
This value is populated with the received or sent
attribute in Adj-RIB-In or Adj-RIB-Out, respectively.
It should not be populated in Loc-RIB since the Loc-RIB
is expected to store the effective AS-Path in the
as-path leaf regardless of being 4-octet or 2-octet.";
reference
"RFC 6793 - BGP Support for Four-octet AS Number Space";
list segment {
key "index";
config false;
uses bgp-as-path-attr;
description
"List of AS PATH segments";
}
}
}
}
grouping attr-set {
description
"A grouping for all path attributes.";
list attr-set {
key "index";
description description
"Initial Revision."; "List of path attributes that may be in use by multiple
reference routes in the table";
"RFC XXXX: BGP YANG Model for Service Providers."; leaf index {
type uint64;
description
"System generated index for each attribute set. The
index is used to reference an attribute set from a
specific path. Multiple paths may reference the same
attribute set.";
}
uses attr-set-attributes;
} }
}
grouping rib-ext-route-annotations { grouping attr-sets {
description
"A grouping for all sets of path attributes.";
container attr-sets {
description description
"Extended annotations for routes in the routing tables"; "Enclosing container for the list of path attribute sets";
leaf reject-reason { uses attr-set;
type union { }
type identityref { }
base bgp-not-selected-bestpath;
grouping ext-community-attributes {
description
"A grouping for all external community parameters.";
leaf-list ext-community {
type rt:route-target;
description
"List of BGP extended community attributes. The received
extended community may be an explicitly modeled
type or unknown, represented by an 8-octet value
formatted according to RFC 4360.";
reference
"RFC 4360 - BGP Extended Communities Attribute";
}
}
grouping rib {
description
"Grouping for rib.";
container rib {
config false;
uses attr-sets;
container communities {
description
"Enclosing container for the list of community attribute
sets.";
list community {
key "index";
config false;
description
"List of path attributes that may be in use by multiple
routes in the table.";
leaf index {
type uint64;
description
"System generated index for each attribute set. The
index is used to reference an attribute set from a
specific path. Multiple paths may reference the same
attribute set.";
} }
type identityref { uses bgp-community-attr-state;
base bgp-not-selected-policy; }
}
container ext-communities {
description
"Enclosing container for the list of extended community
attribute sets.";
list ext-community {
key "index";
config false;
description
"List of path attributes that may be in use by multiple
routes in the table.";
leaf index {
type uint64;
description
"System generated index for each attribute set. The
index is used to reference an attribute set from a
specific path. Multiple paths may reference the same
attribute set.";
} }
uses ext-community-attributes;
} }
}
container afi-safis {
config false;
description description
"Indicates the reason the route is not used, either due to "Enclosing container for address family list.";
policy filtering or bestpath selection"; list afi-safi {
key "afi-safi-name";
description
"List of afi-safi types.";
leaf afi-safi-name {
type identityref {
base bt:afi-safi-type;
}
description
"AFI,SAFI name.";
}
container ipv4-unicast {
when "../afi-safi-name = 'bt:ipv4-unicast'" {
description
"Include this container for IPv4 unicast RIB.";
}
description
"Routing tables for IPv4 unicast -- active when the
afi-safi name is ipv4-unicast.";
uses ipv4-loc-rib;
uses ipv4-adj-rib;
}
container ipv6-unicast {
when "../afi-safi-name = 'bt:ipv6-unicast'" {
description
"Include this container for IPv6 unicast RIB.";
}
description
"Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast.";
uses ipv6-loc-rib;
uses ipv6-adj-rib;
}
}
} }
description
"Top level container for BGP RIB.";
} }
} }
<CODE ENDS> }
<CODE BEGINS> file "ietf-bgp-rib-types@2020-06-28.yang" <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-types@2020-11-15.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>
skipping to change at page 97, line 45 skipping to change at page 98, line 41
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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.";
reference reference
"RFC 7854: BGP Monitoring Protocol."; "RFC 7854: BGP Monitoring Protocol.";
} }
identity invalid-cluster-loop { identity invalid-cluster-loop {
base invalid-route-reason; base invalid-route-reason;
description description
"Route was invalid due to CLUSTER_LIST loop"; "Route was invalid due to CLUSTER_LIST loop";
} }
skipping to change at page 100, line 31 skipping to change at page 101, line 26
} }
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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-rib-attributes@2020-11-15.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;
skipping to change at page 101, line 8 skipping to change at page 102, line 4
} }
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),
Jeffrey Haas (jhaas at pfrc.org).";
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.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
skipping to change at page 101, line 36 skipping to change at page 102, line 32
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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 index { leaf index {
skipping to change at page 104, line 37 skipping to change at page 105, line 33
key "attr-type"; key "attr-type";
description description
"This list contains received attributes that are unrecognized "This list contains received attributes that are unrecognized
or unsupported by the local router. The list may be empty."; or unsupported by the local router. The list may be empty.";
uses bgp-unknown-attr-flags-state; uses bgp-unknown-attr-flags-state;
uses bgp-unknown-attr-state; uses bgp-unknown-attr-state;
} }
} }
} }
grouping bgp-loc-rib-attr-state {
description
"Path attributes that are not expected to be shared across
route entries, specific to LOC-RIB";
}
grouping bgp-adj-rib-attr-state { grouping bgp-adj-rib-attr-state {
description description
"Path attributes that are not expected to be shared across "Path attributes that are not expected to be shared across
route entries, specific to Adj-RIB"; route entries, specific to Adj-RIB";
leaf path-id { leaf path-id {
type uint32; type uint32;
description description
"When the BGP speaker supports advertisement of multiple "When the BGP speaker supports advertisement of multiple
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
skipping to change at page 105, line 14 skipping to change at page 106, line 4
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-06-28.yang" <CODE BEGINS> file "ietf-bgp-rib-table-attributes@2020-11-15.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;
skipping to change at page 105, line 42 skipping to change at page 106, line 33
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).";
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.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
skipping to change at page 106, line 20 skipping to change at page 107, line 11
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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 107, line 4 skipping to change at page 107, line 43
"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.";
} }
} }
grouping bgp-loc-rib-route-annotations-state {
description
"Data definitions for information attached to routes in 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 {
description
"Common attributes attached to all routing tables";
// placeholder for metadata associated with all tables
}
grouping bgp-common-table-attrs-top {
// no enclosing container as this data will fit under an
// existing LOC-RIB container
uses bgp-common-table-attrs-state;
description
"Operational state data for data related to the entire
LOC-RIB";
}
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-tables@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-rib-tables@2020-11-15.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.";
} }
skipping to change at page 108, line 17 skipping to change at page 108, line 32
"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 { import ietf-bgp-types {
prefix bt; prefix bt;
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Network."; "RFC XXXX: BGP YANG Model for Service Provider Network.";
} }
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) Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Authors: Keyur Patel, Keyur Patel (keyur at arrcus.com),
Mahesh Jethanandani, Susan Hares (shares at ndzh.com,
Susan Hares"; Jeffrey Haas (jhaas at pfrc.org).";
description description
"This submodule contains structural data definitions for "This submodule contains structural data definitions for
BGP routing tables. BGP routing tables.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
skipping to change at page 109, line 15 skipping to change at page 109, line 29
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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-ext-route-annotations {
description
"Extended annotations for routes in the routing tables";
leaf reject-reason {
type union {
type identityref {
base bgp-not-selected-bestpath;
}
type identityref {
base bgp-not-selected-policy;
}
}
description
"Indicates the reason the route is not used, either due to
policy filtering or bestpath selection";
}
}
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
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
LOC-RIB entries"; LOC-RIB entries.";
leaf origin { leaf origin {
type union { type union {
type inet:ip-address; type inet:ip-address;
type identityref { type identityref {
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
skipping to change at page 111, line 33 skipping to change at page 112, line 19
description description
"Action to clear BGP routes."; "Action to clear BGP routes.";
container clear-routes { container clear-routes {
if-feature "bt: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.";
} }
} }
grouping ipv4-loc-rib { grouping ipv4-loc-rib {
description description
"Top-level grouping for IPv4 routing tables"; "Top-level grouping for IPv4 routing tables.";
container loc-rib { container loc-rib {
config false; config false;
description description
"Container for the IPv4 BGP LOC-RIB data"; "Container for the IPv4 BGP LOC-RIB data.";
uses bgp-common-table-attrs-top;
container routes { container routes {
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix origin path-id"; key "prefix origin path-id";
description description
"List of routes in the table, keyed by the route "List of routes in the table, keyed by the route
prefix, the route origin, and path-id. The route prefix, the route origin, and path-id. The route
origin can be either the neighbor address from which origin can be either the neighbor address from which
the route was learned, or the source protocol that the route was learned, or the source protocol that
injected the route. The path-id distinguishes routes injected the route. The path-id distinguishes routes
for the same prefix received from a neighbor (e.g., for the same prefix received from a neighbor (e.g.,
if add-paths is enabled)."; if add-paths is enabled).";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description description
"The IPv4 prefix corresponding to the route"; "The IPv4 prefix corresponding to the route.";
} }
uses bgp-loc-rib-common-keys; uses bgp-loc-rib-common-keys;
uses bgp-loc-rib-common-attr-refs; uses bgp-loc-rib-common-attr-refs;
uses bgp-loc-rib-attr-state;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
uses bgp-loc-rib-route-annotations-state;
uses bgp-unknown-attr-top; uses bgp-unknown-attr-top;
uses rib-ext-route-annotations; uses rib-ext-route-annotations;
} }
uses clear-routes; uses clear-routes;
} }
} }
} }
grouping ipv6-loc-rib { grouping ipv6-loc-rib {
description description
"Top-level grouping for IPv6 routing tables"; "Top-level grouping for IPv6 routing tables.";
container loc-rib { container loc-rib {
config false; config false;
description description
"Container for the IPv6 BGP LOC-RIB data"; "Container for the IPv6 BGP LOC-RIB data.";
uses bgp-common-table-attrs-top;
container routes { container routes {
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix origin path-id"; key "prefix origin path-id";
description description
"List of routes in the table, keyed by the route "List of routes in the table, keyed by the route
prefix, the route origin, and path-id. The route prefix, the route origin, and path-id. The route
origin can be either the neighbor address from which origin can be either the neighbor address from which
the route was learned, or the source protocol that the route was learned, or the source protocol that
injected the route. The path-id distinguishes routes injected the route. The path-id distinguishes routes
for the same prefix received from a neighbor (e.g., for the same prefix received from a neighbor (e.g.,
if add-paths is enabled)."; if add-paths is enabled).";
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"The IPv6 prefix corresponding to the route"; "The IPv6 prefix corresponding to the route.";
} }
uses bgp-loc-rib-common-keys; uses bgp-loc-rib-common-keys;
uses bgp-loc-rib-common-attr-refs; uses bgp-loc-rib-common-attr-refs;
uses bgp-loc-rib-attr-state;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
uses bgp-loc-rib-route-annotations-state;
uses bgp-unknown-attr-top; uses bgp-unknown-attr-top;
uses rib-ext-route-annotations; uses rib-ext-route-annotations;
} }
uses clear-routes; uses clear-routes;
} }
} }
} }
grouping ipv4-adj-rib-common { grouping ipv4-adj-rib-common {
description description
"Common structural grouping for each IPv4 adj-RIB table"; "Common structural grouping for each IPv4 adj-RIB table.";
uses bgp-common-table-attrs-top;
container routes { container routes {
config false; config false;
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix path-id"; key "prefix path-id";
description description
"List of routes in the table, keyed by a combination of "List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix, routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled."; e.g., when BGP add-paths is enabled.";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description description
"Prefix for the route"; "Prefix for the route.";
} }
uses bgp-adj-rib-attr-state; uses bgp-adj-rib-attr-state;
uses bgp-adj-rib-common-attr-refs; uses bgp-adj-rib-common-attr-refs;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
uses bgp-unknown-attr-top; uses bgp-unknown-attr-top;
uses rib-ext-route-annotations; uses rib-ext-route-annotations;
} }
uses clear-routes; uses clear-routes;
} }
} }
grouping ipv4-adj-rib-in-post { grouping ipv4-adj-rib-in-post {
description description
"Common structural grouping for the IPv4 adj-rib-in "Common structural grouping for the IPv4 adj-rib-in
post-policy table"; post-policy table.";
uses bgp-common-table-attrs-top;
container routes { container routes {
config false; config false;
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix path-id"; key "prefix path-id";
description description
"List of routes in the table, keyed by a combination of "List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix, routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled."; e.g., when BGP add-paths is enabled.";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description description
skipping to change at page 114, line 36 skipping to change at page 115, line 15
list route { list route {
key "prefix path-id"; key "prefix path-id";
description description
"List of routes in the table, keyed by a combination of "List of routes in the table, keyed by a combination of
the route prefix and path-id to distinguish multiple the route prefix and path-id to distinguish multiple
routes received from a neighbor for the same prefix, routes received from a neighbor for the same prefix,
e.g., when BGP add-paths is enabled."; e.g., when BGP add-paths is enabled.";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description description
"Prefix for the route"; "Prefix for the route.";
} }
uses bgp-adj-rib-attr-state; uses bgp-adj-rib-attr-state;
uses bgp-adj-rib-common-attr-refs; uses bgp-adj-rib-common-attr-refs;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
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 ipv4-adj-rib { grouping ipv4-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 ipv4-adj-rib-common; uses ipv4-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 ipv4-adj-rib-in-post; uses ipv4-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 eligible 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 ipv4-adj-rib-common; uses ipv4-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 eligible 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 ipv4-adj-rib-common; uses ipv4-adj-rib-common;
} }
} }
} }
} }
grouping ipv6-adj-rib-common { grouping ipv6-adj-rib-common {
description description
"Common structural grouping for each IPv6 adj-RIB table"; "Common structural grouping for each IPv6 adj-RIB table.";
uses bgp-common-table-attrs-state;
container routes { container routes {
config false; config false;
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix path-id"; key "prefix path-id";
description description
"List of routes in the table"; "List of routes in the table.";
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Prefix for the route"; "Prefix for the route.";
} }
uses bgp-adj-rib-attr-state; uses bgp-adj-rib-attr-state;
uses bgp-adj-rib-common-attr-refs; uses bgp-adj-rib-common-attr-refs;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
uses bgp-unknown-attr-top; uses bgp-unknown-attr-top;
uses rib-ext-route-annotations; uses rib-ext-route-annotations;
} }
uses clear-routes; uses clear-routes;
} }
} }
grouping ipv6-adj-rib-in-post { grouping ipv6-adj-rib-in-post {
description description
"Common structural grouping for the IPv6 adj-rib-in "Common structural grouping for the IPv6 adj-rib-in
post-policy table"; post-policy table.";
uses bgp-common-table-attrs-state;
container routes { container routes {
config false; config false;
description description
"Enclosing container for list of routes in the routing "Enclosing container for list of routes in the routing
table."; table.";
list route { list route {
key "prefix path-id"; key "prefix path-id";
description description
"List of routes in the table"; "List of routes in the table.";
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Prefix for the route"; "Prefix for the route.";
} }
uses bgp-adj-rib-attr-state; uses bgp-adj-rib-attr-state;
uses bgp-adj-rib-common-attr-refs; uses bgp-adj-rib-common-attr-refs;
uses bgp-common-route-annotations-state; uses bgp-common-route-annotations-state;
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 eligible 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 eligible 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@2020-06-28.yang" <CODE BEGINS> file "ietf-bgp-rib-table-attributes@2020-11-15.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;
skipping to change at page 118, line 37 skipping to change at page 119, line 14
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).";
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.
Copyright (c) 2019 IETF Trust and the persons identified as Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
skipping to change at page 119, line 15 skipping to change at page 119, line 40
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices. for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here."; they appear in all capitals, as shown here.";
revision 2020-06-28 { revision 2020-11-15 {
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 119, line 50 skipping to change at page 120, line 27
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.";
} }
} }
grouping bgp-loc-rib-route-annotations-state {
description
"Data definitions for information attached to routes in 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 {
description
"Common attributes attached to all routing tables";
// placeholder for metadata associated with all tables
}
grouping bgp-common-table-attrs-top {
// no enclosing container as this data will fit under an
// existing LOC-RIB container
uses bgp-common-table-attrs-state;
description
"Operational state data for data related to the entire
LOC-RIB";
}
} }
<CODE ENDS> <CODE ENDS>
8. Contributors 8. 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.
9. Acknowledgements 9. Acknowledgements
skipping to change at page 124, line 39 skipping to change at page 124, line 48
[I-D.ietf-bfd-yang] [I-D.ietf-bfd-yang]
Rahman, R., Zheng, L., Jethanandani, M., Pallagatti, S., Rahman, R., Zheng, L., Jethanandani, M., Pallagatti, S.,
and G. Mirsky, "YANG Data Model for Bidirectional and G. Mirsky, "YANG Data Model for Bidirectional
Forwarding Detection (BFD)", draft-ietf-bfd-yang-17 (work Forwarding Detection (BFD)", draft-ietf-bfd-yang-17 (work
in 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-16 (work in progress), June 2020. policy-model-26 (work in progress), October 2020.
[RFC3765] Huston, G., "NOPEER Community for Border Gateway Protocol [RFC3765] Huston, G., "NOPEER Community for Border Gateway Protocol
(BGP) Route Scope Control", RFC 3765, (BGP) Route Scope Control", RFC 3765,
DOI 10.17487/RFC3765, April 2004, DOI 10.17487/RFC3765, April 2004,
<https://www.rfc-editor.org/info/rfc3765>. <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>.
skipping to change at page 132, line 10 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 2020-06-28 { revision 2020-11-15 {
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 133, line 27 skipping to change at page 133, line 27
} }
organization organization
"Newco model group."; "Newco model group.";
contact contact
"abc@newco.com"; "abc@newco.com";
description description
"This YANG module deviates IETF BGP YANG module."; "This YANG module deviates IETF BGP YANG module.";
revision 2020-06-28 { revision 2020-11-15 {
description description
"Creating NewCo deviations to ietf-bgp model"; "Creating NewCo deviations to ietf-bgp model";
reference reference
"RFC XXXX: BGP YANG module for Service Provider Network."; "RFC XXXX: BGP YANG module for Service Provider Network.";
} }
deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" +
"bgp:restart-time" { "bgp:restart-time" {
deviate not-supported; deviate not-supported;
} }
deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" + deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" +
"bgp:stale-route-time" { "bgp:stale-route-time" {
deviate not-supported; deviate not-supported;
} }
} }
Appendix D. Complete tree diagram
Here is a complete tree diagram for the model.
module: ietf-bgp
augment /rt:routing/rt:control-plane-protocols
/rt:control-plane-protocol:
+--rw bgp
+--rw global!
| +--rw as inet:as-number
| +--rw identifier? yang:dotted-quad
| +--rw distance
| | +--rw external? uint8
| | +--rw internal? uint8
| +--rw confederation
| | +--rw enabled? boolean
| | +--rw identifier? inet:as-number
| | +--rw member-as* inet:as-number
| +--rw graceful-restart {bt:graceful-restart}?
| | +--rw enabled? boolean
| | +--rw restart-time? uint16
| | +--rw stale-routes-time? uint32
| | +--rw helper-only? boolean
| +--rw use-multiple-paths
| | +--rw enabled? boolean
| | +--rw ebgp
| | | +--rw allow-multiple-as? boolean
| | | +--rw maximum-paths? uint32
| | +--rw ibgp
| | +--rw maximum-paths? uint32
| +--rw route-selection-options
| | +--rw always-compare-med? boolean
| | +--rw ignore-as-path-length? boolean
| | +--rw external-compare-router-id? boolean
| | +--rw advertise-inactive-routes? boolean
| | +--rw enable-aigp? boolean
| | +--rw ignore-next-hop-igp-metric? boolean
| | +--rw enable-med? boolean
| +--rw afi-safis
| | +--rw afi-safi* [afi-safi-name]
| | +--rw afi-safi-name identityref
| | +--rw enabled? boolean
| | +--ro total-paths? uint32
| | +--ro total-prefixes? uint32
| | +--rw graceful-restart {bt:graceful-restart}?
| | | +--rw enabled? boolean
| | +--rw route-selection-options
| | | +--rw always-compare-med? boolean
| | | +--rw ignore-as-path-length? boolean
| | | +--rw external-compare-router-id? boolean
| | | +--rw advertise-inactive-routes? boolean
| | | +--rw enable-aigp? boolean
| | | +--rw ignore-next-hop-igp-metric? boolean
| | | +--rw enable-med? boolean
| | +--rw use-multiple-paths
| | | +--rw enabled? boolean
| | | +--rw ebgp
| | | | +--rw allow-multiple-as? boolean
| | | | +--rw maximum-paths? uint32
| | | +--rw ibgp
| | | +--rw maximum-paths? uint32
| | +--rw apply-policy
| | | +--rw import-policy* leafref
| | | +--rw default-import-policy? default-policy-type
| | | +--rw export-policy* leafref
| | | +--rw default-export-policy? default-policy-type
| | +--rw ipv4-unicast
| | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw send-default-route? boolean
| | +--rw ipv6-unicast
| | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw send-default-route? boolean
| | +--rw ipv4-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw ipv6-labeled-unicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l3vpn-ipv4-unicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l3vpn-ipv6-unicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l3vpn-ipv4-multicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l3vpn-ipv6-multicast
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l2vpn-vpls
| | | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw l2vpn-evpn
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw apply-policy
| | +--rw import-policy* leafref
| | +--rw default-import-policy? default-policy-type
| | +--rw export-policy* leafref
| | +--rw default-export-policy? default-policy-type
| +--ro total-paths? uint32
| +--ro total-prefixes? uint32
+--rw neighbors
| +--rw neighbor* [remote-address]
| | +--ro local-address? inet:ip-address
| | +--ro local-port? inet:port-number
| | +--ro peer-type? bt:peer-type
| | +--rw peer-group? leafref
| | +--ro identifier? yang:dotted-quad
| | +--rw remote-address inet:ip-address
| | +--ro remote-port? inet:port-number
| | +--rw enabled? boolean
| | +--rw secure-session-enable? boolean
| | +--rw secure-session
| | | +--rw (option)?
| | | +--:(ao)
| | | | +--rw enable-ao? boolean
| | | | +--rw send-id? uint8
| | | | +--rw recv-id? uint8
| | | | +--rw include-tcp-options? boolean
| | | | +--rw accept-ao-mismatch? boolean
| | | | +--rw ao-keychain? kc:key-chain-ref
| | | +--:(md5)
| | | | +--rw enable-md5? boolean
| | | | +--rw md5-keychain? kc:key-chain-ref
| | | +--:(ipsec)
| | | +--rw sa? string
| | +--rw ttl-security? uint8
| | | {bt:ttl-security}?
| | +--rw remote-as? inet:as-number
| | +--rw peer-as? inet:as-number
| | +--rw local-as? inet:as-number
| | +--rw remove-private-as?
| | | bt:remove-private-as-option
| | +--rw route-flap-damping {bt:damping}?
| | | +--rw enable? boolean
| | | +--rw suppress-above? decimal64
| | | +--rw reuse-above? decimal64
| | | +--rw max-flap? decimal64
| | | +--rw reach-decay? yang:gauge32
| | | +--rw unreach-decay? yang:gauge32
| | | +--rw keep-history? yang:gauge32
| | +--rw send-community? bt:community-type
| | | {bt:send-communities}?
| | +--rw description? string
| | +--rw route-selection-options
| | | +--rw always-compare-med? boolean
| | | +--rw ignore-as-path-length? boolean
| | | +--rw external-compare-router-id? boolean
| | | +--rw advertise-inactive-routes? boolean
| | | +--rw enable-aigp? boolean
| | | +--rw ignore-next-hop-igp-metric? boolean
| | | +--rw enable-med? boolean
| | +--rw session-state? enumeration
| | +--ro last-established? uint64
| | +--ro negotiated-capabilities* identityref
| | +--ro negotiated-hold-time? decimal64
| | +--rw last-error? binary
| | +--ro fsm-established-time? yang:gauge32
| | +--rw timers
| | | +--rw connect-retry-interval? uint16
| | | +--rw hold-time? uint16
| | | +--rw keepalive? uint16
| | | +--rw min-as-origination-interval? uint16
| | | +--rw min-route-advertisement-interval? uint16
| | +--rw transport
| | | +--rw tcp-mss? uint16
| | | +--rw mtu-discovery? boolean
| | | +--rw passive-mode? boolean
| | | +--rw local-address? union
| | | +--rw auth-password? string
| | +--rw treat-as-withdraw? boolean
| | +--ro erroneous-update-messages? uint32
| | +--rw graceful-restart {bt:graceful-restart}?
| | | +--rw enabled? boolean
| | | +--rw restart-time? uint16
| | | +--rw stale-routes-time? uint32
| | | +--rw helper-only? boolean
| | | +--ro peer-restart-time? uint16
| | | +--ro peer-restarting? boolean
| | | +--ro local-restarting? boolean
| | | +--ro mode? enumeration
| | +--rw logging-options
| | | +--rw log-neighbor-state-changes? boolean
| | +--rw ebgp-multihop
| | | +--rw enabled? boolean
| | | +--rw multihop-ttl? uint8
| | +--rw route-reflector
| | | +--rw route-reflector-cluster-id?
| | | | bt:rr-cluster-id-type
| | | +--rw no-client-reflect? boolean
| | | +--rw route-reflector-client? boolean
| | +--rw as-path-options
| | | +--rw allow-own-as? uint8
| | | +--rw replace-peer-as? boolean
| | +--rw add-paths {bt:add-paths}?
| | | +--rw receive? boolean
| | | +--rw (send)?
| | | | +--:(max)
| | | | | +--rw max? uint8
| | | | +--:(all)
| | | | +--rw all? empty
| | | +--rw eligible-prefix-policy? leafref
| | +--rw use-multiple-paths
| | | +--rw enabled? boolean
| | | +--rw ebgp
| | | +--rw allow-multiple-as? boolean
| | +--rw apply-policy
| | | +--rw import-policy* leafref
| | | +--rw default-import-policy? default-policy-type
| | | +--rw export-policy* leafref
| | | +--rw default-export-policy? default-policy-type
| | +--rw afi-safis
| | | +--rw afi-safi* [afi-safi-name]
| | | +--rw afi-safi-name identityref
| | | +--rw enabled? boolean
| | | +--ro active? boolean
| | | +--ro prefixes
| | | | +--ro received? uint32
| | | | +--ro sent? uint32
| | | | +--ro installed? uint32
| | | +--rw graceful-restart {bt:graceful-restart}?
| | | | +--rw enabled? boolean
| | | | +--ro received? boolean
| | | | +--ro advertised? boolean
| | | +--rw apply-policy
| | | | +--rw import-policy* leafref
| | | | +--rw default-import-policy?
| | | | | default-policy-type
| | | | +--rw export-policy* leafref
| | | | +--rw default-export-policy?
| | | | default-policy-type
| | | +--rw ipv4-unicast
| | | | +--rw prefix-limit
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct?
| | | | | | rt-types:percentage
| | | | | +--rw restart-timer? uint32
| | | | +--rw send-default-route? boolean
| | | +--rw ipv6-unicast
| | | | +--rw prefix-limit
| | | | | +--rw max-prefixes? uint32
| | | | | +--rw shutdown-threshold-pct?
| | | | | | rt-types:percentage
| | | | | +--rw restart-timer? uint32
| | | | +--rw send-default-route? boolean
| | | +--rw ipv4-labeled-unicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw ipv6-labeled-unicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l3vpn-ipv4-unicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l3vpn-ipv6-unicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l3vpn-ipv4-multicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l3vpn-ipv6-multicast
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l2vpn-vpls
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw l2vpn-evpn
| | | | +--rw prefix-limit
| | | | +--rw max-prefixes? uint32
| | | | +--rw shutdown-threshold-pct?
| | | | | rt-types:percentage
| | | | +--rw restart-timer? uint32
| | | +--rw use-multiple-paths
| | | +--rw enabled? boolean
| | | +--rw ebgp
| | | +--rw allow-multiple-as? boolean
| | +--rw statistics
| | +--ro peer-fsm-established-transitions?
| | | yang:counter64
| | +--ro fsm-established-transitions?
| | | yang:counter32
| | +--ro messages
| | | +--ro in-total-messages? yang:counter32
| | | +--ro out-total-messages? yang:counter32
| | | +--ro in-update-elapsed-time? yang:gauge32
| | | +--ro sent
| | | | +--ro updates-received? uint64
| | | | +--ro updates-sent? uint64
| | | | +--ro messages-received? uint64
| | | | +--ro messages-sent? uint64
| | | | +--ro notification? uint64
| | | +--ro received
| | | +--ro updates-received? uint64
| | | +--ro updates-sent? uint64
| | | +--ro messages-received? uint64
| | | +--ro messages-sent? uint64
| | | +--ro notification? uint64
| | +--ro queues
| | | +--ro input? uint32
| | | +--ro output? uint32
| | +---x clear {bt:clear-statistics}?
| | +---w input
| | | +---w clear-at? yang:date-and-time
| | +--ro output
| | +--ro clear-finished-at? yang:date-and-time
| +---n established
| | +-- remote-address? -> ../../neighbor/remote-address
| | +-- last-error? -> ../../neighbor/last-error
| | +-- session-state? -> ../../neighbor/session-state
| +---n backward-transition
| | +-- remote-addr? -> ../../neighbor/remote-address
| | +-- last-error? -> ../../neighbor/last-error
| | +-- session-state? -> ../../neighbor/session-state
| +---x clear {bt:clear-neighbors}?
| +---w input
| | +---w clear-at? yang:date-and-time
| +--ro output
| +--ro clear-finished-at? yang:date-and-time
+--rw peer-groups
| +--rw peer-group* [peer-group-name]
| +--rw peer-group-name string
| +--rw remote-as? inet:as-number
| +--rw peer-as? inet:as-number
| +--rw local-as? inet:as-number
| +--rw remove-private-as? bt:remove-private-as-option
| +--rw route-flap-damping {bt:damping}?
| | +--rw enable? boolean
| | +--rw suppress-above? decimal64
| | +--rw reuse-above? decimal64
| | +--rw max-flap? decimal64
| | +--rw reach-decay? yang:gauge32
| | +--rw unreach-decay? yang:gauge32
| | +--rw keep-history? yang:gauge32
| +--rw send-community? bt:community-type
| | {bt:send-communities}?
| +--rw description? string
| +--rw timers
| | +--rw connect-retry-interval? uint16
| | +--rw hold-time? uint16
| | +--rw keepalive? uint16
| | +--rw min-as-origination-interval? uint16
| | +--rw min-route-advertisement-interval? uint16
| +--rw transport
| | +--rw tcp-mss? uint16
| | +--rw mtu-discovery? boolean
| | +--rw passive-mode? boolean
| | +--rw local-address? union
| | +--rw auth-password? string
| +--rw graceful-restart {bt:graceful-restart}?
| | +--rw enabled? boolean
| | +--rw restart-time? uint16
| | +--rw stale-routes-time? uint32
| | +--rw helper-only? boolean
| +--rw ebgp-multihop
| | +--rw enabled? boolean
| | +--rw multihop-ttl? uint8
| +--rw route-reflector
| | +--rw route-reflector-cluster-id?
| | | bt:rr-cluster-id-type
| | +--rw no-client-reflect? boolean
| | +--rw route-reflector-client? boolean
| +--rw as-path-options
| | +--rw allow-own-as? uint8
| | +--rw replace-peer-as? boolean
| +--rw add-paths {bt:add-paths}?
| | +--rw receive? boolean
| | +--rw (send)?
| | | +--:(max)
| | | | +--rw max? uint8
| | | +--:(all)
| | | +--rw all? empty
| | +--rw eligible-prefix-policy? leafref
| +--rw use-multiple-paths
| | +--rw enabled? boolean
| | +--rw ebgp
| | | +--rw allow-multiple-as? boolean
| | | +--rw maximum-paths? uint32
| | +--rw ibgp
| | +--rw maximum-paths? uint32
| +--rw apply-policy
| | +--rw import-policy* leafref
| | +--rw default-import-policy? default-policy-type
| | +--rw export-policy* leafref
| | +--rw default-export-policy? default-policy-type
| +--rw afi-safis
| +--rw afi-safi* [afi-safi-name]
| +--rw afi-safi-name identityref
| +--rw enabled? boolean
| +--rw graceful-restart {bt:graceful-restart}?
| | +--rw enabled? boolean
| +--rw route-selection-options
| | +--rw always-compare-med? boolean
| | +--rw ignore-as-path-length? boolean
| | +--rw external-compare-router-id? boolean
| | +--rw advertise-inactive-routes? boolean
| | +--rw enable-aigp? boolean
| | +--rw ignore-next-hop-igp-metric? boolean
| | +--rw enable-med? boolean
| +--rw use-multiple-paths
| | +--rw enabled? boolean
| | +--rw ebgp
| | | +--rw allow-multiple-as? boolean
| | | +--rw maximum-paths? uint32
| | +--rw ibgp
| | +--rw maximum-paths? uint32
| +--rw apply-policy
| | +--rw import-policy* leafref
| | +--rw default-import-policy?
| | | default-policy-type
| | +--rw export-policy* leafref
| | +--rw default-export-policy?
| | default-policy-type
| +--rw ipv4-unicast
| | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw send-default-route? boolean
| +--rw ipv6-unicast
| | +--rw prefix-limit
| | | +--rw max-prefixes? uint32
| | | +--rw shutdown-threshold-pct?
| | | | rt-types:percentage
| | | +--rw restart-timer? uint32
| | +--rw send-default-route? boolean
| +--rw ipv4-labeled-unicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw ipv6-labeled-unicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l3vpn-ipv4-unicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l3vpn-ipv6-unicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l3vpn-ipv4-multicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l3vpn-ipv6-multicast
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l2vpn-vpls
| | +--rw prefix-limit
| | +--rw max-prefixes? uint32
| | +--rw shutdown-threshold-pct?
| | | rt-types:percentage
| | +--rw restart-timer? uint32
| +--rw l2vpn-evpn
| +--rw prefix-limit
| +--rw max-prefixes? uint32
| +--rw shutdown-threshold-pct?
| | rt-types:percentage
| +--rw restart-timer? uint32
+--rw interfaces
| +--rw interface* [name]
| +--rw name if:interface-ref
| +--rw bfd {bt:bfd}?
| +--rw enable? boolean
| +--rw local-multiplier? multiplier
| +--rw (interval-config-type)?
| +--:(tx-rx-intervals)
| | +--rw desired-min-tx-interval? uint32
| | +--rw required-min-rx-interval? uint32
| +--:(single-interval) {single-minimum-interval}?
| +--rw min-interval? uint32
+--ro rib
+--ro attr-sets
| +--ro attr-set* [index]
| +--ro index uint64
| +--ro attr-set-attributes
| +--ro origin? bt:bgp-origin-attr-type
| +--ro atomic-aggregate? boolean
| +--ro next-hop? inet:ip-address
| +--ro med? uint32
</