draft-ietf-idr-bgp-model-06.txt   draft-ietf-idr-bgp-model-07.txt 
Interdomain Routing M. Jethanandani Interdomain Routing M. Jethanandani
Internet-Draft VMware Internet-Draft VMware
Intended status: Standards Track K. Patel Intended status: Standards Track K. Patel
Expires: December 15, 2019 Arrcus Expires: April 6, 2020 Arrcus
S. Hares S. Hares
Huawei Huawei
June 13, 2019 J. Haas
Juniper Networks
October 4, 2019
BGP YANG Model for Service Provider Networks BGP YANG Model for Service Provider Networks
draft-ietf-idr-bgp-model-06 draft-ietf-idr-bgp-model-07
Abstract Abstract
This document defines a YANG data model for configuring and managing This document defines a YANG data model for configuring and managing
BGP, including protocol, policy, and operational aspects, such as BGP, including protocol, policy, and operational aspects, such as
RIB, based on data center, carrier and content provider operational RIB, based on data center, carrier and content provider operational
requirements. requirements.
Status of This Memo Status of This Memo
skipping to change at page 1, line 36 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 15, 2019. This Internet-Draft will expire on April 6, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3
1.2. Note to RFC Editor . . . . . . . . . . . . . . . . . . . 4 1.2. Note to RFC Editor . . . . . . . . . . . . . . . . . . . 4
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5
1.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 5 1.4. Abbreviations . . . . . . . . . . . . . . . . . . . . . . 5
2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 6
2.2. Policy configuration overview . . . . . . . . . . . . . . 8 2.2. Policy configuration overview . . . . . . . . . . . . . . 9
2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 9 2.3. BGP RIB overview . . . . . . . . . . . . . . . . . . . . 10
2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 11 2.3.1. Local Routing . . . . . . . . . . . . . . . . . . . . 12
2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 11 2.3.2. Pre updates per-neighbor . . . . . . . . . . . . . . 12
2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 11 2.3.3. Post updates per-neighbor . . . . . . . . . . . . . . 12
2.3.4. Pre route advertisements per-neighbor . . . . . . . . 11 2.3.4. Pre route advertisements per-neighbor . . . . . . . . 12
2.3.5. Post route advertisements per-neighbor . . . . . . . 11 2.3.5. Post route advertisements per-neighbor . . . . . . . 12
3. Relation to other YANG data models . . . . . . . . . . . . . 11 3. Relation to other YANG data models . . . . . . . . . . . . . 12
4. Security Considerations . . . . . . . . . . . . . . . . . . . 11 4. Security Considerations . . . . . . . . . . . . . . . . . . . 13
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 12 5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 14
5.2. YANG Module Name Registration . . . . . . . . . . . . . . 12 5.2. YANG Module Name Registration . . . . . . . . . . . . . . 14
6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 13 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 14
7. Structure of the YANG modules . . . . . . . . . . . . . . . . 14 7. Structure of the YANG modules . . . . . . . . . . . . . . . . 15
7.1. Main module and submodules for base items . . . . . . . . 14 7.1. Main module and submodules for base items . . . . . . . . 15
7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 58 7.2. BGP types . . . . . . . . . . . . . . . . . . . . . . . . 64
7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 69 7.3. BGP policy data . . . . . . . . . . . . . . . . . . . . . 75
7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 80 7.4. RIB modules . . . . . . . . . . . . . . . . . . . . . . . 86
8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 113 8.1. Creating BGP Instance . . . . . . . . . . . . . . . . . . 120
8.2. Neighbor Address Family Configuration . . . . . . . . . . 114 8.2. Neighbor Address Family Configuration . . . . . . . . . . 121
9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 116 8.3. IPv6 Neighbor Configuration . . . . . . . . . . . . . . . 123
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 116 8.4. VRF Configuration . . . . . . . . . . . . . . . . . . . . 124
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 116 9. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 125
11.1. Normative references . . . . . . . . . . . . . . . . . . 116 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 126
11.2. Informative references . . . . . . . . . . . . . . . . . 118 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 126
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 119 11.1. Normative references . . . . . . . . . . . . . . . . . . 126
11.2. Informative references . . . . . . . . . . . . . . . . . 128
Appendix A. How to add a new AFI and Augment a Module . . . . . 129
Appendix B. How to deviate a module . . . . . . . . . . . . . . 131
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 132
1. Introduction 1. Introduction
This document describes a YANG [RFC7950] data model for the BGP-4 This document describes a YANG [RFC7950] data model for the BGP-4
[RFC4271] protocol, including various protocol extensions, policy [RFC4271] protocol, including various protocol extensions, policy
configuration, as well as defining key operational state data, configuration, as well as defining key operational state data,
including Routing Information Base (RIB). The model is intended to including Routing Information Base (RIB). The model is intended to
be vendor-neutral, in order to allow operators to manage BGP be vendor-neutral, in order to allow operators to manage BGP
configuration in heterogeneous environments with routers supplied by configuration in heterogeneous environments with routers supplied by
multiple vendors. The model is also intended to be readily mapped to multiple vendors. The model is also intended to be readily mapped to
skipping to change at page 4, line 30 skipping to change at page 4, line 40
1.2. Note to RFC Editor 1.2. Note to RFC Editor
This document uses several placeholder values throughout the This document uses several placeholder values throughout the
document. Please replace them as follows and remove this note before document. Please replace them as follows and remove this note before
publication. publication.
RFC XXXX, where XXXX is the number assigned to this document at the RFC XXXX, where XXXX is the number assigned to this document at the
time of publication. time of publication.
2019-06-13 with the actual date of the publication of this document. 2019-10-03 with the actual date of the publication of this document.
RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for RFC ZZZZ, where ZZZZ is the number assigned to A YANG Data Model for
Routing Policy Management [I-D.ietf-rtgwg-policy-model]. Routing Policy Management [I-D.ietf-rtgwg-policy-model].
RFC AAAA, where AAAA is the number assigned to BGP Monitoring RFC AAAA, where AAAA is the number assigned to BGP Monitoring
Protocol [RFC7854]. Protocol [RFC7854].
RFC BBBB, where BBBB is the number assigned to YANG Data Model for RFC BBBB, where BBBB is the number assigned to YANG Data Model for
Bidirectional Forward Detection [I-D.ietf-bfd-yang]. Bidirectional Forward Detection [I-D.ietf-bfd-yang].
skipping to change at page 5, line 21 skipping to change at page 5, line 29
| | | | | |
| BFD | Bidirectional Forward Detection | | BFD | Bidirectional Forward Detection |
| | | | | |
| NLRI | Network Layer Reachability Information | | NLRI | Network Layer Reachability Information |
| | | | | |
| NMDA | Network Management Datastore Architecture | | NMDA | Network Management Datastore Architecture |
| | | | | |
| RIB | Routing Information Base | | RIB | Routing Information Base |
| | | | | |
| SAFI | Subsequent Address Family Identifier | | SAFI | Subsequent Address Family Identifier |
| | |
| VRF | Virtual Routing and Forwarding |
+--------------+-------------------------------------------+ +--------------+-------------------------------------------+
2. Model overview 2. Model overview
The BGP model is defined across several YANG modules and submodules, The BGP model is defined across several YANG modules and submodules,
but at a high level is organized into six elements: but at a high level is organized into six elements:
o base protocol configuration -- configuration affecting BGP o base protocol configuration -- configuration affecting BGP
protocol-related operations, defined at various levels of protocol-related operations, defined at various levels of
hierarchy. hierarchy.
skipping to change at page 6, line 24 skipping to change at page 7, line 13
below. below.
module: ietf-bgp module: ietf-bgp
augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto augment /rt:routing/rt:control-plane-protocols/rt:control-plane-proto
col: col:
+--rw bgp +--rw bgp
+--rw global! +--rw global!
| +--rw as inet:as-number | +--rw as inet:as-number
| +--rw identifier? yang:dotted-quad | +--rw identifier? yang:dotted-quad
| +--rw default-route-distance | +--rw distance
| +--rw confederation | +--rw confederation
| +--rw graceful-restart | +--rw graceful-restart {graceful-restart}?
| +--rw use-multiple-paths | +--rw use-multiple-paths
| +--rw route-selection-options | +--rw route-selection-options
| +--rw afi-safis | +--rw afi-safis
| +--rw apply-policy | +--rw apply-policy
| +--ro total-paths? uint32 | +--ro total-paths? uint32
| +--ro total-prefixes? uint32 | +--ro total-prefixes? uint32
+--rw neighbors +--rw neighbors
| +--rw neighbor* [remote-address] | +--rw neighbor* [remote-address]
| +---n established | +---n established
| +---n backward-transition | +---n backward-transition
skipping to change at page 11, line 45 skipping to change at page 12, line 45
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, routing instances, or VRFs, and RIBs. routing protocols, and RIBs. The notion of Virtual Routing and
Forwarding (VRF) is derived by using the YANG Schema Mount [RFC8528]
to mount the Routing Management module under the YANG Data Model for
Network Instances [RFC8529].
4. Security Considerations 4. Security Considerations
The YANG module specified in this document defines a schema for data The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such that is designed to be accessed via network management protocols such
as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341] [RFC8446]. The NETCONF Access Control Model (NACM) [RFC8341]
skipping to change at page 12, line 30 skipping to change at page 13, line 37
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. These are the subtrees and data
nodes and their sensitivity/vulnerability: nodes and their sensitivity/vulnerability:
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:
BGP OPSEC [RFC7454] describes several policies that can be used to
secure a BGP. In particular, it recommends securing the underlying
TCP session and to use Generalized TTL Security Mechanism (GTSM)
[RFC5082] capability to make it harder to spoof a BGP session. This
module allows implementations that want to support the capability to
configure a TTL value, under a feature flag. It also defines a
container 'secure-session' that can be augmented with TCP-
Authentication Option (TCP-AO) [RFC5925], or other methods to secure
a BGP session, and will be developed in a future version of this
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 in the IETF XML registry [RFC3688] [RFC3688]. Following the format
in RFC 3688, the following registration is requested to be made: in RFC 3688, 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
skipping to change at page 14, line 19 skipping to change at page 15, line 37
with [I-D.ietf-rtgwg-policy-model] (described in more detail with [I-D.ietf-rtgwg-policy-model] (described in more detail
Section 2.2) Section 2.2)
7. Structure of the YANG modules 7. Structure of the YANG modules
The YANG model can be subdivided between the main module for base The YANG model can be subdivided between the main module for base
items, types, policy data, and the RIB module. items, types, policy data, and the RIB module.
7.1. Main module and submodules for base items 7.1. Main module and submodules for base items
<CODE BEGINS> file "ietf-bgp@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp@2019-10-03.yang"
module ietf-bgp { module ietf-bgp {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp"; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp";
prefix bgp; prefix bgp;
/* /*
* Import and Include * Import and Include
*/ */
import ietf-routing { import ietf-routing {
skipping to change at page 15, line 37 skipping to change at page 17, line 8
include ietf-bgp-rib-tables; include ietf-bgp-rib-tables;
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 module describes a YANG model for BGP protocol "This module describes a YANG model for BGP protocol
configuration. It is a limited subset of all of the configuration configuration. It is a limited subset of all of the configuration
parameters available in the variety of vendor implementations, parameters available in the variety of vendor implementations,
hence it is expected that it would be augmented with vendor- hence it is expected that it would be augmented with vendor-
specific configuration data as needed. Additional modules or specific configuration data as needed. Additional modules or
submodules to handle other aspects of BGP configuration, submodules to handle other aspects of BGP configuration,
including policy, VRFs, VPNs, and additional address families including policy, VRFs, VPNs, and additional address families
are also expected. are also expected.
skipping to change at page 16, line 17 skipping to change at page 17, line 35
+-> [ global BGP configuration ] +-> [ global BGP configuration ]
+-> AFI / SAFI global +-> AFI / SAFI global
+-> peer group +-> peer group
+-> [ peer group config ] +-> [ peer group config ]
+-> AFI / SAFI [ per-AFI overrides ] +-> AFI / SAFI [ per-AFI overrides ]
+-> neighbor +-> neighbor
+-> [ neighbor config ] +-> [ neighbor config ]
+-> [ optional pointer to peer-group ] +-> [ optional pointer to peer-group ]
+-> AFI / SAFI [ per-AFI overrides ]"; +-> AFI / SAFI [ per-AFI overrides ]";
revision 2019-06-13 { revision 2019-10-03 {
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 16, line 33 skipping to change at page 18, line 4
/* /*
* Identity * Identity
*/ */
identity bgp { identity bgp {
base rt:routing-protocol; base rt:routing-protocol;
description description
"BGP protocol."; "BGP protocol.";
} }
/* /*
* Feature(s) * Feature(s)
*/ */
feature clear-routes { feature graceful-restart {
description description
"Clearing of BGP routes is supported."; "Graceful restart as defined in RFC 4724 is supported.";
} }
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.";
skipping to change at page 17, line 46 skipping to change at page 19, line 19
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
"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 default-route-distance { container distance {
description description
"Administrative distance (or preference) assigned to "Administrative distance (or preference) assigned to
routes received from different sources routes received from different sources
(external, internal, and local)."; (external, internal, and local).";
leaf external-route-distance { leaf external {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description description
"Administrative distance for routes learned from "Administrative distance for routes learned from
external BGP (eBGP)."; external BGP (eBGP).";
} }
leaf internal-route-distance { leaf internal {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description description
"Administrative distance for routes learned from "Administrative distance for routes learned from
internal BGP (iBGP)."; internal BGP (iBGP).";
} }
} }
container confederation { container confederation {
skipping to change at page 18, line 51 skipping to change at page 20, line 22
leaf-list member-as { leaf-list member-as {
type inet:as-number; type inet:as-number;
description description
"Remote autonomous systems that are to be treated "Remote autonomous systems that are to be treated
as part of the local confederation."; as part of the local confederation.";
} }
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart;
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 {
skipping to change at page 19, line 26 skipping to change at page 20, line 47
key "afi-safi-name"; key "afi-safi-name";
description description
"AFI,SAFI configuration available for the "AFI,SAFI configuration available for the
neighbour or group"; neighbour or group";
uses mp-afi-safi-config; uses mp-afi-safi-config;
uses state; uses state;
container graceful-restart { container graceful-restart {
if-feature graceful-restart;
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;
} }
skipping to change at page 21, line 13 skipping to change at page 22, line 35
config false; config false;
description description
"The remote port for the TCP connection "The remote port for the TCP connection
between the BGP peers. Note that the between the BGP peers. Note that the
objects local-addr, local-port, remote-addr, and objects local-addr, local-port, remote-addr, and
reemote-port provide the appropriate reemote-port provide the appropriate
reference to the standard MIB TCP reference to the standard MIB TCP
connection table."; connection table.";
} }
leaf remote-as {
type inet:as-number;
config false;
description
"The remote autonomous system number received in
the BGP OPEN message.";
reference
"RFC 4271, Section 4.2.";
}
leaf enabled { leaf enabled {
type boolean; type boolean;
default "true"; default "true";
description description
"Whether the BGP peer is enabled. In cases where the "Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should enabled leaf is set to false, the local system should
not initiate connections to the neighbor, and should not initiate connections to the neighbor, and should
not respond to TCP connections attempts from the not respond to TCP connections attempts from the
neighbor. If the state of the BGP session is neighbor. If the state of the BGP session is
ESTABLISHED at the time that this leaf is set to false, ESTABLISHED at the time that this leaf is set to false,
skipping to change at page 21, line 47 skipping to change at page 23, line 11
A transition from 'true' to 'false' will cause A transition from 'true' to 'false' will cause
the BGP Manual Stop Event to be generated. the BGP Manual Stop Event to be generated.
This parameter can be used to restart BGP peer This parameter can be used to restart BGP peer
connections. Care should be used in providing connections. Care should be used in providing
write access to this object without adequate write access to this object without adequate
authentication."; authentication.";
reference reference
"RFC 4271, Section 8.1.2."; "RFC 4271, Section 8.1.2.";
} }
leaf ttl-security {
if-feature "bt:ttl-security";
type uint8;
default "255";
description
"BGP Time To Live (TTL) security check.";
reference
"RFC 5082: The Genaralized TTL Security Mechanism
(GTSM),
RFC 7454: BGP Operations and Security.";
}
uses neighbor-group-config; uses neighbor-group-config;
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";
} }
enum connect { enum connect {
description description
"Neighbor is down, and the session is waiting for the "Neighbor is down, and the session is waiting for the
skipping to change at page 24, line 26 skipping to change at page 26, line 4
uses neighbor-group-timers-config; uses neighbor-group-timers-config;
} }
container transport { container transport {
description description
"Transport session parameters for the BGP neighbor"; "Transport session parameters for the BGP neighbor";
uses neighbor-group-transport-config; uses neighbor-group-transport-config;
} }
leaf treat-as-withdraw {
type boolean;
default "false";
description
"Specify whether erroneous UPDATE messages for which
the NLRI can be extracted are treated as though the
NLRI is withdrawn - avoiding session reset";
reference
"RFC 7606: Revised Error Handling for BGP UPDATE
Messages.";
}
leaf erroneous-update-messages { leaf erroneous-update-messages {
type uint32; type uint32;
config false; config false;
description description
"The number of BGP UPDATE messages for which the "The number of BGP UPDATE messages for which the
treat-as-withdraw mechanism has been applied based on treat-as-withdraw mechanism has been applied based on
erroneous message contents"; erroneous message contents";
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart;
description description
"Parameters relating the graceful restart mechanism for "Parameters relating the graceful restart mechanism for
BGP"; BGP";
uses graceful-restart-config; uses graceful-restart-config;
leaf peer-restart-time { leaf peer-restart-time {
type uint16 { type uint16 {
range "0..4096"; range "0..4096";
} }
skipping to change at page 25, line 25 skipping to change at page 27, line 16
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 unset 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 unset";
} }
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";
} }
enum BILATERAL { enum bilateral {
description description
"The local router is operating in both helper "The local router is operating in both helper
mode, and hence retains forwarding state during mode, and hence retains forwarding state during
a remote restart, and also maintains forwarding a remote restart, and also maintains forwarding
state during local session restart"; state during local session restart";
} }
enum REMOTE_HELPER { enum remote-helper {
description description
"The local system is able to retain routes during "The local system is able to retain routes during
restart but the remote system is only able to restart but the remote system is only able to
act as a helper"; act as a helper";
} }
} }
config false; config false;
description description
"This leaf indicates the mode of operation of BGP "This leaf indicates the mode of operation of BGP
graceful restart with the peer"; graceful restart with the peer";
} }
} }
uses structure-neighbor-group-logging-options;
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 bgp-neighbor-use-multiple-paths; uses bgp-neighbor-use-multiple-paths;
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
container afi-safis { container afi-safis {
description description
"Per-address-family configuration parameters associated "Per-address-family configuration parameters associated
with the neighbor"; with the neighbor";
uses bgp-neighbor-afi-safi-list; uses bgp-neighbor-afi-safi-list;
} }
container statistics { container statistics {
leaf established-transitions { leaf established-transitions {
skipping to change at page 32, line 4 skipping to change at page 33, line 45
"List of interfaces within the routing instance."; "List of interfaces within the routing instance.";
} }
description description
"Interface specific parameters."; "Interface specific parameters.";
} }
uses rib; uses rib;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common@2019-06-13.yang"
submodule ietf-bgp-common {
yang-version "1.1";
belongs-to ietf-bgp {
prefix "bgp";
}
import ietf-bgp-types { <CODE BEGINS> file "ietf-bgp-common@2019-10-03.yang"
prefix bt; submodule ietf-bgp-common {
} yang-version "1.1";
import ietf-inet-types { belongs-to ietf-bgp {
prefix inet; prefix "bgp";
} }
organization import ietf-bgp-types {
"IETF IDR Working Group"; prefix bt;
reference
"RFC XXXX: BGP Model for Service Provider Network.";
}
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types.";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types.";
}
contact organization
"WG Web: <http://tools.ietf.org/wg/idr> "IETF IDR Working Group";
WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), contact
Keyur Patel (keyur at arrcus.com), "WG Web: <http://tools.ietf.org/wg/idr>
Susan Hares (shares at ndzh.com"; WG List: <idr@ietf.org>
description Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
"This sub-module contains common groupings that are common across Keyur Patel (keyur at arrcus.com),
multiple contexts within the BGP module. That is to say that Susan Hares (shares at ndzh.com,
they may be application to a subset of global, peer-group or Jeffrey Haas (jhaas at pfrc.org).";
neighbor contexts.";
revision "2019-06-13" { description
description "This sub-module contains common groupings that are common across
"Initial Version"; multiple contexts within the BGP module. That is to say that
reference they may be application to a subset of global, peer-group or
"RFC XXXX, BGP Model for Service Provider Network."; neighbor contexts.";
}
grouping neighbor-group-timers-config { revision "2019-10-03" {
description description
"Config parameters related to timers associated with the BGP "Initial Version";
peer"; reference
"RFC XXXX, BGP Model for Service Provider Network.";
}
leaf connect-retry-interval { /*
type uint32 { * Features.
range "1..65535"; */
} feature damping {
units "seconds"; description
description "Weighted route dampening is supported.";
"Time interval (in seconds) for the }
ConnectRetryTimer. The suggested value
for this timer is 120 seconds.";
reference
"RFC 4271, Section 8.2.2. This is the value used
to initialize the 'ConnectRetryTimer'.";
}
leaf hold-time { grouping neighbor-group-timers-config {
type uint32 { description
range "0 | 3..65535"; "Config parameters related to timers associated with the BGP
} peer";
units "seconds";
description
"Time interval (in seconds) for the HoldTimer
established with the peer. The
value of this object is calculated by this
BGP speaker, using the smaller of the
values in hold-time-configured and the
Hold Time received in the OPEN message.
This value must be at least three seconds leaf connect-retry-interval {
if it is not zero (0). type uint16 {
range "1..max";
}
units "seconds";
default "120";
description
"Time interval (in seconds) for the ConnectRetryTimer. The
suggested value for this timer is 120 seconds.";
reference
"RFC 4271, Section 8.2.2. This is the value used
to initialize the 'ConnectRetryTimer'.";
}
If the Hold Timer has not been established leaf hold-time {
with the peer this object MUST have a value type uint16 {
of zero (0). range "0 | 3..65535";
}
units "seconds";
default "90";
description
"Time interval (in seconds) for the HoldTimer established
with the peer. When read as operational data (ro), the
value of this object is calculated by this BGP speaker,
using the smaller of the values in hold-time that was
configured (rw) in the running datastore and the Hold Time
received in the OPEN message.
If the hold-time-configured object has This value must be at least three seconds
a value of (0), then this object MUST have a if it is not zero (0).
value of (0).";
reference
"RFC 4271, Section 4.2.";
}
leaf keepalive-interval { If the Hold Timer has not been established
type uint32 { with the peer this object MUST have a value
range "0..21845"; of zero (0).
}
units "seconds";
default 30;
description
"Time interval (in seconds) for the KeepAlive
timer established with the peer. The value
of this object is calculated by this BGP
speaker such that, when compared with
hold-time, it has the same proportion
that keep-alive-configured has,
compared with hold-time-configured.
If the KeepAlive timer has not been established If the configured value of hold-time object was
with the peer, this object MUST have a value a value of (0), then when read this object MUST have a
of zero (0). value of (0) also.";
reference
"RFC 4271, Section 4.2.
RFC 4271, Section 10.";
}
If the of keep-alive-configured object leaf keepalive {
has a value of (0), then this object MUST have type uint16 {
a value of (0)."; range "0..21845";
reference }
"RFC 4271, Section 4.4."; units "seconds";
} default "30";
description
"When used as a configuration (rw) value, this Time interval
(in seconds) for the KeepAlive timer configured for this BGP
speaker with this peer. The value of this object will only
determine the KEEPALIVE messages' frequency relative to
the value specified in configured value for hold-time.
leaf hold-time-configured { If the value of this object is zero (0), no periodical
type uint32 { KEEPALIVE messages are sent to the peer after the BGP
range "0 | 3..65535"; connection has been established. The suggested value for
} this timer is 30 seconds.;
units "seconds";
description
"Time interval (in seconds) for the Hold Time
configured for this BGP speaker with this
peer. This value is placed in an OPEN
message sent to this peer by this BGP
speaker, and is compared with the Hold
Time field in an OPEN message received
from the peer when determining the Hold
Time (hold-time) with the peer.
This value must not be less than three
seconds if it is not zero (0). If it is
zero (0), the Hold Time is NOT to be
established with the peer. The suggested
value for this timer is 90 seconds.";
reference
"RFC 4271, Section 4.2.
RFC 4271, Section 10.";
}
leaf keep-alive-configured { The actual time interval for the KEEPALIVE messages is
type uint32 { indicated by operational value of keepalive. That value
range "0..21845"; of this object is calculated by this BGP speaker such that,
} when compared with hold-time, it has the same proportion
units "seconds"; that keepalive has, compared with hold-time. A
description reasonable maximum value for this timer would be one third
"Time interval (in seconds) for the of that of hold-time.";
KeepAlive timer configured for this BGP reference
speaker with this peer. The value of this "RFC 4271, Section 4.4.
object will only determine the RFC 4271, Section 10.";
KEEPALIVE messages' frequency relative to }
the value specified in
hold-time-configured; the actual
time interval for the KEEPALIVE messages is
indicated by keep-alive. A
reasonable maximum value for this timer
would be one third of that of
hold-time-configured.
If the value of this object is zero (0),
no periodical KEEPALIVE messages are sent
to the peer after the BGP connection has
been established. The suggested value for
this timer is 30 seconds.";
reference
"RFC 4271, Section 4.4.
RFC 4271, Section 10.";
}
leaf min-as-origination-interval { leaf min-as-origination-interval {
type uint32 { type uint16 {
range "0..65535"; range "0..max";
} }
units "seconds"; units "seconds";
description default "15";
"Time interval (in seconds) for the description
MinASOriginationInterval timer. "Time interval (in seconds) for the MinASOriginationInterval
The suggested value for this timer is 15 timer. The suggested value for this timer is 15 seconds.";
seconds."; reference
reference "RFC 4271, Section 9.2.1.2.
"RFC 4271, Section 9.2.1.2. RFC 4271, Section 10.";
RFC 4271, Section 10."; }
} leaf min-route-advertisement-interval {
type uint16 {
range "0..max";
}
units "seconds";
description
"Time interval (in seconds) for the
MinRouteAdvertisementInterval timer.
The suggested value for this timer is 30
seconds for EBGP connections and 5
seconds for IBGP connections.";
reference
"RFC 4271, Section 9.2.1.1.
RFC 4271, Section 10.";
}
}
leaf min-route-advertisement-interval { grouping neighbor-group-config {
type uint32 { description
range "0..65535"; "Neighbor level configuration items.";
}
units "seconds";
description
"Time interval (in seconds) for the
MinRouteAdvertisementInterval timer.
The suggested value for this timer is 30
seconds for EBGP connections and 5
seconds for IBGP connections.";
reference
"RFC 4271, Section 9.2.1.1.
RFC 4271, Section 10.";
}
} leaf remote-as {
type inet:as-number;
description
"The remote autonomous system number received in
the BGP OPEN message.";
reference
"RFC 4271, Section 4.2.";
}
grouping neighbor-group-config { leaf peer-as {
description type inet:as-number;
"Neighbor level configuration items."; description
"AS number of the peer.";
}
leaf peer-as { leaf local-as {
type inet:as-number; type inet:as-number;
description description
"AS number of the peer."; "The local autonomous system number that is to be used when
} establishing sessions with the remote peer or peer group, if
this differs from the global BGP router autonomous system
number.";
}
leaf local-as { leaf peer-type {
type inet:as-number; type bt:peer-type;
description description
"The local autonomous system number that is to be used when "Explicitly designate the peer or peer group as internal
establishing sessions with the remote peer or peer group, if (iBGP) or external (eBGP).";
this differs from the global BGP router autonomous system }
number.";
}
leaf peer-type { leaf remove-private-as {
type bt:peer-type; // could also make this a container with a flag to enable
description // remove-private and separate option. here, option implies
"Explicitly designate the peer or peer group as internal // remove-private is enabled.
(iBGP) or external (eBGP)."; type bt:remove-private-as-option;
} description
"Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged";
}
leaf auth-password { container route-flap-damping {
type string; if-feature damping;
description
"Configures an MD5 authentication password for use with
neighboring devices.";
}
leaf remove-private-as { leaf enable {
// could also make this a container with a flag to enable type boolean;
// remove-private and separate option. here, option implies default false;
// remove-private is enabled. description
type bt:remove-private-as-option; "Enable route flap damping.";
description }
"Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged";
}
leaf description { leaf suppress-above {
type string; type decimal64 {
description fraction-digits 1;
"An optional textual description (intended primarily for use }
with a peer or group"; default "3.0";
} description
} "This is the value of the instability metric at which
route suppression takes place. A route is not installed
in the forwarding information base (FIB), or announced
even if it is reachable during the period that it is
suppressed.";
}
grouping neighbor-group-transport-config { leaf reuse-above {
description type decimal64 {
"Configuration parameters relating to the transport protocol fraction-digits 1;
used by the BGP session to the peer"; }
default "2.0";
description
"This is the value of the instability metric at which a
suppressed route becomes unsuppressed if it is reachable
but currently suppressed. The value assigned to
reuse-below must be less than suppress-above.";
leaf tcp-mss { }
type uint16;
description
"Sets the max segment size for BGP TCP sessions.";
}
leaf mtu-discovery { leaf max-flap {
type boolean; type decimal64 {
default false; fraction-digits 1;
description }
"Turns path mtu discovery for BGP TCP sessions on (true) or default "16.0";
off (false)"; description
} "This is the upper limit of the instability metric. This
value must be greater than the larger of 1 and
suppress-above.";
}
leaf passive-mode { leaf reach-decay {
type boolean; type yang:gauge32;
default false; units "seconds";
description default "300";
"Wait for peers to issue requests to open a BGP session, description
rather than initiating sessions from the local router."; "This value specifies the time desired for the instability
} metric value to reach one-half of its current value when
the route is reachable. This half-life value determines
the rate at which the metric value is decayed. A smaller
half-life value makes a suppressed route reusable sooner
than a larger value.";
}
leaf local-address { leaf unreach-decay {
type union { type yang:gauge32;
type inet:ip-address; units "seconds";
type leafref { default "900";
path "../../../../interfaces/interface/name"; description
} "This value acts the same as reach-decay except that it
} specifies the rate at which the instability metric is
description decayed when a route is unreachable. It should have a
"Set the local IP (either IPv4 or IPv6) address to use for value greater than or equal to reach-decay.";
the session when sending BGP update messages. This may be }
expressed as either an IP address or reference to the name
of an interface.";
}
}
grouping graceful-restart-config {
description
"Configuration parameters relating to BGP graceful restart.";
leaf enabled { leaf keep-history {
type boolean; type yang:gauge32;
description units "seconds";
"Enable or disable the graceful-restart capability."; default "1800";
} description
"This value specifies the period over which the route
flapping history is to be maintained for a given route.
The size of the configuration arrays described below is
directly affected by this value.";
}
description
"Routes learned via BGP are subject to weighted route
dampening.";
}
leaf restart-time { leaf send-community {
type uint16 { if-feature "bt:send-communities";
range 0..4096; type bt:community-type;
} description
description "When supported, this tells the router to propogate any
"Estimated time (in seconds) for the local BGP speaker to prefixes that are attached to this community. The value
restart a session. This value is advertise in the graceful of 0 implies 'none'.";
restart BGP capability. This is a 12-bit value, referred to }
as Restart Time in RFC4724. Per RFC4724, the suggested
default value is <= the hold-time value.";
}
leaf stale-routes-time { leaf description {
type uint32; type string;
description description
"An upper-bound on the time that stale routes will be "An optional textual description (intended primarily for use
retained by a router after a session is restarted. If an with a peer or group";
End-of-RIB (EOR) marker is received prior to this timer }
expiring stale-routes will be flushed upon its receipt - if }
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724";
}
leaf helper-only { grouping neighbor-group-transport-config {
type boolean; description
default true; "Configuration parameters relating to the transport protocol
description used by the BGP session to the peer";
"Enable graceful-restart in helper mode only. When this leaf
is set, the local system does not retain forwarding its own
state during a restart, but supports procedures for the
receiving speaker, as defined in RFC4724.";
}
}
grouping use-multiple-paths-config { leaf tcp-mss {
description type uint16;
"Generic configuration options relating to use of multiple description
paths for a referenced AFI-SAFI, group or neighbor"; "Sets the max segment size for BGP TCP sessions.";
}
leaf enabled { leaf mtu-discovery {
type boolean; type boolean;
default false; default false;
description description
"Whether the use of multiple paths for the same NLRI is "Turns path mtu discovery for BGP TCP sessions on (true) or
enabled for the neighbor. This value is overridden by any off (false)";
more specific configuration value."; }
}
}
grouping use-multiple-paths-ebgp-as-options-config { leaf passive-mode {
description type boolean;
"Configuration parameters specific to eBGP multi-path applicable default false;
to all contexts"; description
"Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router.";
}
leaf local-address {
type union {
type inet:ip-address;
type leafref {
path "../../../../interfaces/interface/name";
}
}
description
"Set the local IP (either IPv4 or IPv6) address to use for
the session when sending BGP update messages. This may be
expressed as either an IP address or reference to the name
of an interface.";
}
leaf allow-multiple-as { // TODO: Better form of authentication of the BGP session should
type boolean; // be added here. It can be in the form of TCP-AO [RFC 5925],
default "false"; // IPsec, or any other protocol deemed desirable.
leaf auth-password {
type string;
description
"Configures an MD5 authentication password for use with
neighboring devices.";
}
}
grouping graceful-restart-config {
description description
"Allow multi-path to use paths from different neighboring ASes. "Configuration parameters relating to BGP graceful restart.";
The default is to only consider multiple paths from the same
neighboring AS.";
}
}
grouping global-group-use-multiple-paths { leaf enabled {
description type boolean;
"Common grouping used for both global and groups which provides description
configuration and state parameters relating to use of multiple "Enable or disable the graceful-restart capability.";
paths"; }
container use-multiple-paths { leaf restart-time {
description type uint16 {
"Parameters related to the use of multiple paths for the range 0..4096;
same NLRI"; }
description
"Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful
restart BGP capability. This is a 12-bit value, referred to
as Restart Time in RFC4724. Per RFC4724, the suggested
default value is <= the hold-time value.";
reference
"RFC 4724: Graceful Restart Mechanism for BGP.";
}
leaf stale-routes-time {
type uint32;
description
"An upper-bound on the time that stale routes will be
retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724";
reference
"RFC 4724: Graceful Restart Mechanism for BGP.";
}
uses use-multiple-paths-config; leaf helper-only {
type boolean;
default true;
description
"Enable graceful-restart in helper mode only. When this leaf
is set, the local system does not retain forwarding its own
state during a restart, but supports procedures for the
receiving speaker, as defined in RFC4724.";
reference
"RFC 4724: Graceful Restart Mechanism for BGP.";
}
}
container ebgp { grouping global-group-use-multiple-paths {
description description
"Multi-Path parameters for eBGP"; "Common grouping used for both global and groups which provides
configuration and state parameters relating to use of multiple
paths";
leaf allow-multiple-as { container use-multiple-paths {
type boolean; description
default "false"; "Parameters related to the use of multiple paths for the
description same NLRI";
"Allow multi-path to use paths from different neighboring
ASes. The default is to only consider multiple paths
from the same neighboring AS.";
}
leaf maximum-paths { leaf enabled {
type uint32; type boolean;
default 1; default false;
description description
"Maximum number of parallel paths to consider when using "Whether the use of multiple paths for the same NLRI is
BGP multi-path. The default is use a single path."; enabled for the neighbor. This value is overridden by any
} more specific configuration value.";
} }
container ibgp { container ebgp {
description description
"Multi-Path parameters for iBGP"; "Multi-Path parameters for eBGP";
leaf maximum-paths { leaf allow-multiple-as {
type uint32; type boolean;
default 1; default "false";
description description
"Maximum number of parallel paths to consider when using "Allow multi-path to use paths from different neighboring
iBGP multi-path. The default is to use a single path"; ASes. The default is to only consider multiple paths
} from the same neighboring AS.";
} }
}
}
grouping route-selection-options { leaf maximum-paths {
description type uint32;
"Configuration and state relating to route selection options"; default 1;
description
"Maximum number of parallel paths to consider when using
BGP multi-path. The default is use a single path.";
}
}
container route-selection-options { container ibgp {
description description
"Parameters relating to options for route selection"; "Multi-Path parameters for iBGP";
leaf enable-aigp { leaf maximum-paths {
type boolean; type uint32;
default false; default 1;
description description
"Flag to enable sending / receiving accumulated IGP "Maximum number of parallel paths to consider when using
attribute in routing updates"; iBGP multi-path. The default is to use a single path";
} }
} }
} }
}
grouping state { grouping route-selection-options {
description description
"Grouping containing common counters relating to prefixes and "Configuration and state relating to route selection options";
paths";
leaf total-paths { container route-selection-options {
type uint32; description
config false; "Parameters relating to options for route selection";
description
"Total number of BGP paths within the context";
}
leaf total-prefixes { leaf always-compare-med {
type uint32; type boolean;
config false; default "false";
description description
"Total number of BGP prefixes received within the context"; "Compare multi-exit discriminator (MED) value from
} different ASes when selecting the best route. The default
} behavior is to only compare MEDs for paths received from
} the same AS.";
<CODE ENDS> }
<CODE BEGINS> file "ietf-bgp-common-multiprotocol@2019-06-13.yang" leaf ignore-as-path-length {
type boolean;
default "false";
description
"Ignore the AS path length when selecting the best path.
The default is to use the AS path length and prefer paths
with shorter length.";
}
leaf external-compare-router-id {
type boolean;
default "true";
description
"When comparing similar routes received from external BGP
peers, use the router-id as a criterion to select the
active path.";
}
leaf advertise-inactive-routes {
type boolean;
default "false";
description
"Advertise inactive routes to external peers. The default
is to only advertise active routes.";
reference
"I-D.ietf-idr-best-external: Advertisement of the best
external route in BGP.";
}
leaf enable-aigp {
type boolean;
default false;
description
"Flag to enable sending / receiving accumulated IGP
attribute in routing updates";
reference
"RFC 7311: AIGP Metric Attribute for BGP.";
}
leaf ignore-next-hop-igp-metric {
type boolean;
default "false";
description
"Ignore the IGP metric to the next-hop when calculating BGP
best-path. The default is to select the route for which
the metric to the next-hop is lowest";
}
leaf enable-med {
type boolean;
default false;
description
"Flag to enable sending/receiving of MED metric attribute
in routing updates.";
}
}
}
grouping state {
description
"Grouping containing common counters relating to prefixes and
paths";
leaf total-paths {
type uint32;
config false;
description
"Total number of BGP paths within the context";
}
leaf total-prefixes {
type uint32;
config false;
description
"Total number of BGP prefixes received within the context";
}
}
}
<CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common-multiprotocol@2019-10-03.yang"
submodule ietf-bgp-common-multiprotocol { submodule ietf-bgp-common-multiprotocol {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix "bgp";
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
} }
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
} }
include ietf-bgp-common; include ietf-bgp-common;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
skipping to change at page 42, line 11 skipping to change at page 46, line 29
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"This sub-module contains groupings that are related to support "This sub-module contains groupings that are related to support
for multiple protocols in BGP. The groupings are common across for multiple protocols in BGP. The groupings are common across
multiple contexts."; multiple contexts.";
revision "2019-06-13" { revision "2019-10-03" {
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 47, line 8 skipping to change at page 51, line 24
} }
leaf shutdown-threshold-pct { leaf shutdown-threshold-pct {
type bt:percentage; type bt: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 neighbour 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 decimal64 { type uint32;
fraction-digits 2;
}
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.";
} }
} }
} }
grouping mp-ipv4-ipv6-unicast-common { grouping mp-ipv4-ipv6-unicast-common {
skipping to change at page 48, line 30 skipping to change at page 52, line 43
// Config groupings for common groups // Config groupings for common groups
grouping mp-all-afi-safi-common-prefix-limit-config { grouping mp-all-afi-safi-common-prefix-limit-config {
description description
"Configuration parameters relating to prefix-limits for an "Configuration parameters relating to prefix-limits for an
AFI-SAFI"; AFI-SAFI";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common-structure@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-common-structure@2019-10-03.yang"
submodule ietf-bgp-common-structure { submodule ietf-bgp-common-structure {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix "bgp";
} }
import ietf-bgp-types { prefix bt; } import ietf-bgp-types { prefix bt; }
import ietf-routing-policy { prefix rpol; } import ietf-routing-policy { prefix rpol; }
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
include ietf-bgp-common; include ietf-bgp-common;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description
"This sub-module contains groupings that are common across
multiple BGP contexts and provide structure around other
primitive groupings.";
revision "2019-10-03" {
description description
"This sub-module contains groupings that are common across "Initial Version";
multiple BGP contexts and provide structure around other reference
primitive groupings."; "RFC XXX, BGP Model for Service Provider Network.";
}
revision "2019-06-13" { grouping structure-neighbor-group-logging-options {
description
"Structural grouping used to include error handling
configuration and state for both BGP neighbors and groups";
container logging-options {
description description
"Initial Version"; "Logging options for events related to the BGP neighbor or
reference group";
"RFC XXX, BGP Model for Service Provider Network.";
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,
but documenting all backward transitions is
problematic, and should be avoided.";
}
} }
}
grouping structure-neighbor-group-ebgp-multihop { 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 description
"Structural grouping used to include eBGP multi-hop "eBGP multi-hop parameters for the BGPgroup";
configuration and state for both BGP neighbors and peer
groups";
container ebgp-multihop { leaf enabled {
type boolean;
default "false";
description description
"eBGP multi-hop parameters for the BGPgroup"; "When enabled the referenced group or neighbors are
permitted to be indirectly connected - including cases
leaf enabled { where the TTL can be decremented between the BGP peers";
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 { leaf multihop-ttl {
type uint8; type uint8;
description description
"Time-to-live value to use when packets are sent to the "Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is referenced group or neighbors and ebgp-multihop is
enabled"; enabled";
}
} }
} }
}
grouping structure-neighbor-group-route-reflector { grouping structure-neighbor-group-route-reflector {
description
"Structural grouping used to include route reflector
configuration and state for both BGP neighbors and peer
groups";
container route-reflector {
description description
"Structural grouping used to include route reflector "Route reflector parameters for the BGPgroup";
configuration and state for both BGP neighbors and peer reference
groups"; "RFC 4456: BGP Route Reflection.";
container route-reflector { leaf route-reflector-cluster-id {
when "../route-reflector-client = 'false'";
type bt:rr-cluster-id-type;
description description
"Route reflector parameters for the BGPgroup"; "Route Reflector cluster id to use when local router is
configured as a route reflector. Commonly set at the
group level, but allows a different cluster id to be set
for each neighbor.";
reference reference
"RFC 4456: BGP Route Reflection."; "RFC 4456: BGP Route Reflection: An Alternative to
Full Mesh.";
}
leaf route-reflector-cluster-id { leaf no-client-reflect {
type bt:rr-cluster-id-type; type boolean;
description default "false";
"route-reflector cluster id to use when local router is description
configured as a route reflector. Commonly set at the "When set to 'true', this disables route redistribution
group level, but allows a different cluster id to be set by the Route Reflector. It is set 'true' when the client is
for each neighbor."; fully meshed to prevent sending of redundant route
} advertisements.";
reference
"TODO: Add reference when IETF writes a draft describing
this.";
}
leaf route-reflector-client { leaf route-reflector-client {
type boolean; type boolean;
default "false"; default "false";
description description
"Configure the neighbor as a route reflector client."; "Configure the neighbor as a route reflector client.";
} reference
"RFC 4456: BGP Route Reflection: An Alternative to
Full Mesh.";
} }
} }
}
grouping structure-neighbor-group-as-path-options { grouping structure-neighbor-group-as-path-options {
description
"Structural grouping used to include AS_PATH manipulation
configuration and state for both BGP neighbors and peer
groups";
container as-path-options {
description description
"Structural grouping used to include AS_PATH manipulation "AS_PATH manipulation parameters for the BGP neighbor or
configuration and state for both BGP neighbors and peer group";
groups";
container as-path-options { leaf allow-own-as {
type uint8;
default 0;
description description
"AS_PATH manipulation parameters for the BGP neighbor or "Specify the number of occurrences of the local BGP
group"; speaker's AS that can occur within the AS_PATH before it
leaf allow-own-as { is rejected.";
type uint8; }
default 0;
description
"Specify the number of occurrences of the local BGP
speaker's AS that can occur within the AS_PATH before it
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
"Structural grouping used to include ADD-PATHs configuration
and state for both BGP neighbors and peer groups";
container add-paths {
description description
"Structural grouping used to include ADD-PATHs configuration "Parameters relating to the advertisement and receipt of
and state for both BGP neighbors and peer groups"; multiple paths for a single NLRI (add-paths)";
reference
"RFC 7911: ADD-PATH.";
container add-paths { leaf receive {
type boolean;
default false;
description description
"Parameters relating to the advertisement and receipt of "Enable ability to receive multiple path advertisements for
multiple paths for a single NLRI (add-paths)"; an NLRI from the neighbor or group";
}
leaf receive { choice send {
type boolean; default "all";
default false; description
description "Choice of sending the max. number of paths or to send all.";
"Enable ability to receive multiple path advertisements for
an NLRI from the neighbor or group";
}
leaf send-max { case max {
type uint8; leaf max {
description type uint8;
"The maximum number of paths to advertise to neighbors for description
a single NLRI"; "The maximum number of paths to advertise to neighbors
for a single NLRI";
}
} }
leaf eligible-prefix-policy {
type leafref { case all {
path "/rpol:routing-policy/rpol:policy-definitions/" + leaf all {
"rpol:policy-definition/rpol:name"; type empty;
description
"Send all the path advertisements to neighbors for a
single NLRI.";
} }
description
"A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled";
} }
} }
leaf eligible-prefix-policy {
type leafref {
path "/rpol:routing-policy/rpol:policy-definitions/" +
"rpol:policy-definition/rpol:name";
}
description
"A reference to a routing policy which can be used to
restrict the prefixes for which add-paths is enabled";
}
} }
} }
<CODE ENDS> }
<CODE ENDS>
<CODE BEGINS> file "ietf-bgp-peer-group@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-peer-group@2019-10-03.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;
} }
skipping to change at page 52, line 28 skipping to change at page 58, line 12
// 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 specific to the "This sub-module contains groupings that are specific to the
peer-group context of the OpenConfig BGP module."; peer-group context of the BGP module.";
revision "2019-06-13" { revision "2019-10-03" {
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-config {
description
"Configuration parameters relating to a base BGP peer group
that are not also applicable to any other context (e.g.,
neighbor)";
leaf peer-group-name {
type string;
description
"Name of the BGP peer-group";
}
}
grouping bgp-peer-group-afi-safi-list { grouping bgp-peer-group-afi-safi-list {
description description
"List of address-families associated with the BGP peer-group"; "List of address-families associated with the BGP peer-group";
list afi-safi { list afi-safi {
key "afi-safi-name"; key "afi-safi-name";
description description
"AFI, SAFI configuration available for the "AFI, SAFI configuration available for the
neighbour or group"; neighbour or group";
uses mp-afi-safi-config; uses mp-afi-safi-config;
container graceful-restart { container graceful-restart {
if-feature graceful-restart;
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;
} }
skipping to change at page 53, line 32 skipping to change at page 59, line 4
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
uses mp-afi-safi-graceful-restart-config; uses mp-afi-safi-graceful-restart-config;
} }
uses route-selection-options; uses route-selection-options;
uses global-group-use-multiple-paths; uses global-group-use-multiple-paths;
uses mp-all-afi-safi-list-contents; uses mp-all-afi-safi-list-contents;
} }
} }
grouping bgp-peer-group-base { grouping bgp-peer-group-base {
description description
"Parameters related to a BGP group."; "Parameters related to a BGP group.";
uses bgp-peer-group-config; leaf peer-group-name {
type string;
description
"Name of the BGP peer-group";
}
uses neighbor-group-config; uses neighbor-group-config;
uses state;
container timers { container timers {
description description
"Timers related to a BGP peer-group."; "Timers related to a BGP peer-group.";
uses neighbor-group-timers-config; uses neighbor-group-timers-config;
} }
container transport { container transport {
description description
skipping to change at page 54, line 4 skipping to change at page 59, line 28
"Timers related to a BGP peer-group."; "Timers related to a BGP peer-group.";
uses neighbor-group-timers-config; uses neighbor-group-timers-config;
} }
container transport { container transport {
description description
"Transport session parameters for the BGP peer-group."; "Transport session parameters for the BGP peer-group.";
uses neighbor-group-transport-config; uses neighbor-group-transport-config;
} }
container graceful-restart { container graceful-restart {
if-feature graceful-restart;
description description
"Parameters relating the graceful restart mechanism for BGP."; "Parameters relating the graceful restart mechanism for BGP.";
uses graceful-restart-config; uses graceful-restart-config;
} }
uses structure-neighbor-group-ebgp-multihop; uses structure-neighbor-group-ebgp-multihop;
uses structure-neighbor-group-route-reflector; uses structure-neighbor-group-route-reflector;
uses structure-neighbor-group-as-path-options; uses structure-neighbor-group-as-path-options;
uses structure-neighbor-group-add-paths; uses structure-neighbor-group-add-paths;
skipping to change at page 54, line 45 skipping to change at page 60, line 20
description description
"List of BGP peer-groups configured on the local system - "List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name"; uniquely identified by peer-group name";
uses bgp-peer-group-base; uses bgp-peer-group-base;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-neighbor@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-neighbor@2019-10-03.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";
} }
// Include the common submodule // Include the common submodule
include ietf-bgp-common; include ietf-bgp-common;
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
include ietf-bgp-peer-group; include ietf-bgp-peer-group;
include ietf-bgp-common-structure; include ietf-bgp-common-structure;
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
skipping to change at page 55, line 20 skipping to change at page 60, line 43
// 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 specific to the "This sub-module contains groupings that are specific to the
neighbor context of the BGP module."; neighbor context of the BGP module.";
revision "2019-06-13" { revision "2019-10-03" {
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";
uses use-multiple-paths-config; leaf enabled {
type boolean;
default false;
description
"Whether the use of multiple paths for the same NLRI is
enabled for the neighbor. This value is overridden by any
more specific configuration value.";
}
container ebgp { container ebgp {
description description
"Multi-path configuration for eBGP"; "Multi-path configuration for eBGP";
uses use-multiple-paths-ebgp-as-options-config;
leaf allow-multiple-as {
type boolean;
default "false";
description
"Allow multi-path to use paths from different neighboring
ASes. The default is to only consider multiple paths
from the same neighboring AS.";
}
} }
} }
} }
grouping bgp-neighbor-counters-message-types-state { grouping bgp-neighbor-counters-message-types-state {
description description
"Grouping of BGP message types, included for re-use across "Grouping of BGP message types, included for re-use across
counters"; counters";
leaf updates-received { leaf updates-received {
type uint64; type uint64;
description description
"Number of BGP UPDATE messages received from this neighbor."; "Number of BGP UPDATE messages received from this neighbor.";
reference reference
skipping to change at page 57, line 51 skipping to change at page 63, line 44
leaf installed { leaf installed {
type uint32; type uint32;
description description
"The number of advertised prefixes installed in the "The number of advertised prefixes installed in the
Loc-RIB"; Loc-RIB";
} }
} }
container graceful-restart { container graceful-restart {
if-feature bgp:graceful-restart;
description description
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
uses mp-afi-safi-graceful-restart-config; uses mp-afi-safi-graceful-restart-config;
leaf received { leaf received {
type boolean; type boolean;
config false; config false;
description description
"This leaf indicates whether the neighbor advertised the "This leaf indicates whether the neighbor advertised the
skipping to change at page 58, line 33 skipping to change at page 64, line 27
uses mp-all-afi-safi-list-contents; uses mp-all-afi-safi-list-contents;
uses bgp-neighbor-use-multiple-paths; uses bgp-neighbor-use-multiple-paths;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
7.2. BGP types 7.2. BGP types
<CODE BEGINS> file "ietf-bgp-types@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-types@2019-10-03.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;
} }
skipping to change at page 59, line 4 skipping to change at page 64, line 45
prefix inet; prefix inet;
} }
// meta // meta
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description description
"This module contains general data definitions for use in BGP "This module contains general data definitions for use in BGP
policy. It can be imported by modules that make use of BGP policy. It can be imported by modules that make use of BGP
attributes"; attributes";
revision "2019-06-13" { revision "2019-10-03" {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
identity bgp-capability { identity bgp-capability {
description "Base identity for a BGP capability"; description "Base identity for a BGP capability";
} }
skipping to change at page 62, line 4 skipping to change at page 67, line 48
"BGP-signalled VPLS (AFI,SAFI = 25,65)"; "BGP-signalled VPLS (AFI,SAFI = 25,65)";
reference reference
"RFC4761"; "RFC4761";
} }
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
"Reserved communities within the standard community space "Base identity for reserved communities within the standard
defined by RFC1997. These communities must fall within the community space defined by RFC1997. These communities must
range 0xFFFF0000 to 0xFFFFFFFF"; fall within the range 0xFFFF0000 to 0xFFFFFFFF";
reference reference
"RFC 1997"; "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
"RFC1997"; "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
0xFFFFFF02."; 0xFFFFFF02.";
reference reference
"RFC1997"; "RFC 1997: BGP Communities Attribute.";
} }
identity NO_EXPORT_SUBCONFED { identity no-export-subconfed {
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 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
"RFC1997"; "RFC 1997: BGP Communities Attribute.";
} }
identity NOPEER { 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 bi-lateral
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";
reference reference
"RFC3765"; "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.";
} }
identity as-set { identity as-set {
base as-path-segment-type; base as-path-segment-type;
skipping to change at page 64, line 4 skipping to change at page 69, line 47
} }
identity as-confed-set { identity as-confed-set {
base as-path-segment-type; base as-path-segment-type;
description description
"Unordered set of Member Autonomous Systems in the local "Unordered set of Member Autonomous Systems in the local
confederation that the UPDATE message has traversed."; confederation that the UPDATE message has traversed.";
reference reference
"RFC 5065, Autonomous System Configuration for BGP."; "RFC 5065, Autonomous System Configuration for BGP.";
} }
/* /*
* Features. * Features.
*/ */
feature send-communities {
description
"Enable the propogation 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 64, line 42 skipping to change at page 70, line 43
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 {
base BGP_WELL_KNOWN_STD_COMMUNITY; base bgp-well-known-std-community;
} }
description description
"Type definition for well-known IETF community attribute "Type definition for well-known IETF community attribute
values"; values";
reference reference
"IANA Border Gateway Protocol (BGP) Well Known Communities"; "IANA Border Gateway Protocol (BGP) Well Known Communities";
} }
typedef bgp-std-community-type { typedef bgp-std-community-type {
// TODO: further refine restrictions and allowed patterns // TODO: further refine restrictions and allowed patterns
// 4-octet value: // 4-octet value:
skipping to change at page 67, line 6 skipping to change at page 73, line 6
typedef bgp-community-regexp-type { typedef bgp-community-regexp-type {
// TODO: needs more work to decide what format these regexps can // TODO: needs more work to decide what format these regexps can
// take. // take.
type string; type string;
description description
"Type definition for communities specified as regular "Type definition for communities specified as regular
expression patterns"; expression patterns";
} }
typedef bgp-origin-attr-type { typedef bgp-origin-attr-type {
type enumeration { type enumeration {
enum IGP { enum igp {
description "Origin of the NLRI is internal"; description "Origin of the NLRI is internal";
} }
enum EGP { enum egp {
description "Origin of the NLRI is EGP"; description "Origin of the NLRI is EGP";
} }
enum INCOMPLETE { enum incomplete {
description "Origin of the NLRI is neither IGP or EGP"; description "Origin of the NLRI is neither IGP or EGP";
} }
} }
description description
"Type definition for standard BGP origin attribute"; "Type definition for standard BGP origin attribute";
reference reference
"RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3"; "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3";
} }
typedef peer-type { typedef peer-type {
type enumeration { type enumeration {
enum INTERNAL { enum internal {
description "internal (iBGP) peer"; description
"internal (iBGP) peer";
} }
enum EXTERNAL { enum external {
description "external (eBGP) peer"; description
"external (eBGP) peer";
}
enum confederation {
description
"Confederation as peer";
} }
} }
description description
"Labels a peer or peer group as explicitly internal or "Labels a peer or peer group as explicitly internal,
external"; 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;
skipping to change at page 68, line 42 skipping to change at page 74, line 49
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";
} }
typedef community-type { typedef community-type {
type enumeration { type bits {
enum STANDARD { bit standard {
description position 0;
"Send only standard communities";
}
enum EXTENDED {
description description
"Send only extended communities"; "Send only standard communities.";
reference
"RFC 1997: BGP Communities Attribute.";
} }
enum BOTH { bit extended {
description description
"Send both standard and extended communities"; "Send only extended communities.";
reference
"RFC 4360: BGP Extended Communities Attribute.";
} }
enum NONE { bit large {
description description
"Do not send any community attribute"; "Send only large communities.";
reference
"RFC 8092: BGP Large Communities Attribute.";
} }
} }
description description
"Type describing variations of community attributes: "Type describing variations of community attributes.
STANDARD: standard BGP community [rfc1997] The community types can be combined and a value of 0
EXTENDED: extended BGP community [rfc4360] implies 'none'";
BOTH: both standard and extended community";
} }
} }
<CODE ENDS> <CODE ENDS>
7.3. BGP policy data 7.3. BGP policy data
<CODE BEGINS> file "ietf-bgp-policy@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-policy@2019-10-03.yang"
module ietf-bgp-policy { module ietf-bgp-policy {
yang-version "1.1"; yang-version "1.1";
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy"; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy";
prefix "bp"; prefix "bp";
// import some basic types // import some basic types
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-routing-policy { import ietf-routing-policy {
skipping to change at page 69, line 43 skipping to change at page 76, line 4
import ietf-routing-policy { import ietf-routing-policy {
prefix rpol; prefix rpol;
} }
import ietf-bgp-types { import ietf-bgp-types {
prefix bt; prefix bt;
} }
import ietf-routing-types { import ietf-routing-types {
prefix rt-types; prefix rt-types;
} }
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description description
"This module contains data definitions for BGP routing policy. "This module contains data definitions for BGP routing policy.
It augments the base routing-policy module with BGP-specific It augments the base routing-policy module with BGP-specific
options for conditions and actions."; options for conditions and actions.";
revision "2019-06-13" { revision "2019-10-03" {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXX, BGP Model for Service Provider Network."; "RFC XXX, BGP Model for Service Provider Network.";
} }
// typedef statements // typedef statements
typedef bgp-set-community-option-type { typedef bgp-set-community-option-type {
type enumeration { type enumeration {
enum ADD { enum add {
description description
"Add the specified communities to the existing "Add the specified communities to the existing
community attribute"; community attribute";
} }
enum REMOVE { enum remove {
description description
"Remove the specified communities from the "Remove the specified communities from the
existing community attribute"; existing community attribute";
} }
enum REPLACE { enum replace {
description description
"Replace the existing community attribute with "Replace the existing community attribute with
the specified communities. If an empty set is the specified communities. If an empty set is
specified, this removes the community attribute specified, this removes the community attribute
from the route."; from the route.";
} }
} }
description description
"Type definition for options when setting the community "Type definition for options when setting the community
attribute in a policy action"; attribute in a policy action";
} }
typedef bgp-next-hop-type { typedef bgp-next-hop-type {
type union { type union {
type inet:ip-address-no-zone; type inet:ip-address-no-zone;
type enumeration { type enumeration {
enum SELF { enum self {
description description
"Special designation for local router's own "Special designation for local router's own
address, i.e., next-hop-self"; address, i.e., next-hop-self";
} }
} }
} }
description description
"Type definition for specifying next-hop in policy actions"; "Type definition for specifying next-hop in policy actions";
} }
typedef bgp-set-med-type { typedef bgp-set-med-type {
type union { type union {
type uint32; type uint32;
type string { type string {
pattern "^[+-][0-9]+"; 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 { type enumeration {
enum IGP { enum igp {
description description
"Set the MED value to the IGP cost toward the "Set the MED value to the IGP cost toward the
next hop for the route"; next hop for the route";
} }
enum med-plus-igp {
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 description
"Type definition for specifying how the BGP MED can "Type definition for specifying how the BGP MED can
be set in BGP policy actions. The three choices are to set be set in BGP policy actions. The three choices are to set
the MED directly, increment/decrement using +/- notation, the MED directly, increment/decrement using +/- notation,
and setting it to the IGP cost (predefined value)."; 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 statements
augment "/rpol:routing-policy/rpol:defined-sets" { augment "/rpol:routing-policy/rpol:defined-sets" {
description description
"Adds BGP defined sets container to routing policy model."; "Adds BGP defined sets container to routing policy model.";
container bgp-defined-sets { container bgp-defined-sets {
description description
"BGP-related set definitions for policy match conditions"; "BGP-related set definitions for policy match conditions";
container community-sets { container community-sets {
description description
"Enclosing container for list of defined BGP community sets"; "Enclosing container for list of defined BGP community sets";
list community-set { list community-set {
key "community-set-name"; key "name";
description description
"List of defined BGP community sets"; "List of defined BGP community sets";
leaf community-set-name { leaf name {
type string; type string;
mandatory true; mandatory true;
description description
"Name / label of the community set -- this is used to "Name / label of the community set -- this is used to
reference the set in match conditions"; reference the set in match conditions";
} }
leaf-list community-member { leaf-list member {
type union { type union {
type bt:bgp-std-community-type; type bt:bgp-std-community-type;
type bt:bgp-community-regexp-type; type bt:bgp-community-regexp-type;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Members of the community set"; "Members of the community set";
} }
} }
} }
container ext-community-sets { container ext-community-sets {
description description
"Enclosing container for list of extended BGP community "Enclosing container for list of extended BGP community
sets"; sets";
list ext-community-set { list ext-community-set {
key "ext-community-set-name"; key "name";
description description
"List of defined extended BGP community sets"; "List of defined extended BGP community sets";
leaf ext-community-set-name { leaf name {
type string; type string;
description description
"Name / label of the extended community set -- this is "Name / label of the extended community set -- this is
used to reference the set in match conditions"; used to reference the set in match conditions";
} }
leaf-list ext-community-member { leaf-list member {
type union { type union {
type rt-types:route-target; type rt-types:route-target;
type bt:bgp-community-regexp-type; type bt:bgp-community-regexp-type;
} }
description description
"Members of the extended community set"; "Members of the extended community set";
} }
} }
} }
container as-path-sets { container as-path-sets {
description description
"Enclosing container for list of define AS path sets"; "Enclosing container for list of define AS path sets";
list as-path-set { list as-path-set {
key "as-path-set-name"; key "name";
description description
"List of defined AS path sets"; "List of defined AS path sets";
leaf as-path-set-name { leaf name {
type string; type string;
description description
"Name of the AS path set -- this is used to reference the "Name of the AS path set -- this is used to reference the
set in match conditions"; set in match conditions";
} }
leaf-list member {
leaf-list as-path-set-member {
// TODO: need to refine typedef for AS path expressions // TODO: need to refine typedef for AS path expressions
type string; type string;
description description
"AS path expression -- list of ASes in the set"; "AS path expression -- list of ASes in the set";
} }
} }
} }
} }
} }
grouping set-community-action-common { grouping set-community-action-common {
description description
"Common leaves for set-community and set-ext-community "Common leaves for set-community and set-ext-community
actions"; actions";
leaf method { leaf method {
type enumeration { type enumeration {
enum INLINE { enum inline {
description description
"The extended communities are specified inline as a "The extended communities are specified inline as a
list"; list";
} }
enum REFERENCE { enum reference {
description description
"The extended communities are specified by referencing a "The extended communities are specified by referencing a
defined ext-community set"; defined ext-community set";
} }
} }
description description
"Indicates the method used to specify the extended "Indicates the method used to specify the extended
communities for the set-ext-community action"; communities for the set-ext-community action";
} }
leaf options { leaf options {
type bgp-set-community-option-type; type bgp-set-community-option-type;
description description
"Options for modifying the community attribute with "Options for modifying the community attribute with
the specified values. These options apply to both the specified values. These options apply to both
methods of setting the community attribute."; methods of setting the community attribute.";
} }
} }
skipping to change at page 75, line 18 skipping to change at page 81, line 49
type uint32; type uint32;
// TODO: add support for other comparisons if needed // TODO: add support for other comparisons if needed
description description
"Condition to check if the local pref attribute is equal to "Condition to check if the local pref attribute is equal to
the specified value"; the specified value";
} }
leaf route-type { leaf route-type {
// TODO: verify extent of vendor support for this comparison // TODO: verify extent of vendor support for this comparison
type enumeration { type enumeration {
enum INTERNAL { enum internal {
description "route type is internal"; description "route type is internal";
} }
enum EXTERNAL { enum external {
description "route type is external"; description "route type is external";
} }
} }
description description
"Condition to check the route type in the route update"; "Condition to check the route type in the route update";
} }
container community-count { container community-count {
description description
"Value and comparison operations for conditions based on the "Value and comparison operations for conditions based on the
skipping to change at page 75, line 52 skipping to change at page 82, line 34
description description
"Top-level container for match conditions on communities. "Top-level container for match conditions on communities.
Match a referenced community-set according to the logic Match a referenced community-set according to the logic
defined in the match-set-options leaf"; defined in the match-set-options leaf";
leaf community-set { leaf community-set {
type leafref { type leafref {
path path
"/rpol:routing-policy/rpol:defined-sets/" + "/rpol:routing-policy/rpol:defined-sets/" +
"bp:bgp-defined-sets/bp:community-sets/" + "bp:bgp-defined-sets/bp:community-sets/" +
"bp:community-set/bp:community-set-name"; "bp:community-set/bp:name";
} }
description description
"References a defined community set"; "References a defined community set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
container match-ext-community-set { container match-ext-community-set {
description description
"Match a referenced extended community-set according to the "Match a referenced extended community-set according to the
logic defined in the match-set-options leaf"; logic defined in the match-set-options leaf";
leaf ext-community-set { leaf ext-community-set {
type leafref { type leafref {
path path
"/rpol:routing-policy/rpol:defined-sets/" + "/rpol:routing-policy/rpol:defined-sets/" +
"bp:bgp-defined-sets/bp:ext-community-sets/" + "bp:bgp-defined-sets/bp:ext-community-sets/" +
"bp:ext-community-set/" + "bp:ext-community-set/bp:name";
"bp:ext-community-set-name";
} }
description "References a defined extended community set"; description "References a defined extended community set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
container match-as-path-set { container match-as-path-set {
description description
"Match a referenced as-path set according to the logic "Match a referenced as-path set according to the logic
defined in the match-set-options leaf"; defined in the match-set-options leaf";
leaf as-path-set { leaf as-path-set {
type leafref { type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" + path "/rpol:routing-policy/rpol:defined-sets/" +
"bp:bgp-defined-sets/bp:as-path-sets/" + "bp:bgp-defined-sets/bp:as-path-sets/" +
"bp:as-path-set/bp:as-path-set-name"; "bp:as-path-set/bp:name";
} }
description description
"References a defined AS path set"; "References a defined AS path set";
} }
uses rpol:match-set-options-group; uses rpol:match-set-options-group;
} }
} }
} }
augment "/rpol:routing-policy/rpol:policy-definitions/" + augment "/rpol:routing-policy/rpol:policy-definitions/" +
skipping to change at page 78, line 4 skipping to change at page 84, line 34
leaf repeat-n { leaf repeat-n {
type uint8 { type uint8 {
range 1..max; range 1..max;
} }
description description
"Number of times to prepend the local AS number to the AS "Number of times to prepend the local AS number to the AS
path. The value should be between 1 and the maximum path. The value should be between 1 and the maximum
supported by the implementation."; supported by the implementation.";
} }
} }
container set-community { container set-community {
description description
"Action to set the community attributes of the route, along "Action to set the community attributes of the route, along
with options to modify how the community is modified. with options to modify how the community is modified.
Communities may be set using an inline list OR Communities may be set using an inline list OR
reference to an existing defined set (not both)."; reference to an existing defined set (not both).";
uses set-community-action-common; uses set-community-action-common;
container inline { container inline {
when "../method = 'INLINE'" { when "../method = 'inline'" {
description description
"Active only when the set-community method is INLINE"; "Active only when the set-community method is inline";
} }
description description
"Set the community values for the action inline with "Set the community values for the action inline with
a list."; a list.";
leaf-list communities { leaf-list communities {
type union { type union {
type bt:bgp-std-community-type; type bt:bgp-std-community-type;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the community values for the update inline with a "Set the community values for the update inline with a
list."; list.";
} }
} }
container reference { container reference {
when "../method = 'REFERENCE'" { when "../method = 'reference'" {
description description
"Active only when the set-community method is REFERENCE"; "Active only when the set-community method is reference";
} }
description description
"Provide a reference to a defined community set for the "Provide a reference to a defined community set for the
set-community action"; set-community action";
leaf community-set-ref { leaf community-set-ref {
type leafref { type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" + path "/rpol:routing-policy/rpol:defined-sets/" +
"bp:bgp-defined-sets/" + "bp:bgp-defined-sets/" +
"bp:community-sets/bp:community-set/" + "bp:community-sets/bp:community-set/bp:name";
"bp:community-set-name";
} }
description description
"References a defined community set by name"; "References a defined community set by name";
} }
} }
} }
container set-ext-community { container set-ext-community {
description description
"Action to set the extended community attributes of the "Action to set the extended community attributes of the
route, along with options to modify how the community is route, along with options to modify how the community is
modified. Extended communities may be set using an inline modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not list OR a reference to an existing defined set (but not
both)."; both).";
skipping to change at page 79, line 17 skipping to change at page 85, line 45
container set-ext-community { container set-ext-community {
description description
"Action to set the extended community attributes of the "Action to set the extended community attributes of the
route, along with options to modify how the community is route, along with options to modify how the community is
modified. Extended communities may be set using an inline modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not list OR a reference to an existing defined set (but not
both)."; both).";
uses set-community-action-common; uses set-community-action-common;
container inline { container inline {
when "../method = 'INLINE'" { when "../method = 'inline'" {
description description
"Active only when the set-community method is INLINE"; "Active only when the set-community method is inline";
} }
description description
"Set the extended community values for the action inline "Set the extended community values for the action inline
with a list."; with a list.";
leaf-list communities { leaf-list communities {
type union { type union {
type rt-types:route-target; type rt-types:route-target;
type bt:bgp-well-known-community-type; type bt:bgp-well-known-community-type;
} }
description description
"Set the extended community values for the update inline "Set the extended community values for the update inline
with a list."; with a list.";
} }
} }
container reference { container reference {
when "../method = 'REFERENCE'" { when "../method = 'reference'" {
description description
"Active only when the set-community method is REFERENCE"; "Active only when the set-community method is reference";
} }
description description
"Provide a reference to an extended community set for the "Provide a reference to an extended community set for the
set-ext-community action"; set-ext-community action";
leaf ext-community-set-ref { leaf ext-community-set-ref {
type leafref { type leafref {
path path
"/rpol:routing-policy/rpol:defined-sets/" + "/rpol:routing-policy/rpol:defined-sets/" +
"bp:bgp-defined-sets/bp:ext-community-sets/" + "bp:bgp-defined-sets/bp:ext-community-sets/" +
"bp:ext-community-set/" + "bp:ext-community-set/bp:name";
"bp:ext-community-set-name";
} }
description description
"References a defined extended community set by name"; "References a defined extended community set by name";
} }
} }
} }
} }
} }
// rpc statements // rpc statements
// notification statements // notification statements
} }
<CODE ENDS> <CODE ENDS>
7.4. RIB modules 7.4. RIB modules
<CODE BEGINS> file "ietf-bgp-rib@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib@2019-10-03.yang"
submodule ietf-bgp-rib { submodule ietf-bgp-rib {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix "br";
} }
/* /*
* Import and Include * Import and Include
*/ */
import ietf-bgp-types { import ietf-bgp-types {
prefix "bt"; prefix "bt";
reference reference
"RFC XXXX: BGP YANG Model for Service Provider Networks."; "RFC XXXX: BGP YANG Model for Service Provider Networks.";
} }
skipping to change at page 82, line 15 skipping to change at page 88, line 41
applied. applied.
adj-rib-out-pre: This is a per-neighbor table containing routes adj-rib-out-pre: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor before output eligible for sending (advertising) to the neighbor before output
policy rules have been applied. policy rules have been applied.
adj-rib-out-post: This is a per-neighbor table containing routes adj-rib-out-post: This is a per-neighbor table containing routes
eligible for sending (advertising) to the neighbor after output eligible for sending (advertising) to the neighbor after output
policy rules have been applied."; policy rules have been applied.";
revision "2019-06-13" { revision "2019-10-03" {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP YANG Model for Service Provider Network."; "RFC XXXX, BGP YANG Model for Service Provider Network.";
} }
grouping rib { grouping rib {
description description
"Grouping for rib."; "Grouping for rib.";
skipping to change at page 88, line 27 skipping to change at page 95, line 4
"Include this container for IPv6 unicast RIB"; "Include this container for IPv6 unicast RIB";
} }
description description
"Routing tables for IPv6 unicast -- active when the "Routing tables for IPv6 unicast -- active when the
afi-safi name is ipv6-unicast"; afi-safi name is ipv6-unicast";
uses ipv6-loc-rib; uses ipv6-loc-rib;
uses ipv6-adj-rib; uses ipv6-adj-rib;
} }
} }
} }
description description
"Top level container for BGP RIB"; "Top level container for BGP RIB";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-ext@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-ext@2019-10-03.yang"
submodule ietf-bgp-rib-ext { submodule ietf-bgp-rib-ext {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bre"; prefix "bre";
} }
include ietf-bgp-rib-types; include ietf-bgp-rib-types;
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description description
"Defines additional data nodes for the OpenConfig BGP RIB model. "Defines additional data nodes for the BGP RIB model.
These items reflect extensions that are desirable features but These items reflect extensions that are desirable features but
are not currently supported in a majority of BGP are not currently supported in a majority of BGP
implementations."; implementations.";
revision "2019-06-13" { revision "2019-10-03" {
description description
"Initial Revision."; "Initial Revision.";
reference reference
"RFC XXXX: BGP YANG Model for Service Providers."; "RFC XXXX: BGP YANG Model for Service Providers.";
} }
grouping rib-ext-route-annotations { grouping rib-ext-route-annotations {
description description
"Extended annotations for routes in the routing tables"; "Extended annotations for routes in the routing tables";
skipping to change at page 89, line 41 skipping to change at page 96, line 20
} }
} }
description description
"Indicates the reason the route is not used, either due to "Indicates the reason the route is not used, either due to
policy filtering or bestpath selection"; policy filtering or bestpath selection";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-types@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-types@2019-10-03.yang"
submodule ietf-bgp-rib-types { submodule ietf-bgp-rib-types {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix "br";
} }
organization organization
"IETF IDR Working Group"; "IETF IDR Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/idr> "WG Web: <http://tools.ietf.org/wg/idr>
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com),
Jeffrey Haas (jhaas at pfrc.org).";
description description
"Defines identity and type definitions associated with "Defines identity and type definitions associated with
the BGP RIB modules"; the BGP RIB modules";
revision "2019-06-13" { revision "2019-10-03" {
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
"BGP Monitoring Protocol (draft-ietf-grow-bmp-07)"; "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";
} }
identity invalid-as-loop { identity invalid-as-loop {
base invalid-route-reason; base invalid-route-reason;
skipping to change at page 90, line 51 skipping to change at page 97, line 30
"Route was invalid due to AS_PATH loop"; "Route was invalid due to AS_PATH loop";
} }
identity invalid-originator { identity invalid-originator {
base invalid-route-reason; base invalid-route-reason;
description description
"Route was invalid due to ORIGINATOR_ID, e.g., update has "Route was invalid due to ORIGINATOR_ID, e.g., update has
local router as originator"; local router as originator";
} }
identity invalid-confed {
base invalid-route-reason;
description
"Route was invalid due to a loop in the AS_CONFED_SEQUENCE or
AS_CONFED_SET attributes";
}
identity bgp-not-selected-bestpath { identity bgp-not-selected-bestpath {
description description
"Base identity for indicating reason a route was was not "Base identity for indicating reason a route was was not
selected by BGP route selection algorithm"; selected by BGP route selection algorithm";
reference reference
"RFC 4271 - Section 9.1"; "RFC 4271 - Section 9.1";
} }
identity local-pref-lower { identity local-pref-lower {
base bgp-not-selected-bestpath; base bgp-not-selected-bestpath;
skipping to change at page 92, line 43 skipping to change at page 99, line 29
} }
identity rejected-import-policy { identity rejected-import-policy {
base bgp-not-selected-policy; base bgp-not-selected-policy;
description description
"Route was rejected after apply import policies"; "Route was rejected after apply import policies";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-attributes@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-attributes@2019-10-03.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 93, line 30 skipping to change at page 100, line 17
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com)"; Susan Hares (shares at ndzh.com)";
description description
"This submodule contains common data definitions for BGP "This submodule contains common data definitions for BGP
attributes for use in BGP RIB tables."; attributes for use in BGP RIB tables.";
revision "2019-06-13" { revision "2019-10-03" {
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";
skipping to change at page 97, line 19 skipping to change at page 104, line 4
paths for a prefix, the path identifier is used to paths for a prefix, the path identifier is used to
uniquely identify a route based on the combination of the uniquely identify a route based on the combination of the
prefix and path id. In the Adj-RIB-In, the path-id value is prefix and path id. In the Adj-RIB-In, the path-id value is
the value received in the update message. In the Loc-RIB, the value received in the update message. In the Loc-RIB,
if used, it should represent a locally generated path-id if used, it should represent a locally generated path-id
value for the corresponding route. In Adj-RIB-Out, it value for the corresponding route. In Adj-RIB-Out, it
should be the value sent to a neighbor when add-paths is should be the value sent to a neighbor when add-paths is
used, i.e., the capability has been negotiated."; used, i.e., the capability has been negotiated.";
reference reference
"RFC 7911: Advertisement of Multiple Paths in BGP"; "RFC 7911: Advertisement of Multiple Paths in BGP";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-10-03.yang"
submodule ietf-bgp-rib-table-attributes { submodule ietf-bgp-rib-table-attributes {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix "br";
} }
// import some basic types // import some basic types
import ietf-yang-types { import ietf-yang-types {
prefix types; prefix types;
reference reference
skipping to change at page 98, line 7 skipping to change at page 104, line 41
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com"; Susan Hares (shares at ndzh.com";
description description
"This submodule contains common data definitions for data "This submodule contains common data definitions for data
related to a RIB entry, or RIB table."; related to a RIB entry, or RIB table.";
revision "2019-06-13" { revision "2019-10-03" {
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 99, line 38 skipping to change at page 106, line 23
// existing LOC-RIB container // existing LOC-RIB container
uses bgp-common-table-attrs-state; uses bgp-common-table-attrs-state;
description description
"Operational state data for data related to the entire "Operational state data for data related to the entire
LOC-RIB"; LOC-RIB";
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-tables@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-tables@2019-10-03.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
skipping to change at page 100, line 36 skipping to change at page 107, line 22
Editor: Mahesh Jethanandani (mjethanandani@gmail.com) Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel, Authors: Keyur Patel,
Mahesh Jethanandani, Mahesh Jethanandani,
Susan Hares"; Susan Hares";
description description
"This submodule contains structural data definitions for "This submodule contains structural data definitions for
BGP routing tables."; BGP routing tables.";
revision "2019-06-13" { revision "2019-10-03" {
description description
"Initial Version"; "Initial Version";
reference reference
"RFC XXXX, BGP YANG Model for Service Provider Network."; "RFC XXXX, BGP YANG Model for Service Provider Network.";
} }
/*
* Feature(s)
*/
feature clear-routes {
description
"Clearing of BGP routes is supported.";
}
grouping bgp-adj-rib-common-attr-refs { grouping bgp-adj-rib-common-attr-refs {
description description
"Definitions of common references to attribute sets for "Definitions of common references to attribute sets for
multiple AFI-SAFIs for Adj-RIB tables"; multiple AFI-SAFIs for Adj-RIB tables";
leaf attr-index { leaf attr-index {
type leafref { type leafref {
path "../../../../../../../../../attr-sets/" + path "../../../../../../../../../attr-sets/" +
"attr-set/index"; "attr-set/index";
} }
description description
"Reference to the common attribute group for the "Reference to the common attribute group for the
route"; route";
} }
leaf community-index { leaf community-index {
type leafref { type leafref {
path "../../../../../../../../../communities/community/" + path "../../../../../../../../../communities/community/" +
"index"; "index";
} }
description description
"Reference to the community attribute for the route"; "Reference to the community attribute for the route";
} }
leaf ext-community-index { leaf ext-community-index {
skipping to change at page 101, line 23 skipping to change at page 108, line 16
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
the route was injected or redistributed from another the route was injected or redistributed from another
protocol, the origin indicates the source protocol for the protocol, the origin indicates the source protocol for the
route."; route.";
} }
leaf path-id { leaf path-id {
type uint32; type uint32;
// TODO: YANG does not allow default values for key // TODO: YANG does not allow default values for key
// default 0; // default 0;
description description
"If the route is learned from a neighbor, the path-id "If the route is learned from a neighbor, the path-id
corresponds to the path-id for the route in the corresponds to the path-id for the route in the
corresponding adj-rib-in-post table. If the route is corresponding adj-rib-in-post table. If the route is
injected from another protocol, or the neighbor does not injected from another protocol, or the neighbor does not
support BGP add-paths, the path-id should be set support BGP add-paths, the path-id should be set
to zero, also the default value."; to zero, also the default value.";
} }
} }
grouping clear-routes { grouping clear-routes {
description description
"Action to clear BGP routes."; "Action to clear BGP routes.";
container clear-routes { container clear-routes {
if-feature "clear-routes"; if-feature "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.";
} }
} }
skipping to change at page 103, line 48 skipping to change at page 110, line 41
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; 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 eanbled)."; 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-loc-rib-attr-state;
skipping to change at page 104, line 47 skipping to change at page 111, line 41
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; 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 eanbled)."; 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-loc-rib-attr-state;
skipping to change at page 105, line 43 skipping to change at page 112, line 37
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; 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;
skipping to change at page 106, line 26 skipping to change at page 113, line 21
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; 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;
skipping to change at page 107, line 36 skipping to change at page 114, line 31
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 eligble for
sending (advertising) to the neighbor before output sending (advertising) to the neighbor before output
policy rules have been applied"; policy rules have been applied";
uses 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 eligble for
sending (advertising) to the neighbor after output sending (advertising) to the neighbor after output
policy rules have been applied"; policy rules have been applied";
uses 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; uses bgp-common-table-attrs-state;
skipping to change at page 108, line 40 skipping to change at page 115, line 32
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; 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
skipping to change at page 109, line 4 skipping to change at page 115, line 45
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; 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
skipping to change at page 110, line 25 skipping to change at page 117, line 19
leaf neighbor-address { leaf neighbor-address {
type inet:ip-address; type inet:ip-address;
description description
"IP address of the BGP neighbor or peer"; "IP address of the BGP neighbor or peer";
} }
container adj-rib-in-pre { container adj-rib-in-pre {
description description
"Per-neighbor table containing the NLRI updates "Per-neighbor table containing the NLRI updates
received from the neighbor before any local input received from the neighbor before any local input
policy rules or filters have been applied. This can policy rules or filters have been applied. This can
be considered the 'raw' updates from the neighbor."; be considered the 'raw' updates from the neighbor.";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
container adj-rib-in-post { container adj-rib-in-post {
description description
"Per-neighbor table containing the paths received from "Per-neighbor table containing the paths received from
the neighbor that are eligible for best-path selection the neighbor that are eligible for best-path selection
after local input policy rules have been applied."; after local input policy rules have been applied.";
uses ipv6-adj-rib-in-post; uses ipv6-adj-rib-in-post;
} }
container adj-rib-out-pre { container adj-rib-out-pre {
description description
"Per-neighbor table containing paths eligble for "Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor before output sending (advertising) to the neighbor before output
policy rules have been applied"; policy rules have been applied";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
container adj-rib-out-post { container adj-rib-out-post {
description description
"Per-neighbor table containing paths eligble for "Per-neighbor table containing paths eligble for
sending (advertising) to the neighbor after output sending (advertising) to the neighbor after output
policy rules have been applied"; policy rules have been applied";
uses ipv6-adj-rib-common; uses ipv6-adj-rib-common;
} }
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-06-13.yang" <CODE BEGINS> file "ietf-bgp-rib-table-attributes@2019-10-03.yang"
submodule ietf-bgp-rib-table-attributes { submodule ietf-bgp-rib-table-attributes {
yang-version "1.1"; yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "br"; prefix "br";
} }
// import some basic types // import some basic types
import ietf-yang-types { import ietf-yang-types {
prefix types; prefix types;
reference reference
skipping to change at page 112, line 5 skipping to change at page 118, line 43
WG List: <idr@ietf.org> WG List: <idr@ietf.org>
Authors: Mahesh Jethanandani (mjethanandani at gmail.com), Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
Keyur Patel (keyur at arrcus.com), Keyur Patel (keyur at arrcus.com),
Susan Hares (shares at ndzh.com"; Susan Hares (shares at ndzh.com";
description description
"This submodule contains common data definitions for data "This submodule contains common data definitions for data
related to a RIB entry, or RIB table."; related to a RIB entry, or RIB table.";
revision "2019-06-13" { revision "2019-10-03" {
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 115, line 7 skipping to change at page 121, line 44
</config> </config>
8.2. Neighbor Address Family Configuration 8.2. Neighbor Address Family Configuration
This example shows how to configure a BGP peer, where the remote This example shows how to configure a BGP peer, where the remote
address is 192.0.2.1, the remote AS number is 64497, and the address address is 192.0.2.1, the remote AS number is 64497, and the address
family of the peer is IPv4 unicast. family of the peer is IPv4 unicast.
[note: '\' line wrapping for formatting only] [note: '\' line wrapping for formatting only]
<!--
This example shows a neighbor configuration with damping.
-->
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing <routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing"> xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols> <control-plane-protocols>
<control-plane-protocol> <control-plane-protocol>
<type <type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type> </type>
<name>name:BGP</name> <name>name:BGP</name>
<bgp <bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp"> xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global> <global>
<as>64496</as> <as>64496</as>
skipping to change at page 115, line 34 skipping to change at page 122, line 28
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-\ xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-\
unicast unicast
</afi-safi-name> </afi-safi-name>
</afi-safi> </afi-safi>
</afi-safis> </afi-safis>
</global> </global>
<neighbors> <neighbors>
<neighbor> <neighbor>
<remote-address>192.0.2.1</remote-address> <remote-address>192.0.2.1</remote-address>
<peer-as>64497</peer-as> <peer-as>64497</peer-as>
<route-flap-damping>
<enable>true</enable>
<suppress-above>4.0</suppress-above>
<reuse-above>3.0</reuse-above>
<max-flap>15.0</max-flap>
<reach-decay>100</reach-decay>
<unreach-decay>500</unreach-decay>
<keep-history>1000</keep-history>
</route-flap-damping>
<description>"Peer Router B"</description> <description>"Peer Router B"</description>
<afi-safis> <afi-safis>
<afi-safi> <afi-safi>
<afi-safi-name <afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv\ xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv\
4-unicast 4-unicast
</afi-safi-name> </afi-safi-name>
</afi-safi> </afi-safi>
</afi-safis> </afi-safis>
</neighbor> </neighbor>
</neighbors> </neighbors>
</bgp> </bgp>
</control-plane-protocol> </control-plane-protocol>
</control-plane-protocols> </control-plane-protocols>
</routing> </routing>
</config> </config>
8.3. IPv6 Neighbor Configuration
This example shows how to configure a BGP peer, where the remote peer
has a IPv6 address, and uses non-default timers for hold-time and
keepalive.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp
</type>
<name>name:BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv6-\
unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
<neighbors>
<neighbor>
<remote-address>2001:db8::</remote-address>
<enabled>true</enabled>
<peer-as>64497</peer-as>
<description>"Peer Router B"</description>
<timers>
<hold-time>120</hold-time>
<keepalive>70</keepalive>
</timers>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv\
6-unicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</neighbor>
</neighbors>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</config>
8.4. VRF Configuration
This example shows how BGP can be configured for two VRFs, red and
blue. In this case, the two network instances share a common AS, and
distinguish between the instances using the router id.
[note: '\' line wrapping for formatting only]
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<network-instances
xmlns="urn:ietf:params:xml:ns:yang:ietf-network-instance">
<network-instance>
<name>vrf-red</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.1</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-u\
nicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
<network-instance>
<name>vrf-blue</name>
<vrf-root>
<routing
xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
<router-id>192.0.2.2</router-id>
<control-plane-protocols>
<control-plane-protocol>
<type
xmlns:bgpm="urn:ietf:params:xml:ns:yang:ietf-bgp">bgpm:bgp
</type>
<name>BGP</name>
<bgp
xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
<global>
<as>64496</as>
<afi-safis>
<afi-safi>
<afi-safi-name
xmlns:bt="urn:ietf:params:xml:ns:yang:ietf-bgp-types">bt:ipv4-u\
nicast
</afi-safi-name>
</afi-safi>
</afi-safis>
</global>
</bgp>
</control-plane-protocol>
</control-plane-protocols>
</routing>
</vrf-root>
</network-instance>
</network-instances>
</config>
9. Contributors 9. Contributors
Previous versions of this document saw contributions from Anees Previous versions of this document saw contributions from Anees
Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr
Zhadkin, and Xyfeng Liu. Zhadkin, and Xyfeng Liu.
10. Acknowledgements 10. Acknowledgements
The authors are grateful for valuable contributions to this document The authors are grateful for valuable contributions to this document
and the associated models from: Ebben Aires, Pavan Beeram, Chris and the associated models from: Ebben Aires, Pavan Beeram, Chris
skipping to change at page 118, line 27 skipping to change at page 128, line 23
[RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
Routing Management (NMDA Version)", RFC 8349, Routing Management (NMDA Version)", RFC 8349,
DOI 10.17487/RFC8349, March 2018, DOI 10.17487/RFC8349, March 2018,
<https://www.rfc-editor.org/info/rfc8349>. <https://www.rfc-editor.org/info/rfc8349>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>. <https://www.rfc-editor.org/info/rfc8446>.
[RFC8528] Bjorklund, M. and L. Lhotka, "YANG Schema Mount",
RFC 8528, DOI 10.17487/RFC8528, March 2019,
<https://www.rfc-editor.org/info/rfc8528>.
[RFC8529] Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X.
Liu, "YANG Data Model for Network Instances", RFC 8529,
DOI 10.17487/RFC8529, March 2019,
<https://www.rfc-editor.org/info/rfc8529>.
11.2. Informative references 11.2. Informative references
[I-D.ietf-bfd-yang] [I-D.ietf-bfd-yang]
Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and
G. Mirsky, "YANG Data Model for Bidirectional Forwarding G. Mirsky, "YANG Data Model for Bidirectional Forwarding
Detection (BFD)", draft-ietf-bfd-yang-17 (work in Detection (BFD)", draft-ietf-bfd-yang-17 (work in
progress), August 2018. 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-06 (work in progress), March 2019. policy-model-07 (work in progress), September 2019.
[RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C.
Pignataro, "The Generalized TTL Security Mechanism
(GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007,
<https://www.rfc-editor.org/info/rfc5082>.
[RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection
(BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
<https://www.rfc-editor.org/info/rfc5880>. <https://www.rfc-editor.org/info/rfc5880>.
[RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP
Authentication Option", RFC 5925, DOI 10.17487/RFC5925,
June 2010, <https://www.rfc-editor.org/info/rfc5925>.
[RFC7454] Durand, J., Pepelnjak, I., and G. Doering, "BGP Operations
and Security", BCP 194, RFC 7454, DOI 10.17487/RFC7454,
February 2015, <https://www.rfc-editor.org/info/rfc7454>.
[RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP [RFC7854] Scudder, J., Ed., Fernando, R., and S. Stuart, "BGP
Monitoring Protocol (BMP)", RFC 7854, Monitoring Protocol (BMP)", RFC 7854,
DOI 10.17487/RFC7854, June 2016, DOI 10.17487/RFC7854, June 2016,
<https://www.rfc-editor.org/info/rfc7854>. <https://www.rfc-editor.org/info/rfc7854>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>. <https://www.rfc-editor.org/info/rfc8342>.
Appendix A. How to add a new AFI and Augment a Module
This section explains how a new AFI can be defined in a new module
and how that module can then be augmented. Assume that the new AFI
being defined is called 'foo' which extends the base identity of
'afi-safi-type', and the augmentation is to add a new container for
'foo' under two different XPaths. The example shows how the base
identity can be extended to add this new AFI, and then use the
augmented containers be used to add 'foo' specific information.
module example-newafi-bgp {
yang-version 1.1;
namespace "http://example.com/ns/example-newafi-bgp";
prefix example-newafi-bgp;
import ietf-routing {
prefix rt;
reference
"RFC 8349, A YANG Data Model for Routing Management
(NMDA Version)";
}
import ietf-bgp {
prefix "bgp";
reference
"RFC XXXX: BGP YANG module for Service Provider Network.";
}
import ietf-bgp-types {
prefix "bt";
}
organization
"Newafi model group.";
contact
"abc@newafi.com";
description
"This YANG module defines and uses new AFI.";
revision 2019-10-03 {
description
"Creating new AFI and using in this model";
reference
"RFC XXXX: BGP YANG Model for Service Provider Network.";
}
identity foo {
base bt:afi-safi-type;
description
"New AFI type foo.";
}
augment "/rt:routing/rt:control-plane-protocols/" +
"rt:control-plane-protocol/bgp:bgp/bgp:global/" +
"bgp:afi-safis/bgp:afi-safi" {
when "derived-from-or-self(bgp:afi-safi-name, 'foo')" {
description
"This augmentation is valid for a AFI/SAFI instance
of 'foo'";
}
container foo {
description
"Container to add 'foo' specific AFI/SAFI information.";
}
}
augment "/rt:routing/rt:control-plane-protocols/" +
"rt:control-plane-protocol/bgp:bgp/" +
"bgp:rib/bgp:afi-safis/bgp:afi-safi" {
when "derived-from-or-self(bgp:afi-safi-name, 'foo')" {
description
"This augmentation is valid for a AFI/SAFI instance
of 'foo'";
}
container foo {
description
"Container to add 'foo' rib specific information.";
}
}
}
Appendix B. How to deviate a module
This example shows how the BGP can be deviated to indicate two nodes
that the particular implementation is choosing not to support.
module example-newco-bgp {
yang-version 1.1;
namespace "http://example.com/ns/example-newco-bgp";
prefix example-newco-bgp;
import ietf-bgp {
prefix "bgp";
}
organization
"Newco model group.";
contact
"abc@newco.com";
description
"This YANG module deviates IETF BGP YANG module.";
revision 2019-10-03 {
description
"Creating NewCo deviations to ietf-bgp model";
reference
"RFC XXXX: BGP YANG module for Service Provider Network.";
}
deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" +
"bgp:restart-time" {
deviate not-supported;
}
deviation "/bgp:bgp/bgp:global/bgp:graceful-restart/" +
"bgp:stale-route-time" {
deviate not-supported;
}
}
Authors' Addresses Authors' Addresses
Mahesh Jethanandani Mahesh Jethanandani
VMware VMware
Email: mjethanandani@gmail.com Email: mjethanandani@gmail.com
Keyur Patel Keyur Patel
Arrcus Arrcus
CA CA
skipping to change at line 5600 skipping to change at page 132, line 26
Email: keyur@arrcus.com Email: keyur@arrcus.com
Susan Hares Susan Hares
Huawei Huawei
7453 Hickory Hill 7453 Hickory Hill
Saline, MI 48176 Saline, MI 48176
USA USA
Email: shares@ndzh.com Email: shares@ndzh.com
Jeffrey Haas
Juniper Networks
Email: jhaas@pfrc.org
 End of changes. 306 change blocks. 
784 lines changed or deleted 1370 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/