draft-ietf-idr-bgp-model-02.txt   draft-ietf-idr-bgp-model-03.txt 
Interdomain Routing A. Shaikh, Ed. Interdomain Routing K. Patel
Internet-Draft Google Internet-Draft Arrcus
Intended status: Standards Track R. Shakir, Ed. Intended status: Standards Track M. Jethanandani
Expires: January 19, 2017 Jive Communications Expires: November 11, 2018
K. Patel, Ed. S. Hares
Cisco
S. Hares, Ed.
Huawei Huawei
K. D'Souza May 10, 2018
AT&T
D. Bansal
Microsoft
A. Clemm
A. Zhdankin
Cisco
M. Jethanandani
Cisco Systems, Inc
X. Liu
Ericsson
July 18, 2016
BGP Model for Service Provider Networks BGP Model for Service Provider Networks
draft-ietf-idr-bgp-model-02 draft-ietf-idr-bgp-model-03
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 based on BGP, including protocol, policy, and operational aspects based on
data center, carrier and content provider operational requirements. data center, carrier and content provider operational requirements.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://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 January 19, 2017. This Internet-Draft will expire on November 11, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2018 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
(http://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 . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 3 1.1. Goals and approach . . . . . . . . . . . . . . . . . . . 2
2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 4 2. Model overview . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. BGP protocol configuration . . . . . . . . . . . . . . . 5 2.1. BGP protocol configuration . . . . . . . . . . . . . . . 4
2.2. Policy configuration overview . . . . . . . . . . . . . . 6 2.2. Policy configuration overview . . . . . . . . . . . . . . 6
2.3. Operational state overview . . . . . . . . . . . . . . . 7 3. Relation to other YANG data models . . . . . . . . . . . . . 7
3. Relation to other YANG data models . . . . . . . . . . . . . 8 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7
4. Security Considerations . . . . . . . . . . . . . . . . . . . 8
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
5.1. URI Registration . . . . . . . . . . . . . . . . . . . . 8
5.2. YANG Module Name Registration . . . . . . . . . . . . . . 8
6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 9 6. YANG modules . . . . . . . . . . . . . . . . . . . . . . . . 9
7. BGP main module and submodule for base items . . . . . . . . 9 7. BGP main module and submodule for base items . . . . . . . . 10
8. BGP types . . . . . . . . . . . . . . . . . . . . . . . . . . 60 8. BGP types . . . . . . . . . . . . . . . . . . . . . . . . . . 49
9. BGP policy data . . . . . . . . . . . . . . . . . . . . . . . 69 9. BGP policy data . . . . . . . . . . . . . . . . . . . . . . . 58
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 93 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 72
10.1. Normative references . . . . . . . . . . . . . . . . . . 93 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 72
10.2. Informative references . . . . . . . . . . . . . . . . . 95 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 72
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 95 12.1. Normative references . . . . . . . . . . . . . . . . . . 72
Appendix B. Change summary . . . . . . . . . . . . . . . . . . . 96 12.2. Informative references . . . . . . . . . . . . . . . . . 74
B.1. Changes between revisions -01 and -02 . . . . . . . . . . 96 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 74
B.2. Changes between revisions -00 and -01 . . . . . . . . . . 96
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 96
1. Introduction 1. Introduction
YANG [RFC6020] is a data modeling language that was introduced to This document describes a YANG [RFC7950] data model for the BGP
define data for managing networked devices using NETCONF [RFC6241]. [RFC4271] protocol, including various protocol extensions, policy
YANG is proving relevant beyond its initial confines, as bindings to
other interfaces (e.g. ReST) and encodings other than XML (e.g.
JSON) are being defined. Furthermore, YANG data models can be used
as the basis of implementation for a number of interfaces, such as
CLIs and programmatic APIs (e.g., see
[I-D.talwar-rtgwg-grpc-use-cases]).
This document describes a YANG data model for the BGP [RFC4271]
protocol, including various protocol extensions, policy
configuration, as well as defining key operational state data. The configuration, as well as defining key operational state data. The
model is intended to be vendor-neutral, in order to allow operators model is intended to be vendor-neutral, in order to allow operators
to manage BGP configuration in heterogeneous environments with to manage BGP configuration in heterogeneous environments with
routers supplied by multiple vendors. The model is also intended to routers supplied by multiple vendors. The model is also intended to
be readily mapped to existing implementations to facilitate support be readily mapped to existing implementations to facilitate support
from as large a set of routing hardware and software vendors as from as large a set of routing hardware and software vendors as
possible. possible.
1.1. Goals and approach 1.1. Goals and approach
The model covers the base BGP features that are deployed across major The model covers the base BGP features that are deployed across major
implementations and the common BGP configurations in use across a implementations and the common BGP configurations in use across a
number of operator network deployments. In particular, this model number of operator network deployments. In particular, this model
attempts to cover BGP features defined in [RFC4271], [RFC1997], attempts to cover BGP features defined in BGP [RFC4271], BGP
[RFC4456], [RFC4760], [RFC3065], [RFC2439], [RFC4724], and [RFC6811]. Communities Attribute [RFC1997], BGP Route Reflection [RFC4456],
Multiprotocol Extensions for BGP-4 [RFC4760], Autonomous System
Confederations for BGP [RFC5065], BGP Route Flap Damping [RFC2439],
Graceful Restart Mechanism for BGP [RFC4724], and BGP Prefix Origin
Validation [RFC6811].
Along with configuration of base BGP features, this model also Along with configuration of base BGP features, this model also
addresses policy configuration, by providing "hooks" for applying addresses policy configuration, by providing "hooks" for applying
policies, and also defining BGP-specific policy features. The BGP policies, and also defining BGP-specific policy features. The BGP
policy features are intended to be used with the general routing policy features are intended to be used with the general routing
policy model defined in [I-D.ietf-rtgwg-policy-model]. The model policy model defined in A YANG Data Model for Routing Policy
also supports operational state data to provide a common model for Management [I-D.ietf-rtgwg-policy-model]. The model supports the
reading BGP-related state from a BGP speaker. NMDA [RFC8342] architecture.
For the base BGP features, the focus of the model described in this For the base BGP features, the focus of the model described in this
document is on providing configuration and operational state document is on providing configuration and operational state
information relating to: information relating to:
o The global BGP instance, and neighbors whose configuration is o The global BGP instance, and neighbors whose configuration is
specified individually, or templated with the use of peer-groups. specified individually, or templated with the use of peer-groups.
o The address families that are supported by peers, and the global o The address families that are supported by peers, and the global
configuration which relates to them. configuration which relates to them.
skipping to change at page 4, line 29 skipping to change at page 4, line 15
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.
o multiprotocol configuration -- configuration affecting individual o multiprotocol configuration -- configuration affecting individual
address-families within BGP [RFC4760]. address-families within BGP Multiprotocl Extensions for BGP-4
[RFC4760].
o neighbor configuration -- configuration affecting an individual o neighbor configuration -- configuration affecting an individual
neighbor within BGP. neighbor within BGP.
o neighbor multiprotocol configuration -- configuration affecting o neighbor multiprotocol configuration -- configuration affecting
individual address-families for a neighbor within BGP. individual address-families for a neighbor within BGP.
o policy configuration -- hooks for application of the policies o policy configuration -- hooks for application of the policies
defined in [I-D.ietf-rtgwg-policy-model] that act on routes sent defined in A YANG Data Model for Routing Policy Management
(received) to (from) peers or other routing protocols and BGP- [I-D.ietf-rtgwg-policy-model] that act on routes sent (received)
specific policy features. to (from) peers or other routing protocols and BGP-specific policy
features.
o operational state -- variables used for monitoring and management o operational state -- variables used for monitoring and management
of BGP operations. of BGP operations.
These modules also make use of standard Internet types, such as IP These modules also make use of standard Internet types, such as IP
addresses and prefixes, autonomous system numbers, etc., defined in addresses and prefixes, autonomous system numbers, etc., defined in
RFC 6991 [RFC6991]. Common YANG Data Types [RFC6991].
Throughout the model, the approach described in
[I-D.openconfig-netmod-opstate] is used to represent configuration
(intended state), operational and derived state data. That is to
say, that each container holds a "config" and "state" sub-container -
with the config container being used for configurable parameters, and
the state container container holding both the operational state of
configurable leaves, and derived counters and statistical
information.
2.1. BGP protocol configuration 2.1. BGP protocol configuration
The BGP protocol configuration model is organized hierarchically, The BGP protocol configuration model is organized hierarchically,
much like the majority of router implementations. That is, much like the majority of router implementations. That is,
configuration items can be specified at multiple levels, as shown configuration items can be specified at multiple levels, as shown
below. below.
+--rw bgp! +--rw bgp!
+--rw global +--rw global
skipping to change at page 6, line 50 skipping to change at page 6, line 35
+--rw l3vpn-ipv6-multicast +--rw l3vpn-ipv6-multicast
| ... | ...
+--rw l2vpn-vpls +--rw l2vpn-vpls
| ... | ...
+--rw l2vpn-evpn +--rw l2vpn-evpn
| ... | ...
2.2. Policy configuration overview 2.2. Policy configuration overview
The BGP policy configuration model references the generic YANG The BGP policy configuration model references the generic YANG
routing policy model described in [I-D.ietf-rtgwg-policy-model], routing policy model described in A YANG Data Model for Routing
which represents a condition-action policy framework for routing. Policy Management [I-D.ietf-rtgwg-policy-model], which represents a
condition-action policy framework for routing. This model adds BGP-
This model adds BGP-specific conditions (e.g., matching on the specific conditions (e.g., matching on the community attribute), and
community attribute), and actions (e.g., setting local preference) to actions (e.g., setting local preference) to the generic policy
the generic policy framework. framework.
Policies that are defined in the routing-policy model are referenced Policies that are defined in the routing-policy model are referenced
in multiple places within the model: in multiple places within the model:
o within the global instance, where a policy applies to all address- o within the global instance, where a policy applies to all address-
families for all peers. families for all peers.
o on a global AFI-SAFI basis, where policies apply to all peers for o on a global AFI-SAFI basis, where policies apply to all peers for
a particular address-family. a particular address-family.
skipping to change at page 7, line 45 skipping to change at page 7, line 32
| | +--rw afi-safi* [afi-safi-name] | | +--rw afi-safi* [afi-safi-name]
| | +--rw apply-policy | | +--rw apply-policy
| +--rw apply-policy | +--rw apply-policy
+--rw peer-groups +--rw peer-groups
+--rw peer-group* [peer-group-name] +--rw peer-group* [peer-group-name]
+--rw afi-safi +--rw afi-safi
| +--rw afi-safi* [afi-safi-name] | +--rw afi-safi* [afi-safi-name]
| +--rw apply-policy | +--rw apply-policy
+--rw apply-policy +--rw apply-policy
2.3. Operational state overview
The BGP operational model contains data which relates to the
operational state of the various elements of the BGP router. As
noted in Section 2 - the approach described in
[I-D.openconfig-netmod-opstate] is utilized for the inclusion of
operational and statistical data. To this end, the "-state"
groupings (those that contain derived operational parameters) are
contained within the BGP operational model - and included within the
relevant "state" containers throughout the core BGP model. In some
cases, operational information may be relevant to one instance of a
common grouping, but not another - for example, the number of
received, advertised, and installed prefixes is relevant on a per-
neighbor-basis, but is not required (or meaningful) in the peer-group
context. Groupings are defined with the appropriate operational
state data accordingly.
3. Relation to other YANG data models 3. Relation to other YANG data models
The BGP model is intended to work within a larger framework model, The BGP model is intended to work within a larger framework model,
such as the Network Instance model such as the Network Instance model YANG Model for Network Instance
[I-D.openconfig-rtgwg-network-instance] which provides a [I-D.ietf-rtgwg-ni-model] which provides a comprehensive model for
comprehensive model for defining VRFs, associated routing protocols, defining VRFs, associated routing protocols, multiple protocol
multiple protocol instances, and inter-protocol and inter-instance instances, and inter-protocol and inter-instance routing policies.
routing policies. The current version of the model imports and The current version of the model imports and instantiates the BGP
instantiates the BGP model in its tree at /network-instances/network- model in its tree at /network-instances/network-instance/vrf-
instance/protocols/protocol/bgp/... root/rt:routing/control-plane-protocols/control-plane-protocol/
bgp/...
It is also possible to integrate the BGP model with the Routing It is also possible to integrate the BGP model with the Routing
Management model [I-D.ietf-netmod-routing-cfg] or the Network Device Management model A YANG Data Model for Routing Management [RFC8349]
Organizational Model [I-D.rtgyangdt-rtgwg-device-model], both of which defines the notion of routing instances, or VRFs.
which define the notion of routing instances, or VRFs.
4. Security Considerations 4. Security Considerations
BGP configuration has a significant impact on network operations, and The YANG module specified in this document defines a schema for data
as such any related protocol or model carries potential security that is designed to be accessed via network management protocols such
risks. as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[RFC5246]. The NETCONF Access Control Model (NACM) [RFC8341]
provides the means to restrict access for particular NETCONF or
RESTCONF users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content.
YANG data models are generally designed to be used with the NETCONF There are a number of data nodes defined in this YANG module that are
protocol over an SSH transport. This provides an authenticated and writable/creatable/deletable (i.e., config true, which is the
secure channel over which to transfer BGP configuration and default). These data nodes may be considered sensitive or vulnerable
operational data. Note that use of alternate transport or data in some network environments. Write operations (e.g., edit-config)
encoding (e.g., JSON over HTTPS) would require similar mechanisms for to these data nodes without proper protection can have a negative
authenticating and securing access to configuration data. effect on network operations. These are the subtrees and data nodes
and their sensitivity/vulnerability:
Most of the data elements in the configuration model could be Some of the readable data nodes in this YANG module may be considered
considered sensitive from a security standpoint. Unauthorized access sensitive or vulnerable in some network environments. It is thus
or invalid data could cause major disruption. important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability:
Some of the RPC operations in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control access to these operations. These are the
operations and their sensitivity/vulnerability:
5. IANA Considerations 5. IANA Considerations
An appropriate namespace URI will be registered in the IETF XML This document registers three URIs and three YANG modules.
Registry" [RFC3688]. The BGP YANG modules will be registered in the
"YANG Module Names" registry [RFC6020]. 5.1. URI Registration
in the IETF XML registry [RFC3688] [RFC3688]. Following the format
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-policy
URI: urn:ietf:params:xml:ns:yang:ietf-bgp-types
Registrant Contact: The IESG. XML: N/A, the requested URI is an XML
namespace.
5.2. YANG Module Name Registration
This document registers three YANG module in the YANG Module Names
registry YANG [RFC6020].
name: ietf-bgp
namespace: urn:ietf:params:xml:ns:yang:ietf-bgp
prefix: bgp
reference: RFC XXXX
name: ietf-bgp-policy
namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-policy
prefix: bgp-pol
reference: RFC XXXX
name: ietf-bgp-types
namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-types
prefix: bgp-types
reference: RFC XXXX
6. YANG modules 6. YANG modules
The modules comprising the BGP configuration and operational model The modules comprising the BGP configuration and operational model
are described by the YANG modules and submodules in the sections are described by the YANG modules and submodules in the sections
below. below.
The main module, openconfig-bgp.yang, includes the following The main module, ietf-bgp.yang, includes the following submodules:
submodules:
o openconfig-bgp-common - defines the groupings that are common o ietf-bgp-common - defines the groupings that are common across
across more than one context (where contexts are neighbor, group, more than one context (where contexts are neighbor, group, global)
global)
o openconfig-bgp-common-multiprotocol - defines the groupings that o ietf-bgp-common-multiprotocol - defines the groupings that are
are common across more than one context, and relate to common across more than one context, and relate to multiprotocol
multiprotocol BGP BGP
o openconfig-bgp-common-structure - defines groupings that are o ietf-bgp-common-structure - defines groupings that are shared by
shared by multiple contexts, but are used only to create multiple contexts, but are used only to create structural
structural elements, i.e., containers (leaf nodes are defined in elements, i.e., containers (leaf nodes are defined in separate
separate groupings) groupings)
o openconfig-bgp-global - groupings with data specific to the global o ietf-bgp-global - groupings with data specific to the global
context context
o openconfig-bgp-peer-group - groupings with data specific to the o ietf-bgp-peer-group - groupings with data specific to the peer
peer group context group context
o openconfig-bgp-neighbor - groupings with data specific to the o ietf-bgp-neighbor - groupings with data specific to the neighbor
neighbor context context
Additional modules include: Additional modules include:
o openconfig-bgp-types - common type and identity definitions for o ietf-bgp-types - common type and identity definitions for BGP,
BGP, including BGP policy including BGP policy
o openconfig-bgp-policy - BGP-specific policy data definitions for o ietf-bgp-policy - BGP-specific policy data definitions for use
use with [I-D.ietf-rtgwg-policy-model] (described in more detail with [I-D.ietf-rtgwg-policy-model] (described in more detail
Section 2.2) Section 2.2)
7. BGP main module and submodule for base items 7. BGP main module and submodule for base items
<CODE BEGINS> file "ietf-bgp.yang" <CODE BEGINS> file "ietf-bgp@2018-05-09.yang"
module ietf-bgp {
module ietf-bgp { yang-version "1.1";
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp";
yang-version "1"; prefix "bgp";
// namespace
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp";
prefix "bgp";
// import some basic inet types
import openconfig-extensions { prefix oc-ext; }
import ietf-routing-policy { prefix rpol; }
// Include the OpenConfig BGP submodules
// Common: defines the groupings that are common across more than
// one context (where contexts are neighbor, group, global)
include ietf-bgp-common;
// Multiprotocol: defines the groupings that are common across more
// than one context, and relate to Multiprotocol
include ietf-bgp-common-multiprotocol;
// Structure: defines groupings that are shared but are solely used for
// structural reasons.
include ietf-bgp-common-structure;
// Include peer-group/neighbor/global - these define the groupings
// that are specific to one context
include ietf-bgp-peer-group;
include ietf-bgp-neighbor;
include ietf-bgp-global;
// meta
organization
"OpenConfig working group";
contact import ietf-routing-policy {
"OpenConfig working group prefix rpol;
netopenconfig@googlegroups.com"; reference
"RFC ZZZZ: A YANG Data Model for Routing Policy Management";
}
description include ietf-bgp-common;
"This module describes a YANG model for BGP protocol include ietf-bgp-common-multiprotocol;
configuration.It is a limited subset of all of the configuration include ietf-bgp-common-structure;
parameters available in the variety of vendor implementations, include ietf-bgp-neighbor;
hence it is expected that it would be augmented with vendor- include ietf-bgp-global;
specific configuration data as needed. Additional modules or include ietf-bgp-peer-group;
submodules to handle other aspects of BGP configuration,
including policy, VRFs, VPNs, and additional address families
are also expected.
This model supports the following BGP configuration level organization
hierarchy: "IETF IDR Working Group";
BGP contact
| "WG Web: <http://tools.ietf.org/wg/idr>
+-> [ global BGP configuration ] WG List: <idr@ietf.org>
+-> AFI / SAFI global
+-> peer group
+-> [ peer group config ]
+-> AFI / SAFI [ per-AFI overrides ]
+-> neighbor
+-> [ neighbor config ]
+-> [ optional pointer to peer-group ]
+-> AFI / SAFI [ per-AFI overrides ]";
oc-ext:openconfig-version "2.1.1"; Authors: Keyur Patel (keyur at arrcus.com),
Mahesh Jethanandani (mjethanandani at gmail.com),
Susan Hares (shares at ndzh.com";
revision "2016-06-21" {
description description
"OpenConfig BGP refactor"; "This module describes a YANG model for BGP protocol
reference "2.1.1"; configuration. It is a limited subset of all of the configuration
} parameters available in the variety of vendor implementations,
hence it is expected that it would be augmented with vendor-
specific configuration data as needed. Additional modules or
submodules to handle other aspects of BGP configuration,
including policy, VRFs, VPNs, and additional address families
are also expected.
revision "2016-06-06" { This model supports the following BGP configuration level
description hierarchy:
"OpenConfig public release";
reference "2.1.0";
}
revision "2016-03-31" { BGP
description |
"OpenConfig public release"; +-> [ global BGP configuration ]
reference "2.0.1"; +-> AFI / SAFI global
} +-> peer group
+-> [ peer group config ]
+-> AFI / SAFI [ per-AFI overrides ]
+-> neighbor
+-> [ neighbor config ]
+-> [ optional pointer to peer-group ]
+-> AFI / SAFI [ per-AFI overrides ]";
grouping bgp-top { revision "2018-05-09" {
description description
"Top-level grouping for the BGP model data"; "Initial Version";
reference
"RFC XXXX, BGP Model for Service Provider Network ";
}
/*
* Groupings
*/
container bgp { container bgp {
description description
"Top-level configuration and state for the BGP router"; "Top-level configuration for the BGP router";
container global { container global {
presence "Enables global configuration of BGP";
description description
"Global configuration for the BGP router"; "Global configuration for the BGP router";
uses bgp-global-base; uses bgp-global-base;
uses rpol:apply-policy-group; uses rpol:apply-policy-group;
} }
container neighbors { container neighbors {
description description
"Configuration for BGP neighbors"; "Configuration for BGP neighbors";
uses bgp-neighbor-list; uses bgp-neighbor-list;
} }
container peer-groups { container peer-groups {
description description
"Configuration for BGP peer-groups"; "Configuration for BGP peer-groups";
uses bgp-peer-group-list; uses bgp-peer-group-list;
} }
} }
} }
skipping to change at page 12, line 15 skipping to change at page 11, line 52
uses bgp-neighbor-list; uses bgp-neighbor-list;
} }
container peer-groups { container peer-groups {
description description
"Configuration for BGP peer-groups"; "Configuration for BGP peer-groups";
uses bgp-peer-group-list; uses bgp-peer-group-list;
} }
} }
} }
<CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common@2018-05-09.yang"
submodule ietf-bgp-common {
yang-version "1.1";
belongs-to ietf-bgp {
prefix "bgp";
}
uses bgp-top; import ietf-bgp-types {
prefix bgp-types;
} }
import ietf-inet-types {
<CODE ENDS> prefix inet;
}
<CODE BEGINS> file "ietf-bgp-common.yang"
submodule ietf-bgp-common {
belongs-to ietf-bgp {
prefix "bgp";
}
import openconfig-extensions { prefix oc-ext; }
import ietf-bgp-types { prefix oc-bgp-types; }
import ietf-routing-policy { prefix rpol; }
import ietf-inet-types { prefix inet; }
// meta organization
organization "IETF IDR Working Group";
"OpenConfig working group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
description Authors: Keyur Patel,
"This sub-module contains common groupings that are common across Mahesh Jethanandani,
multiple contexts within the BGP module. That is to say that they Susan Hares";
may be application to a subset of global, peer-group or neighbor
contexts.";
oc-ext:openconfig-version "2.1.1"; description
"This sub-module contains common groupings that are common across
multiple contexts within the BGP module. That is to say that
they may be application to a subset of global, peer-group or
neighbor contexts.";
revision "2016-06-21" { revision "2018-05-09" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
} "RFC XXX, BGP Model for Service Provider Network.";
}
grouping bgp-common-neighbor-group-timers-config { grouping bgp-common-neighbor-group-timers-config {
description description
"Config parameters related to timers associated with the BGP "Config parameters related to timers associated with the BGP
peer"; peer";
leaf connect-retry { leaf connect-retry {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
default 30; default 30;
description description
"Time interval in seconds between attempts to establish a "Time interval in seconds between attempts to establish a
session with the peer."; session with the peer.";
} }
leaf hold-time { leaf hold-time {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
default 90; default 90;
description description
"Time interval in seconds that a BGP session will be "Time interval in seconds that a BGP session will be
considered active in the absence of keepalive or other considered active in the absence of keepalive or other
messages from the peer. The hold-time is typically messages from the peer. The hold-time is typically set to
set to 3x the keepalive-interval."; 3x the keepalive-interval.";
reference reference
"RFC 4271 - A Border Gateway Protocol 4, Sec. 10"; "RFC 4271 - A Border Gateway Protocol 4, Sec. 10";
} }
leaf keepalive-interval { leaf keepalive-interval {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
default 30; default 30;
description description
"Time interval in seconds between transmission of keepalive "Time interval in seconds between transmission of keepalive
messages to the neighbor. Typically set to 1/3 the messages to the neighbor. Typically set to 1/3 the
hold-time."; hold-time.";
} }
leaf minimum-advertisement-interval {
type decimal64 {
fraction-digits 2;
} leaf minimum-advertisement-interval {
default 30; type decimal64 {
description fraction-digits 2;
"Minimum time which must elapse between subsequent UPDATE }
default 30;
description
"Minimum time which must elapse between subsequent UPDATE
messages relating to a common set of NLRI being transmitted messages relating to a common set of NLRI being transmitted
to a peer. This timer is referred to as to a peer. This timer is referred to as
MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
reduce the number of UPDATE messages transmitted when a reduce the number of UPDATE messages transmitted when a
particular set of NLRI exhibit instability."; particular set of NLRI exhibit instability.";
reference reference
"RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1";
} }
} }
grouping bgp-common-neighbor-group-config { grouping bgp-common-neighbor-group-config {
description description
"Neighbor level configuration items."; "Neighbor level configuration items.";
leaf peer-as { leaf peer-as {
type inet:as-number; type inet:as-number;
description description
"AS number of the peer."; "AS number of the peer.";
} }
leaf local-as { leaf local-as {
type inet:as-number; type inet:as-number;
description description
"The local autonomous system number that is to be used "The local autonomous system number that is to be used when
when establishing sessions with the remote peer or peer establishing sessions with the remote peer or peer group, if
group, if this differs from the global BGP router this differs from the global BGP router autonomous system
autonomous system number."; number.";
} }
leaf peer-type { leaf peer-type {
type oc-bgp-types:peer-type; type bgp-types:peer-type;
description description
"Explicitly designate the peer or peer group as internal "Explicitly designate the peer or peer group as internal
(iBGP) or external (eBGP)."; (iBGP) or external (eBGP).";
} }
leaf auth-password { leaf auth-password {
type string; type string;
description description
"Configures an MD5 authentication password for use with "Configures an MD5 authentication password for use with
neighboring devices."; neighboring devices.";
} }
leaf remove-private-as { leaf remove-private-as {
// could also make this a container with a flag to enable // could also make this a container with a flag to enable
// remove-private and separate option. here, option implies // remove-private and separate option. here, option implies
// remove-private is enabled. // remove-private is enabled.
type oc-bgp-types:remove-private-as-option; type bgp-types:remove-private-as-option;
description description
"Remove private AS numbers from updates sent to peers - when "Remove private AS numbers from updates sent to peers - when
this leaf is not specified, the AS_PATH attribute should be this leaf is not specified, the AS_PATH attribute should be
sent to the peer unchanged"; sent to the peer unchanged";
} }
leaf route-flap-damping { leaf route-flap-damping {
type boolean; type boolean;
default false; default false;
description description
"Enable route flap damping."; "Enable route flap damping.";
}
leaf send-community { }
type oc-bgp-types:community-type;
default "NONE";
description
"Specify which types of community should be sent to the
neighbor or group. The default is to not send the
community attribute";
}
leaf description { leaf send-community {
type string; type bgp-types:community-type;
description default "NONE";
"An optional textual description (intended primarily for use description
"Specify which types of community should be sent to the
neighbor or group. The default is to not send the community
attribute";
}
leaf description {
type string;
description
"An optional textual description (intended primarily for use
with a peer or group"; with a peer or group";
} }
} }
grouping bgp-common-neighbor-group-transport-config { grouping bgp-common-neighbor-group-transport-config {
description description
"Configuration parameters relating to the transport protocol "Configuration parameters relating to the transport protocol
used by the BGP session to the peer"; used by the BGP session to the peer";
leaf tcp-mss { leaf tcp-mss {
type uint16; type uint16;
description description
"Sets the max segment size for BGP TCP sessions."; "Sets the max segment size for BGP TCP sessions.";
} }
leaf mtu-discovery { leaf mtu-discovery {
type boolean; type boolean;
default false; default false;
description description
"Turns path mtu discovery for BGP TCP sessions on (true) "Turns path mtu discovery for BGP TCP sessions on (true) or
or off (false)"; off (false)";
} }
leaf passive-mode { leaf passive-mode {
type boolean; type boolean;
default false; default false;
description description
"Wait for peers to issue requests to open a BGP session, "Wait for peers to issue requests to open a BGP session,
rather than initiating sessions from the local router."; rather than initiating sessions from the local router.";
} }
leaf local-address { leaf local-address {
type union { type union {
type inet:ip-address; type inet:ip-address;
type string; type string;
} }
//TODO: the string should be converted to a leafref type //TODO: the string should be converted to a leafref type
//to point to an interface when YANG 1.1 is available with //to point to an interface when YANG 1.1 is available with
//leafrefs in union types. //leafrefs in union types.
description description
"Set the local IP (either IPv4 or IPv6) address to use "Set the local IP (either IPv4 or IPv6) address to use for
for the session when sending BGP update messages. This the session when sending BGP update messages. This may be
may be expressed as either an IP address or reference expressed as either an IP address or reference to the name
to the name of an interface."; of an interface.";
} }
} }
grouping bgp-common-neighbor-group-error-handling-config { grouping bgp-common-neighbor-group-error-handling-config {
description description
"Configuration parameters relating to enhanced error handling "Configuration parameters relating to enhanced error handling
behaviours for BGP"; behaviours for BGP";
leaf treat-as-withdraw { leaf treat-as-withdraw {
type boolean; type boolean;
default "false"; default "false";
description description
"Specify whether erroneous UPDATE messages for which the "Specify whether erroneous UPDATE messages for which the NLRI
NLRI can be extracted are reated as though the NLRI is can be extracted are reated as though the NLRI is withdrawn
withdrawn - avoiding session reset"; - avoiding session reset";
reference "draft-ietf-idr-error-handling-16"; reference "draft-ietf-idr-error-handling-16";
} }
} }
grouping bgp-common-neighbor-group-logging-options-config {
description
"Configuration parameters specifying the logging behaviour for
BGP sessions to the peer";
leaf log-neighbor-state-changes {
type boolean;
default "true";
description
"Configure logging of peer state changes. Default is
to enable logging of peer state changes.";
}
}
grouping bgp-common-neighbor-group-multihop-config {
description
"Configuration parameters specifying the multihop behaviour for
BGP sessions to the peer";
leaf enabled {
type boolean;
default "false";
description
"When enabled the referenced group or neighbors are permitted
to be indirectly connected - including cases where the TTL
can be decremented between the BGP peers";
}
leaf multihop-ttl {
type uint8;
description
"Time-to-live value to use when packets are sent to the
referenced group or neighbors and ebgp-multihop is enabled";
}
}
grouping bgp-common-neighbor-group-route-reflector-config {
description
"Configuration parameters determining whether the behaviour of
the local system when acting as a route-reflector";
leaf route-reflector-cluster-id {
type oc-bgp-types:rr-cluster-id-type;
description
"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.";
}
leaf route-reflector-client {
type boolean;
default "false";
description
"Configure the neighbor as a route reflector client.";
}
}
grouping bgp-common-neighbor-group-as-path-options-config {
description
"Configuration parameters allowing manipulation of the AS_PATH
attribute";
leaf allow-own-as {
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 {
type boolean;
default "false";
description
"Replace occurrences of the peer's AS in the AS_PATH
with the local autonomous system number";
}
}
grouping bgp-common-neighbor-group-add-paths-config {
description
"Configuration parameters specfying whether the local system
will send or receive multiple paths using ADD_PATHS";
leaf receive {
type boolean;
default false;
description
"Enable ability to receive multiple path advertisements
for an NLRI from the neighbor or group";
}
leaf send-max {
type uint8;
description
"The maximum number of paths to advertise to neighbors
for a single NLRI";
}
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";
}
}
grouping bgp-common-graceful-restart-config { grouping bgp-common-graceful-restart-config {
description description
"Configuration parameters relating to BGP graceful restart."; "Configuration parameters relating to BGP graceful restart.";
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"Enable or disable the graceful-restart capability."; "Enable or disable the graceful-restart capability.";
} }
leaf restart-time { leaf restart-time {
type uint16 { type uint16 {
range 0..4096; range 0..4096;
} }
description description
"Estimated time (in seconds) for the local BGP speaker to "Estimated time (in seconds) for the local BGP speaker to
restart a session. This value is advertise in the graceful restart a session. This value is advertise in the graceful
restart BGP capability. This is a 12-bit value, referred to restart BGP capability. This is a 12-bit value, referred to
as Restart Time in RFC4724. Per RFC4724, the suggested as Restart Time in RFC4724. Per RFC4724, the suggested
default value is <= the hold-time value."; default value is <= the hold-time value.";
} }
leaf stale-routes-time { leaf stale-routes-time {
type decimal64 { type decimal64 {
fraction-digits 2; fraction-digits 2;
} }
description description
"An upper-bound on the time thate stale routes will be "An upper-bound on the time that stale routes will be
retained by a router after a session is restarted. If an retained by a router after a session is restarted. If an
End-of-RIB (EOR) marker is received prior to this timer End-of-RIB (EOR) marker is received prior to this timer
expiring stale-routes will be flushed upon its receipt - if expiring stale-routes will be flushed upon its receipt - if
no EOR is received, then when this timer expires stale paths no EOR is received, then when this timer expires stale paths
will be purged. This timer is referred to as the will be purged. This timer is referred to as the
Selection_Deferral_Timer in RFC4724"; Selection_Deferral_Timer in RFC4724";
} }
leaf helper-only { leaf helper-only {
type boolean; type boolean;
description description
"Enable graceful-restart in helper mode only. When this "Enable graceful-restart in helper mode only. When this leaf
leaf is set, the local system does not retain forwarding is set, the local system does not retain forwarding its own
its own state during a restart, but supports procedures state during a restart, but supports procedures for the
for the receiving speaker, as defined in RFC4724."; receiving speaker, as defined in RFC4724.";
} }
} }
grouping bgp-common-use-multiple-paths-config { grouping bgp-common-use-multiple-paths-config {
description description
"Generic configuration options relating to use of multiple "Generic configuration options relating to use of multiple
paths for a referenced AFI-SAFI, group or neighbor"; paths for a referenced AFI-SAFI, group or neighbor";
leaf enabled { 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.";
}
}
grouping bgp-common-use-multiple-paths-ebgp-as-options-config {
description
"Configuration parameters specific to eBGP multipath applicable
to all contexts";
leaf allow-multiple-as {
type boolean; type boolean;
default "false"; default false;
description description
"Allow multipath to use paths from different neighbouring "Whether the use of multiple paths for the same NLRI is
ASes. The default is to only consider multiple paths from enabled for the neighbor. This value is overridden by any
the same neighbouring AS."; more specific configuration value.";
} }
} }
grouping bgp-common-global-group-use-multiple-paths {
description
"Common grouping used for both global and groups which provides
configuration and state parameters relating to use of multiple
paths";
container use-multiple-paths {
description
"Parameters related to the use of multiple paths for the
same NLRI";
container config {
description
"Configuration parameters relating to multipath";
uses bgp-common-use-multiple-paths-config;
}
container state {
config false;
description
"State parameters relating to multipath";
uses bgp-common-use-multiple-paths-config;
}
container ebgp { grouping bgp-common-use-multiple-paths-ebgp-as-options-config {
description description
"Multipath parameters for eBGP"; "Configuration parameters specific to eBGP multi-path applicable
container config { to all contexts";
description
"Configuration parameters relating to eBGP multipath";
uses bgp-common-use-multiple-paths-ebgp-config;
}
container state {
config false;
description
"State information relating to eBGP multipath";
uses bgp-common-use-multiple-paths-ebgp-config;
}
}
container ibgp { leaf allow-multiple-as {
description type boolean;
"Multipath parameters for iBGP"; default "false";
container config {
description
"Configuration parameters relating to iBGP multipath";
uses bgp-common-use-multiple-paths-ibgp-config;
}
container state {
config false;
description
"State information relating to iBGP multipath";
uses bgp-common-use-multiple-paths-ibgp-config;
}
}
}
}
grouping bgp-common-use-multiple-paths-ebgp-config {
description description
"Configuration parameters relating to multipath for eBGP"; "Allow multi-path to use paths from different neighboring ASes.
The default is to only consider multiple paths from the same
neighboring AS.";
}
}
leaf allow-multiple-as { grouping bgp-common-global-group-use-multiple-paths {
type boolean; description
default "false"; "Common grouping used for both global and groups which provides
description configuration and state parameters relating to use of multiple
"Allow multipath to use paths from different neighbouring paths";
ASes. The default is to only consider multiple paths from
the same neighbouring AS.";
}
leaf maximum-paths { container use-multiple-paths {
type uint32;
default 1;
description description
"Maximum number of parallel paths to consider when using "Parameters related to the use of multiple paths for the
BGP multipath. The default is use a single path."; same NLRI";
}
}
grouping bgp-common-use-multiple-paths-ibgp-config {
description
"Configuration parmaeters relating to multipath for iBGP";
leaf maximum-paths {
type uint32;
default 1;
description
"Maximum number of parallel paths to consider when using
iBGP multipath. The default is to use a single path";
}
}
grouping bgp-common-route-selection-options-config { uses bgp-common-use-multiple-paths-config;
description
"Set of configuration options that govern best
path selection.";
leaf always-compare-med { container ebgp {
type boolean; description
default "false"; "Multi-Path parameters for eBGP";
description
"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.";
} 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.";
}
leaf ignore-as-path-length { leaf maximum-paths {
type boolean; type uint32;
default "false"; default 1;
description description
"Ignore the AS path length when selecting the best path. "Maximum number of parallel paths to consider when using
The default is to use the AS path length and prefer paths BGP multi-path. The default is use a single path.";
with shorter length."; }
} }
leaf external-compare-router-id { container ibgp {
type boolean; description
default "true"; "Multi-Path parameters for iBGP";
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 { leaf maximum-paths {
type boolean; type uint32;
default "false"; default 1;
description description
"Advertise inactive routes to external peers. The "Maximum number of parallel paths to consider when using
default is to only advertise active routes."; iBGP multi-path. The default is to use a single path";
} }
}
}
}
leaf enable-aigp { grouping bgp-common-route-selection-options {
type boolean; description
default false; "Configuration and state relating to route selection options";
description
"Flag to enable sending / receiving accumulated IGP
attribute in routing updates";
}
leaf ignore-next-hop-igp-metric { container route-selection-options {
type boolean; description
default "false"; "Parameters relating to options for route selection";
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";
}
}
grouping bgp-common-route-selection-options { leaf always-compare-med {
description type boolean;
"Configuration and state relating to route selection options"; default "false";
description
"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.";
}
container route-selection-options { leaf ignore-as-path-length {
description type boolean;
"Parameters relating to options for route selection"; default "false";
container config { description
description "Ignore the AS path length when selecting the best path.
"Configuration parameters relating to route selection The default is to use the AS path length and prefer paths
options"; with shorter length.";
uses bgp-common-route-selection-options-config; }
}
container state {
config false;
description
"State information for the route selection options";
uses bgp-common-route-selection-options-config;
}
}
}
grouping bgp-common-state { leaf external-compare-router-id {
description type boolean;
"Grouping containing common counters relating to prefixes and default "true";
paths"; description
"When comparing similar routes received from external BGP
peers, use the router-id as a criterion to select the
active path.";
}
leaf total-paths { leaf advertise-inactive-routes {
type uint32; type boolean;
description default "false";
"Total number of BGP paths within the context"; description
} "Advertise inactive routes to external peers. The default
is to only advertise active routes.";
}
leaf total-prefixes { leaf enable-aigp {
type uint32; type boolean;
description default false;
"Total number of BGP prefixes received within the context"; description
} "Flag to enable sending / receiving accumulated IGP
} attribute in routing updates";
}
} 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";
}
}
}
<CODE ENDS> grouping bgp-common-state {
description
"Grouping containing common counters relating to prefixes and
paths";
<CODE BEGINS> file "ietf-bgp-common-multiprotocol.yang" 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@2018-05-09.yang"
submodule ietf-bgp-common-multiprotocol { submodule ietf-bgp-common-multiprotocol {
yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix "bgp";
} }
import openconfig-extensions { prefix oc-ext; } import ietf-bgp-types {
import ietf-bgp-types { prefix oc-bgp-types; } prefix bgp-types;
import ietf-routing-policy { prefix rpol; } }
import openconfig-types { prefix oc-types; } import ietf-routing-policy {
prefix rpol;
}
include ietf-bgp-common; include ietf-bgp-common;
// meta // meta
organization organization
"OpenConfig working group"; "IETF IDR Working Group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel,
Mahesh Jethanandani,
Susan Hares";
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.";
oc-ext:openconfig-version "2.1.1";
revision "2016-06-21" { revision "2018-05-09" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
"RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-common-mp-afi-safi-graceful-restart-config { grouping bgp-common-mp-afi-safi-graceful-restart-config {
description description
"BGP graceful restart parameters that apply on a per-AFI-SAFI "BGP graceful restart parameters that apply on a per-AFI-SAFI
basis"; basis";
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default false;
skipping to change at page 26, line 8 skipping to change at page 22, line 17
this AFI-SAFI"; this AFI-SAFI";
} }
} }
grouping bgp-common-mp-afi-safi-config { grouping bgp-common-mp-afi-safi-config {
description description
"Configuration parameters used for all BGP AFI-SAFIs"; "Configuration parameters used for all BGP AFI-SAFIs";
leaf afi-safi-name { leaf afi-safi-name {
type identityref { type identityref {
base oc-bgp-types:AFI_SAFI_TYPE; base bgp-types:AFI_SAFI_TYPE;
} }
description "AFI,SAFI"; description "AFI,SAFI";
} }
leaf enabled { leaf enabled {
type boolean; type boolean;
default false; default false;
description description
"This leaf indicates whether the IPv4 Unicast AFI,SAFI is "This leaf indicates whether the IPv4 Unicast AFI,SAFI is
enabled for the neighbour or group"; enabled for the neighbour or group";
skipping to change at page 26, line 48 skipping to change at page 23, line 9
uses bgp-common-mp-l2vpn-vpls-group; uses bgp-common-mp-l2vpn-vpls-group;
uses bgp-common-mp-l2vpn-evpn-group; uses bgp-common-mp-l2vpn-evpn-group;
} }
// Groupings relating to each address family // Groupings relating to each address family
grouping bgp-common-mp-ipv4-unicast-group { grouping bgp-common-mp-ipv4-unicast-group {
description description
"Group for IPv4 Unicast configuration options"; "Group for IPv4 Unicast configuration options";
container ipv4-unicast { container ipv4-unicast {
when "../afi-safi-name = 'oc-bgp-types:IPV4_UNICAST'" { when "../afi-safi-name = 'bgp-types:IPV4_UNICAST'" {
description description
"Include this container for IPv4 Unicast specific "Include this container for IPv4 Unicast specific
configuration"; configuration";
} }
description "IPv4 unicast configuration options"; description "IPv4 unicast configuration options";
// include common IPv[46] unicast options // include common IPv[46] unicast options
uses bgp-common-mp-ipv4-ipv6-unicast-common; uses bgp-common-mp-ipv4-ipv6-unicast-common;
// placeholder for IPv4 unicast specific configuration // placeholder for IPv4 unicast specific configuration
} }
} }
skipping to change at page 27, line 21 skipping to change at page 23, line 29
// placeholder for IPv4 unicast specific configuration // placeholder for IPv4 unicast specific configuration
} }
} }
grouping bgp-common-mp-ipv6-unicast-group { grouping bgp-common-mp-ipv6-unicast-group {
description description
"Group for IPv6 Unicast configuration options"; "Group for IPv6 Unicast configuration options";
container ipv6-unicast { container ipv6-unicast {
when "../afi-safi-name = 'oc-bgp-types:IPV6_UNICAST'" { when "../afi-safi-name = 'bgp-types:IPV6_UNICAST'" {
description description
"Include this container for IPv6 Unicast specific "Include this container for IPv6 Unicast specific
configuration"; configuration";
} }
description "IPv6 unicast configuration options"; description "IPv6 unicast configuration options";
// include common IPv[46] unicast options // include common IPv[46] unicast options
uses bgp-common-mp-ipv4-ipv6-unicast-common; uses bgp-common-mp-ipv4-ipv6-unicast-common;
// placeholder for IPv6 unicast specific configuration // placeholder for IPv6 unicast specific configuration
// options // options
} }
} }
grouping bgp-common-mp-ipv4-labeled-unicast-group { grouping bgp-common-mp-ipv4-labeled-unicast-group {
description description
"Group for IPv4 Labeled Unicast configuration options"; "Group for IPv4 Labeled Unicast configuration options";
container ipv4-labeled-unicast { container ipv4-labeled-unicast {
when "../afi-safi-name = 'oc-bgp-types:IPV4_LABELED_UNICAST'" { when "../afi-safi-name = 'bgp-types:IPV4_LABELED_UNICAST'" {
description description
"Include this container for IPv4 Labeled Unicast specific "Include this container for IPv4 Labeled Unicast specific
configuration"; configuration";
} }
description "IPv4 Labeled Unicast configuration options"; description "IPv4 Labeled Unicast configuration options";
uses bgp-common-mp-all-afi-safi-common; uses bgp-common-mp-all-afi-safi-common;
// placeholder for IPv4 Labeled Unicast specific config // placeholder for IPv4 Labeled Unicast specific config
// options // options
} }
} }
grouping bgp-common-mp-ipv6-labeled-unicast-group { grouping bgp-common-mp-ipv6-labeled-unicast-group {
description description
"Group for IPv6 Labeled Unicast configuration options"; "Group for IPv6 Labeled Unicast configuration options";
container ipv6-labeled-unicast { container ipv6-labeled-unicast {
when "../afi-safi-name = 'oc-bgp-types:IPV6_LABELED_UNICAST'" { when "../afi-safi-name = 'bgp-types:IPV6_LABELED_UNICAST'" {
description description
"Include this container for IPv6 Labeled Unicast specific "Include this container for IPv6 Labeled Unicast specific
configuration"; configuration";
} }
description "IPv6 Labeled Unicast configuration options"; description "IPv6 Labeled Unicast configuration options";
uses bgp-common-mp-all-afi-safi-common; uses bgp-common-mp-all-afi-safi-common;
// placeholder for IPv6 Labeled Unicast specific config // placeholder for IPv6 Labeled Unicast specific config
// options. // options.
} }
} }
grouping bgp-common-mp-l3vpn-ipv4-unicast-group { grouping bgp-common-mp-l3vpn-ipv4-unicast-group {
description description
"Group for IPv4 Unicast L3VPN configuration options"; "Group for IPv4 Unicast L3VPN configuration options";
container l3vpn-ipv4-unicast { container l3vpn-ipv4-unicast {
when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_UNICAST'" { when "../afi-safi-name = 'bgp-types:L3VPN_IPV4_UNICAST'" {
description description
"Include this container for IPv4 Unicast L3VPN specific "Include this container for IPv4 Unicast L3VPN specific
configuration"; configuration";
} }
description "Unicast IPv4 L3VPN configuration options"; description "Unicast IPv4 L3VPN configuration options";
// include common L3VPN configuration options // include common L3VPN configuration options
uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
// placeholder for IPv4 Unicast L3VPN specific config options. // placeholder for IPv4 Unicast L3VPN specific config options.
} }
} }
grouping bgp-common-mp-l3vpn-ipv6-unicast-group { grouping bgp-common-mp-l3vpn-ipv6-unicast-group {
description description
"Group for IPv6 Unicast L3VPN configuration options"; "Group for IPv6 Unicast L3VPN configuration options";
container l3vpn-ipv6-unicast { container l3vpn-ipv6-unicast {
when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_UNICAST'" { when "../afi-safi-name = 'bgp-types:L3VPN_IPV6_UNICAST'" {
description description
"Include this container for unicast IPv6 L3VPN specific "Include this container for unicast IPv6 L3VPN specific
configuration"; configuration";
} }
description "Unicast IPv6 L3VPN configuration options"; description "Unicast IPv6 L3VPN configuration options";
// include common L3VPN configuration options // include common L3VPN configuration options
uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common; uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
// placeholder for IPv6 Unicast L3VPN specific configuration // placeholder for IPv6 Unicast L3VPN specific configuration
// options // options
} }
} }
grouping bgp-common-mp-l3vpn-ipv4-multicast-group { grouping bgp-common-mp-l3vpn-ipv4-multicast-group {
description description
"Group for IPv4 L3VPN multicast configuration options"; "Group for IPv4 L3VPN multicast configuration options";
container l3vpn-ipv4-multicast { container l3vpn-ipv4-multicast {
when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_MULTICAST'" { when "../afi-safi-name = 'bgp-types:L3VPN_IPV4_MULTICAST'" {
description description
"Include this container for multicast IPv6 L3VPN specific "Include this container for multicast IPv6 L3VPN specific
configuration"; configuration";
} }
description "Multicast IPv4 L3VPN configuration options"; description "Multicast IPv4 L3VPN configuration options";
// include common L3VPN multicast options // include common L3VPN multicast options
uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
// placeholder for IPv4 Multicast L3VPN specific configuration // placeholder for IPv4 Multicast L3VPN specific configuration
// options // options
} }
} }
grouping bgp-common-mp-l3vpn-ipv6-multicast-group { grouping bgp-common-mp-l3vpn-ipv6-multicast-group {
description description
"Group for IPv6 L3VPN multicast configuration options"; "Group for IPv6 L3VPN multicast configuration options";
container l3vpn-ipv6-multicast { container l3vpn-ipv6-multicast {
when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_MULTICAST'" { when "../afi-safi-name = 'bgp-types:L3VPN_IPV6_MULTICAST'" {
description description
"Include this container for multicast IPv6 L3VPN specific "Include this container for multicast IPv6 L3VPN specific
configuration"; configuration";
} }
description "Multicast IPv6 L3VPN configuration options"; description "Multicast IPv6 L3VPN configuration options";
// include common L3VPN multicast options // include common L3VPN multicast options
uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common; uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
// placeholder for IPv6 Multicast L3VPN specific configuration // placeholder for IPv6 Multicast L3VPN specific configuration
// options // options
} }
} }
grouping bgp-common-mp-l2vpn-vpls-group { grouping bgp-common-mp-l2vpn-vpls-group {
description description
"Group for BGP-signalled VPLS configuration options"; "Group for BGP-signalled VPLS configuration options";
container l2vpn-vpls { container l2vpn-vpls {
when "../afi-safi-name = 'oc-bgp-types:L2VPN_VPLS'" { when "../afi-safi-name = 'bgp-types:L2VPN_VPLS'" {
description description
"Include this container for BGP-signalled VPLS specific "Include this container for BGP-signalled VPLS specific
configuration"; configuration";
} }
description "BGP-signalled VPLS configuration options"; description "BGP-signalled VPLS configuration options";
// include common L2VPN options // include common L2VPN options
uses bgp-common-mp-l2vpn-common; uses bgp-common-mp-l2vpn-common;
// placeholder for BGP-signalled VPLS specific configuration // placeholder for BGP-signalled VPLS specific configuration
// options // options
} }
} }
grouping bgp-common-mp-l2vpn-evpn-group { grouping bgp-common-mp-l2vpn-evpn-group {
description description
"Group for BGP EVPN configuration options"; "Group for BGP EVPN configuration options";
container l2vpn-evpn { container l2vpn-evpn {
when "../afi-safi-name = 'oc-bgp-types:L2VPN_EVPN'" { when "../afi-safi-name = 'bgp-types:L2VPN_EVPN'" {
description description
"Include this container for BGP EVPN specific "Include this container for BGP EVPN specific
configuration"; configuration";
} }
description "BGP EVPN configuration options"; description "BGP EVPN configuration options";
// include common L2VPN options // include common L2VPN options
uses bgp-common-mp-l2vpn-common; uses bgp-common-mp-l2vpn-common;
// placeholder for BGP EVPN specific configuration options // placeholder for BGP EVPN specific configuration options
} }
} }
// Common groupings across multiple AFI,SAFIs // Common groupings across multiple AFI,SAFIs
grouping bgp-common-mp-all-afi-safi-common { grouping bgp-common-mp-all-afi-safi-common {
description description
"Grouping for configuration common to all AFI,SAFI"; "Grouping for configuration common to all AFI,SAFI";
container prefix-limit { container prefix-limit {
description description
skipping to change at page 31, line 15 skipping to change at page 27, line 23
} }
} }
// Common groupings across multiple AFI,SAFIs // Common groupings across multiple AFI,SAFIs
grouping bgp-common-mp-all-afi-safi-common { grouping bgp-common-mp-all-afi-safi-common {
description description
"Grouping for configuration common to all AFI,SAFI"; "Grouping for configuration common to all AFI,SAFI";
container prefix-limit { container prefix-limit {
description description
"Configure the maximum number of prefixes that will be "Parameters relating to the prefix limit for the AFI-SAFI";
accepted from a peer"; leaf max-prefixes {
type uint32;
container config {
description description
"Configuration parameters relating to the prefix "Maximum number of prefixes that will be accepted from the
limit for the AFI-SAFI"; neighbour";
uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; }
leaf shutdown-threshold-pct {
type bgp-types:percentage;
description
"Threshold on number of prefixes that can be received from
a neighbour before generation of warning messages or log
entries. Expressed as a percentage of max-prefixes";
} }
container state { leaf restart-timer {
config false; type decimal64 {
fraction-digits 2;
}
units "seconds";
description description
"State information relating to the prefix-limit for the "Time interval in seconds after which the BGP session is
AFI-SAFI"; re-established after being torn down due to exceeding the
uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; max-prefix limit.";
} }
} }
} }
grouping bgp-common-mp-ipv4-ipv6-unicast-common { grouping bgp-common-mp-ipv4-ipv6-unicast-common {
description description
"Common configuration that is applicable for IPv4 and IPv6 "Common configuration that is applicable for IPv4 and IPv6
unicast"; unicast";
// include common afi-safi options. // include common afi-safi options.
uses bgp-common-mp-all-afi-safi-common; uses bgp-common-mp-all-afi-safi-common;
// configuration options that are specific to IPv[46] unicast // configuration options that are specific to IPv[46] unicast
container config { leaf send-default-route {
description type boolean;
"Configuration parameters for common IPv4 and IPv6 unicast default "false";
AFI-SAFI options";
uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
}
container state {
config false;
description description
"State information for common IPv4 and IPv6 unicast "If set to true, send the default-route to the neighbour(s)";
parameters";
uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
} }
} }
grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common { grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common {
description description
"Common configuration applied across L3VPN for IPv4 "Common configuration applied across L3VPN for IPv4
and IPv6"; and IPv6";
// placeholder -- specific configuration options that are generic // placeholder -- specific configuration options that are generic
// across IPv[46] unicast address families. // across IPv[46] unicast address families.
skipping to change at page 32, line 46 skipping to change at page 29, line 7
// generic across L2VPN address families // generic across L2VPN address families
uses bgp-common-mp-all-afi-safi-common; uses bgp-common-mp-all-afi-safi-common;
} }
// Config groupings for common groups // Config groupings for common groups
grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config { grouping bgp-common-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";
leaf max-prefixes {
type uint32;
description
"Maximum number of prefixes that will be accepted
from the neighbour";
}
leaf shutdown-threshold-pct {
type oc-types:percentage;
description
"Threshold on number of prefixes that can be received
from a neighbour before generation of warning messages
or log entries. Expressed as a percentage of
max-prefixes";
}
leaf restart-timer {
type decimal64 {
fraction-digits 2;
}
units "seconds";
description
"Time interval in seconds after which the BGP session
is re-established after being torn down due to exceeding
the max-prefix limit.";
}
} }
grouping bgp-common-mp-ipv4-ipv6-unicast-common-config {
description
"Common configuration parameters for IPv4 and IPv6 Unicast
address families";
leaf send-default-route {
type boolean;
default "false";
description
"If set to true, send the default-route to the neighbour(s)";
}
}
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-common-structure.yang" <CODE BEGINS> file "ietf-bgp-common-structure@2018-05-09.yang"
submodule ietf-bgp-common-structure {
submodule ietf-bgp-common-structure { yang-version "1.1";
belongs-to ietf-bgp {
belongs-to ietf-bgp { prefix "bgp";
prefix "bgp"; }
}
import openconfig-extensions { prefix oc-ext; } import ietf-bgp-types { prefix bgp-types; }
include ietf-bgp-common-multiprotocol; import ietf-routing-policy { prefix rpol; }
include ietf-bgp-common; include ietf-bgp-common-multiprotocol;
include ietf-bgp-common;
// meta // meta
organization organization
"OpenConfig working group"; "IETF IDR Working Group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
description Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
"This sub-module contains groupings that are common across multiple BGP Authors: Keyur Patel,
contexts and provide structure around other primitive groupings."; Mahesh Jethanandani,
Susan Hares";
oc-ext:openconfig-version "2.1.1"; description
"This sub-module contains groupings that are common across
multiple BGP contexts and provide structure around other
primitive groupings.";
revision "2016-06-21" { revision "2018-05-09" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
} "RFC XXX, BGP Model for Service Provider Network.";
}
grouping bgp-common-structure-neighbor-group-logging-options { grouping bgp-common-structure-neighbor-group-logging-options {
description description
"Structural grouping used to include error handling configuration and "Structural grouping used to include error handling
state for both BGP neighbors and groups"; configuration and state for both BGP neighbors and groups";
container logging-options { container logging-options {
description description
"Logging options for events related to the BGP neighbor or "Logging options for events related to the BGP neighbor or
group"; group";
container config {
description
"Configuration parameters enabling or modifying logging
for events relating to the BGPgroup";
uses bgp-common-neighbor-group-logging-options-config;
}
container state {
config false;
description
"State information relating to logging for the BGP neighbor
or group";
uses bgp-common-neighbor-group-logging-options-config;
}
}
}
grouping bgp-common-structure-neighbor-group-ebgp-multihop {
description
"Structural grouping used to include eBGP multihop configuration and
state for both BGP neighbors and peer groups";
container ebgp-multihop { leaf log-neighbor-state-changes {
description type boolean;
"eBGP multi-hop parameters for the BGPgroup"; default "true";
container config { description
description "Configure logging of peer state changes. Default is to
"Configuration parameters relating to eBGP multihop for the enable logging of peer state changes.";
BGP group"; }
uses bgp-common-neighbor-group-multihop-config; }
} }
container state { grouping bgp-common-structure-neighbor-group-ebgp-multihop {
config false; description
description "Structural grouping used to include eBGP multi-hop
"State information for eBGP multihop, for the BGP neighbor configuration and state for both BGP neighbors and peer
or group"; groups";
uses bgp-common-neighbor-group-multihop-config;
}
}
}
grouping bgp-common-structure-neighbor-group-route-reflector { container ebgp-multihop {
description description
"Structural grouping used to include route reflector configuration and "eBGP multi-hop parameters for the BGPgroup";
state for both BGP neighbors and peer groups";
container route-reflector { leaf enabled {
description type boolean;
"Route reflector parameters for the BGPgroup"; default "false";
container config { description
description "When enabled the referenced group or neighbors are
"Configuraton parameters relating to route reflection permitted to be indirectly connected - including cases
for the BGPgroup"; where the TTL can be decremented between the BGP peers";
uses bgp-common-neighbor-group-route-reflector-config; }
}
container state {
config false;
description
"State information relating to route reflection for the
BGPgroup";
uses bgp-common-neighbor-group-route-reflector-config;
}
}
}
grouping bgp-common-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 { leaf multihop-ttl {
description type uint8;
"AS_PATH manipulation parameters for the BGP neighbor or description
group"; "Time-to-live value to use when packets are sent to the
container config { referenced group or neighbors and ebgp-multihop is
description enabled";
"Configuration parameters relating to AS_PATH manipulation }
for the BGP peer or group"; }
uses bgp-common-neighbor-group-as-path-options-config; }
}
container state {
config false;
description
"State information relating to the AS_PATH manipulation
mechanisms for the BGP peer or group";
uses bgp-common-neighbor-group-as-path-options-config;
}
}
}
grouping bgp-common-structure-neighbor-group-add-paths { grouping bgp-common-structure-neighbor-group-route-reflector {
description description
"Structural grouping used to include ADD-PATHs configuration and state "Structural grouping used to include route reflector
for both BGP neighbors and peer groups"; configuration and state for both BGP neighbors and peer
groups";
container add-paths { container route-reflector {
description description
"Parameters relating to the advertisement and receipt of "Route reflector parameters for the BGPgroup";
multiple paths for a single NLRI (add-paths)";
container config {
description
"Configuration parameters relating to ADD_PATHS";
uses bgp-common-neighbor-group-add-paths-config;
}
container state {
config false;
description
"State information associated with ADD_PATHS";
uses bgp-common-neighbor-group-add-paths-config;
}
}
}
} leaf route-reflector-cluster-id {
type bgp-types:rr-cluster-id-type;
description
"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.";
}
<CODE ENDS> leaf route-reflector-client {
type boolean;
default "false";
description
"Configure the neighbor as a route reflector client.";
}
}
}
<CODE BEGINS> file "ietf-bgp-peer-group.yang" grouping bgp-common-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";
submodule ietf-bgp-peer-group { container as-path-options {
description
"AS_PATH manipulation parameters for the BGP neighbor or
group";
leaf allow-own-as {
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.";
}
belongs-to ietf-bgp { leaf replace-peer-as {
prefix "bgp"; type boolean;
} default "false";
description
"Replace occurrences of the peer's AS in the AS_PATH with
the local autonomous system number";
}
}
}
import openconfig-extensions { prefix oc-ext; } grouping bgp-common-structure-neighbor-group-add-paths {
import ietf-routing-policy { prefix rpol; } description
"Structural grouping used to include ADD-PATHs configuration
and state for both BGP neighbors and peer groups";
// Include the common submodule container add-paths {
include ietf-bgp-common; description
include ietf-bgp-common-multiprotocol; "Parameters relating to the advertisement and receipt of
include ietf-bgp-common-structure; multiple paths for a single NLRI (add-paths)";
// meta leaf receive {
organization type boolean;
"OpenConfig working group"; default false;
description
"Enable ability to receive multiple path advertisements for
an NLRI from the neighbor or group";
}
contact leaf send-max {
"OpenConfig working group type uint8;
netopenconfig@googlegroups.com"; description
"The maximum number of paths to advertise to neighbors for
a single NLRI";
}
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>
description <CODE BEGINS> file "ietf-bgp-peer-group@2018-05-09.yang"
"This sub-module contains groupings that are specific to the submodule ietf-bgp-peer-group {
peer-group context of the OpenConfig BGP module."; yang-version "1.1";
belongs-to ietf-bgp {
prefix "bgp";
}
oc-ext:openconfig-version "2.1.1"; import ietf-routing-policy {
prefix rpol;
}
revision "2016-06-21" { // Include the common submodule
description include ietf-bgp-common;
"OpenConfig BGP refactor"; include ietf-bgp-common-multiprotocol;
reference "2.1.1"; include ietf-bgp-common-structure;
}
grouping bgp-peer-group-config { // meta
description organization
"Configuration parameters relating to a base BGP peer group that "IETF IDR Working Group";
are not also applicable to any other context (e.g., neighbor)";
leaf peer-group-name { contact
type string; "WG Web: <http://tools.ietf.org/wg/idr>
description WG List: <idr@ietf.org>
"Name of the BGP peer-group";
}
} Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel,
Mahesh Jethanandani,
Susan Hares";
grouping bgp-peer-group-afi-safi-list { description
description "This sub-module contains groupings that are specific to the
"List of address-families associated with the BGP peer-group"; peer-group context of the OpenConfig BGP module.";
list afi-safi { revision "2018-05-09" {
key "afi-safi-name"; description
"Initial Version";
reference
"RFC XXX, BGP Model for Service Provider Network.";
}
description grouping bgp-peer-group-config {
"AFI,SAFI configuration available for the description
neighbour or group"; "Configuration parameters relating to a base BGP peer group
that are not also applicable to any other context (e.g.,
neighbor)";
leaf afi-safi-name { leaf peer-group-name {
type leafref { type string;
path "../config/afi-safi-name"; description
} "Name of the BGP peer-group";
description
"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
}
container config { }
description
"Configuration parameters for the AFI-SAFI";
uses bgp-common-mp-afi-safi-config;
}
container state {
config false;
description
"State information relating to the AFI-SAFI";
uses bgp-common-mp-afi-safi-config;
}
container graceful-restart { }
description
"Parameters relating to BGP graceful-restart";
container config {
description
"Configuration options for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
}
container state {
config false;
description
"State information for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
}
}
uses bgp-common-route-selection-options; grouping bgp-peer-group-afi-safi-list {
uses bgp-common-global-group-use-multiple-paths; description
uses bgp-common-mp-all-afi-safi-list-contents; "List of address-families associated with the BGP peer-group";
}
}
grouping bgp-peer-group-base { list afi-safi {
description key "afi-safi-name";
"Parameters related to a BGP group";
container config { description
description "AFI,SAFI configuration available for the
"Configuration parameters relating to the BGP neighbor or neighbour or group";
group";
uses bgp-peer-group-config;
uses bgp-common-neighbor-group-config;
}
container state {
config false;
description
"State information relating to the BGP peer-group";
uses bgp-peer-group-config;
uses bgp-common-neighbor-group-config;
uses bgp-common-state;
}
container timers { uses bgp-common-mp-afi-safi-config;
description
"Timers related to a BGP peer-group";
container config { container graceful-restart {
description description
"Configuration parameters relating to timers used for the "Parameters relating to BGP graceful-restart";
BGP neighbor or peer group";
uses bgp-common-neighbor-group-timers-config;
}
container state {
config false;
description
"State information relating to the timers used for the BGP
group";
uses bgp-common-neighbor-group-timers-config;
} uses bgp-common-mp-afi-safi-graceful-restart-config;
} }
container transport { uses bgp-common-route-selection-options;
description uses bgp-common-global-group-use-multiple-paths;
"Transport session parameters for the BGP peer-group"; uses bgp-common-mp-all-afi-safi-list-contents;
}
}
container config { grouping bgp-peer-group-base {
description description
"Configuration parameters relating to the transport "Parameters related to a BGP group";
session(s) used for the BGP neighbor or group";
uses bgp-common-neighbor-group-transport-config;
}
container state {
config false;
description
"State information relating to the transport session(s)
used for the BGP neighbor or group";
uses bgp-common-neighbor-group-transport-config;
}
}
container error-handling { uses bgp-peer-group-config;
description uses bgp-common-neighbor-group-config;
"Error handling parameters used for the BGP peer-group"; uses bgp-common-state;
container config { container timers {
description description
"Configuration parameters enabling or modifying the "Timers related to a BGP peer-group";
behavior or enhanced error handling mechanisms for the BGP
group";
uses bgp-common-neighbor-group-error-handling-config;
}
container state {
config false;
description
"State information relating to enhanced error handling
mechanisms for the BGP group";
uses bgp-common-neighbor-group-error-handling-config;
}
}
container graceful-restart { uses bgp-common-neighbor-group-timers-config;
description }
"Parameters relating the graceful restart mechanism for BGP";
container config {
description
"Configuration parameters relating to graceful-restart";
uses bgp-common-graceful-restart-config; container transport {
} description
container state { "Transport session parameters for the BGP peer-group";
config false;
description
"State information associated with graceful-restart";
uses bgp-common-graceful-restart-config;
}
}
uses bgp-common-structure-neighbor-group-logging-options; uses bgp-common-neighbor-group-transport-config;
uses bgp-common-structure-neighbor-group-ebgp-multihop; }
uses bgp-common-structure-neighbor-group-route-reflector;
uses bgp-common-structure-neighbor-group-as-path-options;
uses bgp-common-structure-neighbor-group-add-paths;
uses bgp-common-global-group-use-multiple-paths;
uses rpol:apply-policy-group;
container afi-safis { container error-handling {
description description
"Per-address-family configuration parameters associated with "Error handling parameters used for the BGP peer-group";
thegroup";
uses bgp-peer-group-afi-safi-list;
}
}
grouping bgp-peer-group-list { uses bgp-common-neighbor-group-error-handling-config;
description }
"The list of BGP peer groups";
list peer-group { container graceful-restart {
key "peer-group-name"; description
description "Parameters relating the graceful restart mechanism for BGP";
"List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name";
leaf peer-group-name { uses bgp-common-graceful-restart-config;
type leafref { }
path "../config/peer-group-name";
}
description
"Reference to the name of the BGP peer-group used as a
key in the peer-group list";
}
uses bgp-peer-group-base; uses bgp-common-structure-neighbor-group-logging-options;
} uses bgp-common-structure-neighbor-group-ebgp-multihop;
} uses bgp-common-structure-neighbor-group-route-reflector;
uses bgp-common-structure-neighbor-group-as-path-options;
uses bgp-common-structure-neighbor-group-add-paths;
uses bgp-common-global-group-use-multiple-paths;
uses rpol:apply-policy-group;
} container afi-safis {
description
"Per-address-family configuration parameters associated with
thegroup";
uses bgp-peer-group-afi-safi-list;
}
}
<CODE ENDS> grouping bgp-peer-group-list {
description
"The list of BGP peer groups";
<CODE BEGINS> file "ietf-bgp-neighbor.yang" list peer-group {
key "peer-group-name";
description
"List of BGP peer-groups configured on the local system -
uniquely identified by peer-group name";
uses bgp-peer-group-base;
}
}
}
<CODE ENDS>
<CODE BEGINS> file "ietf-bgp-neighbor@2018-05-09.yang"
submodule ietf-bgp-neighbor { submodule ietf-bgp-neighbor {
yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix "bgp";
} }
import openconfig-extensions { prefix oc-ext; } import ietf-routing-policy {
import ietf-routing-policy { prefix rpol; } prefix rpol;
import openconfig-types { prefix oc-types; } }
import ietf-bgp-types { prefix oc-bgp-types; } import ietf-bgp-types {
import ietf-inet-types { prefix inet; } prefix bgp-types;
import ietf-yang-types { prefix yang; } }
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix yang;
}
// 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
"OpenConfig working group"; "IETF IDR Working Group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel,
Mahesh Jethanandani,
Susan Hares";
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 OpenConfig BGP module."; neighbor context of the OpenConfig BGP module.";
oc-ext:openconfig-version "2.1.1";
revision "2016-06-21" { revision "2018-05-09" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
"RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-neighbor-config { grouping bgp-neighbor-use-multiple-paths {
description description
"Configuration parameters relating to a base BGP neighbor that "Multi-path configuration and state applicable to a BGP
are not also applicable to any other context neighbor";
(e.g., peer group)";
leaf peer-group { container use-multiple-paths {
type leafref {
path "../../../../peer-groups/peer-group/peer-group-name";
}
description description
"The peer-group with which this neighbor is associated"; "Parameters related to the use of multiple-paths for the same
} NLRI when they are received only from this neighbor";
leaf neighbor-address { uses bgp-common-use-multiple-paths-config;
type inet:ip-address;
container ebgp {
description description
"Address of the BGP peer, either in IPv4 or IPv6"; "Multi-path configuration for eBGP";
uses bgp-common-use-multiple-paths-ebgp-as-options-config;
}
} }
}
leaf enabled { grouping bgp-neighbor-counters-message-types-state {
type boolean; description
default true; "Grouping of BGP message types, included for re-use across
description counters";
"Whether the BGP peer is enabled. In cases where the
enabled leaf is set to false, the local system should not leaf UPDATE {
initiate connections to the neighbor, and should not type uint64;
respond to TCP connections attempts from the neighbor. If description
the state of the BGP session is ESTABLISHED at the time "Number of BGP UPDATE messages announcing, withdrawing or
that this leaf is set to false, the BGP session should be modifying paths exchanged.";
ceased."; }
leaf NOTIFICATION {
type uint64;
description
"Number of BGP NOTIFICATION messages indicating an error
condition has occurred exchanged.";
} }
} }
grouping bgp-neighbor-use-multiple-paths { grouping bgp-neighbor-afi-safi-list {
description description
"Multipath configuration and state applicable to a BGP "List of address-families associated with the BGP neighbor";
neighbor";
container use-multiple-paths { list afi-safi {
key "afi-safi-name";
description description
"Parameters related to the use of multiple-paths for the same "AFI,SAFI configuration available for the neighbour or
NLRI when they are received only from this neighbor"; group";
container config { uses bgp-common-mp-afi-safi-config;
leaf active {
type boolean;
config false;
description description
"Configuration parameters relating to multipath"; "This value indicates whether a particular AFI-SAFI has
uses bgp-common-use-multiple-paths-config; been succesfully negotiated with the peer. An AFI-SAFI may
be enabled in the current running configuration, but a
session restart may be required in order to negotiate the
new capability.";
} }
container state {
container prefixes {
config false; config false;
description description "Prefix counters for the BGP session";
"State parameters relating to multipath"; leaf received {
uses bgp-common-use-multiple-paths-config; type uint32;
description
"The number of prefixes received from the neighbor";
}
leaf sent {
type uint32;
description
"The number of prefixes advertised to the neighbor";
}
leaf installed {
type uint32;
description
"The number of advertised prefixes installed in the
Loc-RIB";
}
} }
container ebgp { container graceful-restart {
description description
"Multipath configuration for eBGP"; "Parameters relating to BGP graceful-restart";
container config {
uses bgp-common-mp-afi-safi-graceful-restart-config;
leaf received {
type boolean;
config false;
description description
"Configuration parameters relating to eBGP multipath"; "This leaf indicates whether the neighbor advertised the
uses bgp-common-use-multiple-paths-ebgp-as-options-config; ability to support graceful-restart for this AFI-SAFI";
} }
container state {
leaf advertised {
type boolean;
config false; config false;
description description
"State information relating to eBGP multipath"; "This leaf indicates whether the ability to support
uses bgp-common-use-multiple-paths-ebgp-as-options-config; graceful-restart has been advertised to the peer";
} }
} }
uses bgp-common-mp-all-afi-safi-list-contents;
uses bgp-neighbor-use-multiple-paths;
} }
} }
grouping bgp-neighbor-state { grouping bgp-neighbor-base {
description description
"Operational state parameters relating only to a BGP neighbor"; "Parameters related to a BGP neighbor";
leaf peer-group {
type leafref {
path "../../../peer-groups/peer-group/peer-group-name";
}
description
"The peer-group with which this neighbor is associated";
}
leaf neighbor-address {
type inet:ip-address;
description
"Address of the BGP peer, either in IPv4 or IPv6";
}
leaf enabled {
type boolean;
default true;
description
"Whether the BGP peer is enabled. In cases where the enabled
leaf is set to false, the local system should not initiate
connections to the neighbor, and should not respond to TCP
connections attempts from the neighbor. If the state of the
BGP session is ESTABLISHED at the time that this leaf is set
to false, the BGP session should be ceased.";
}
uses bgp-common-neighbor-group-config;
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 "neighbor is down, and in the Idle state of the FSM";
FSM";
} }
enum CONNECT { enum CONNECT {
description description
"neighbor is down, and the session is waiting for "neighbor is down, and the session is waiting for the
the underlying transport session to be established"; underlying transport session to be established";
} }
enum ACTIVE { enum ACTIVE {
description description
"neighbor is down, and the local system is awaiting "neighbor is down, and the local system is awaiting a
a conncetion from the remote peer"; connection from the remote peer";
} }
enum OPENSENT { enum OPENSENT {
description description
"neighbor is in the process of being established. "neighbor is in the process of being established. The
local system has sent an OPEN message";
The local system has sent an OPEN message";
} }
enum OPENCONFIRM { enum OPENCONFIRM {
description description
"neighbor is in the process of being established. "neighbor is in the process of being established. The
The local system is awaiting a NOTIFICATION or local system is awaiting a NOTIFICATION or KEEPALIVE
KEEPALIVE message"; message";
} }
enum ESTABLISHED { enum ESTABLISHED {
description description
"neighbor is up - the BGP session with the peer is "neighbor is up - the BGP session with the peer is
established"; established";
} }
} }
config false;
description description
"Operational state of the BGP peer"; "Operational state of the BGP peer";
} }
leaf last-established { leaf last-established {
type oc-types:timeticks64; // Was oc-types:timeticks64
type uint64;
config false;
description description
"This timestamp indicates the time that the "This timestamp indicates the time that the BGP session last
BGP session last transitioned in or out of the Established transitioned in or out of the Established state. The value
state. The value is the timestamp in seconds relative to is the timestamp in seconds relative to the Unix Epoch (Jan
the Unix Epoch (Jan 1, 1970 00:00:00 UTC). 1, 1970 00:00:00 UTC).
The BGP session uptime can be computed by clients as the The BGP session uptime can be computed by clients as the
difference between this value and the current time in UTC difference between this value and the current time in UTC
(assuming the session is in the ESTABLISHED state, per the (assuming the session is in the ESTABLISHED state, per the
session-state leaf)."; session-state leaf).";
} }
leaf established-transitions { leaf established-transitions {
type yang:counter64; type yang:counter64;
config false;
description description
"Number of transitions to the Established state for "Number of transitions to the Established state for the
the neighbor session. This value is analogous to the neighbor session. This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the standard bgpPeerFsmEstablishedTransitions object from the standard
BGP-4 MIB"; BGP-4 MIB";
reference reference
"RFC 4273 - Definitions of Managed Objects for BGP-4"; "RFC 4273 - Definitions of Managed Objects for BGP-4";
} }
leaf-list supported-capabilities { leaf-list supported-capabilities {
type identityref { type identityref {
base oc-bgp-types:BGP_CAPABILITY; base bgp-types:BGP_CAPABILITY;
} }
config false;
description description
"BGP capabilities negotiated as supported with the peer"; "BGP capabilities negotiated as supported with the peer";
} }
container messages { container messages {
config false;
description description
"Counters for BGP messages sent and received from the "Counters for BGP messages sent and received from the
neighbor"; neighbor";
container sent { container sent {
description description
"Counters relating to BGP messages sent to the neighbor"; "Counters relating to BGP messages sent to the neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
} }
container received { container received {
description description
"Counters for BGP messages received from the neighbor"; "Counters for BGP messages received from the neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
skipping to change at page 46, line 23 skipping to change at page 42, line 4
"Counters relating to BGP messages sent to the neighbor"; "Counters relating to BGP messages sent to the neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
} }
container received { container received {
description description
"Counters for BGP messages received from the neighbor"; "Counters for BGP messages received from the neighbor";
uses bgp-neighbor-counters-message-types-state; uses bgp-neighbor-counters-message-types-state;
} }
} }
container queues { container queues {
config false;
description description
"Counters related to queued messages associated with the "Counters related to queued messages associated with the BGP
BGP neighbor"; neighbor";
uses bgp-neighbor-queue-counters-state;
}
}
grouping bgp-neighbor-counters-message-types-state {
description
"Grouping of BGP message types, included for re-use
across counters";
leaf UPDATE {
type uint64;
description
"Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.";
}
leaf NOTIFICATION {
type uint64;
description
"Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.";
}
}
grouping bgp-neighbor-queue-counters-state {
description
"Counters relating to the message queues associated with the
BGP peer";
leaf input {
type uint32;
description
"The number of messages received from the peer currently
queued";
}
leaf output {
type uint32;
description
"The number of messages queued to be sent to the peer";
}
}
grouping bgp-neighbor-transport-state {
description
"Operational state parameters relating to the transport session
used for the BGP session";
leaf local-port {
type inet:port-number;
description
"Local TCP port being used for the TCP session supporting
the BGP session";
}
leaf remote-address {
type inet:ip-address;
description
"Remote address to which the BGP session has been
established";
}
leaf remote-port {
type inet:port-number;
description
"Remote port being used by the peer for the TCP session
supporting the BGP session";
}
}
grouping bgp-neighbor-error-handling-state {
description
"Operational state parameters relating to enhanced error
error handling for BGP";
leaf erroneous-update-messages {
type uint32;
description
"The number of BGP UPDATE messages for which the
treat-as-withdraw mechanism has been applied based
on erroneous message contents";
}
}
grouping bgp-neighbor-timers-state {
description
"Operational state parameters relating to BGP timers associated
with the BGP session";
leaf negotiated-hold-time { leaf input {
type decimal64 { type uint32;
fraction-digits 2; description
"The number of messages received from the peer currently
queued";
} }
description
"The negotiated hold-time for the BGP session";
}
}
grouping bgp-neighbor-afi-safi-graceful-restart-state { leaf output {
description type uint32;
"Operational state variables relating to the graceful-restart description
mechanism on a per-AFI-SAFI basis"; "The number of messages queued to be sent to the peer";
leaf received {
type boolean;
description
"This leaf indicates whether the neighbor advertised the
ability to support graceful-restart for this AFI-SAFI";
}
leaf advertised {
type boolean;
description
"This leaf indicates whether the ability to support
graceful-restart has been advertised to the peer";
}
}
grouping bgp-neighbor-graceful-restart-state {
description
"Operational state information relevant to graceful restart
for BGP";
leaf peer-restart-time {
type uint16 {
range 0..4096;
} }
description
"The period of time (advertised by the peer) that
the peer expects a restart of a BGP session to
take";
} }
leaf peer-restarting { container timers {
type boolean;
description description
"This flag indicates whether the remote neighbor is currently "Timers related to a BGP neighbor";
in the process of restarting, and hence received routes are
currently stale";
}
leaf local-restarting { uses bgp-common-neighbor-group-timers-config;
type boolean;
description
"This flag indicates whether the local neighbor is currently
restarting. The flag is unset after all NLRI have been
advertised to the peer, and the End-of-RIB (EOR) marker has
been unset";
}
leaf mode { leaf negotiated-hold-time {
type enumeration { type decimal64 {
enum HELPER_ONLY { fraction-digits 2;
description
"The local router is operating in helper-only mode, and
hence will not retain forwarding state during a local
session restart, but will do so during a restart of the
remote peer";
}
enum BILATERAL {
description
"The local router is operating in both helper mode, and
hence retains forwarding state during a remote restart,
and also maintains forwarding state during local session
restart";
}
enum REMOTE_HELPER {
description
"The local system is able to retain routes during restart
but the remote system is only able to act as a helper";
} }
config false;
description
"The negotiated hold-time for the BGP session";
} }
description
"Ths leaf indicates the mode of operation of BGP graceful
restart with the peer";
} }
}
grouping bgp-neighbor-afi-safi-state {
description
"Operational state parameters relating to an individual AFI,
SAFI for a neighbor";
leaf active { container transport {
type boolean;
description description
"This value indicates whether a particular AFI-SAFI has "Transport session parameters for the BGP neighbor";
been succesfully negotiated with the peer. An AFI-SAFI
may be enabled in the current running configuration, but a
session restart may be required in order to negotiate the new
capability.";
}
container prefixes {
description "Prefix counters for the BGP session";
leaf received {
type uint32;
description
"The number of prefixes received from the neighbor";
}
leaf sent { uses bgp-common-neighbor-group-transport-config;
type uint32;
description
"The number of prefixes advertised to the neighbor";
}
leaf installed { leaf local-port {
type uint32; type inet:port-number;
config false;
description description
"The number of advertised prefixes installed in the "Local TCP port being used for the TCP session supporting
Loc-RIB"; the BGP session";
}
}
}
grouping bgp-neighbor-afi-safi-list {
description
"List of address-families associated with the BGP neighbor";
list afi-safi {
key "afi-safi-name";
description
"AFI,SAFI configuration available for the
neighbour or group";
leaf afi-safi-name {
type leafref {
path "../config/afi-safi-name";
}
description
"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
} }
container config { leaf remote-address {
description type inet:ip-address;
"Configuration parameters for the AFI-SAFI";
uses bgp-common-mp-afi-safi-config;
}
container state {
config false; config false;
description description
"State information relating to the AFI-SAFI"; "Remote address to which the BGP session has been
uses bgp-common-mp-afi-safi-config; established";
uses bgp-neighbor-afi-safi-state;
} }
container graceful-restart { leaf remote-port {
type inet:port-number;
config false;
description description
"Parameters relating to BGP graceful-restart"; "Remote port being used by the peer for the TCP session
container config { supporting the BGP session";
description
"Configuration options for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
}
container state {
config false;
description
"State information for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
uses bgp-neighbor-afi-safi-graceful-restart-state;
}
} }
uses bgp-common-mp-all-afi-safi-list-contents;
uses bgp-neighbor-use-multiple-paths;
} }
}
grouping bgp-neighbor-base { container error-handling {
description
"Parameters related to a BGP neighbor";
container config {
description
"Configuration parameters relating to the BGP neighbor or
group";
uses bgp-neighbor-config;
uses bgp-common-neighbor-group-config;
}
container state {
config false;
description description
"State information relating to the BGP neighbor"; "Error handling parameters used for the BGP neighbor or
uses bgp-neighbor-config; group";
uses bgp-common-neighbor-group-config; uses bgp-common-neighbor-group-error-handling-config;
uses bgp-neighbor-state;
}
container timers { leaf erroneous-update-messages {
description type uint32;
"Timers related to a BGP neighbor";
container config {
description
"Configuration parameters relating to timers used for the
BGP neighbor";
uses bgp-common-neighbor-group-timers-config;
}
container state {
config false; config false;
description description
"State information relating to the timers used for the BGP "The number of BGP UPDATE messages for which the
neighbor"; treat-as-withdraw mechanism has been applied based on
uses bgp-common-neighbor-group-timers-config; erroneous message contents";
uses bgp-neighbor-timers-state;
} }
} }
container transport {
container graceful-restart {
description description
"Transport session parameters for the BGP neighbor"; "Parameters relating the graceful restart mechanism for BGP";
container config {
description uses bgp-common-graceful-restart-config;
"Configuration parameters relating to the transport
session(s) used for the BGP neighbor"; leaf peer-restart-time {
uses bgp-common-neighbor-group-transport-config; type uint16 {
} range 0..4096;
container state { }
config false; config false;
description description
"State information relating to the transport session(s) "The period of time (advertised by the peer) that the peer
used for the BGP neighbor"; expects a restart of a BGP session to take";
uses bgp-common-neighbor-group-transport-config;
uses bgp-neighbor-transport-state;
} }
}
container error-handling { leaf peer-restarting {
description type boolean;
"Error handling parameters used for the BGP neighbor or
group";
container config {
description
"Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
neighbor";
uses bgp-common-neighbor-group-error-handling-config;
}
container state {
config false; config false;
description description
"State information relating to enhanced error handling "This flag indicates whether the remote neighbor is
mechanisms for the BGP neighbor"; currently in the process of restarting, and hence received
uses bgp-common-neighbor-group-error-handling-config; routes are currently stale";
uses bgp-neighbor-error-handling-state;
} }
}
container graceful-restart { leaf local-restarting {
description type boolean;
"Parameters relating the graceful restart mechanism for BGP"; config false;
container config {
description description
"Configuration parameters relating to graceful-restart"; "This flag indicates whether the local neighbor is
uses bgp-common-graceful-restart-config; currently restarting. The flag is unset after all NLRI
have been advertised to the peer, and the End-of-RIB (EOR)
marker has been unset";
} }
container state {
leaf mode {
type enumeration {
enum HELPER_ONLY {
description
"The local router is operating in helper-only mode, and
hence will not retain forwarding state during a local
session restart, but will do so during a restart of
the remote peer";
}
enum BILATERAL {
description
"The local router is operating in both helper mode, and
hence retains forwarding state during a remote
restart, and also maintains forwarding state during
local session restart";
}
enum REMOTE_HELPER {
description
"The local system is able to retain routes during
restart but the remote system is only able to act as a
helper";
}
}
config false; config false;
description description
"State information associated with graceful-restart"; "This leaf indicates the mode of operation of BGP graceful
uses bgp-common-graceful-restart-config; restart with the peer";
uses bgp-neighbor-graceful-restart-state;
} }
} }
uses bgp-common-structure-neighbor-group-logging-options; uses bgp-common-structure-neighbor-group-logging-options;
uses bgp-common-structure-neighbor-group-ebgp-multihop; uses bgp-common-structure-neighbor-group-ebgp-multihop;
uses bgp-common-structure-neighbor-group-route-reflector; uses bgp-common-structure-neighbor-group-route-reflector;
uses bgp-common-structure-neighbor-group-as-path-options; uses bgp-common-structure-neighbor-group-as-path-options;
uses bgp-common-structure-neighbor-group-add-paths; uses bgp-common-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;
skipping to change at page 54, line 39 skipping to change at page 45, line 34
grouping bgp-neighbor-list { grouping bgp-neighbor-list {
description description
"The list of BGP neighbors"; "The list of BGP neighbors";
list neighbor { list neighbor {
key "neighbor-address"; key "neighbor-address";
description description
"List of BGP neighbors configured on the local system, "List of BGP neighbors configured on the local system,
uniquely identified by peer IPv[46] address"; uniquely identified by peer IPv[46] address";
leaf neighbor-address {
type leafref {
path "../config/neighbor-address";
}
description
"Reference to the address of the BGP neighbor used as
a key in the neighbor list";
}
uses bgp-neighbor-base; uses bgp-neighbor-base;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
<CODE BEGINS> file "ietf-bgp-global.yang" <CODE BEGINS> file "ietf-bgp-global@2018-05-09.yang"
submodule ietf-bgp-global { submodule ietf-bgp-global {
yang-version "1.1";
belongs-to ietf-bgp { belongs-to ietf-bgp {
prefix "bgp"; prefix bgp;
} }
import openconfig-extensions { prefix oc-ext; } import ietf-inet-types {
import ietf-inet-types { prefix inet; } prefix inet;
import ietf-yang-types { prefix yang; } }
import ietf-yang-types {
prefix yang;
}
// Include common submodule
include ietf-bgp-common; include ietf-bgp-common;
include ietf-bgp-common-multiprotocol; include ietf-bgp-common-multiprotocol;
// meta
organization organization
"OpenConfig working group"; "IETF IDR Working Group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel,
Mahesh Jethanandani,
Susan Hares";
description description
"This sub-module contains groupings that are specific to the "This sub-module contains groupings that are specific to the
global context of the OpenConfig BGP module"; global context of the BGP module";
oc-ext:openconfig-version "2.1.1";
revision "2016-06-21" { revision "2018-05-09" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
"RFC XXX, BGP Model for Service Provider Network.";
} }
grouping bgp-global-config { grouping bgp-global-config {
description description
"Global configuration options for the BGP router."; "Global configuration options for the BGP router.";
leaf as { leaf as {
type inet:as-number; type inet:as-number;
mandatory true; mandatory true;
description description
skipping to change at page 57, line 41 skipping to change at page 48, line 29
description description
"List of address-families associated with the BGP instance"; "List of address-families associated with the BGP instance";
list afi-safi { list afi-safi {
key "afi-safi-name"; key "afi-safi-name";
description description
"AFI,SAFI configuration available for the "AFI,SAFI configuration available for the
neighbour or group"; neighbour or group";
leaf afi-safi-name { uses bgp-common-mp-afi-safi-config;
type leafref { uses bgp-common-state;
path "../config/afi-safi-name";
}
description
"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
}
container config {
description
"Configuration parameters for the AFI-SAFI";
uses bgp-common-mp-afi-safi-config;
}
container state {
config false;
description
"State information relating to the AFI-SAFI";
uses bgp-common-mp-afi-safi-config;
uses bgp-common-state;
}
container graceful-restart { container graceful-restart {
description description
"Parameters relating to BGP graceful-restart"; "Parameters relating to BGP graceful-restart";
container config {
description uses bgp-common-mp-afi-safi-graceful-restart-config;
"Configuration options for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
}
container state {
config false;
description
"State information for BGP graceful-restart";
uses bgp-common-mp-afi-safi-graceful-restart-config;
}
} }
uses bgp-common-route-selection-options; uses bgp-common-route-selection-options;
uses bgp-common-global-group-use-multiple-paths; uses bgp-common-global-group-use-multiple-paths;
uses bgp-common-mp-all-afi-safi-list-contents; uses bgp-common-mp-all-afi-safi-list-contents;
} }
} }
// Structural groupings // Structural groupings
grouping bgp-global-base { grouping bgp-global-base {
description description
"Global configuration parameters for the BGP router"; "Global configuration parameters for the BGP router";
container config { uses bgp-global-config;
description uses bgp-global-state;
"Configuration parameters relating to the global BGP router";
uses bgp-global-config;
}
container state {
config false;
description
"State information relating to the global BGP router";
uses bgp-global-config;
uses bgp-global-state;
}
container default-route-distance { container default-route-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).";
container config { uses bgp-global-default-route-distance-config;
description
"Configuration parameters relating to the default route
distance";
uses bgp-global-default-route-distance-config;
}
container state {
config false;
description
"State information relating to the default route distance";
uses bgp-global-default-route-distance-config;
}
} }
container confederation { container confederation {
description description
"Parameters indicating whether the local system acts as part "Parameters indicating whether the local system acts as part
of a BGP confederation"; of a BGP confederation";
container config { uses bgp-global-confederation-config;
description
"Configuration parameters relating to BGP confederations";
uses bgp-global-confederation-config;
}
container state {
config false;
description
"State information relating to the BGP confederations";
uses bgp-global-confederation-config;
}
} }
container graceful-restart { container graceful-restart {
description description
"Parameters relating the graceful restart mechanism for BGP"; "Parameters relating the graceful restart mechanism for BGP";
container config { uses bgp-common-graceful-restart-config;
description
"Configuration parameters relating to graceful-restart";
uses bgp-common-graceful-restart-config;
}
container state {
config false;
description
"State information associated with graceful-restart";
uses bgp-common-graceful-restart-config;
}
} }
uses bgp-common-global-group-use-multiple-paths; uses bgp-common-global-group-use-multiple-paths;
uses bgp-common-route-selection-options; uses bgp-common-route-selection-options;
container afi-safis { container afi-safis {
description description
"Address family specific configuration"; "Address family specific configuration";
uses bgp-global-afi-safi-list; uses bgp-global-afi-safi-list;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
8. BGP types 8. BGP types
<CODE BEGINS> file "ietf-bgp-types.yang" <CODE BEGINS> file "ietf-bgp-types@2018-05-09.yang"
module ietf-bgp-types { module ietf-bgp-types {
yang-version "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 "oc-bgp-types"; prefix "bgp-types";
import ietf-inet-types { prefix inet; } import ietf-inet-types {
import openconfig-types { prefix oc-types; } prefix inet;
import openconfig-extensions { prefix oc-ext; }
}
// meta // meta
organization organization
"OpenConfig working group"; "IETF IDR Working Group";
contact contact
"OpenConfig working group "WG Web: <http://tools.ietf.org/wg/idr>
netopenconfig@googlegroups.com"; WG List: <idr@ietf.org>
Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
Authors: Keyur Patel,
Mahesh Jethanandani,
Susan Hares";
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";
oc-ext:openconfig-version "2.1.1"; revision "2018-05-09" {
revision "2016-06-21" {
description description
"OpenConfig BGP refactor"; "Initial Version";
reference "2.1.1"; reference
"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";
} }
identity MPBGP { identity MPBGP {
base BGP_CAPABILITY; base BGP_CAPABILITY;
description description
"Multi-protocol extensions to BGP"; "Multi-protocol extensions to BGP";
skipping to change at page 62, line 4 skipping to change at page 51, line 19
base BGP_CAPABILITY; base BGP_CAPABILITY;
description description
"Graceful restart functionality"; "Graceful restart functionality";
reference "RFC4724"; reference "RFC4724";
} }
identity ADD_PATHS { identity ADD_PATHS {
base BGP_CAPABILITY; base BGP_CAPABILITY;
description description
"BGP add-paths"; "BGP add-paths";
reference "draft-ietf-idr-add-paths"; reference "draft-ietf-idr-add-paths";
} }
identity AFI_SAFI_TYPE { identity AFI_SAFI_TYPE {
description description
"Base identity type for AFI,SAFI tuples for BGP-4"; "Base identity type for AFI,SAFI tuples for BGP-4";
reference "RFC4760 - multiprotocol extensions for BGP-4"; reference "RFC4760 - multi-protocol extensions for BGP-4";
} }
identity IPV4_UNICAST { identity IPV4_UNICAST {
base AFI_SAFI_TYPE; base AFI_SAFI_TYPE;
description description
"IPv4 unicast (AFI,SAFI = 1,1)"; "IPv4 unicast (AFI,SAFI = 1,1)";
reference "RFC4760"; reference "RFC4760";
} }
identity IPV6_UNICAST { identity IPV6_UNICAST {
skipping to change at page 64, line 26 skipping to change at page 53, line 41
"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 "RFC1997"; reference "RFC1997";
} }
identity NOPEER { identity NOPEER {
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 readvertise 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 "RFC3765"; reference "RFC3765";
} }
typedef bgp-session-direction { typedef bgp-session-direction {
type enumeration { type enumeration {
enum INBOUND { enum INBOUND {
description description
skipping to change at page 65, line 27 skipping to change at page 54, line 42
type uint32 { type uint32 {
// per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 - // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 -
// 0xFFFFFFFF are reserved // 0xFFFFFFFF are reserved
range "65536..4294901759"; // 0x00010000..0xFFFEFFFF range "65536..4294901759"; // 0x00010000..0xFFFEFFFF
} }
type string { type string {
pattern '([0-9]+:[0-9]+)'; pattern '([0-9]+:[0-9]+)';
} }
} }
description description
"Type definition for standard commmunity attributes"; "Type definition for standard community attributes";
reference "RFC 1997 - BGP Communities Attribute"; reference "RFC 1997 - BGP Communities Attribute";
} }
typedef bgp-ext-community-type { typedef bgp-ext-community-type {
// TODO: needs more work to make this more precise given the // TODO: needs more work to make this more precise given the
// variability of extended community attribute specifications // variability of extended community attribute specifications
// 8-octet value: // 8-octet value:
// <type> 2 octects // <type> 2 octects
// <value> 6 octets // <value> 6 octets
skipping to change at page 67, line 4 skipping to change at page 56, line 19
} }
} }
description description
"Type definition for extended community attributes"; "Type definition for extended community attributes";
reference "RFC 4360 - BGP Extended Communities Attribute"; reference "RFC 4360 - BGP Extended Communities Attribute";
} }
typedef bgp-community-regexp-type { typedef bgp-community-regexp-type {
// TODO: needs more work to decide what format these regexps can // TODO: needs more work to decide what format these regexps can
// take. // take.
//type oc-types:std-regexp;
type oc-types:std-regexp; 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";
} }
skipping to change at page 69, line 21 skipping to change at page 58, line 37
description "do not send any community attribute"; description "do not send any community attribute";
} }
} }
description description
"type describing variations of community attributes: "type describing variations of community attributes:
STANDARD: standard BGP community [rfc1997] STANDARD: standard BGP community [rfc1997]
EXTENDED: extended BGP community [rfc4360] EXTENDED: extended BGP community [rfc4360]
BOTH: both standard and extended community"; BOTH: both standard and extended community";
} }
} }
<CODE ENDS> <CODE ENDS>
9. BGP policy data 9. BGP policy data
<CODE BEGINS> file "ietf-bgp-policy.yang" <CODE BEGINS> file "ietf-bgp-policy@2018-05-09.yang"
module ietf-bgp-policy {
module ietf-bgp-policy { yang-version "1.1";
yang-version "1";
// namespace
namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy";
prefix "oc-bgp-pol";
// import some basic types
import ietf-inet-types { prefix inet; }
import ietf-routing-policy {prefix rpol; }
import openconfig-policy-types { prefix pol-types; }
import ietf-bgp-types { prefix oc-bgp-types; }
import openconfig-extensions { prefix oc-ext; }
// meta
organization
"OpenConfig working group";
contact
"OpenConfig working group
netopenconfig@googlegroups.com";
description
"This module contains data definitions for BGP routing policy.
It augments the base routing-policy module with BGP-specific
options for conditions and actions.";
oc-ext:openconfig-version "2.1.1";
revision "2016-06-21" {
description
"OpenConfig BGP refactor";
reference "2.1.1";
}
// typedef statements
typedef bgp-set-community-option-type {
type enumeration {
enum ADD {
description
"add the specified communities to the existing
community attribute";
}
enum REMOVE {
description
"remove the specified communities from the
existing community attribute";
}
enum REPLACE {
description
"replace the existing community attribute with
the specified communities. If an empty set is
specified, this removes the community attribute
from the route.";
}
}
description
"Type definition for options when setting the community
attribute in a policy action";
}
typedef bgp-next-hop-type {
type union {
type inet:ip-address-no-zone;
type enumeration {
enum SELF {
description "special designation for local router's own
address, i.e., next-hop-self";
}
}
}
description
"type definition for specifying next-hop in policy actions";
}
typedef bgp-set-med-type {
type union {
type uint32;
type string {
pattern "^[+-][0-9]+";
}
type enumeration {
enum IGP {
description "set the MED value to the IGP cost toward the
next hop for the route";
}
}
}
description
"Type definition for specifying how the BGP MED can
be set in BGP policy actions. The three choices are to set
the MED directly, increment/decrement using +/- notation,
and setting it to the IGP cost (predefined value).";
}
// grouping statements
grouping match-community-config {
description
"Configuration data for match conditions on communities";
leaf community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" +
"oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:community-sets/" +
"oc-bgp-pol:community-set/oc-bgp-pol:community-set-name";
}
description
"References a defined community set";
}
uses rpol:match-set-options-group;
}
grouping match-community-state {
description
"Operational state data for match conditions on communities";
}
grouping match-community-top {
description
"Top-level grouping for match conditions on communities";
container match-community-set {
description
"Top-level container for match conditions on communities.
Match a referenced community-set according to the logic
defined in the match-set-options leaf";
container config {
description
"Configuration data for match conditions on communities";
uses match-community-config;
}
container state {
config false;
description
"Operational state data ";
uses match-community-config;
uses match-community-state;
}
}
}
grouping match-ext-community-config {
description
"Configuration data for match conditions on extended
communities";
leaf ext-community-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" +
"oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:ext-community-sets/" +
"oc-bgp-pol:ext-community-set/" +
"oc-bgp-pol:ext-community-set-name";
}
description "References a defined extended community set";
}
uses rpol:match-set-options-group;
}
grouping match-ext-community-state {
description
"Operational state data for match conditions on extended
communities";
}
grouping match-ext-community-top {
description
"Top-level grouping for match conditions on extended
communities";
container match-ext-community-set {
description
"Match a referenced extended community-set according to the
logic defined in the match-set-options leaf";
container config {
description
"Configuration data for match conditions on extended
communities";
uses match-ext-community-config;
}
container state {
config false;
description
"Operational state data for match conditions on extended
communities";
uses match-ext-community-config;
uses match-ext-community-state;
}
}
}
grouping match-as-path-config {
description
"Configuration data for match conditions on AS path set";
leaf as-path-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" +
"oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:as-path-sets/" +
"oc-bgp-pol:as-path-set/oc-bgp-pol:as-path-set-name";
}
description "References a defined AS path set";
}
uses rpol:match-set-options-group;
}
grouping match-as-path-state {
description
"Operational state data for match conditions on AS path set";
}
grouping match-as-path-top {
description
"Top-level grouping for match conditions on AS path set";
container match-as-path-set {
description
"Match a referenced as-path set according to the logic
defined in the match-set-options leaf";
container config {
description
"Configuration data for match conditions on AS path set";
uses match-as-path-config;
}
container state {
config false;
description
"Operational state data for match conditions on AS
path set";
uses match-as-path-config;
uses match-as-path-state;
}
}
}
grouping bgp-match-set-conditions {
description
"Condition statement definitions for checking membership in a
defined set";
uses match-community-top;
uses match-ext-community-top;
uses match-as-path-top;
}
grouping community-count-config {
description
"Configuration data for community count condition";
uses pol-types:attribute-compare-operators;
}
grouping community-count-state {
description
"Operational state data for community count condition";
}
grouping community-count-top {
description
"Top-level grouping for community count condition";
container community-count {
description
"Value and comparison operations for conditions based on the
number of communities in the route update";
container config {
description
"Configuration data for community count condition";
uses community-count-config;
}
container state {
config false;
description
"Operational state data for community count condition";
uses community-count-config;
uses community-count-state;
}
}
}
grouping as-path-length-config {
description
"Configuration data for AS path length condition";
uses pol-types:attribute-compare-operators;
}
grouping as-path-length-state {
description
"Operational state data for AS path length condition";
}
grouping as-path-length-top {
description
"Top-level grouping for AS path length condition";
container as-path-length {
description
"Value and comparison operations for conditions based on the
length of the AS path in the route update";
container config {
description
"Configuration data for AS path length condition";
uses as-path-length-config;
}
container state {
config false;
description
"Operational state data for AS path length condition";
uses as-path-length-config;
uses as-path-length-state;
}
}
}
grouping bgp-conditions-config {
description
"Configuration data for BGP-specific policy conditions";
leaf med-eq {
type uint32;
description
"Condition to check if the received MED value is equal to
the specified value";
}
leaf origin-eq {
type oc-bgp-types:bgp-origin-attr-type;
description
"Condition to check if the route origin is equal to the
specified value";
}
leaf-list next-hop-in {
type inet:ip-address-no-zone;
description
"List of next hop addresses to check for in the route
update";
}
leaf-list afi-safi-in {
type identityref {
base oc-bgp-types:AFI_SAFI_TYPE;
}
description
"List of address families which the NLRI may be
within";
}
leaf local-pref-eq {
type uint32;
// TODO: add support for other comparisons if needed
description
"Condition to check if the local pref attribute is equal to
the specified value";
}
leaf route-type {
// TODO: verify extent of vendor support for this comparison
type enumeration {
enum INTERNAL {
description "route type is internal";
}
enum EXTERNAL {
description "route type is external";
}
}
description
"Condition to check the route type in the route update";
}
}
grouping bgp-conditions-state {
description
"Operational state data for BGP-specific policy conditions";
}
grouping bgp-conditions-top {
description
"Top-level grouping for BGP-specific policy conditions";
container bgp-conditions {
description
"Top-level container ";
container config {
description
"Configuration data for BGP-specific policy conditions";
uses bgp-conditions-config;
}
container state {
config false;
description
"Operational state data for BGP-specific policy
conditions";
uses bgp-conditions-config;
uses bgp-conditions-state;
}
uses community-count-top;
uses as-path-length-top;
uses bgp-match-set-conditions;
}
}
grouping community-set-config {
description
"Configuration data for BGP community sets";
leaf community-set-name {
type string;
mandatory true;
description
"name / label of the community set -- this is used to
reference the set in match conditions";
}
leaf-list community-member {
type union {
type oc-bgp-types:bgp-std-community-type;
type oc-bgp-types:bgp-community-regexp-type;
type oc-bgp-types:bgp-well-known-community-type;
}
description
"members of the community set";
}
}
grouping community-set-state {
description
"Operational state data for BGP community sets";
}
grouping community-set-top {
description
"Top-level grouping for BGP community sets";
container community-sets {
description
"Enclosing container for list of defined BGP community sets";
list community-set {
key "community-set-name";
description
"List of defined BGP community sets";
leaf community-set-name {
type leafref {
path "../config/community-set-name";
}
description
"Reference to list key";
}
container config {
description
"Configuration data for BGP community sets";
uses community-set-config;
}
container state {
config false;
description
"Operational state data for BGP community sets";
uses community-set-config;
uses community-set-state;
}
}
}
}
grouping ext-community-set-config {
description
"Configuration data for extended BGP community sets";
leaf ext-community-set-name {
type string;
description
"name / label of the extended community set -- this is
used to reference the set in match conditions";
}
leaf-list ext-community-member {
type union {
type oc-bgp-types:bgp-ext-community-type;
type oc-bgp-types:bgp-community-regexp-type;
}
description
"members of the extended community set";
}
}
grouping ext-community-set-state {
description
"Operational state data for extended BGP community sets";
}
grouping ext-community-set-top {
description
"Top-level grouping for extended BGP community sets";
container ext-community-sets {
description
"Enclosing container for list of extended BGP community
sets";
list ext-community-set {
key "ext-community-set-name";
description
"List of defined extended BGP community sets";
leaf ext-community-set-name {
type leafref {
path "../config/ext-community-set-name";
}
description
"Reference to list key";
}
container config {
description
"Configuration data for extended BGP community sets";
uses ext-community-set-config;
}
container state {
config false;
description
"Operational state data for extended BGP community sets";
uses ext-community-set-config;
uses ext-community-set-state;
}
}
}
}
grouping as-path-set-config {
description
"Configuration data for AS path sets";
leaf as-path-set-name { // namespace
type string; namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-policy";
description
"name of the AS path set -- this is used to reference
the set in match conditions";
}
leaf-list as-path-set-member { prefix "bgp-pol";
// TODO: need to refine typedef for AS path expressions
type string;
description
"AS path expression -- list of ASes in the set";
}
}
grouping as-path-set-state { // import some basic types
description import ietf-inet-types {
"Operational state data for AS path sets"; prefix inet;
} }
import ietf-routing-policy {
prefix rpol;
}
import ietf-bgp-types {
prefix bgp-types;
}
grouping as-path-set-top { import ietf-routing-types {
description prefix rt-types;
"Top-level grouping for AS path sets"; }
container as-path-sets { // meta
description organization
"Enclosing container for list of define AS path sets"; "IETF IDR Working Group";
list as-path-set { contact
key "as-path-set-name"; "WG Web: <http://tools.ietf.org/wg/idr>
description WG List: <idr@ietf.org>
"List of defined AS path sets";
leaf as-path-set-name { Editor: Mahesh Jethanandani (mjethanandani@gmail.com)
type leafref { Authors: Keyur Patel,
path "../config/as-path-set-name"; Mahesh Jethanandani,
} Susan Hares";
description
"Reference to list key";
}
container config { description
description "This module contains data definitions for BGP routing policy.
"Configuration data for AS path sets"; It augments the base routing-policy module with BGP-specific
options for conditions and actions.";
uses as-path-set-config; revision "2018-05-09" {
} description
"Initial Version";
reference
"RFC XXX, BGP Model for Service Provider Network.";
}
container state { // typedef statements
config false; typedef bgp-set-community-option-type {
type enumeration {
enum ADD {
description
"add the specified communities to the existing
community attribute";
description }
"Operational state data for AS path sets"; enum REMOVE {
description
"remove the specified communities from the
existing community attribute";
}
enum REPLACE {
description
"replace the existing community attribute with
the specified communities. If an empty set is
specified, this removes the community attribute
from the route.";
}
}
description
"Type definition for options when setting the community
attribute in a policy action";
}
uses as-path-set-config; typedef bgp-next-hop-type {
uses as-path-set-state; type union {
} type inet:ip-address-no-zone;
type enumeration {
enum SELF {
description "special designation for local router's own
address, i.e., next-hop-self";
}
}
}
description
"type definition for specifying next-hop in policy actions";
}
} typedef bgp-set-med-type {
} type union {
} type uint32;
type string {
pattern "^[+-][0-9]+";
}
type enumeration {
enum IGP {
description "set the MED value to the IGP cost toward the
next hop for the route";
}
}
}
description
"Type definition for specifying how the BGP MED can
be set in BGP policy actions. The three choices are to set
the MED directly, increment/decrement using +/- notation,
and setting it to the IGP cost (predefined value).";
}
// augment statements // grouping statements
augment "/rpol:routing-policy/rpol:defined-sets" { grouping match-community-top {
description "adds BGP defined sets container to routing policy description
model"; "Top-level grouping for match conditions on communities";
container bgp-defined-sets { container match-community-set {
description description
"BGP-related set definitions for policy match conditions"; "Top-level container for match conditions on communities.
Match a referenced community-set according to the logic
defined in the match-set-options leaf";
uses community-set-top; leaf community-set {
uses ext-community-set-top; type leafref {
uses as-path-set-top; path
} "/rpol:routing-policy/rpol:defined-sets/" +
} "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/" +
"bgp-pol:community-set/bgp-pol:community-set-name";
}
description
"References a defined community set";
}
grouping as-path-prepend-config { uses rpol:match-set-options-group;
description }
"Configuration data for the AS path prepend action"; }
leaf repeat-n { grouping match-ext-community-top {
type uint8 { description
range 1..max; "Top-level grouping for match conditions on extended
} communities";
description
"Number of times to prepend the local AS number to the AS
path. The value should be between 1 and the maximum
supported by the implementation.";
}
}
grouping as-path-prepend-state { container match-ext-community-set {
description description
"Operational state data for the AS path prepend action"; "Match a referenced extended community-set according to the
} logic defined in the match-set-options leaf";
grouping as-path-prepend-top { leaf ext-community-set {
description type leafref {
"Top-level grouping for the AS path prepend action"; path
"/rpol:routing-policy/rpol:defined-sets/" +
"bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" +
"bgp-pol:ext-community-set/" +
"bgp-pol:ext-community-set-name";
}
description "References a defined extended community set";
}
container set-as-path-prepend { uses rpol:match-set-options-group;
description }
"action to prepend local AS number to the AS-path a }
specified number of times";
container config { grouping match-as-path-top {
description description
"Configuration data for the AS path prepend action"; "Top-level grouping for match conditions on AS path set";
uses as-path-prepend-config; container match-as-path-set {
} description
"Match a referenced as-path set according to the logic
defined in the match-set-options leaf";
container state { leaf as-path-set {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" +
"bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/" +
"bgp-pol:as-path-set/bgp-pol:as-path-set-name";
}
description "References a defined AS path set";
}
uses rpol:match-set-options-group;
}
}
config false; grouping bgp-match-set-conditions {
description
"Condition statement definitions for checking membership in a
defined set";
description uses match-community-top;
"Operational state data for the AS path prepend action"; uses match-ext-community-top;
uses match-as-path-top;
}
uses as-path-prepend-config; grouping community-count-top {
uses as-path-prepend-state; description
} "Top-level grouping for community count condition";
}
}
grouping set-community-action-common { container community-count {
description description
"Common leaves for set-community and set-ext-community "Value and comparison operations for conditions based on the
actions"; number of communities in the route update";
}
}
leaf method { grouping as-path-length-top {
type enumeration { description
enum INLINE { "Top-level grouping for AS path length condition";
description
"The extended communities are specified inline as a
list";
}
enum REFERENCE {
description
"The extended communities are specified by referencing a
defined ext-community set";
}
}
description
"Indicates the method used to specify the extended
communities for the set-ext-community action";
}
leaf options { container as-path-length {
type bgp-set-community-option-type; description
description "Value and comparison operations for conditions based on the
"Options for modifying the community attribute with length of the AS path in the route update";
the specified values. These options apply to both }
methods of setting the community attribute."; }
}
}
grouping set-community-inline-config { grouping bgp-conditions-top {
description description
"Configuration data for inline specification of set-community "Top-level grouping for BGP-specific policy conditions";
action";
leaf-list communities { container bgp-conditions {
type union { description
type oc-bgp-types:bgp-std-community-type; "Top-level container ";
type oc-bgp-types:bgp-well-known-community-type;
}
description
"Set the community values for the update inline with
a list.";
}
}
grouping set-community-inline-state { leaf med-eq {
description type uint32;
"Operational state data or inline specification of description
set-community action"; "Condition to check if the received MED value is equal to
} the specified value";
}
grouping set-community-inline-top { leaf origin-eq {
description type bgp-types:bgp-origin-attr-type;
"Top-level grouping or inline specification of set-community description
action"; "Condition to check if the route origin is equal to the
specified value";
}
container inline { leaf-list next-hop-in {
when "../config/method=INLINE" { type inet:ip-address-no-zone;
description description
"Active only when the set-community method is INLINE"; "List of next hop addresses to check for in the route
} update";
description }
"Set the community values for the action inline with
a list.";
container config { leaf-list afi-safi-in {
description type identityref {
"Configuration data or inline specification of set-community base bgp-types:AFI_SAFI_TYPE;
action"; }
description
"List of address families which the NLRI may be within";
}
uses set-community-inline-config; leaf local-pref-eq {
} type uint32;
container state { // TODO: add support for other comparisons if needed
description
"Condition to check if the local pref attribute is equal to
the specified value";
}
config false; leaf route-type {
// TODO: verify extent of vendor support for this comparison
type enumeration {
enum INTERNAL {
description "route type is internal";
}
enum EXTERNAL {
description "route type is external";
}
}
description
"Condition to check the route type in the route update";
}
description uses community-count-top;
"Operational state data or inline specification of uses as-path-length-top;
set-community action"; uses bgp-match-set-conditions;
}
}
uses set-community-inline-config; grouping community-set-top {
uses set-community-inline-state; description
} "Top-level grouping for BGP community sets";
}
}
grouping set-community-reference-config { container community-sets {
description description
"Configuration data for referening a community-set in the "Enclosing container for list of defined BGP community sets";
set-community action";
leaf community-set-ref { list community-set {
type leafref { key "community-set-name";
path "/rpol:routing-policy/rpol:defined-sets/" + description
"oc-bgp-pol:bgp-defined-sets/" + "List of defined BGP community sets";
"oc-bgp-pol:community-sets/oc-bgp-pol:community-set/" +
"oc-bgp-pol:community-set-name";
}
description
"References a defined community set by name";
}
}
grouping set-community-reference-state { leaf community-set-name {
description type string;
"Operational state data for referening a community-set in the mandatory true;
set-community action"; description
} "name / label of the community set -- this is used to
reference the set in match conditions";
}
grouping set-community-reference-top { leaf-list community-member {
description type union {
"Top-level grouping for referening a community-set in the type bgp-types:bgp-std-community-type;
set-community action"; type bgp-types:bgp-community-regexp-type;
type bgp-types:bgp-well-known-community-type;
}
description
"members of the community set";
}
}
}
}
container reference { grouping ext-community-set-top {
when "../config/method=REFERENCE" { description
description "Top-level grouping for extended BGP community sets";
"Active only when the set-community method is REFERENCE";
}
description
"Provide a reference to a defined community set for the
set-community action";
container config { container ext-community-sets {
description description
"Configuration data for referening a community-set in the "Enclosing container for list of extended BGP community
set-community action"; sets";
list ext-community-set {
key "ext-community-set-name";
description
"List of defined extended BGP community sets";
uses set-community-reference-config; leaf ext-community-set-name {
} type string;
description
"name / label of the extended community set -- this is
used to reference the set in match conditions";
}
container state { leaf-list ext-community-member {
type union {
type rt-types:route-target;
type bgp-types:bgp-community-regexp-type;
}
description
"members of the extended community set";
}
}
}
config false; }
description grouping as-path-set-top {
"Operational state data for referening a community-set description
in the set-community action"; "Top-level grouping for AS path sets";
uses set-community-reference-config; container as-path-sets {
uses set-community-reference-state; description
} "Enclosing container for list of define AS path sets";
}
}
grouping set-community-action-config { list as-path-set {
description key "as-path-set-name";
"Configuration data for the set-community action"; description
"List of defined AS path sets";
uses set-community-action-common; leaf as-path-set-name {
} type string;
description
"name of the AS path set -- this is used to reference the
set in match conditions";
}
grouping set-community-action-state { leaf-list as-path-set-member {
description // TODO: need to refine typedef for AS path expressions
"Operational state data for the set-community action"; type string;
} description
"AS path expression -- list of ASes in the set";
}
}
}
}
grouping set-community-action-top { // augment statements
description
"Top-level grouping for the set-community action";
container set-community { augment "/rpol:routing-policy/rpol:defined-sets" {
description description "adds BGP defined sets container to routing policy
"Action to set the community attributes of the route, along model";
with options to modify how the community is modified.
Communities may be set using an inline list OR
reference to an existing defined set (not both).";
container config { container bgp-defined-sets {
description description
"Configuration data for the set-community action"; "BGP-related set definitions for policy match conditions";
uses set-community-action-config; uses community-set-top;
} uses ext-community-set-top;
uses as-path-set-top;
}
}
grouping as-path-prepend-top {
description
"Top-level grouping for the AS path prepend action";
container state { container set-as-path-prepend {
description
"action to prepend local AS number to the AS-path a
specified number of times";
config false; leaf repeat-n {
type uint8 {
range 1..max;
}
description
"Number of times to prepend the local AS number to the AS
path. The value should be between 1 and the maximum
supported by the implementation.";
}
}
}
description grouping set-community-action-common {
"Operational state data for the set-community action"; description
"Common leaves for set-community and set-ext-community
actions";
uses set-community-action-config; leaf method {
uses set-community-action-state; type enumeration {
} enum INLINE {
description
"The extended communities are specified inline as a
list";
}
enum REFERENCE {
description
"The extended communities are specified by referencing a
defined ext-community set";
}
}
description
"Indicates the method used to specify the extended
communities for the set-ext-community action";
}
uses set-community-inline-top; leaf options {
uses set-community-reference-top; type bgp-set-community-option-type;
} description
} "Options for modifying the community attribute with
the specified values. These options apply to both
methods of setting the community attribute.";
}
}
grouping set-ext-community-inline-config { grouping set-community-inline-top {
description description
"Configuration data for inline specification of "Top-level grouping or inline specification of set-community
set-ext-community action"; action";
leaf-list communities { container inline {
type union { when "../config/method=INLINE" {
type oc-bgp-types:bgp-ext-community-type; description
type oc-bgp-types:bgp-well-known-community-type; "Active only when the set-community method is INLINE";
} }
description description
"Set the extended community values for the update inline "Set the community values for the action inline with
with a list."; a list.";
}
}
grouping set-ext-community-inline-state { leaf-list communities {
description type union {
"Operational state data or inline specification of type bgp-types:bgp-std-community-type;
set-ext-community action"; type bgp-types:bgp-well-known-community-type;
} }
description
"Set the community values for the update inline with a
list.";
}
}
}
grouping set-ext-community-inline-top { grouping set-community-reference-top {
description description
"Top-level grouping or inline specification of set-ext-community "Top-level grouping for referencing a community-set in the
action"; set-community action";
container inline { container reference {
when "../config/method=INLINE" { when "../config/method=REFERENCE" {
description description
"Active only when the set-community method is INLINE"; "Active only when the set-community method is REFERENCE";
} }
description description
"Set the extended community values for the action inline with "Provide a reference to a defined community set for the
a list."; set-community action";
container config { leaf community-set-ref {
description type leafref {
"Configuration data or inline specification of path "/rpol:routing-policy/rpol:defined-sets/" +
set-ext-community action"; "bgp-pol:bgp-defined-sets/" +
"bgp-pol:community-sets/bgp-pol:community-set/" +
"bgp-pol:community-set-name";
}
description
"References a defined community set by name";
}
}
}
uses set-ext-community-inline-config; grouping set-community-action-top {
} description
"Top-level grouping for the set-community action";
container state { container set-community {
description
"Action to set the community attributes of the route, along
with options to modify how the community is modified.
Communities may be set using an inline list OR
reference to an existing defined set (not both).";
config false; uses set-community-action-common;
uses set-community-inline-top;
uses set-community-reference-top;
}
}
description grouping set-ext-community-inline-top {
"Operational state data or inline specification of description
"Top-level grouping or inline specification of
set-ext-community action"; set-ext-community action";
uses set-ext-community-inline-config; container inline {
uses set-ext-community-inline-state; when "../config/method=INLINE" {
} description
} "Active only when the set-community method is INLINE";
} }
description
grouping set-ext-community-reference-config { "Set the extended community values for the action inline with
description a list.";
"Configuration data for referening a extended community-set
in the set-ext-community action";
leaf ext-community-set-ref {
type leafref {
path "/rpol:routing-policy/rpol:defined-sets/" +
"oc-bgp-pol:bgp-defined-sets/" +
"oc-bgp-pol:ext-community-sets/" +
"oc-bgp-pol:ext-community-set/" +
"oc-bgp-pol:ext-community-set-name";
}
description
"References a defined extended community set by
name";
}
}
grouping set-ext-community-reference-state {
description
"Operational state data for referening an extended
community-set in the set-ext-community action";
}
grouping set-ext-community-reference-top {
description
"Top-level grouping for referening an extended community-set
in the set-community action";
container reference {
when "../config/method=REFERENCE" {
description
"Active only when the set-community method is REFERENCE";
}
description
"Provide a reference to an extended community set for the
set-ext-community action";
container config {
description
"Configuration data for referening an extended
community-set in the set-ext-community action";
uses set-ext-community-reference-config;
}
container state {
config false;
description
"Operational state data for referening an extended
community-set in the set-ext-community action";
uses set-ext-community-reference-config;
uses set-ext-community-reference-state;
}
}
}
grouping set-ext-community-action-config {
description
"Configuration data for the set-ext-community action";
uses set-community-action-common;
}
grouping set-ext-community-action-state {
description
"Operational state data for the set-ext-community action";
}
grouping set-ext-community-action-top {
description
"Top-level grouping for the set-ext-community action";
container set-ext-community {
description
"Action to set the extended community attributes of the
route, along with options to modify how the community is
modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not
both).";
container config {
description
"Configuration data for the set-ext-community action";
uses set-ext-community-action-config; leaf-list communities {
} type union {
type rt-types:route-target;
type bgp-types:bgp-well-known-community-type;
}
description
"Set the extended community values for the update inline
with a list.";
}
}
}
container state { grouping set-ext-community-reference-top {
description
"Top-level grouping for referening an extended community-set
in the set-community action";
config false; container reference {
when "../config/method=REFERENCE" {
description
"Active only when the set-community method is REFERENCE";
}
description
"Provide a reference to an extended community set for the
set-ext-community action";
description leaf ext-community-set-ref {
"Operational state data for the set-ext-community action"; type leafref {
path
"/rpol:routing-policy/rpol:defined-sets/" +
"bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" +
"bgp-pol:ext-community-set/" +
"bgp-pol:ext-community-set-name";
}
description
"References a defined extended community set by name";
}
}
}
uses set-ext-community-action-config; grouping set-ext-community-action-top {
uses set-ext-community-action-state; description
} "Top-level grouping for the set-ext-community action";
uses set-ext-community-inline-top;
uses set-ext-community-reference-top;
}
}
grouping bgp-actions-config { container set-ext-community {
description description
"Configuration data for BGP-specific actions"; "Action to set the extended community attributes of the
route, along with options to modify how the community is
modified. Extended communities may be set using an inline
list OR a reference to an existing defined set (but not
both).";
leaf set-route-origin { uses set-community-action-common;
type oc-bgp-types:bgp-origin-attr-type; uses set-ext-community-inline-top;
description "set the origin attribute to the specified uses set-ext-community-reference-top;
value";
}
leaf set-local-pref { }
type uint32; }
description "set the local pref attribute on the route
update";
}
leaf set-next-hop { grouping bgp-actions-top {
type bgp-next-hop-type; description
description "set the next-hop attribute in the route update"; "Top-level grouping for BGP-specific actions";
}
leaf set-med { container bgp-actions {
type bgp-set-med-type; description
description "set the med metric attribute in the route "Top-level container for BGP-specific actions";
update";
}
}
grouping bgp-actions-state { leaf set-route-origin {
description type bgp-types:bgp-origin-attr-type;
"Operational state data for BGP-specific actions"; description
} "set the origin attribute to the specified value";
}
grouping bgp-actions-top { leaf set-local-pref {
description type uint32;
"Top-level grouping for BGP-specific actions"; description
"set the local pref attribute on the route update";
}
container bgp-actions { leaf set-next-hop {
description type bgp-next-hop-type;
"Top-level container for BGP-specific actions"; description
"set the next-hop attribute in the route update";
}
container config { leaf set-med {
description type bgp-set-med-type;
"Configuration data for BGP-specific actions"; description
"set the med metric attribute in the route update";
}
uses as-path-prepend-top;
uses set-community-action-top;
uses set-ext-community-action-top;
}
}
uses bgp-actions-config; augment "/rpol:routing-policy/rpol:policy-definitions/" +
} "rpol:policy-definition/rpol:statements/rpol:statement/" +
"rpol:conditions" {
description
"BGP policy conditions added to routing policy module";
container state { uses bgp-conditions-top;
}
augment "/rpol:routing-policy/rpol:policy-definitions/" +
"rpol:policy-definition/rpol:statements/rpol:statement/" +
"rpol:actions" {
description "BGP policy actions added to routing policy
module";
config false; uses bgp-actions-top;
description }
"Operational state data for BGP-specific actions";
uses bgp-actions-config; // rpc statements
uses bgp-actions-state;
}
uses as-path-prepend-top;
uses set-community-action-top;
uses set-ext-community-action-top;
}
}
augment "/rpol:routing-policy/rpol:policy-definitions/" + // notification statements
"rpol:policy-definition/rpol:statements/rpol:statement/" + }
"rpol:conditions" { <CODE ENDS>
description
"BGP policy conditions added to routing policy module";
uses bgp-conditions-top; 10. Contributors
}
augment "/rpol:routing-policy/rpol:policy-definitions/" + Previous versions of this document saw contributions from Anees
"rpol:policy-definition/rpol:statements/rpol:statement/" + Shaikh, Rob Shakir, Kevin D'Souza, Alexander Clemm, Aleksandr
"rpol:actions" { Zhadkin, and Xyfeng Liu.
description "BGP policy actions added to routing policy
module";
uses bgp-actions-top; 11. Acknowledgements
}
// rpc statements The authors are grateful for valuable contributions to this document
and the associated models from: Ebben Aires, Pavan Beeram, Chris
Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh
George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee
Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen-
Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim
Uttaro, and Gunter Vandevelde.
// notification statements 12. References
}
<CODE ENDS> 12.1. Normative references
10. References [I-D.ietf-rtgwg-ni-model]
Berger, L., Hopps, C., Lindem, A., Bogdanovic, D., and X.
Liu, "YANG Model for Network Instances", draft-ietf-rtgwg-
ni-model-12 (work in progress), March 2018.
10.1. Normative references [RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities
Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996,
<https://www.rfc-editor.org/info/rfc1997>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route
the Network Configuration Protocol (NETCONF)", RFC 6020, Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November
DOI 10.17487/RFC6020, October 2010, 1998, <https://www.rfc-editor.org/info/rfc2439>.
<http://www.rfc-editor.org/info/rfc6020>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
and A. Bierman, Ed., "Network Configuration Protocol DOI 10.17487/RFC3688, January 2004,
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, <https://www.rfc-editor.org/info/rfc3688>.
<http://www.rfc-editor.org/info/rfc6241>.
[RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
Border Gateway Protocol 4 (BGP-4)", RFC 4271, Border Gateway Protocol 4 (BGP-4)", RFC 4271,
DOI 10.17487/RFC4271, January 2006, DOI 10.17487/RFC4271, January 2006,
<http://www.rfc-editor.org/info/rfc4271>. <https://www.rfc-editor.org/info/rfc4271>.
[RFC1997] Chandra, R., Traina, P., and T. Li, "BGP Communities
Attribute", RFC 1997, DOI 10.17487/RFC1997, August 1996,
<http://www.rfc-editor.org/info/rfc1997>.
[RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route
Reflection: An Alternative to Full Mesh Internal BGP Reflection: An Alternative to Full Mesh Internal BGP
(IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006, (IBGP)", RFC 4456, DOI 10.17487/RFC4456, April 2006,
<http://www.rfc-editor.org/info/rfc4456>. <https://www.rfc-editor.org/info/rfc4456>.
[RFC3065] Traina, P., McPherson, D., and J. Scudder, "Autonomous
System Confederations for BGP", RFC 3065,
DOI 10.17487/RFC3065, February 2001,
<http://www.rfc-editor.org/info/rfc3065>.
[RFC2439] Villamizar, C., Chandra, R., and R. Govindan, "BGP Route
Flap Damping", RFC 2439, DOI 10.17487/RFC2439, November
1998, <http://www.rfc-editor.org/info/rfc2439>.
[RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y. [RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724, Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724,
DOI 10.17487/RFC4724, January 2007, DOI 10.17487/RFC4724, January 2007,
<http://www.rfc-editor.org/info/rfc4724>. <https://www.rfc-editor.org/info/rfc4724>.
[RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
Austein, "BGP Prefix Origin Validation", RFC 6811,
DOI 10.17487/RFC6811, January 2013,
<http://www.rfc-editor.org/info/rfc6811>.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760, "Multiprotocol Extensions for BGP-4", RFC 4760,
DOI 10.17487/RFC4760, January 2007, DOI 10.17487/RFC4760, January 2007,
<http://www.rfc-editor.org/info/rfc4760>. <https://www.rfc-editor.org/info/rfc4760>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013,
<http://www.rfc-editor.org/info/rfc6991>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004,
<http://www.rfc-editor.org/info/rfc3688>.
10.2. Informative references
[I-D.ietf-rtgwg-policy-model]
Shaikh, A., Shakir, R., D'Souza, K., and C. Chase,
"Routing Policy Configuration Model for Service Provider
Networks", draft-ietf-rtgwg-policy-model-01 (work in
progress), April 2016.
[I-D.openconfig-netmod-opstate]
Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling
of Operational State Data in YANG", draft-openconfig-
netmod-opstate-01 (work in progress), July 2015.
[I-D.ietf-netmod-routing-cfg]
Lhotka, L. and A. Lindem, "A YANG Data Model for Routing
Management", draft-ietf-netmod-routing-cfg-22 (work in
progress), July 2016.
[I-D.rtgyangdt-rtgwg-device-model] [RFC5065] Traina, P., McPherson, D., and J. Scudder, "Autonomous
Lindem, A., Berger, L., Bogdanovic, D., and C. Hopps, System Confederations for BGP", RFC 5065,
"Network Device YANG Organizational Models", draft- DOI 10.17487/RFC5065, August 2007,
rtgyangdt-rtgwg-device-model-04 (work in progress), May <https://www.rfc-editor.org/info/rfc5065>.
2016.
[I-D.openconfig-rtgwg-network-instance] [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
Shakir, R., "A Data Model for Network Instances in Service (TLS) Protocol Version 1.2", RFC 5246,
Provider Networks", draft-openconfig-rtgwg-network- DOI 10.17487/RFC5246, August 2008,
instance-01 (work in progress), November 2015. <https://www.rfc-editor.org/info/rfc5246>.
[I-D.talwar-rtgwg-grpc-use-cases] [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
Specification, g., Kolhe, J., Shaikh, A., and J. George, the Network Configuration Protocol (NETCONF)", RFC 6020,
"Use cases for gRPC in network management", draft-talwar- DOI 10.17487/RFC6020, October 2010,
rtgwg-grpc-use-cases-00 (work in progress), July 2016. <https://www.rfc-editor.org/info/rfc6020>.
Appendix A. Acknowledgements [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>.
The authors are grateful for valuable contributions to this document [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure
and the associated models from: Ebben Aires, Pavan Beeram, Chris Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
Chase, Ed Crabbe, Luyuan Fang, Bill Fenner, Akshay Gattani, Josh <https://www.rfc-editor.org/info/rfc6242>.
George, Vijay Gill, Matt John, Jeff Haas, Dhanendra Jain, Acee
Lindem, Ina Minei, Carl Moberg, Ashok Narayanan, Einar Nilsen-
Nygaard, Adam Simpson, Puneet Sood, Jason Sterne, Jeff Tantsura, Jim
Uttaro, and Gunter Vandevelde.
Appendix B. Change summary [RFC6811] Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
Austein, "BGP Prefix Origin Validation", RFC 6811,
DOI 10.17487/RFC6811, January 2013,
<https://www.rfc-editor.org/info/rfc6811>.
B.1. Changes between revisions -01 and -02 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013,
<https://www.rfc-editor.org/info/rfc6991>.
o Refactored BGP model such that it is comprised of multiple sub- [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
modules rather than independent modules. RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>.
o Remove the need for self-augmentation of the BGP model to allow [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
the ability to import the model in wider structures more easily. Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>.
o Added new operational state values for BGP session established [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
transitions and last-established timestamp. Also deprecated Access Control Model", STD 91, RFC 8341,
uptime operational state leaf. DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>.
o Added ability to select eligible paths for add-paths based on a [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
policy. Routing Management (NMDA Version)", RFC 8349,
DOI 10.17487/RFC8349, March 2018,
<https://www.rfc-editor.org/info/rfc8349>.
B.2. Changes between revisions -00 and -01 12.2. Informative references
o Updated module namespaces to reflect IETF standard namespace. [I-D.ietf-rtgwg-policy-model]
Qu, Y., Tantsura, J., Lindem, A., Liu, X., and A. Shaikh,
"A YANG Data Model for Routing Policy Management", draft-
ietf-rtgwg-policy-model-02 (work in progress), March 2018.
o Updated module filenames with ietf- prefix per RFC 6087 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
guidelines. and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>.
Authors' Addresses Authors' Addresses
Anees Shaikh (editor) Keyur Patel
Google Arrcus
1600 Amphitheatre Pkwy CA
Mountain View, CA 94043
US
Email: aashaikh@google.com
Rob Shakir (editor)
Jive Communications, Inc.
1275 West 1600 North, Suite 100
Orem, UT 84057
Email: rjs@rob.sh
Keyur Patel (editor)
Cisco
170 W. Tasman Drive
San Jose, CA 95134
USA USA
Email: keyupate@cisco.com Email: keyur@arrcus.com
Mahesh Jethanandani
Susan Hares (editor) Email: mjethanandani@gmail.com
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
Kevin D'Souza
AT&T
200 S. Laurel Ave
Middletown, NJ
US
Email: kd6913@att.com
Deepak Bansal
Microsoft
205 108th Ave. NE, Suite 400
Bellevue, WA
US
Email: dbansal@microsoft.com
Alexander Clemm
Cisco
170 W. Tasman Drive
San Jose, CA 95134
USA
Email: alex@cisco.com
Aleksandr Zhdankin
Cisco
170 W. Tasman Drive
San Jose, CA 95134
USA
Email: azhdanki@cisco.com
Mahesh Jethanandani
Cisco Systems, Inc
180 W. Tasman Drive
San Jose, CA 95134
USA
Phone: +1 408.526.8763
Email: mjethanandani@gmail.com
Xyfeng Liu
Ericsson
1595 Spring Hill Road, Suite 500
Vienna, VA 22182
USA
Email: xufeng.liu@ericsson.com
 End of changes. 461 change blocks. 
2889 lines changed or deleted 1840 lines changed or added

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