submoduleopenconfig-bgp-neighbor {
yang-version1;
belongs-toopenconfig-bgp {
prefixoc-bgp;
}
importopenconfig-extensions {
prefixoc-ext;
}
importopenconfig-routing-policy {
prefixoc-rpol;
}
importopenconfig-types {
prefixoc-types;
}
importopenconfig-bgp-types {
prefixoc-bgp-types;
}
importopenconfig-inet-types {
prefixoc-inet;
}
importopenconfig-yang-types {
prefixoc-yang;
}
includeopenconfig-bgp-common;
includeopenconfig-bgp-common-multiprotocol;
includeopenconfig-bgp-peer-group;
includeopenconfig-bgp-common-structure;
organization"OpenConfig working group";
contact"OpenConfig working group
netopenconfig@googlegroups.com";
description"This sub-module contains groupings that are specific to the
neighbor context of the OpenConfig BGP module.";
revision"2017-07-30" {
description"Clarification of add-paths send-max leaf";
reference"4.0.1";
}
revision"2017-07-10" {
description"Add error notifications; moved add-paths config; add AS
prepend policy features; removed unneeded config leaves";
reference"4.0.0";
}
revision"2017-02-02" {
description"Bugfix to remove remaining global-level policy data";
reference"3.0.1";
}
revision"2017-01-26" {
description"Add dynamic neighbor support, migrate to OpenConfig types";
reference"3.0.0";
}
revision"2016-06-21" {
description"OpenConfig BGP refactor";
reference"2.1.1";
}
oc-ext:openconfig-version"4.0.1";
groupingbgp-neighbor-config {
description"Configuration parameters relating to a base BGP neighbor that
are not also applicable to any other context
(e.g., peer group)";
leafpeer-group {
typeleafref {
path"../../../../peer-groups/peer-group/peer-group-name";
}
description"The peer-group with which this neighbor is associated";
}
leafneighbor-address {
typeoc-inet:ip-address;
description"Address of the BGP peer, either in IPv4 or IPv6";
}
leafenabled {
typeboolean;
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.";
}
} // grouping bgp-neighbor-configgroupingbgp-neighbor-use-multiple-paths {
description"Multipath configuration and state applicable to a BGP
neighbor";
containeruse-multiple-paths {
description"Parameters related to the use of multiple-paths for the same
NLRI when they are received only from this neighbor";
containerconfig {
description"Configuration parameters relating to multipath";
usesbgp-common-use-multiple-paths-config;
} // container configcontainerstate {
configfalse;
description"State parameters relating to multipath";
usesbgp-common-use-multiple-paths-config;
} // container statecontainerebgp {
description"Multipath configuration for eBGP";
containerconfig {
description"Configuration parameters relating to eBGP multipath";
usesbgp-common-use-multiple-paths-ebgp-as-options-config;
} // container configcontainerstate {
configfalse;
description"State information relating to eBGP multipath";
usesbgp-common-use-multiple-paths-ebgp-as-options-config;
} // container state
} // container ebgp
} // container use-multiple-paths
} // grouping bgp-neighbor-use-multiple-pathsgroupingbgp-neighbor-state {
description"Operational state parameters relating only to a BGP neighbor";
leafsession-state {
typeenumeration {
enum"IDLE" {
value0;
description"neighbor is down, and in the Idle state of the
FSM";
}
enum"CONNECT" {
value1;
description"neighbor is down, and the session is waiting for
the underlying transport session to be established";
}
enum"ACTIVE" {
value2;
description"neighbor is down, and the local system is awaiting
a conncetion from the remote peer";
}
enum"OPENSENT" {
value3;
description"neighbor is in the process of being established.
The local system has sent an OPEN message";
}
enum"OPENCONFIRM" {
value4;
description"neighbor is in the process of being established.
The local system is awaiting a NOTIFICATION or
KEEPALIVE message";
}
enum"ESTABLISHED" {
value5;
description"neighbor is up - the BGP session with the peer is
established";
}
}
description"Operational state of the BGP peer";
}
leaflast-established {
typeoc-types:timeticks64;
description"This timestamp indicates the time that the
BGP session last transitioned in or out of the Established
state. The value is the timestamp in seconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
The BGP session uptime can be computed by clients as the
difference between this value and the current time in UTC
(assuming the session is in the ESTABLISHED state, per the
session-state leaf).";
}
leafestablished-transitions {
typeoc-yang:counter64;
description"Number of transitions to the Established state for
the neighbor session. This value is analogous to the
bgpPeerFsmEstablishedTransitions object from the standard
BGP-4 MIB";
reference"RFC 4273 - Definitions of Managed Objects for BGP-4";
}
leaf-listsupported-capabilities {
typeidentityref {
baseoc-bgp-types:BGP_CAPABILITY;
}
description"BGP capabilities negotiated as supported with the peer";
}
containermessages {
description"Counters for BGP messages sent and received from the
neighbor";
containersent {
description"Counters relating to BGP messages sent to the neighbor";
usesbgp-neighbor-counters-message-types-state;
} // container sentcontainerreceived {
description"Counters for BGP messages received from the neighbor";
usesbgp-neighbor-counters-message-types-state;
} // container received
} // container messagescontainerqueues {
description"Counters related to queued messages associated with the
BGP neighbor";
usesbgp-neighbor-queue-counters-state;
} // container queuesleafdynamically-configured {
typeboolean;
default'false';
description"When this leaf is set to true, the peer was configured dynamically
due to an inbound connection request from a specified source prefix
within a dynamic-neighbor-prefix.";
}
} // grouping bgp-neighbor-stategroupingbgp-neighbor-counters-message-types-state {
description"Grouping of BGP message types, included for re-use
across counters";
leafUPDATE {
typeuint64;
description"Number of BGP UPDATE messages announcing, withdrawing
or modifying paths exchanged.";
}
leafNOTIFICATION {
typeuint64;
description"Number of BGP NOTIFICATION messages indicating an
error condition has occurred exchanged.";
}
leaflast-notification-time {
typeoc-types:timeticks64;
description"This timestamp indicates the time that a NOTIFICATION
message was sent or received on the peering session
(based on whether this leaf is associated with
sent or received messages).
The value is the timestamp in seconds relative to
the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
}
leaflast-notification-error-code {
typeidentityref {
baseoc-bgp-types:BGP_ERROR_CODE;
}
description"Indicates the last BGP error sent or received on the peering
session (based on whether this leaf is associated with
sent or received messages).";
}
leaflast-notification-error-subcode {
typeidentityref {
baseoc-bgp-types:BGP_ERROR_SUBCODE;
}
description"Indicates the last BGP error subcode sent or received on
the peering session (based on whether this leaf is associated
with sent or received messages)";
}
} // grouping bgp-neighbor-counters-message-types-stategroupingbgp-neighbor-queue-counters-state {
description"Counters relating to the message queues associated with the
BGP peer";
leafinput {
typeuint32;
description"The number of messages received from the peer currently
queued";
}
leafoutput {
typeuint32;
description"The number of messages queued to be sent to the peer";
}
} // grouping bgp-neighbor-queue-counters-stategroupingbgp-neighbor-transport-state {
description"Operational state parameters relating to the transport session
used for the BGP session";
leaflocal-port {
typeoc-inet:port-number;
description"Local TCP port being used for the TCP session supporting
the BGP session";
}
leafremote-address {
typeoc-inet:ip-address;
description"Remote address to which the BGP session has been
established";
}
leafremote-port {
typeoc-inet:port-number;
description"Remote port being used by the peer for the TCP session
supporting the BGP session";
}
} // grouping bgp-neighbor-transport-stategroupingbgp-neighbor-error-handling-state {
description"Operational state parameters relating to enhanced error
error handling for BGP";
leaferroneous-update-messages {
typeuint32;
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-error-handling-stategroupingbgp-neighbor-timers-state {
description"Operational state parameters relating to BGP timers associated
with the BGP session";
leafnegotiated-hold-time {
typedecimal64 {
fraction-digits2;
}
description"The negotiated hold-time for the BGP session";
}
} // grouping bgp-neighbor-timers-stategroupingbgp-neighbor-afi-safi-graceful-restart-state {
description"Operational state variables relating to the graceful-restart
mechanism on a per-AFI-SAFI basis";
leafreceived {
typeboolean;
description"This leaf indicates whether the neighbor advertised the
ability to support graceful-restart for this AFI-SAFI";
}
leafadvertised {
typeboolean;
description"This leaf indicates whether the ability to support
graceful-restart has been advertised to the peer";
}
} // grouping bgp-neighbor-afi-safi-graceful-restart-stategroupingbgp-neighbor-graceful-restart-state {
description"Operational state information relevant to graceful restart
for BGP";
leafpeer-restart-time {
typeuint16 {
range"0..4096";
}
description"The period of time (advertised by the peer) that
the peer expects a restart of a BGP session to
take";
}
leafpeer-restarting {
typeboolean;
description"This flag indicates whether the remote neighbor is currently
in the process of restarting, and hence received routes are
currently stale";
}
leaflocal-restarting {
typeboolean;
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";
}
leafmode {
typeenumeration {
enum"HELPER_ONLY" {
value0;
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" {
value1;
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" {
value2;
description"The local system is able to retain routes during restart
but the remote system is only able to act as a helper";
}
}
description"Ths leaf indicates the mode of operation of BGP graceful
restart with the peer";
}
} // grouping bgp-neighbor-graceful-restart-stategroupingbgp-neighbor-afi-safi-state {
description"Operational state parameters relating to an individual AFI,
SAFI for a neighbor";
leafactive {
typeboolean;
description"This value indicates whether a particular AFI-SAFI has
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.";
}
containerprefixes {
description"Prefix counters for the BGP session";
leafreceived {
typeuint32;
description"The number of prefixes received from the neighbor";
}
leafsent {
typeuint32;
description"The number of prefixes advertised to the neighbor";
}
leafinstalled {
typeuint32;
description"The number of advertised prefixes installed in the
Loc-RIB";
}
} // container prefixes
} // grouping bgp-neighbor-afi-safi-stategroupingbgp-neighbor-afi-safi-list {
description"List of address-families associated with the BGP neighbor";
listafi-safi {
key "afi-safi-name";
description"AFI,SAFI configuration available for the
neighbour or group";
leafafi-safi-name {
typeleafref {
path"../config/afi-safi-name";
}
description"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
}
containerconfig {
description"Configuration parameters for the AFI-SAFI";
usesbgp-common-mp-afi-safi-config;
} // container configcontainerstate {
configfalse;
description"State information relating to the AFI-SAFI";
usesbgp-common-mp-afi-safi-config;
usesbgp-neighbor-afi-safi-state;
} // container statecontainergraceful-restart {
description"Parameters relating to BGP graceful-restart";
containerconfig {
description"Configuration options for BGP graceful-restart";
usesbgp-common-mp-afi-safi-graceful-restart-config;
} // container configcontainerstate {
configfalse;
description"State information for BGP graceful-restart";
usesbgp-common-mp-afi-safi-graceful-restart-config;
usesbgp-neighbor-afi-safi-graceful-restart-state;
} // container state
} // container graceful-restartusesbgp-common-structure-neighbor-group-add-paths;
usesbgp-common-mp-all-afi-safi-list-contents;
usesbgp-neighbor-use-multiple-paths;
} // list afi-safi
} // grouping bgp-neighbor-afi-safi-listgroupingbgp-neighbor-base {
description"Parameters related to a BGP neighbor";
containerconfig {
description"Configuration parameters relating to the BGP neighbor or
group";
usesbgp-neighbor-config;
usesbgp-common-neighbor-group-config;
} // container configcontainerstate {
configfalse;
description"State information relating to the BGP neighbor";
usesbgp-neighbor-config;
usesbgp-common-neighbor-group-config;
usesbgp-neighbor-state;
} // container statecontainertimers {
description"Timers related to a BGP neighbor";
containerconfig {
description"Configuration parameters relating to timers used for the
BGP neighbor";
usesbgp-common-neighbor-group-timers-config;
} // container configcontainerstate {
configfalse;
description"State information relating to the timers used for the BGP
neighbor";
usesbgp-common-neighbor-group-timers-config;
usesbgp-neighbor-timers-state;
} // container state
} // container timerscontainertransport {
description"Transport session parameters for the BGP neighbor";
containerconfig {
description"Configuration parameters relating to the transport
session(s) used for the BGP neighbor";
usesbgp-common-neighbor-group-transport-config;
} // container configcontainerstate {
configfalse;
description"State information relating to the transport session(s)
used for the BGP neighbor";
usesbgp-common-neighbor-group-transport-config;
usesbgp-neighbor-transport-state;
} // container state
} // container transportcontainererror-handling {
description"Error handling parameters used for the BGP neighbor or
group";
containerconfig {
description"Configuration parameters enabling or modifying the
behavior or enhanced error handling mechanisms for the BGP
neighbor";
usesbgp-common-neighbor-group-error-handling-config;
} // container configcontainerstate {
configfalse;
description"State information relating to enhanced error handling
mechanisms for the BGP neighbor";
usesbgp-common-neighbor-group-error-handling-config;
usesbgp-neighbor-error-handling-state;
} // container state
} // container error-handlingcontainergraceful-restart {
description"Parameters relating the graceful restart mechanism for BGP";
containerconfig {
description"Configuration parameters relating to graceful-restart";
usesbgp-common-graceful-restart-config;
} // container configcontainerstate {
configfalse;
description"State information associated with graceful-restart";
usesbgp-common-graceful-restart-config;
usesbgp-neighbor-graceful-restart-state;
} // container state
} // container graceful-restartusesbgp-common-structure-neighbor-group-logging-options;
usesbgp-common-structure-neighbor-group-ebgp-multihop;
usesbgp-common-structure-neighbor-group-route-reflector;
usesbgp-common-structure-neighbor-group-as-path-options;
usesbgp-neighbor-use-multiple-paths;
usesoc-rpol:apply-policy-group;
containerafi-safis {
description"Per-address-family configuration parameters associated with
the neighbor";
usesbgp-neighbor-afi-safi-list;
} // container afi-safis
} // grouping bgp-neighbor-basegroupingbgp-neighbor-list {
description"The list of BGP neighbors";
listneighbor {
key "neighbor-address";
description"List of BGP neighbors configured on the local system,
uniquely identified by peer IPv[46] address";
leafneighbor-address {
typeleafref {
path"../config/neighbor-address";
}
description"Reference to the address of the BGP neighbor used as
a key in the neighbor list";
}
usesbgp-neighbor-base;
} // list neighbor
} // grouping bgp-neighbor-list
} // submodule openconfig-bgp-neighbor