3 namespace "urn:opendaylight:params:xml:ns:yang:bmp-message";
6 import bgp-message { prefix bgp-msg; revision-date 2020-01-20; }
7 import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; }
8 import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
9 import ietf-yang-types { prefix yang; revision-date 2013-07-15; }
10 import bgp-types { prefix bgp-t; revision-date 2020-01-20; }
12 organization "Cisco Systems, Inc.";
13 contact "Milos Fabian <milfabia@cisco.com>";
16 "This module contains the base data model of a BMP messages.
17 It rolls up the definitions contained in RFC7854.
19 Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
21 This program and the accompanying materials are made available
22 under the terms of the Eclipse Public License v1.0 which
23 accompanies this distribution, and is available at
24 http://www.eclipse.org/legal/epl-v10.html";
27 "https://tools.ietf.org/html/rfc7854";
30 description "Update to use -no-zone-adresses";
33 revision "2018-03-29" {
34 description "Add support for add-path for all afi/safi.";
37 revision "2017-12-07" {
38 description "Add support for add-path in base BGP NLRI.";
41 revision "2015-05-12" {
48 enum administratively-closed {
51 "Session administratively closed.";
56 "Unspecified reason.";
58 enum out-of-resources {
61 "Out of resources. The router has exhausted
62 resources available for the BMP session.";
64 enum redundant-connection {
67 "Redundant connection. The router has determined
68 that this connection is redundant with another one.";
70 enum permanently-closed {
73 "Session permanently administratively closed,
74 will not be re-initiated. Monitoring station should reduce
75 (potentially to 0) the rate at which it attempts
76 reconnection to the monitored router.";
81 typedef adj-rib-in-type {
91 "If set to 1, indicates that the message reflects
92 the post-policy Adj-RIB-In (i.e., it reflects the application
93 of inbound policy). It is set to 0 if the message reflects the
94 pre-policy Adj-RIB-In.";
101 description "Global Instance Peer.";
105 description "RD Instance Peer.";
109 description "Local Instance Peer";
114 typedef mirror-information-code {
127 "Common marker for all BMP TLVs.";
130 grouping string-tlv {
131 container string-tlv {
137 "Type = 0: String. The Information field contains a free-form
138 UTF-8 string whose length is given by the Information Length
139 field. Inclusion of this TLV is optional.
140 Multiple String TLVs MAY be included in the message.";
144 grouping description-tlv {
145 container description-tlv {
152 "Type = 1: sysDescr. The Information field contains an ASCII
153 string whose value MUST be set to be equal to the value of the
154 sysDescr MIB-II [RFC1213] object. Inclusion of this TLV is
167 "Type = 2: sysName. The Information field contains a ASCII
168 string whose value MUST be set to be equal to the value of the
169 sysName MIB-II [RFC1213] object. Inclusion of this TLV is
174 grouping string-informations {
175 list string-information {
180 grouping initiation-tlvs {
181 uses string-informations;
182 uses description-tlv;
185 "TLVs containing information about the monitored router";
188 grouping reason-tlv {
189 container reason-tlv {
196 "Type = 1: Reason. The Information field contains a two-byte
197 code indicating the reason the connection was terminated. Some
198 reasons may have further TLVs associated with them. Inclusion
199 of this TLV is not optional.";
203 grouping termination-tlvs {
204 uses string-informations;
207 "TLVs containing information about the reason for the
211 grouping mirror-information-tlv {
212 container mirror-information-tlv {
215 type mirror-information-code;
218 "Type = 1: Information. A two-byte code that provides information
219 about the mirrored message or message stream.";
223 grouping mirror-pdu-tlvs {
224 container pdu-update-tlv {
226 uses bgp-msg:update-message;
228 container pdu-open-tlv {
230 uses bgp-msg:open-message;
233 "BGP Message. A BGP PDU. This PDU may or may not be an
234 Update message. If the BGP Message TLV occurs in the Route
235 Mirroring message, it MUST occur last in the list of TLVs.";
238 grouping mirror-tlvs {
239 uses mirror-information-tlv;
240 uses mirror-pdu-tlvs;
263 grouping afi-safi-gauge-tlv {
265 uses bgp-mp:bgp-table-type;
272 container rejected-prefixes-tlv {
275 "Stat Type = 0: (32-bit Counter) Number of prefixes rejected by
278 container duplicate-prefix-advertisements-tlv {
281 "Stat Type = 1: (32-bit Counter) Number of (known) duplicate prefix
284 container duplicate-withdraws-tlv {
287 "Stat Type = 2: (32-bit Counter) Number of (known) duplicate
290 container invalidated-cluster-list-loop-tlv {
293 "Stat Type = 3: (32-bit Counter) Number of updates invalidated due
294 to CLUSTER_LIST loop.";
296 container invalidated-as-path-loop-tlv {
299 "Stat Type = 4: (32-bit Counter) Number of updates invalidated due
302 container invalidated-originator-id-tlv {
305 "Stat Type = 5: (32-bit Counter) Number of updates invalidated due
308 container invalidated-as-confed-loop-tlv {
311 "Stat Type = 6: (32-bit Counter) Number of updates invalidated due
314 container adj-ribs-in-routes-tlv {
317 "Stat Type = 7: (64-bit Gauge) Number of routes in Adj-RIBs-In.";
319 container loc-rib-routes-tlv {
322 "Stat Type = 8: (64-bit Gauge) Number of routes in Loc-RIB.";
325 "Each counter is encoded as a TLV.";
326 container per-afi-safi-adj-rib-in-tlv {
327 uses afi-safi-gauge-tlv;
329 "Stat Type = 9: Number of routes in per-AFI/SAFI Adj-RIB-In. The
330 value is structured as: AFI (2 bytes), SAFI (1 byte), followed by
333 container per-afi-safi-loc-rib-tlv {
334 uses afi-safi-gauge-tlv;
336 "Stat Type = 10: Number of routes in per-AFI/SAFI Loc-RIB. The
337 value is structured as: AFI (2 bytes), SAFI (1 byte), followed by
340 container updates-treated-as-withdraw-tlv {
343 "Stat Type = 11: (32-bit Counter) Number of updates subjected to
344 treat-as-withdraw treatment. ";
346 container prefixes-treated-as-withdraw-tlv {
349 "Stat Type = 12: (32-bit Counter) Number of prefixes subjected to
350 treat-as-withdraw treatment. ";
352 container duplicate-updates-tlv {
355 "Stat Type = 13: (32-bit Counter) Number of duplicate update
356 messages received. ";
365 "Timestamp with seconds precision.";
367 leaf timestamp-micro {
371 "Timestamp with microseconds precision.";
374 "The time when the encapsulated routes were received
375 (one may also think of this as the time when they were installed
376 in the Adj-RIB-In), expressed in seconds and microseconds since
377 midnight (zero hour), January 1, 1970 (UTC). If zero, the time is
378 unavailable. Precision of the timestamp is implementation-
387 leaf peer-distinguisher {
389 type bgp-t:route-distinguisher;
395 "This field is present to distinguish peers that
396 belong to one address domain from the other.";
399 type inet:ip-address-no-zone;
402 "The remote IP address associated with the TCP
403 session over which the encapsulated PDU was received. It is 4
404 bytes long if an IPv4 address is carried in this field (with most
405 significant bytes zero filled) and 16 bytes long if an IPv6
406 address is carried in this field.";
412 "The Autonomous System number of the peer from which the
413 encapsulated PDU was received. If a 16 bit AS number is stored in
414 this field [RFC4893], it should be padded with zeroes in the most
418 type inet:ipv4-address-no-zone;
421 "The BGP Identifier of the peer from which the
422 encapsulated PDU was received.";
426 grouping peer-header {
427 container peer-header {
430 leaf adj-rib-in-type {
431 type adj-rib-in-type;
438 "Indicates if peer's address is IPv4. If set to false address is IPv6.";
442 "The per-peer header follows the common header for most BMP messages.
443 The rest of the data in a BMP message is dependent on the Message
444 Type field in the common header.";
446 "https://tools.ietf.org/html/rfc7854#section-4.2";
456 uses bgp-msg:open-message {
457 augment "bgp-parameters/optional-capabilities/c-parameters" {
458 uses bgp-mp:mp-capabilities;
465 type inet:ip-address-no-zone;
468 "The local IP address associated with the peering
472 type inet:port-number;
475 "The local port number associated with the peering TCP
479 type inet:port-number;
482 "The remote port number associated with the peering
485 container sent-open {
488 "The full OPEN message transmitted by the
489 monitored router to its peer.";
491 container received-open {
494 "The full OPEN message received by the
495 monitored router from its peer.";
497 container information {
498 uses string-informations;
503 leaf local-system-closed {
507 "If set true, the local system closed the session.
508 Otherwise the remote system closed the session.";
511 container notification {
512 uses bgp-msg:notify-message;
514 "BGP PDU containing the BGP
515 NOTIFICATION message as received from the peer.";
517 leaf fsm-event-code {
521 "Containing the code corresponding to the FSM Event which caused
522 the system to close the session.
523 Two bytes both set to zero are used to indicate that no relevant
524 Event code is defined.";
529 grouping initiation {
531 uses initiation-tlvs;
535 grouping termination {
537 uses termination-tlvs;
541 notification initiation-message {
544 "The initiation message provides a means for the monitored router to
545 inform the monitoring station of its vendor, software version, and so on.";
547 "https://tools.ietf.org/html/rfc7854#section-4.3";
550 notification termination-message {
553 "The termination message provides a way for a monitored router to
554 indicate why it is terminating a session.";
556 "https://tools.ietf.org/html/rfc7854#section-4.5";
559 notification route-monitoring-message {
562 uses bgp-msg:update-message;
565 "Route Monitoring messages are used for initial synchronization of
566 ADJ-RIBs-In. They are also used for ongoing monitoring of received
567 advertisements and withdraws.";
569 "https://tools.ietf.org/html/rfc7854#section-4.6";
572 notification route-mirroring-message {
576 "Route Mirroring messages are used for verbatim duplication of
577 messages as received.";
579 "https://tools.ietf.org/html/rfc7854#section-4.7";
582 notification stats-reports-message {
586 "These messages contain information that could be used by the
587 monitoring station to observe interesting events that occur on the
590 "https://tools.ietf.org/html/rfc7854#section-4.8";
593 notification peer-down-notification {
597 "This message is used to indicate that a peering session was
600 "https://tools.ietf.org/html/rfc7854#section-4.9";
603 notification peer-up-notification {
607 "The Peer Up message is used to indicate that a peering session has
608 come up (i.e., has transitioned into ESTABLISHED state).";
610 "https://tools.ietf.org/html/rfc7854#section-4.10";