3 namespace "urn:opendaylight:params:xml:ns:yang:bmp-message";
6 import bgp-message { prefix bgp-msg; revision-date 2018-03-29; }
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 2018-03-29; }
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";
29 revision "2018-03-29" {
30 description "Add support for add-path for all afi/safi.";
33 revision "2017-12-07" {
34 description "Add support for add-path in base BGP NLRI.";
37 revision "2015-05-12" {
44 enum administratively-closed {
47 "Session administratively closed.";
52 "Unspecified reason.";
54 enum out-of-resources {
57 "Out of resources. The router has exhausted
58 resources available for the BMP session.";
60 enum redundant-connection {
63 "Redundant connection. The router has determined
64 that this connection is redundant with another one.";
66 enum permanently-closed {
69 "Session permanently administratively closed,
70 will not be re-initiated. Monitoring station should reduce
71 (potentially to 0) the rate at which it attempts
72 reconnection to the monitored router.";
77 typedef adj-rib-in-type {
87 "If set to 1, indicates that the message reflects
88 the post-policy Adj-RIB-In (i.e., it reflects the application
89 of inbound policy). It is set to 0 if the message reflects the
90 pre-policy Adj-RIB-In.";
97 description "Global Instance Peer.";
101 description "RD Instance Peer.";
105 description "Local Instance Peer";
110 typedef mirror-information-code {
123 "Common marker for all BMP TLVs.";
126 grouping string-tlv {
127 container string-tlv {
133 "Type = 0: String. The Information field contains a free-form
134 UTF-8 string whose length is given by the Information Length
135 field. Inclusion of this TLV is optional.
136 Multiple String TLVs MAY be included in the message.";
140 grouping description-tlv {
141 container description-tlv {
148 "Type = 1: sysDescr. The Information field contains an ASCII
149 string whose value MUST be set to be equal to the value of the
150 sysDescr MIB-II [RFC1213] object. Inclusion of this TLV is
163 "Type = 2: sysName. The Information field contains a ASCII
164 string whose value MUST be set to be equal to the value of the
165 sysName MIB-II [RFC1213] object. Inclusion of this TLV is
170 grouping string-informations {
171 list string-information {
176 grouping initiation-tlvs {
177 uses string-informations;
178 uses description-tlv;
181 "TLVs containing information about the monitored router";
184 grouping reason-tlv {
185 container reason-tlv {
192 "Type = 1: Reason. The Information field contains a two-byte
193 code indicating the reason the connection was terminated. Some
194 reasons may have further TLVs associated with them. Inclusion
195 of this TLV is not optional.";
199 grouping termination-tlvs {
200 uses string-informations;
203 "TLVs containing information about the reason for the
207 grouping mirror-information-tlv {
208 container mirror-information-tlv {
211 type mirror-information-code;
214 "Type = 1: Information. A two-byte code that provides information
215 about the mirrored message or message stream.";
219 grouping mirror-pdu-tlvs {
220 container pdu-update-tlv {
222 uses bgp-msg:update-message;
224 container pdu-open-tlv {
226 uses bgp-msg:open-message;
229 "BGP Message. A BGP PDU. This PDU may or may not be an
230 Update message. If the BGP Message TLV occurs in the Route
231 Mirroring message, it MUST occur last in the list of TLVs.";
234 grouping mirror-tlvs {
235 uses mirror-information-tlv;
236 uses mirror-pdu-tlvs;
259 grouping afi-safi-gauge-tlv {
261 uses bgp-mp:bgp-table-type;
268 container rejected-prefixes-tlv {
271 "Stat Type = 0: (32-bit Counter) Number of prefixes rejected by
274 container duplicate-prefix-advertisements-tlv {
277 "Stat Type = 1: (32-bit Counter) Number of (known) duplicate prefix
280 container duplicate-withdraws-tlv {
283 "Stat Type = 2: (32-bit Counter) Number of (known) duplicate
286 container invalidated-cluster-list-loop-tlv {
289 "Stat Type = 3: (32-bit Counter) Number of updates invalidated due
290 to CLUSTER_LIST loop.";
292 container invalidated-as-path-loop-tlv {
295 "Stat Type = 4: (32-bit Counter) Number of updates invalidated due
298 container invalidated-originator-id-tlv {
301 "Stat Type = 5: (32-bit Counter) Number of updates invalidated due
304 container invalidated-as-confed-loop-tlv {
307 "Stat Type = 6: (32-bit Counter) Number of updates invalidated due
310 container adj-ribs-in-routes-tlv {
313 "Stat Type = 7: (64-bit Gauge) Number of routes in Adj-RIBs-In.";
315 container loc-rib-routes-tlv {
318 "Stat Type = 8: (64-bit Gauge) Number of routes in Loc-RIB.";
321 "Each counter is encoded as a TLV.";
322 container per-afi-safi-adj-rib-in-tlv {
323 uses afi-safi-gauge-tlv;
325 "Stat Type = 9: Number of routes in per-AFI/SAFI Adj-RIB-In. The
326 value is structured as: AFI (2 bytes), SAFI (1 byte), followed by
329 container per-afi-safi-loc-rib-tlv {
330 uses afi-safi-gauge-tlv;
332 "Stat Type = 10: Number of routes in per-AFI/SAFI Loc-RIB. The
333 value is structured as: AFI (2 bytes), SAFI (1 byte), followed by
336 container updates-treated-as-withdraw-tlv {
339 "Stat Type = 11: (32-bit Counter) Number of updates subjected to
340 treat-as-withdraw treatment. ";
342 container prefixes-treated-as-withdraw-tlv {
345 "Stat Type = 12: (32-bit Counter) Number of prefixes subjected to
346 treat-as-withdraw treatment. ";
348 container duplicate-updates-tlv {
351 "Stat Type = 13: (32-bit Counter) Number of duplicate update
352 messages received. ";
361 "Timestamp with seconds precision.";
363 leaf timestamp-micro {
367 "Timestamp with microseconds precision.";
370 "The time when the encapsulated routes were received
371 (one may also think of this as the time when they were installed
372 in the Adj-RIB-In), expressed in seconds and microseconds since
373 midnight (zero hour), January 1, 1970 (UTC). If zero, the time is
374 unavailable. Precision of the timestamp is implementation-
383 leaf peer-distinguisher {
385 type bgp-t:route-distinguisher;
391 "This field is present to distinguish peers that
392 belong to one address domain from the other.";
395 type inet:ip-address;
398 "The remote IP address associated with the TCP
399 session over which the encapsulated PDU was received. It is 4
400 bytes long if an IPv4 address is carried in this field (with most
401 significant bytes zero filled) and 16 bytes long if an IPv6
402 address is carried in this field.";
408 "The Autonomous System number of the peer from which the
409 encapsulated PDU was received. If a 16 bit AS number is stored in
410 this field [RFC4893], it should be padded with zeroes in the most
414 type inet:ipv4-address;
417 "The BGP Identifier of the peer from which the
418 encapsulated PDU was received.";
422 grouping peer-header {
423 container peer-header {
426 leaf adj-rib-in-type {
427 type adj-rib-in-type;
434 "Indicates if peer's address is IPv4. If set to false address is IPv6.";
438 "The per-peer header follows the common header for most BMP messages.
439 The rest of the data in a BMP message is dependent on the Message
440 Type field in the common header.";
442 "https://tools.ietf.org/html/rfc7854#section-4.2";
452 uses bgp-msg:open-message {
453 augment "bgp-parameters/optional-capabilities/c-parameters" {
454 uses bgp-mp:mp-capabilities;
461 type inet:ip-address;
464 "The local IP address associated with the peering
468 type inet:port-number;
471 "The local port number associated with the peering TCP
475 type inet:port-number;
478 "The remote port number associated with the peering
481 container sent-open {
484 "The full OPEN message transmitted by the
485 monitored router to its peer.";
487 container received-open {
490 "The full OPEN message received by the
491 monitored router from its peer.";
493 container information {
494 uses string-informations;
499 leaf local-system-closed {
503 "If set true, the local system closed the session.
504 Otherwise the remote system closed the session.";
507 container notification {
508 uses bgp-msg:notify-message;
510 "BGP PDU containing the BGP
511 NOTIFICATION message as received from the peer.";
513 leaf fsm-event-code {
517 "Containing the code corresponding to the FSM Event which caused
518 the system to close the session.
519 Two bytes both set to zero are used to indicate that no relevant
520 Event code is defined.";
525 grouping initiation {
527 uses initiation-tlvs;
531 grouping termination {
533 uses termination-tlvs;
537 notification initiation-message {
540 "The initiation message provides a means for the monitored router to
541 inform the monitoring station of its vendor, software version, and so on.";
543 "https://tools.ietf.org/html/rfc7854#section-4.3";
546 notification termination-message {
549 "The termination message provides a way for a monitored router to
550 indicate why it is terminating a session.";
552 "https://tools.ietf.org/html/rfc7854#section-4.5";
555 notification route-monitoring-message {
558 uses bgp-msg:update-message;
561 "Route Monitoring messages are used for initial synchronization of
562 ADJ-RIBs-In. They are also used for ongoing monitoring of received
563 advertisements and withdraws.";
565 "https://tools.ietf.org/html/rfc7854#section-4.6";
568 notification route-mirroring-message {
572 "Route Mirroring messages are used for verbatim duplication of
573 messages as received.";
575 "https://tools.ietf.org/html/rfc7854#section-4.7";
578 notification stats-reports-message {
582 "These messages contain information that could be used by the
583 monitoring station to observe interesting events that occur on the
586 "https://tools.ietf.org/html/rfc7854#section-4.8";
589 notification peer-down-notification {
593 "This message is used to indicate that a peering session was
596 "https://tools.ietf.org/html/rfc7854#section-4.9";
599 notification peer-up-notification {
603 "The Peer Up message is used to indicate that a peering session has
604 come up (i.e., has transitioned into ESTABLISHED state).";
606 "https://tools.ietf.org/html/rfc7854#section-4.10";