﻿<?xml version="1.0" encoding="UTF-8"?>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" ipr="trust200902" docName="draft-ietf-grow-bmp-yang-05" submissionType="IETF">
  <front>
    <title abbrev="BMP YANG Module">BMP YANG Module</title>
    <author fullname="Camilo Cardona" initials="C" surname="Cardona ">
      <organization>NTT</organization>
      <address>
        <postal>
          <street>164-168, Carrer de Numancia</street>
          <city>Barcelona</city>
          <code>08029</code>
          <country>Spain</country>
        </postal>
        <email>camilo@ntt.net</email>
      </address>
    </author>
    <author fullname="Paolo Lucente" initials="P." surname="Lucente">
      <organization>NTT</organization>
      <address>
        <postal>
          <street>Siriusdreef 70-72</street>
          <city>Hoofddorp</city>
          <code>2132</code>
          <country>Netherlands</country>
        </postal>
        <email>paolo@ntt.net</email>
      </address>
    </author>
    <author fullname="Thomas Graf" initials="T." surname="Graf">
      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zurich 8045</city>
          <country>Switzerland</country>
        </postal>
        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>
    <author fullname="Benoit Claise" initials="B" surname="Claise">
      <organization>Huawei</organization>
      <address>
        <email>benoit.claise@huawei.com</email>
      </address>
    </author>
    <author fullname="Dhananjay Patki" initials="D" surname="Patki">
      <organization>Cisco</organization>
      <address>
        <postal>
          <street>Cessna Business Park SEZ, Kadubeesanahalli</street>
          <city>Bangalore</city>
          <country>India</country>
        </postal>
        <email>dhpatki@cisco.com</email>
      </address>
    </author>
    <author fullname="Prasad S. Narasimha" initials="P" surname="Narasimha">
      <organization>Cisco</organization>
      <address>
        <postal>
          <street>Cessna Business Park SEZ, Kadubeesanahalli</street>
          <city>Bangalore</city>
          <country>India</country>
        </postal>
        <email>snprasad@cisco.com</email>
      </address>
    </author>
    <date/>
    <area>OPS</area>
    <workgroup>GROW</workgroup>
    <abstract>
      <t> 
        This document proposes a YANG module for the configuration and monitoring of the BGP Monitoring Protocol (BMP).
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
        <t>
            The BGP Monitoring Protocol (BMP) provides a mechanism for
            monitoring BGP sessions.  This document defines a YANG data model
            for BMP, enabling operators to configure and manage BMP sessions;
            control the data exported to monitoring stations; and 
            collect statistics for each BMP session.
            The model is designed to
            accommodate both simple and advanced deployment scenarios,
            supporting granular control over network instances, RIBs, address
            families, and peers.
        </t>
    </section>
    <section title="Terminology" anchor="terminology">
      <t>
         The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
         NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
         "MAY", and "OPTIONAL" in this document are to be interpreted as
         described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
         when, and only when, they appear in all capitals, as shown here.
      </t>
      <t>
           Routing Information Bases, peers, monitoring stations, and
           initiation messages are defined in <xref target="RFC7854"/>.
      </t>
    </section>
    <section title="Model description" anchor="model_description">
      <t>
              This document specifies a YANG module for configuring and
          monitoring the BGP Monitoring Protocol (BMP)  <xref
              target="RFC7854"/> on the monitored router.  The model provides
              parameters for configuring the session to BMP monitoring
              stations; configuration of BMP messages; provides operational
              metrics and enables resetting of BMP monitoring sessions.
       </t>
      <t>The model is included in <xref target="model-content"/>. In this
           section, we provide details and examples of each of its parts.</t>
      <t>The BMP yang model is placed at the root of the YANG tree.  At its
           upper level, the BMP model lists each monitoring station. Every
           monitoring station is identified by an ID, which is a string
           provided by the operator.</t>
      <section title="IP Connectivity" anchor="ip_connectivitu">
        <t> BMP allows for active and passive
            connections between the router and the BMP monitoring station as described in  <xref target="RFC7854" section="3.2" sectionFormat="of"/>. In
            an active connection, the router establishes the TCP connection to
            the monitoring station, while in a passive one, it is the monitoring
            station which initiates the connection. The BMP YANG module
            provides options for both types of connection using a choice.</t>
        <t>We describe each type of connection option next, and provide
            examples of their configuration.</t>
        <section title="Active connection">
          <t>For an active connection, the IP address and port of the monitoring
          station, together with the local endpoint must be provided. The local
            endpoint can be a local IP address or a source interface. One can
            optionally provide the local port for establishing the connection.
            If the monitoring station is connected over a network-instance
            instead of the global one, this one must also be specified. An
            example of configuration is included in <xref target="active_connection_option"/>.</t>
          <figure anchor="active_connection_option">
            <name>Active connection example</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>1</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
          </figure>
          <t>Note in the example from  <xref target="active_connection_option"/>
                that there is no network instance defined, so the connection is
                using the global network instance.</t>
        </section>
        <section title="Passive connection">
          <t>In a passive connection, the IP of the monitoring station, the local endpoint and local port
            for the incoming connection must be specified. If the port of the
            monitoring station is provided, it must match the incoming
            connection. If the monitoring station is connected through a
            network-instance instead of the global one, this one must also be
            specified.</t>
          <t>An incoming connection not matching a valid entry MUST be ignored by
            the router.</t>
          <t><xref target="passive_connection_option"/> includes an example of
            configuring a passive connection. In this example, we specify the
            network-instance where we want to receive the connection.</t>
          <figure anchor="passive_connection_option">
            <name>Passive connection example</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_two</id>
      <connection>
        <passive>
          <network-instance>test</network-instance>
          <station-address>192.0.2.1</station-address>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
          <monitored-router-port>57993</monitored-router-port>
        </passive>
      </connection>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
          </figure>
        </section>
      </section>
      <section title="TCP Options" anchor="tcp_options">
        <t>The BMP module allows tuning various parameters of the TCP
            connection supporting the BMP session:</t>
        <t>
          <ul spacing="compact">
            <li>The maximum segment size of the TCP connection. See  <xref target="RFC9293" section="3.7.1" sectionFormat="of"/>.</li>
            <li>Enabling MTU discovery for the path. See <xref target="RFC9293" section="3.7.2" sectionFormat="of"/>.</li>
            <li>For configuring TCP keepalives, the connection container uses the tcp-common-grouping from <xref target="I-D.ietf-netconf-tcp-client-server"/>. Note that the implementation must support module ietf-bmp-tcp-dependencies in addition to the main module to support these elements.  Please see <xref target="I-D.ietf-netconf-tcp-client-server" section="2.1.3.1" sectionFormat="of"/> for the explanation of each of its parameters. The device must have the feature "tcp-client-keepalives" enabled. See also <xref target="RFC9293" section="3.8.4" sectionFormat="of"/></li>
            <li>Session security. Provides options for authentication using AO and MD5. This part of the model was taken from the BGP YANG model <xref target="I-D.ietf-idr-bgp-model"/>. This feature also requires support of the ietf-bmp-tcp-dependencies module.</li>
          </ul>
        </t>
        <t>Figures <xref target="tcp_example1" format="counter"/> and <xref target="tcp_example2" format="counter"/> include examples configuring the previous TCP parameters in the model.</t>
        <t>
          <figure anchor="tcp_example1">
            <name>Example of configuring basic TCP parameters</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>1</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
        <tcp-options>
          <keepalives xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp-tc\
p-dependencies">
            <idle-time>15</idle-time>
            <max-probes>3</max-probes>
            <probe-interval>30</probe-interval>
          </keepalives>
          <maximum-segment-size>1500</maximum-segment-size>
          <mtu-discovery>true</mtu-discovery>
        </tcp-options>
      </connection>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
          </figure>
        </t>
        <t>
          <figure anchor="tcp_example2">
            <name>Example of the Configuration of TCP session security.</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

  <key-chains xmlns="urn:ietf:params:xml:ns:yang:ietf-key-chain">
    <key-chain>
      <name>bmp-key-chain</name>
      <description>An example of TCP-AO configuration for BMP</descr\
iption>
      <key>
        <key-id>55</key-id>
        <crypto-algorithm>aes-cmac-prf-128</crypto-algorithm>
        <lifetime>
          <send-lifetime>
            <start-date-time>2023-01-01T00:00:00+00:00</start-date-t\
ime>
            <end-date-time>2023-02-01T00:00:00+00:00</end-date-time>
          </send-lifetime>
          <accept-lifetime>
            <start-date-time>2023-01-01T00:00:00+00:00</start-date-t\
ime>
            <end-date-time>2023-02-01T00:00:00+00:00</end-date-time>
          </accept-lifetime>
        </lifetime>
        <key-string>
          <keystring>teststring</keystring>
        </key-string>
        <authentication xmlns="urn:ietf:params:xml:ns:yang:ietf-tcp">
          <keychain>bmp-key-chain</keychain>
          <ao>
            <send-id>65</send-id>
            <recv-id>87</recv-id>
          </ao>
        </authentication>
      </key>
      <key>
        <key-id>56</key-id>
        <crypto-algorithm>aes-cmac-prf-128</crypto-algorithm>
        <lifetime>
          <send-lifetime>
            <start-date-time>2023-01-01T00:00:00+00:00</start-date-t\
ime>
            <end-date-time>2023-02-01T00:00:00+00:00</end-date-time>
          </send-lifetime>
          <accept-lifetime>
            <start-date-time>2023-01-01T00:00:00+00:00</start-date-t\
ime>
            <end-date-time>2023-02-01T00:00:00+00:00</end-date-time>
          </accept-lifetime>
        </lifetime>
        <authentication xmlns="urn:ietf:params:xml:ns:yang:ietf-tcp">
          <keychain>bmp-key-chain</keychain>
          <ao>
            <send-id>65</send-id>
            <recv-id>87</recv-id>
          </ao>
        </authentication>
      </key>
    </key-chain>
  </key-chains>
  <bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
    <bmp-monitoring-stations>
      <bmp-monitoring-station>
        <id>monitoring_station_one</id>
        <connection>
          <active>
            <station-address>192.0.2.1</station-address>
            <station-port>57992</station-port>
            <monitored-router-address>192.0.2.2</monitored-router-ad\
dress>
          </active>
          <tcp-options>
            <secure-session xmlns="urn:ietf:params:xml:ns:yang:ietf-\
bmp-tcp-dependencies">
              <ao-keychain>bmp-key-chain</ao-keychain>
            </secure-session>
          </tcp-options>
        </connection>
      </bmp-monitoring-station>
    </bmp-monitoring-stations>
  </bmp>
           ]]></sourcecode>
          </figure>
        </t>
      </section>
      <section title="Other BMP connectivity options">
        <t>The model also includes the following options to configure the connection to the BMP monitoring station:</t>
        <t>
          <ul spacing="compact">
            <li>Initial-delay: a value in seconds that the device must wait before starting the connection to the station. An operator can use this delay to let BGP converge before starting the BMP session.</li>
            <li>Backoff time: Configuration of the backoff time strategy after failing to connect to the monitoring station. The model includes a basic exponential backoff with a default initial backoff of 30 seconds and a maximum of 720 seconds, as suggested in <xref target="RFC7854" section="3.2" sectionFormat="of"/>.</li>
          </ul>
        </t>
        <t>In the example in <xref target="example_indelay"/>, we configure an initial-delay of 10, an initial-backoff of 50 seconds and 600 of maximum-backoff.</t>
        <t>
          <figure anchor="example_indelay">
            <name>Example of the initial-delay and simple exponential backoff.</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>1</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
        <initial-delay>10</initial-delay>
        <backoff>
          <simple-exponential>
            <initial-backoff>50</initial-backoff>
            <maximum-backoff>600</maximum-backoff>
          </simple-exponential>
        </backoff>
      </connection>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
          </figure>
        </t>
      </section>
      <section title="BMP data">
        <t>The bmp-data container defines the configuration parameters for the data that the device sends to the monitoring station using BMP messages. See <xref target="RFC7854" section="4" sectionFormat="of"/>.</t>
        <t>The BMP model defines options for the initiation message, the statistics report, the route mirroring, and the route monitoring. The first three have simple configuration options and are described next. Route monitoring is the most complex and is detailed in <xref target="route_monitoring"/>.</t>
        <t>
          <ul spacing="compact">
            <li>Initiation-message: Content for an information TLV type-0 for identification of the device. See <xref target="RFC7854" section="4.3" sectionFormat="bare"/> and <xref target="RFC7854" section="4.4" sectionFormat="of"/></li>
            <li>Statistics-interval: The statistics report is enabled by the presence of the bmp-statistics-report container. The statistics-interval is mandatory if the bmp-statistics-report container exists and defines the interval of the statistics report. See <xref target="RFC7854" section="4.8" sectionFormat="of"/>.</li>
            <li>Route-mirroring: Route Mirroring messages serve as an exact replica of the messages received by the device. See <xref target="RFC7854" section="6" sectionFormat="of"/>. Enabling route mirroring messages towards a particular BMP monitoring station only requires the presence of the container "bmp-route-mirroing" within the monitoring station container.</li>
          </ul>
        </t>
        <t>An example of configuring the previous options is included in <xref target="example_init_msg"/></t>
        <t>
          <figure anchor="example_init_msg">
            <name>Example of configuration of initiation-message and statistics report interval.</name>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <initiation-message>BMP device supporting the BMP yang modul\
e</initiation-message>
        <bmp-statistics-report>
          <statistics-interval>600</statistics-interval>
        </bmp-statistics-report>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
          </figure>
        </t>
        <section title="BMP route monitoring" anchor="route_monitoring">
          <t>Route monitoring messages are used for synchronization of RIBs to the monitoring station. See <xref target="RFC7854" section="5" sectionFormat="of"/>.</t>
          <t>The next 3 requirements were defined before designing this part of the model.</t>
          <t>
            <ul spacing="compact">
              <li>Operators might not want to receive all routes from all RIBs in a network device. For instance, some devices contain a considerable amount of data that might overwhelm the monitoring station. In these cases, operators might want to only collect information from an arbitrary subset of RIBs, address families, peers.</li>
              <li>Operators might want to configure the route monitoring messages for different network instances differently. For example, they might want to receive different address families from the global network instance than in L3 VPN network instances. </li>
              <li>In contrast to the previous points. some operators might want a simple configuration that covers multiple cases (e.g. same config for all peers, or same config for all network instances).  This would not only make configurations look smaller and concise, but will reduce the need for reconfiguring devices when you add a new peer or add a new network instance (which happens frequently on some type of networks). </li>
            </ul>
          </t>
          <t>Based on the previous points, the BMP yang model is designed to flexibly control the data sent through the BMP route monitoring packets, yet it provides options to facilitate configurations for simple cases, such as when the operator wants to receive all routes from a RIB.</t>
          <t>The Routing monitoring configuration is divided in a 4 part hierarchy:</t>
          <t>
            <ul spacing="compact">
              <li>Network Instance </li>
              <li>RIB Type (e.g. Adj-RIB-IN pre/post, local RIB)</li>
              <li>Address Family </li>
              <li>Peers</li>
            </ul>
          </t>
          <t>Absence of the routing monitoring container will disable the routing monitoring messages to the monitoring station.</t>
          <t>We'll offer an introduction to these hierarchies before going over them with detail.</t>
          <t>The number of RIB types (e.g. Adj-RIB-IN/OUT, local RIB, etc) and Address families is low, and their configuration should not change frequently. Therefore, they are configured explicitly in the model. That is, the model does not provide a way of providing a default configuration for these or configuring them in groups.</t>
          <t>On the other hand, Network instances and peers require greater flexibility.</t>
          <t>For network instances, the model should configure not only the "global" network instance, but also other network instances. Also, network instances can change frequently in networks with customer connecting to Virtual Private Networks. To not force operators to change configuration at every change, the model provides methods for  defining a "default" configuration for network instances. However, to provide control over the configuration, each network instance can be configured independently, if needed.</t>
          <t>A situation is similar with peers for the Adj-RIB-IN and Adj-RIB-OUT RIBs. The model includes a way of configuring a default for all peers for simple cases, but one can provide configuration for type of peers, peergroups,  or each peer individually. </t>
          <t>We summarize the requirements stated on the previous two paragraphs next:</t>
          <t>For network instances:</t>
          <t>
            <ul spacing="compact">
              <li>The configuration should be simple for cases where only the "global" routing instance is enabled.</li>
              <li>The model should  provide ways of configuring all Network instances (kind of a default config for any Network instance that is configured in the device).</li>
              <li>The model should provide a way of configuring network instances individually.</li>
            </ul>
          </t>
          <t>For peers:</t>
          <t>
            <ul spacing="compact">
              <li>The model should provide ways of configuring all peers, kind of a default. This would be the most common case.</li>
              <li>The model should provide ways of configuring peergroups.</li>
              <li>The model should provide ways of configuring type of peers. For instance, only send routes from eBGP peers.</li>
              <li>The model should provide ways of configuring individual peers. For instance, turn a route-policy filtering prefix for a specific peer, or turning off a peer that is noisy yet not important.</li>
            </ul>
          </t>
          <t>To further control the route monitoring data, the peer container includes a route-policy option in which the operator can further filter the data send to the BMP monitoring station.</t>
          <t>We'll describe each of the 4 hierarchies, and provide examples for each, in the next sections.</t>
          <section title="Network instances">
            <t>The route monitoring configuration starts with the configuration of network instances. A network instance can be configured individually, or it can be configured if it matches any of the selectors from the "bmp-ni-types" identity. We explain each next.</t>
            <t>The model currently defines two bmp-ni-types identities: "bmp-ni-types-all-ni" which selects all network instances, and "bmp-ni-types-non-global-ni" which selects all network instances except the global one. The former can be used as a "default" configuration for simple cases.</t>
            <t>The model offers two ways of configuring a network-instance individually. The main one is under container "bmp-data/bmp-monitoring-stations/" under the "routing/control-plane-protocols/control-plane-protocol/bgp". The second one is specifying the name under the "bmp/bmp-route-monitoring/network-instance". The former one requires the support of schema-mount and the ietf-bmp-bgp-dependencies.yang module (which is optional). The latter does not require support for schema-mount by the device.</t>
            <t>An empty configuration disables routing monitoring messages for the selected network-instances. Operators can also use the "enable" leaf to disable explicitly the routing messages for the network instance. </t>
            <t>The route-monitoring data for a network instance can be configured by at most one element under the network-instance-configuration container.  There SHOULD  be clear rules for which element to apply to a network instance in case multiple elements can select it. We provide rules and examples in the next part of the section.</t>
            <t>The rules for selecting which element configures a network instance are presented next. Each point is evaluated only if the previous points do not hold.</t>
            <t>
              <ul spacing="compact">
                <li>If the BGP container under the network-instance includes a BMP/Route monitoring container, it SHOULD be configured by it. Note that if the monitoring-station is not present in the container, the route monitoring will be disabled for this network instance.</li>
                <li>If the name of the network instance is referenced in "network-instance-configuration/network-instances/network-instance", the network instance SHOULD be configured using this element.</li>
                <li>If the selector 'bmp-ni-types-global-ni' under the "network-instance-configuration/network-instance-selectors" exist, the global network instance SHOULD be configured using this element. Note that if a vendor has a name for the global network instance, the previous step (i.e, network instance name) will take priority over using the bmp-ni-types-global-ni selector.</li>
                <li>If the selector 'bmp-ni-types-non-global-ni' under the "network-instance-configuration/network-instance-selectors" exist, any non-global network instance should be configured using its content.</li>
                <li>Any Network instance not referenced by any rule above SHOULD be configured using the bmp-ni-types-all-ni if one exists. If it does not exist, then the network instance is not configured (and therefore no route monitoring messages from the network instance are sent to the monitoring station).</li>
              </ul>
            </t>
            <t>Any extension of the bmp-ni-types SHOULD provide explanations of how to deal with case in which multiple elements select the same network instance. </t>
            <t>We provide examples of configuring the network instance level next. For now, we will focus on the configuration using the BMP container (not the configuration under the BGP container).  To focus on the network instance configuration, we mask the configuration under each instance using "Configuration X". </t>
            <t>
              <figure anchor="example_netins_one">
                <name>Examples of configuring the network instance level for Route Monitoring.</name>
                <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <!-- Configuration A -->
              </network-instance-selector>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-global-ni\
</network-instance-selector-id>
                <!-- Configuration B -->
              </network-instance-selector>
            </network-instance-selectors>
            <network-instances>
              <network-instance>
                <network-instance-id>network-instance-two</network-i\
nstance-id>
                <!-- Configuration C -->
              </network-instance>
              <network-instance>
                <network-instance-id>network-instance-one</network-i\
nstance-id>
                <enabled>false</enabled>
              </network-instance>
            </network-instances>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
              </figure>
            </t>
            <t>In example from <xref target="example_netins_one"/>, we have a "default" configuration (Configuration A) applied to any network instance without any explicit configuration. The global network instance and network-instance-two get Configuration B and Configuration C, respectively. The network-instance-one instance container disables the routing monitoring messages for that network instance.</t>
            <t>
              <figure anchor="simple_ni_configuration">
                <name>Example of configuring all network instances.</name>
                <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <!-- Configuration D -->
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
              </figure>
            </t>
            <t>The example in <xref target="simple_ni_configuration"/> shows a "simple" configuration. In this case, all network instances would get "Configuration D". Note that `bmp-ni-types-all-ni` would also cover the global instance.</t>
            <t>Another simple configuration would just involve configuring the global network instance. In this case, information of non-global network instances would not be sent to the monitoring station. This is depicted in <xref target="simple_gni_configuration"/></t>
            <t>
              <figure anchor="simple_gni_configuration">
                <name>Example of configuring only the global network instance.</name>
                <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <!-- Configuration D -->
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
              </figure>
            </t>
            <t>Alternatively to the configuration of <xref target="simple_gni_configuration"/>, if the device supports the ietf-bgp and ietf-bmp-bgp-dependencies.yang models,   one could configure directly the global instance, but using the BMP configuration under the BGP container</t>
          </section>
          <section title="RIB Type">
            <t>Each RIB type is configured explicitly in the model through a container. The model currently provides containers for adj-rib-out-pre, adj-rib-out-post, adj-rib-in-post, adj-rib-in-pre and local-rib. </t>
            <t>An empty configuration or absence of a RIB-type container disables route-messages for it. Operators can also disable the route monitoring messages for each RIB explicitly by marking the "enabled" leaf as False.</t>
            <t>We provide an example of this, together with address families, in the next section</t>
          </section>
          <section title="Address families">
            <t>Address families are configured explicitly within each RIB type using a list. The key is of type `ietf-bgp-types:afi-safi-type` without any further constraint.</t>
            <t>An empty configuration or absence of an address family disables route-messages for it. Operators can also disable the address-family route monitoring messages by marking the "enabled" leaf as False.</t>
            <t>We show a few examples of configuring RIB-Types and Address families next. We will mask further configurations of address families with "Configuration X" to focus on the covered parts.</t>
            <t>
              <figure anchor="example_rib_af_one">
                <name>Example of configuring RIBs and address families.</name>
                <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <!-- Configuration F -->
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <!-- Configuration G -->
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-global-ni\
</network-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <!-- Configuration H -->
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <!-- Configuration I -->
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
                <adj-rib-in-post>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <!-- Configuration H -->
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <!-- Configuration I -->
                    </address-family>
                  </address-families>
                </adj-rib-in-post>
              </network-instance-selector>
            </network-instance-selectors>
            <network-instances>
              <network-instance>
                <network-instance-id>network-instance-one</network-i\
nstance-id>
                <enabled>false</enabled>
              </network-instance>
              <network-instance>
                <network-instance-id>network-instance-two</network-i\
nstance-id>
                <adj-rib-in-post>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <!-- Configuration L -->
                    </address-family>
                  </address-families>
                </adj-rib-in-post>
              </network-instance>
            </network-instances>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
              </figure>
            </t>
            <t>In <xref target="example_rib_af_one"/>,  we expand previous sections examples with RIB-Type and address families configurations. The expected result of the previous configuration would be:</t>
            <t>
              <ul spacing="compact">
                <li>For the global network instance, adj-rib-in-pre and adj-rib-in-post RIBs are enabled. In each of them IPv4 and IPv6 address families are configured. The configuration can be the same or not, depending on the requirements of the operators. Any other RIB and address families are disabled.</li>
                <li>Network instance "network-instance-one"  is disabled, meaning that routing monitoring messages are disabled for that network instance.</li>
                <li>Network instance "network-instance-two" has adj-rib-out-post enabled, but only address family ipv4-unicast is configured. The ipv6-unicast will not be configured for this instance.</li>
                <li>For all other network instances, adj-rib-in-pre with IPv4 and IPv6 address families are configured, thanks to the configuration of bmp-ni-types-all-ni</li>
              </ul>
            </t>
            <t>If an operator only wants to configure the IPv4/IPv6 of adj-rib-pre-in for the global instance,  the configuration in <xref target="example_rib_af_two"/> plus the peer configuration (coming in next section) will be enough. We note again that even if the configuration of both address families is the same, they must be explicitly configured for each of them.</t>
            <t>
              <figure anchor="example_rib_af_two">
                <name>Example of configuring RIBs and address families.</name>
                <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-global-ni\
</network-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <!-- Configuration for ipv6-uniceast -->
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <!-- Configuration for ipv4-unicast -->
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
              </figure>
            </t>
          </section>
          <section title="Peers">
            <t>For adj-RIB-in and adj-RIB-out, both pre and post, the model requires the selection of peer RIBs that will be transmitted to the monitoring station. The local-rib does not include this container.</t>
            <t>Peers can be configured using different "selectors", which can be one of the following: </t>
            <t>
              <ul spacing="compact">
                <li>An individual peer, using a remote address. For the configuration under the "/bmp" tree, the model currently does not check if the remote address exists, that would be a responsibility of the device.</li>
                <li>Peergroups.</li>
                <li>A group of peers matching a BGP type. i.e. eBGP peers. </li>
                <li>One or more peers defined by an `bmp-peer-types` identity. The BMP model currently provides the `bmp-peer-types-all-peers` identity which select all peers. For simple cases, this is the value that would normally be considered.</li>
              </ul>
            </t>
            <t>Peers MUST be selected (configured) by at most a single instance of the peers list. For the included keys in the BMP model, the process to select which instance to use is as follows:</t>
            <t>
              <ul spacing="compact">
                <li>If there is a peer address matching the peer, it should be configured using that instance.</li>
                <li>If the peer matches a peergroup, it should be configured using the peer-group configuration.</li>
                <li>If the peer is of any BGP type listed in the peer list, it should be configured using this instance.</li>
                <li>If there is a peer instance identified with the `bmp-peer-types-all-peers`, it would be configured using this instance.</li>
                <li>Finally, if no instance covers the peer, the data from this peer should not be transmitted to the monitoring station.</li>
              </ul>
            </t>
            <t>An empty configuration of a peer type disables route-messages for it. Operators can also disable the address-family route monitoring messages by marking the "enabled" leaf as False.</t>
            <t>Note that if an operator only wants the information of a few peers, it can enable them individually  using their peer-id. If no other configuration exists, only the messages from those enabled peers will be transmitted to the monitoring station.</t>
            <t>Any additional bmp-peer-types identity created SHOULD describe how to unambiguously select a peer when there are conflicting options (multiple options covering the peer).</t>
            <t>We'll provide examples of the peers configuration after describing the filter containers.</t>
          </section>
          <section title="Filtering route-monitoring messages">
            <t>The local rib, and the peer containers within the rest of rib types, include a filter container. This container includes mechanisms to filter route-monitoring messages for the specific RIB.</t>
            <t>The policy-filter can include a routing policy that, if existing, should be applied to the outgoing updates to the monitoring station, and would serve as a granular way of filtering the messages that the monitoring station receives. </t>
            <t>Note that the policy-filter contains an `accept-route` default export policy. An operator can change it to a reject-route, if required.</t>
            <t>The policies created with the routing-policy can perform a large variety of actions routes, and can filter them based on multiple characteristics. For the consistency of the data in the monitoring station, the route policies actions SHOULD be restricted to accepting or rejecting routes. Furthermore, the conditions SHOULD only match prefix sets.</t>
            <t>We present examples of full configurations next.</t>
          </section>
          <section title="Full examples of Route monitoring configurations">
            <section title="Example one - simple configuration">
              <t>In the example configuration from  <xref target="full_example_one"/>, address families IPv6 and IPv4 are configured to send all peers. This is an example of a simple configuration</t>
              <t>
                <figure anchor="full_example_one">
                  <name>Enabling Route monitoring for all peers; all network instances; IPv4/IPv6 Address families,  in the adj-rib-in-pre RIB.</name>
                  <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-global-ni\
</network-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <peers-configurations>
                        <bmp-peer-selectors>
                          <bmp-peer-selector>
                            <bmp-selector-id>bmp-peer-selectors-all-\
peers</bmp-selector-id>
                          </bmp-peer-selector>
                        </bmp-peer-selectors>
                      </peers-configurations>
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <peers-configurations>
                        <bmp-peer-selectors>
                          <bmp-peer-selector>
                            <bmp-selector-id>bmp-peer-selectors-all-\
peers</bmp-selector-id>
                          </bmp-peer-selector>
                        </bmp-peer-selectors>
                      </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
                </figure>
              </t>
            </section>
            <section title="Example two - policy list example">
              <t>In the example in <xref target="full_example_two"/>, the global network instance enables the adj-rib-in-pre. In this RIB, the IPv4 unicast address family is configured for all external peers. We assume peer 198.51.100.1 is external, but its BGP configuration is not shown in the snippet.  Peer 198.51.100.1, however, has a specific configuration: it announces everything but prefixes matching the test_policy list. Note that there is a default accept-route default policy in the model.</t>
              <t>
                <figure anchor="full_example_two">
                  <name>Configuring address families differently for the global network instance</name>
                  <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<routing-policy xmlns="urn:ietf:params:xml:ns:yang:ietf-routing-poli\
cy">
<policy-definitions>
  <policy-definition>
    <name>test_policy</name>
    <!-- Policy definition -->
  </policy-definition>
</policy-definitions>
</routing-policy>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
<bmp-monitoring-stations>
  <bmp-monitoring-station>
    <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
    <bmp-data>
      <bmp-route-monitoring>
        <network-instance-configuration>
            <network-instance-selectors>
          <network-instance-selector>
            <network-instance-selector-id>bmp-ni-types-global-ni</ne\
twork-instance-selector-id>
            <adj-rib-in-pre>
              <address-families>
                <address-family>
                  <address-family-id xmlns:bt="urn:ietf:params:xml:n\
s:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                  <peers-configurations>
                    <bmp-peer-selectors>
                      <bmp-peer-selector>
                        <bmp-selector-id>bmp-peer-selectors-all-peer\
s</bmp-selector-id>
                      </bmp-peer-selector>
                    </bmp-peer-selectors>
                  </peers-configurations>
                </address-family>
                <address-family>
                  <address-family-id xmlns:bt="urn:ietf:params:xml:n\
s:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                  <peers-configurations>
                    <bgp-peer-types>
                        <bgp-peer-type>
                            <bgp-peer-type-id>external</bgp-peer-typ\
e-id>
                        </bgp-peer-type>
                    </bgp-peer-types>
                    <peers>
                      <peer>
                        <peer-id>198.51.100.1</peer-id>
                        <filters>
                          <policy-filter>
                            <export-policy>test_policy</export-polic\
y>
                          </policy-filter>
                        </filters>
                      </peer>
                    </peers>
                  </peers-configurations>
                </address-family>
              </address-families>
            </adj-rib-in-pre>
          </network-instance-selector>
      </network-instance-selectors>
        </network-instance-configuration>
      </bmp-route-monitoring>
    </bmp-data>
  </bmp-monitoring-station>
</bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
                </figure>
              </t>
            </section>
            <section title="Example three - specific network instance configuration">
              <t>In the example from <xref target="full_example_three"/>, all network instances have adj-rib-in-pre with  IPv6  and IPv4  configured receiving all peers. network-instance-one is disabled, and network-instance-two is announcing only the local-rib/IPv4 unicast routes.</t>
              <t>
                <figure anchor="full_example_three">
                  <name>Applying a general configuration to all network instances, except of two, which are configured specifically.</name>
                  <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <peers-configurations>
                        <bmp-peer-selectors>
                          <bmp-peer-selector>
                            <bmp-selector-id>bmp-peer-selectors-all-\
peers</bmp-selector-id>
                          </bmp-peer-selector>
                        </bmp-peer-selectors>
                      </peers-configurations>
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <peers-configurations>
                        <bmp-peer-selectors>
                          <bmp-peer-selector>
                            <bmp-selector-id>bmp-peer-selectors-all-\
peers</bmp-selector-id>
                          </bmp-peer-selector>
                        </bmp-peer-selectors>
                      </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
            </network-instance-selectors>
            <network-instances>
              <network-instance>
                <network-instance-id>network-instance-one</network-i\
nstance-id>
                <enabled>false</enabled>
              </network-instance>
              <network-instance>
                <network-instance-id>network-instance-two</network-i\
nstance-id>
                <local-rib>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                    </address-family>
                  </address-families>
                </local-rib>
              </network-instance>
            </network-instances>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
                </figure>
              </t>
            </section>
            <section title="Example four - Enabling just a few peers in global">
              <t>In the example from <xref target="full_example_four"/>, we configure the device  to only send to the monitoring_station_one monitoring station the Route monitoring messages for ipv4 and ipv6 from peers "198.51.100.1" and "198.51.100.2" in the adj-rib-pre-policy.</t>
              <t>
                <figure anchor="full_example_four">
                  <name>Sending just BGP messages from adj-rib-in-pre from 2 peers</name>
                  <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>monitoring_station_one</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-global-ni\
</network-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <peers-configurations>
                        <peers>
                          <peer>
                            <peer-id>198.51.100.1</peer-id>
                          </peer>
                          <peer>
                            <peer-id>198.51.100.2</peer-id>
                          </peer>
                        </peers>
                      </peers-configurations>
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <peers-configurations>
                        <peers>
                          <peer>
                            <peer-id>198.51.100.1</peer-id>
                          </peer>
                          <peer>
                            <peer-id>198.51.100.2</peer-id>
                          </peer>
                        </peers>
                      </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
           ]]></sourcecode>
                </figure>
              </t>
            </section>
          </section>
        </section>  <!-- End of BMP route monitoring-->
      </section>  <!-- End of BMP data-->
      <section title="Session stats">
        <t>The non-configurable container "session-stats" includes various metrics for the session with the monitoring station.</t>
      </section>
      <section title="Session reset action">
        <t>The "session-reset" action resets a session with a monitoring station.</t>
      </section>
    </section>
    <!-- End of Model description -->
    <section title="Implementation guidelines" anchor="implementation_guidelines">
      <t>To facilitate implementation, the model is divided into three
            distinct parts. The core model (ietf-bmp) is designed to configure
            BMP without deep dependencies to other modules. This
            is an attempt to facilitate the implementation by vendors.</t>
      <t>Additionally, two supplementary modules,
            ietf-bmp-bgp-dependencies.yang and ietf-bmp-tcp-dependencies.yang,
            enhance the model's functionality but rely on the IETF BGP and TCP
            models. These modules can be adopted by implementations that
            support these dependencies.</t>
    </section>
    <section title="BMP YANG module" anchor="model-content">
      <section title="Tree View" anchor="ietf-bmp-tree-view">
        <t>
        The following tree diagram provides an overview of the base ietf-bmp.yang
            data model. It also includes the trees for the modules ietf-bmp-bgp-dependencies.yang and ietf-bmp-tcp-dependencies.yang
            that adds some options to the models in case the implementation supports these models (and their requisites)
        </t>
        <t>
          <figure>
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

module: ietf-bmp
  +--rw bmp
     +--rw bmp-monitoring-stations
        +--rw bmp-monitoring-station* [id]
           +--rw id               string
           +--rw description?     string
           +--rw connection
           |  +--rw (passive-or-active)
           |  |  +--:(active)
           |  |  |  +--rw active
           |  |  |     +--rw network-instance?
           |  |  |     |       leafref
           |  |  |     +--rw station-address
           |  |  |     |       inet:ip-address
           |  |  |     +--rw station-port
           |  |  |     |       inet:port-number
           |  |  |     +--rw (local-endpoint)
           |  |  |     |  +--:(monitored-router-address)
           |  |  |     |  |  +--rw monitored-router-address?
           |  |  |     |  |          inet:ip-address
           |  |  |     |  +--:(monitored-router-interface)
           |  |  |     |     +--rw monitored-router-interface?
           |  |  |     |             leafref
           |  |  |     +--rw monitored-router-port?
           |  |  |             inet:port-number
           |  |  +--:(passive)
           |  |     +--rw passive
           |  |        +--rw network-instance?
           |  |        |       leafref
           |  |        +--rw station-address
           |  |        |       inet:ip-address
           |  |        +--rw station-port?
           |  |        |       inet:port-number
           |  |        +--rw (local-endpoint)
           |  |        |  +--:(monitored-router-address)
           |  |        |  |  +--rw monitored-router-address?
           |  |        |  |          inet:ip-address
           |  |        |  +--:(monitored-router-interface)
           |  |        |     +--rw monitored-router-interface?
           |  |        |             leafref
           |  |        +--rw monitored-router-port
           |  |                inet:port-number
           |  +--rw dscp?            inet:dscp
           |  +--rw tcp-options
           |  |  +--rw maximum-segment-size?     uint16
           |  |  +--rw mtu-discovery?            boolean
           |  |  +--rw bmp-tcp:keepalives!
           |  |  |       {keepalives-supported}?
           |  |  |  +--rw bmp-tcp:idle-time?        uint16
           |  |  |  +--rw bmp-tcp:max-probes?       uint16
           |  |  |  +--rw bmp-tcp:probe-interval?   uint16
           |  |  +--rw bmp-tcp:secure-session!
           |  |     +--rw (bmp-tcp:authentication)
           |  |        +--:(bmp-tcp:ao)
           |  |        |  +--rw bmp-tcp:ao-keychain?
           |  |        |          key-chain:key-chain-ref
           |  |        +--:(bmp-tcp:md5)
           |  |           +--rw bmp-tcp:md5-keychain?
           |  |                   key-chain:key-chain-ref
           |  +--rw initial-delay?   uint32
           |  +--rw backoff
           |     +--rw (backoff-options)?
           |        +--:(simple-exponential)
           |           +--rw simple-exponential
           |              +--rw initial-backoff?   uint32
           |              +--rw maximum-backoff?   uint32
           +--rw bmp-data
           |  +--rw initiation-message?      string
           |  +--rw bmp-statistics-report!
           |  |  +--rw statistics-interval    uint32
           |  +--rw bmp-route-monitoring
           |  |  +--rw network-instance-configuration
           |  |     +--rw network-instances
           |  |     |  +--rw network-instance*
           |  |     |          [network-instance-id]
           |  |     |     +--rw network-instance-id    leafref
           |  |     |     +--rw enabled?               boolean
           |  |     |     +--rw adj-rib-in-pre
           |  |     |     |  +--rw address-families
           |  |     |     |     +--rw address-family*
           |  |     |     |             [address-family-id]
           |  |     |     |        +--rw address-family-id
           |  |     |     |        |       identityref
           |  |     |     |        +--rw enabled?
           |  |     |     |        |       boolean
           |  |     |     |        +--rw peers-configurations
           |  |     |     |           +--rw peers
           |  |     |     |           |  +--rw peer* [peer-id]
           |  |     |     |           |     +--rw peer-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw peer-groups
           |  |     |     |           |  +--rw peer-group*
           |  |     |     |           |          [peer-group-id]
           |  |     |     |           |     +--rw peer-group-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bmp-peer-selectors
           |  |     |     |           |  +--rw bmp-peer-selector*
           |  |     |     |           |          [bmp-selector-id]
           |  |     |     |           |     +--rw bmp-selector-id
           |  |     |     |           |     |       identityref
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bgp-peer-types
           |  |     |     |              +--rw bgp-peer-type*
           |  |     |     |              |       [bgp-peer-type-id]
           |  |     |     |              |  +--rw bgp-peer-type-id
           |  |     |     |              |          bt:peer-type
           |  |     |     |              +--rw enabled?
           |  |     |     |              |       boolean
           |  |     |     |              +--rw filters
           |  |     |     |                 +--rw policy-filter
           |  |     |     |                         {bmp-filter-base\
d-on-route-policy}?
           |  |     |     |                    +--rw export-policy*
           |  |     |     |                    |       leafref
           |  |     |     |                    +--rw default-export-\
policy?
           |  |     |     |                            rt-pol:defaul\
t-policy-type
           |  |     |     +--rw adj-rib-in-post
           |  |     |     |  +--rw address-families
           |  |     |     |     +--rw address-family*
           |  |     |     |             [address-family-id]
           |  |     |     |        +--rw address-family-id
           |  |     |     |        |       identityref
           |  |     |     |        +--rw enabled?
           |  |     |     |        |       boolean
           |  |     |     |        +--rw peers-configurations
           |  |     |     |           +--rw peers
           |  |     |     |           |  +--rw peer* [peer-id]
           |  |     |     |           |     +--rw peer-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw peer-groups
           |  |     |     |           |  +--rw peer-group*
           |  |     |     |           |          [peer-group-id]
           |  |     |     |           |     +--rw peer-group-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bmp-peer-selectors
           |  |     |     |           |  +--rw bmp-peer-selector*
           |  |     |     |           |          [bmp-selector-id]
           |  |     |     |           |     +--rw bmp-selector-id
           |  |     |     |           |     |       identityref
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bgp-peer-types
           |  |     |     |              +--rw bgp-peer-type*
           |  |     |     |              |       [bgp-peer-type-id]
           |  |     |     |              |  +--rw bgp-peer-type-id
           |  |     |     |              |          bt:peer-type
           |  |     |     |              +--rw enabled?
           |  |     |     |              |       boolean
           |  |     |     |              +--rw filters
           |  |     |     |                 +--rw policy-filter
           |  |     |     |                         {bmp-filter-base\
d-on-route-policy}?
           |  |     |     |                    +--rw export-policy*
           |  |     |     |                    |       leafref
           |  |     |     |                    +--rw default-export-\
policy?
           |  |     |     |                            rt-pol:defaul\
t-policy-type
           |  |     |     +--rw local-rib
           |  |     |     |  +--rw address-families
           |  |     |     |     +--rw address-family*
           |  |     |     |             [address-family-id]
           |  |     |     |        +--rw address-family-id
           |  |     |     |        |       identityref
           |  |     |     |        +--rw filters
           |  |     |     |           +--rw policy-filter
           |  |     |     |                   {bmp-filter-based-on-r\
oute-policy}?
           |  |     |     |              +--rw export-policy*
           |  |     |     |              |       leafref
           |  |     |     |              +--rw default-export-policy?
           |  |     |     |                      rt-pol:default-poli\
cy-type
           |  |     |     +--rw adj-rib-out-pre
           |  |     |     |  +--rw address-families
           |  |     |     |     +--rw address-family*
           |  |     |     |             [address-family-id]
           |  |     |     |        +--rw address-family-id
           |  |     |     |        |       identityref
           |  |     |     |        +--rw enabled?
           |  |     |     |        |       boolean
           |  |     |     |        +--rw peers-configurations
           |  |     |     |           +--rw peers
           |  |     |     |           |  +--rw peer* [peer-id]
           |  |     |     |           |     +--rw peer-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw peer-groups
           |  |     |     |           |  +--rw peer-group*
           |  |     |     |           |          [peer-group-id]
           |  |     |     |           |     +--rw peer-group-id
           |  |     |     |           |     |       string
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bmp-peer-selectors
           |  |     |     |           |  +--rw bmp-peer-selector*
           |  |     |     |           |          [bmp-selector-id]
           |  |     |     |           |     +--rw bmp-selector-id
           |  |     |     |           |     |       identityref
           |  |     |     |           |     +--rw enabled?
           |  |     |     |           |     |       boolean
           |  |     |     |           |     +--rw filters
           |  |     |     |           |        +--rw policy-filter
           |  |     |     |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |     |           |           +--rw export-polic\
y*
           |  |     |     |           |           |       leafref
           |  |     |     |           |           +--rw default-expo\
rt-policy?
           |  |     |     |           |                   rt-pol:def\
ault-policy-type
           |  |     |     |           +--rw bgp-peer-types
           |  |     |     |              +--rw bgp-peer-type*
           |  |     |     |              |       [bgp-peer-type-id]
           |  |     |     |              |  +--rw bgp-peer-type-id
           |  |     |     |              |          bt:peer-type
           |  |     |     |              +--rw enabled?
           |  |     |     |              |       boolean
           |  |     |     |              +--rw filters
           |  |     |     |                 +--rw policy-filter
           |  |     |     |                         {bmp-filter-base\
d-on-route-policy}?
           |  |     |     |                    +--rw export-policy*
           |  |     |     |                    |       leafref
           |  |     |     |                    +--rw default-export-\
policy?
           |  |     |     |                            rt-pol:defaul\
t-policy-type
           |  |     |     +--rw adj-rib-out-post
           |  |     |        +--rw address-families
           |  |     |           +--rw address-family*
           |  |     |                   [address-family-id]
           |  |     |              +--rw address-family-id
           |  |     |              |       identityref
           |  |     |              +--rw enabled?
           |  |     |              |       boolean
           |  |     |              +--rw peers-configurations
           |  |     |                 +--rw peers
           |  |     |                 |  +--rw peer* [peer-id]
           |  |     |                 |     +--rw peer-id
           |  |     |                 |     |       string
           |  |     |                 |     +--rw enabled?
           |  |     |                 |     |       boolean
           |  |     |                 |     +--rw filters
           |  |     |                 |        +--rw policy-filter
           |  |     |                 |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |                 |           +--rw export-polic\
y*
           |  |     |                 |           |       leafref
           |  |     |                 |           +--rw default-expo\
rt-policy?
           |  |     |                 |                   rt-pol:def\
ault-policy-type
           |  |     |                 +--rw peer-groups
           |  |     |                 |  +--rw peer-group*
           |  |     |                 |          [peer-group-id]
           |  |     |                 |     +--rw peer-group-id
           |  |     |                 |     |       string
           |  |     |                 |     +--rw enabled?
           |  |     |                 |     |       boolean
           |  |     |                 |     +--rw filters
           |  |     |                 |        +--rw policy-filter
           |  |     |                 |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |                 |           +--rw export-polic\
y*
           |  |     |                 |           |       leafref
           |  |     |                 |           +--rw default-expo\
rt-policy?
           |  |     |                 |                   rt-pol:def\
ault-policy-type
           |  |     |                 +--rw bmp-peer-selectors
           |  |     |                 |  +--rw bmp-peer-selector*
           |  |     |                 |          [bmp-selector-id]
           |  |     |                 |     +--rw bmp-selector-id
           |  |     |                 |     |       identityref
           |  |     |                 |     +--rw enabled?
           |  |     |                 |     |       boolean
           |  |     |                 |     +--rw filters
           |  |     |                 |        +--rw policy-filter
           |  |     |                 |                {bmp-filter-b\
ased-on-route-policy}?
           |  |     |                 |           +--rw export-polic\
y*
           |  |     |                 |           |       leafref
           |  |     |                 |           +--rw default-expo\
rt-policy?
           |  |     |                 |                   rt-pol:def\
ault-policy-type
           |  |     |                 +--rw bgp-peer-types
           |  |     |                    +--rw bgp-peer-type*
           |  |     |                    |       [bgp-peer-type-id]
           |  |     |                    |  +--rw bgp-peer-type-id
           |  |     |                    |          bt:peer-type
           |  |     |                    +--rw enabled?
           |  |     |                    |       boolean
           |  |     |                    +--rw filters
           |  |     |                       +--rw policy-filter
           |  |     |                               {bmp-filter-base\
d-on-route-policy}?
           |  |     |                          +--rw export-policy*
           |  |     |                          |       leafref
           |  |     |                          +--rw default-export-\
policy?
           |  |     |                                  rt-pol:defaul\
t-policy-type
           |  |     +--rw network-instance-selectors
           |  |        +--rw network-instance-selector*
           |  |                [network-instance-selector-id]
           |  |           +--rw network-instance-selector-id
           |  |           |       identityref
           |  |           +--rw enabled?
           |  |           |       boolean
           |  |           +--rw adj-rib-in-pre
           |  |           |  +--rw address-families
           |  |           |     +--rw address-family*
           |  |           |             [address-family-id]
           |  |           |        +--rw address-family-id
           |  |           |        |       identityref
           |  |           |        +--rw enabled?
           |  |           |        |       boolean
           |  |           |        +--rw peers-configurations
           |  |           |           +--rw peers
           |  |           |           |  +--rw peer* [peer-id]
           |  |           |           |     +--rw peer-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw peer-groups
           |  |           |           |  +--rw peer-group*
           |  |           |           |          [peer-group-id]
           |  |           |           |     +--rw peer-group-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bmp-peer-selectors
           |  |           |           |  +--rw bmp-peer-selector*
           |  |           |           |          [bmp-selector-id]
           |  |           |           |     +--rw bmp-selector-id
           |  |           |           |     |       identityref
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bgp-peer-types
           |  |           |              +--rw bgp-peer-type*
           |  |           |              |       [bgp-peer-type-id]
           |  |           |              |  +--rw bgp-peer-type-id
           |  |           |              |          bt:peer-type
           |  |           |              +--rw enabled?
           |  |           |              |       boolean
           |  |           |              +--rw filters
           |  |           |                 +--rw policy-filter
           |  |           |                         {bmp-filter-base\
d-on-route-policy}?
           |  |           |                    +--rw export-policy*
           |  |           |                    |       leafref
           |  |           |                    +--rw default-export-\
policy?
           |  |           |                            rt-pol:defaul\
t-policy-type
           |  |           +--rw adj-rib-in-post
           |  |           |  +--rw address-families
           |  |           |     +--rw address-family*
           |  |           |             [address-family-id]
           |  |           |        +--rw address-family-id
           |  |           |        |       identityref
           |  |           |        +--rw enabled?
           |  |           |        |       boolean
           |  |           |        +--rw peers-configurations
           |  |           |           +--rw peers
           |  |           |           |  +--rw peer* [peer-id]
           |  |           |           |     +--rw peer-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw peer-groups
           |  |           |           |  +--rw peer-group*
           |  |           |           |          [peer-group-id]
           |  |           |           |     +--rw peer-group-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bmp-peer-selectors
           |  |           |           |  +--rw bmp-peer-selector*
           |  |           |           |          [bmp-selector-id]
           |  |           |           |     +--rw bmp-selector-id
           |  |           |           |     |       identityref
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bgp-peer-types
           |  |           |              +--rw bgp-peer-type*
           |  |           |              |       [bgp-peer-type-id]
           |  |           |              |  +--rw bgp-peer-type-id
           |  |           |              |          bt:peer-type
           |  |           |              +--rw enabled?
           |  |           |              |       boolean
           |  |           |              +--rw filters
           |  |           |                 +--rw policy-filter
           |  |           |                         {bmp-filter-base\
d-on-route-policy}?
           |  |           |                    +--rw export-policy*
           |  |           |                    |       leafref
           |  |           |                    +--rw default-export-\
policy?
           |  |           |                            rt-pol:defaul\
t-policy-type
           |  |           +--rw local-rib
           |  |           |  +--rw address-families
           |  |           |     +--rw address-family*
           |  |           |             [address-family-id]
           |  |           |        +--rw address-family-id
           |  |           |        |       identityref
           |  |           |        +--rw filters
           |  |           |           +--rw policy-filter
           |  |           |                   {bmp-filter-based-on-r\
oute-policy}?
           |  |           |              +--rw export-policy*
           |  |           |              |       leafref
           |  |           |              +--rw default-export-policy?
           |  |           |                      rt-pol:default-poli\
cy-type
           |  |           +--rw adj-rib-out-pre
           |  |           |  +--rw address-families
           |  |           |     +--rw address-family*
           |  |           |             [address-family-id]
           |  |           |        +--rw address-family-id
           |  |           |        |       identityref
           |  |           |        +--rw enabled?
           |  |           |        |       boolean
           |  |           |        +--rw peers-configurations
           |  |           |           +--rw peers
           |  |           |           |  +--rw peer* [peer-id]
           |  |           |           |     +--rw peer-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw peer-groups
           |  |           |           |  +--rw peer-group*
           |  |           |           |          [peer-group-id]
           |  |           |           |     +--rw peer-group-id
           |  |           |           |     |       string
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bmp-peer-selectors
           |  |           |           |  +--rw bmp-peer-selector*
           |  |           |           |          [bmp-selector-id]
           |  |           |           |     +--rw bmp-selector-id
           |  |           |           |     |       identityref
           |  |           |           |     +--rw enabled?
           |  |           |           |     |       boolean
           |  |           |           |     +--rw filters
           |  |           |           |        +--rw policy-filter
           |  |           |           |                {bmp-filter-b\
ased-on-route-policy}?
           |  |           |           |           +--rw export-polic\
y*
           |  |           |           |           |       leafref
           |  |           |           |           +--rw default-expo\
rt-policy?
           |  |           |           |                   rt-pol:def\
ault-policy-type
           |  |           |           +--rw bgp-peer-types
           |  |           |              +--rw bgp-peer-type*
           |  |           |              |       [bgp-peer-type-id]
           |  |           |              |  +--rw bgp-peer-type-id
           |  |           |              |          bt:peer-type
           |  |           |              +--rw enabled?
           |  |           |              |       boolean
           |  |           |              +--rw filters
           |  |           |                 +--rw policy-filter
           |  |           |                         {bmp-filter-base\
d-on-route-policy}?
           |  |           |                    +--rw export-policy*
           |  |           |                    |       leafref
           |  |           |                    +--rw default-export-\
policy?
           |  |           |                            rt-pol:defaul\
t-policy-type
           |  |           +--rw adj-rib-out-post
           |  |              +--rw address-families
           |  |                 +--rw address-family*
           |  |                         [address-family-id]
           |  |                    +--rw address-family-id
           |  |                    |       identityref
           |  |                    +--rw enabled?
           |  |                    |       boolean
           |  |                    +--rw peers-configurations
           |  |                       +--rw peers
           |  |                       |  +--rw peer* [peer-id]
           |  |                       |     +--rw peer-id
           |  |                       |     |       string
           |  |                       |     +--rw enabled?
           |  |                       |     |       boolean
           |  |                       |     +--rw filters
           |  |                       |        +--rw policy-filter
           |  |                       |                {bmp-filter-b\
ased-on-route-policy}?
           |  |                       |           +--rw export-polic\
y*
           |  |                       |           |       leafref
           |  |                       |           +--rw default-expo\
rt-policy?
           |  |                       |                   rt-pol:def\
ault-policy-type
           |  |                       +--rw peer-groups
           |  |                       |  +--rw peer-group*
           |  |                       |          [peer-group-id]
           |  |                       |     +--rw peer-group-id
           |  |                       |     |       string
           |  |                       |     +--rw enabled?
           |  |                       |     |       boolean
           |  |                       |     +--rw filters
           |  |                       |        +--rw policy-filter
           |  |                       |                {bmp-filter-b\
ased-on-route-policy}?
           |  |                       |           +--rw export-polic\
y*
           |  |                       |           |       leafref
           |  |                       |           +--rw default-expo\
rt-policy?
           |  |                       |                   rt-pol:def\
ault-policy-type
           |  |                       +--rw bmp-peer-selectors
           |  |                       |  +--rw bmp-peer-selector*
           |  |                       |          [bmp-selector-id]
           |  |                       |     +--rw bmp-selector-id
           |  |                       |     |       identityref
           |  |                       |     +--rw enabled?
           |  |                       |     |       boolean
           |  |                       |     +--rw filters
           |  |                       |        +--rw policy-filter
           |  |                       |                {bmp-filter-b\
ased-on-route-policy}?
           |  |                       |           +--rw export-polic\
y*
           |  |                       |           |       leafref
           |  |                       |           +--rw default-expo\
rt-policy?
           |  |                       |                   rt-pol:def\
ault-policy-type
           |  |                       +--rw bgp-peer-types
           |  |                          +--rw bgp-peer-type*
           |  |                          |       [bgp-peer-type-id]
           |  |                          |  +--rw bgp-peer-type-id
           |  |                          |          bt:peer-type
           |  |                          +--rw enabled?
           |  |                          |       boolean
           |  |                          +--rw filters
           |  |                             +--rw policy-filter
           |  |                                     {bmp-filter-base\
d-on-route-policy}?
           |  |                                +--rw export-policy*
           |  |                                |       leafref
           |  |                                +--rw default-export-\
policy?
           |  |                                        rt-pol:defaul\
t-policy-type
           |  +--rw bmp-route-mirroring!
           +--ro session-stats
           |  +--ro discontinuity-time
           |  |       yang:date-and-time
           |  +--ro established-session?               boolean
           |  +--ro total-route-monitoring-messages?   uint64
           |  +--ro total-statistics-messages?         uint64
           |  +--ro total-peer-down-messages?          uint64
           |  +--ro total-peer-up-messages?            uint64
           |  +--ro total-initiation-messages?         uint64
           |  +--ro total-route-mirroring-messages?    uint64
           |  +--ro total-termination-messages?        uint64
           |  +--ro route-monitoring-stats
           |     +--ro network-instances-stats
           |        +--ro network-instance*
           |                [network-instance-name]
           |           +--ro network-instance-name
           |           |       leafref
           |           +--ro enabled?
           |           |       boolean
           |           +--ro total-route-mirroring-messages-per-ni?
           |           |       uint64
           |           +--ro ribs-stats
           |              +--ro adj-rib-in-pre
           |              |  +--ro enabled?
           |              |  |       boolean
           |              |  +--ro total-route-mirroring-messages-pe\
r-rib?
           |              |  |       uint64
           |              |  +--ro address-families
           |              |     +--ro address-family*
           |              |             [address-family-id]
           |              |        +--ro address-family-id
           |              |        |       identityref
           |              |        +--ro enabled?
           |              |        |       boolean
           |              |        +--ro total-route-monitoring-upda\
ted-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro total-route-monitoring-with\
draw-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro peers-stats
           |              |           +--ro peer* [peer-id]
           |              |              +--ro peer-id
           |              |              |       string
           |              |              +--ro enabled?
           |              |              |       boolean
           |              |              +--ro total-route-monitorin\
g-updated-prefixes-per-peer?
           |              |              |       uint64
           |              |              +--ro total-route-monitorin\
g-withdraw-prefixes-per-peer?
           |              |                      uint64
           |              +--ro adj-rib-in-post
           |              |  +--ro enabled?
           |              |  |       boolean
           |              |  +--ro total-route-mirroring-messages-pe\
r-rib?
           |              |  |       uint64
           |              |  +--ro address-families
           |              |     +--ro address-family*
           |              |             [address-family-id]
           |              |        +--ro address-family-id
           |              |        |       identityref
           |              |        +--ro enabled?
           |              |        |       boolean
           |              |        +--ro total-route-monitoring-upda\
ted-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro total-route-monitoring-with\
draw-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro peers-stats
           |              |           +--ro peer* [peer-id]
           |              |              +--ro peer-id
           |              |              |       string
           |              |              +--ro enabled?
           |              |              |       boolean
           |              |              +--ro total-route-monitorin\
g-updated-prefixes-per-peer?
           |              |              |       uint64
           |              |              +--ro total-route-monitorin\
g-withdraw-prefixes-per-peer?
           |              |                      uint64
           |              +--ro local-rib
           |              |  +--ro enabled?
           |              |  |       boolean
           |              |  +--ro total-route-mirroring-messages-pe\
r-rib?
           |              |  |       uint64
           |              |  +--ro address-families
           |              |     +--ro address-family*
           |              |             [address-family-id]
           |              |        +--ro address-family-id
           |              |        |       identityref
           |              |        +--ro enabled?
           |              |        |       boolean
           |              |        +--ro total-route-monitoring-upda\
ted-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro total-route-monitoring-with\
draw-prefixes-per-af?
           |              |                uint64
           |              +--ro adj-rib-out-pre
           |              |  +--ro enabled?
           |              |  |       boolean
           |              |  +--ro total-route-mirroring-messages-pe\
r-rib?
           |              |  |       uint64
           |              |  +--ro address-families
           |              |     +--ro address-family*
           |              |             [address-family-id]
           |              |        +--ro address-family-id
           |              |        |       identityref
           |              |        +--ro enabled?
           |              |        |       boolean
           |              |        +--ro total-route-monitoring-upda\
ted-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro total-route-monitoring-with\
draw-prefixes-per-af?
           |              |        |       uint64
           |              |        +--ro peers-stats
           |              |           +--ro peer* [peer-id]
           |              |              +--ro peer-id
           |              |              |       string
           |              |              +--ro enabled?
           |              |              |       boolean
           |              |              +--ro total-route-monitorin\
g-updated-prefixes-per-peer?
           |              |              |       uint64
           |              |              +--ro total-route-monitorin\
g-withdraw-prefixes-per-peer?
           |              |                      uint64
           |              +--ro adj-rib-out-post
           |                 +--ro enabled?
           |                 |       boolean
           |                 +--ro total-route-mirroring-messages-pe\
r-rib?
           |                 |       uint64
           |                 +--ro address-families
           |                    +--ro address-family*
           |                            [address-family-id]
           |                       +--ro address-family-id
           |                       |       identityref
           |                       +--ro enabled?
           |                       |       boolean
           |                       +--ro total-route-monitoring-upda\
ted-prefixes-per-af?
           |                       |       uint64
           |                       +--ro total-route-monitoring-with\
draw-prefixes-per-af?
           |                       |       uint64
           |                       +--ro peers-stats
           |                          +--ro peer* [peer-id]
           |                             +--ro peer-id
           |                             |       string
           |                             +--ro enabled?
           |                             |       boolean
           |                             +--ro total-route-monitorin\
g-updated-prefixes-per-peer?
           |                             |       uint64
           |                             +--ro total-route-monitorin\
g-withdraw-prefixes-per-peer?
           |                                     uint64
           +--rw actions
              +---x session-reset
              |  +--ro output
              |     +--ro (outcome)?
              |        +--:(success)
              |        |  +--ro success?   empty
              |        +--:(failure)
              |           +--ro failure?   string
              +---x session-counter-reset
                 +--ro output
                    +--ro (outcome)?
                       +--:(success)
                       |  +--ro success?   empty
                       +--:(failure)
                          +--ro failure?   string


  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bgp:bgp:
    +--rw bmp-data
       +--rw bmp-monitoring-stations!
          +--rw bmp-monitoring-station* [id]
             +--rw id                      string
             +--rw bmp-route-monitoring!
                +--rw enabled?            boolean
                +--rw adj-rib-in-pre
                |  +--rw address-families
                |     +--rw address-family* [address-family-id]
                |        +--rw address-family-id
                |        |       identityref
                |        +--rw enabled?                boolean
                |        +--rw peers-configurations
                |           +--rw bmp-peer-selectors
                |           |  +--rw bmp-peer-selector*
                |           |          [bmp-selector-id]
                |           |     +--rw bmp-selector-id
                |           |     |       identityref
                |           |     +--rw enabled?
                |           |     |       boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peer-types
                |           |  +--rw peer-type* [peer-type-id]
                |           |  |  +--rw peer-type-id
                |           |  |          bt:peer-type
                |           |  +--rw enabled?     boolean
                |           |  +--rw filters
                |           |     +--rw policy-filter
                |           |             {bmp-filter-based-on-route\
-policy}?
                |           |        +--rw export-policy*
                |           |        |       leafref
                |           |        +--rw default-export-policy?
                |           |                rt-pol:default-policy-t\
ype
                |           +--rw peer-groups
                |           |  +--rw peer-group* [peer-group]
                |           |     +--rw peer-group    leafref
                |           |     +--rw enabled?      boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peers
                |              +--rw peer* [peer-id]
                |                 +--rw peer-id    leafref
                |                 +--rw enabled?   boolean
                |                 +--rw filters
                |                    +--rw policy-filter
                |                            {bmp-filter-based-on-ro\
ute-policy}?
                |                       +--rw export-policy*
                |                       |       leafref
                |                       +--rw default-export-policy?
                |                               rt-pol:default-polic\
y-type
                +--rw adj-rib-in-post
                |  +--rw address-families
                |     +--rw address-family* [address-family-id]
                |        +--rw address-family-id
                |        |       identityref
                |        +--rw enabled?                boolean
                |        +--rw peers-configurations
                |           +--rw bmp-peer-selectors
                |           |  +--rw bmp-peer-selector*
                |           |          [bmp-selector-id]
                |           |     +--rw bmp-selector-id
                |           |     |       identityref
                |           |     +--rw enabled?
                |           |     |       boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peer-types
                |           |  +--rw peer-type* [peer-type-id]
                |           |  |  +--rw peer-type-id
                |           |  |          bt:peer-type
                |           |  +--rw enabled?     boolean
                |           |  +--rw filters
                |           |     +--rw policy-filter
                |           |             {bmp-filter-based-on-route\
-policy}?
                |           |        +--rw export-policy*
                |           |        |       leafref
                |           |        +--rw default-export-policy?
                |           |                rt-pol:default-policy-t\
ype
                |           +--rw peer-groups
                |           |  +--rw peer-group* [peer-group]
                |           |     +--rw peer-group    leafref
                |           |     +--rw enabled?      boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peers
                |              +--rw peer* [peer-id]
                |                 +--rw peer-id    leafref
                |                 +--rw enabled?   boolean
                |                 +--rw filters
                |                    +--rw policy-filter
                |                            {bmp-filter-based-on-ro\
ute-policy}?
                |                       +--rw export-policy*
                |                       |       leafref
                |                       +--rw default-export-policy?
                |                               rt-pol:default-polic\
y-type
                +--rw local-rib
                |  +--rw address-families
                |     +--rw address-family* [address-family-id]
                |        +--rw address-family-id    identityref
                |        +--rw filters
                |           +--rw policy-filter
                |                   {bmp-filter-based-on-route-polic\
y}?
                |              +--rw export-policy*
                |              |       leafref
                |              +--rw default-export-policy?
                |                      rt-pol:default-policy-type
                +--rw adj-rib-out-pre
                |  +--rw address-families
                |     +--rw address-family* [address-family-id]
                |        +--rw address-family-id
                |        |       identityref
                |        +--rw enabled?                boolean
                |        +--rw peers-configurations
                |           +--rw bmp-peer-selectors
                |           |  +--rw bmp-peer-selector*
                |           |          [bmp-selector-id]
                |           |     +--rw bmp-selector-id
                |           |     |       identityref
                |           |     +--rw enabled?
                |           |     |       boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peer-types
                |           |  +--rw peer-type* [peer-type-id]
                |           |  |  +--rw peer-type-id
                |           |  |          bt:peer-type
                |           |  +--rw enabled?     boolean
                |           |  +--rw filters
                |           |     +--rw policy-filter
                |           |             {bmp-filter-based-on-route\
-policy}?
                |           |        +--rw export-policy*
                |           |        |       leafref
                |           |        +--rw default-export-policy?
                |           |                rt-pol:default-policy-t\
ype
                |           +--rw peer-groups
                |           |  +--rw peer-group* [peer-group]
                |           |     +--rw peer-group    leafref
                |           |     +--rw enabled?      boolean
                |           |     +--rw filters
                |           |        +--rw policy-filter
                |           |                {bmp-filter-based-on-ro\
ute-policy}?
                |           |           +--rw export-policy*
                |           |           |       leafref
                |           |           +--rw default-export-policy?
                |           |                   rt-pol:default-polic\
y-type
                |           +--rw peers
                |              +--rw peer* [peer-id]
                |                 +--rw peer-id    leafref
                |                 +--rw enabled?   boolean
                |                 +--rw filters
                |                    +--rw policy-filter
                |                            {bmp-filter-based-on-ro\
ute-policy}?
                |                       +--rw export-policy*
                |                       |       leafref
                |                       +--rw default-export-policy?
                |                               rt-pol:default-polic\
y-type
                +--rw adj-rib-out-post
                   +--rw address-families
                      +--rw address-family* [address-family-id]
                         +--rw address-family-id
                         |       identityref
                         +--rw enabled?                boolean
                         +--rw peers-configurations
                            +--rw bmp-peer-selectors
                            |  +--rw bmp-peer-selector*
                            |          [bmp-selector-id]
                            |     +--rw bmp-selector-id
                            |     |       identityref
                            |     +--rw enabled?
                            |     |       boolean
                            |     +--rw filters
                            |        +--rw policy-filter
                            |                {bmp-filter-based-on-ro\
ute-policy}?
                            |           +--rw export-policy*
                            |           |       leafref
                            |           +--rw default-export-policy?
                            |                   rt-pol:default-polic\
y-type
                            +--rw peer-types
                            |  +--rw peer-type* [peer-type-id]
                            |  |  +--rw peer-type-id
                            |  |          bt:peer-type
                            |  +--rw enabled?     boolean
                            |  +--rw filters
                            |     +--rw policy-filter
                            |             {bmp-filter-based-on-route\
-policy}?
                            |        +--rw export-policy*
                            |        |       leafref
                            |        +--rw default-export-policy?
                            |                rt-pol:default-policy-t\
ype
                            +--rw peer-groups
                            |  +--rw peer-group* [peer-group]
                            |     +--rw peer-group    leafref
                            |     +--rw enabled?      boolean
                            |     +--rw filters
                            |        +--rw policy-filter
                            |                {bmp-filter-based-on-ro\
ute-policy}?
                            |           +--rw export-policy*
                            |           |       leafref
                            |           +--rw default-export-policy?
                            |                   rt-pol:default-polic\
y-type
                            +--rw peers
                               +--rw peer* [peer-id]
                                  +--rw peer-id    leafref
                                  +--rw enabled?   boolean
                                  +--rw filters
                                     +--rw policy-filter
                                             {bmp-filter-based-on-ro\
ute-policy}?
                                        +--rw export-policy*
                                        |       leafref
                                        +--rw default-export-policy?
                                                rt-pol:default-polic\
y-type

           ]]></sourcecode>
          </figure>
        </t>
      </section>
      <section title="Base BMP YANG Module" anchor="ietf-bmp">
        <figure>
          <sourcecode><![CDATA[
<CODE BEGINS> file "ietf-bmp@2022-01-27.yang"
module ietf-bmp {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bmp";
  prefix bmp;

  import ietf-yang-types {
    prefix yang;
  }
  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-bgp-types {
    prefix bt;
    description 
      "The bgp types is a model that contains just types.
      Vendors can include it without implications.";
    reference
      "RFC AAAA: BGP YANG module for Service Provider Network.
       RFC-EDITOR: please update XXX with the RFC ID assigned
       to I-D.ietf-idr-bgp-model";
  }
  import ietf-netconf-acm {
    prefix nacm;
    reference
      "RFC 8341: Network Configuration Access Control Model";
  }
  import ietf-routing-policy {
    prefix rt-pol;
    description 
      "This module is only needed if the feature 
      bmp-filter-based-on-route-policy is set";
    reference
      "RFC 9067: A YANG Data Model for Routing Policy";
  }
  import ietf-network-instance {
    prefix ni;
    reference
      "RFC 8529: YANG Data Model for Network Instances";
  }
  import ietf-interfaces {
    prefix if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }

  organization
    "IETF GROW Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/grow/>
     WG List:  <mailto:grow@ietf.org>

     Author:  Camilo Cardona
        <mailto:camilo@ntt.net>

     Author:  Paolo Lucente
        <mailto:cpaolo@ntt.net>

     Author:  Thomas Graf
        <mailto:thomas.graf@swisscom.com>

     Author:  Benoit Claise
        <mailto:benoit.claise@huawei.com>

     Author:  Dhananjay Patki
        <mailto:dhpatki@cisco.com>

     Author:  Prasad S. Narasimha
        <mailto:snprasad@cisco.com>";

  description
    "This module defines a YANG data model for configuration and
     monitoring of the BGP Monitoring Protocol (BMP).

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

     Copyright (c) 2022 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to,
     the license terms contained in the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 9196
     (https://www.rfc-editor.org/info/rfc9196); see the RFC itself
     for full legal notices.";

  revision 2025-01-02 {
    description
      "initial version";
    reference
      "RFC YYYY: BMP YANG Module
       RFC-EDITOR: please update YYYY with this RFC ID";
  }

  identity bmp-peer-selectors {
    description
      "Enum values for selecting peers";
  }

  identity bmp-peer-selectors-all-peers {
    base bmp-peer-selectors;
    description
      "This identity selects all peers under the RIB.
       When used, it acts as a default configuration.";
  }

  identity bmp-ni-types {
    description
      "Enum values for selecting one or more network instances for
      configuration";
  }

  identity bmp-ni-types-all-ni {
    base bmp-ni-types;
    description
      "This identity is an explicit way
       to select all network instances.";
  }

  identity bmp-ni-types-global-ni {
    base bmp-ni-types;
    description
      "Selecting the global or main network instance";
  }

  identity bmp-ni-types-non-global-ni {
    base bmp-ni-types;
    description
      "This identity is an explicit way
       to select all network instances except the global one.";
  }

  feature bmp-filter-based-on-route-policy {
    description
      "This feature means that the device
      is capable of filtering prefixes in BMP monitoring sessions";
  } 


  grouping bmp-ip-connection {
    description
      "Common parameters for establishing connectivity
       to a BMP monitoring station.";
    choice passive-or-active {
      mandatory true;
      description
        "Selects whether the device initiates 
        (active) or waits for (passive)
         the connection to the monitoring station, 
         as described in RFC 7854 Section 3.2.";
      case active {
        description
          "Device initiates the connection to 
          the monitoring station.";
        container active {
          description
            "The device starts the connection to
             the monitoring station";
          leaf network-instance {
            type leafref {
              path "/ni:network-instances/ni:network-instance/"
                 + "ni:name";
            }
            description
              "Network instance used to reach the monitoring 
               station.
               Defaults to the global network instance 
               if not specified.";
          }
          leaf station-address {
            type inet:ip-address;
            mandatory true;
            description
              "IP address of the monitoring station.";
          }
          leaf station-port {
            type inet:port-number;
            mandatory true;
            description
              "Port number of the monitoring station.";
          }
          choice local-endpoint {
            mandatory true;
            description "Local endpoint for the connection.";
            case monitored-router-address {
              leaf  monitored-router-address{
                type inet:ip-address;
                description
                  "Local IP address to source the connection.";
              }
            }
            case monitored-router-interface {
              leaf  monitored-router-interface {
                type leafref {
                  path "/if:interfaces/if:interface/if:name";
                }
                description
                  "Local interface to source the connection.";
              }
            }
          }
          leaf monitored-router-port {
            type inet:port-number;
            description
              "Optional local port for the active connection.";
          }
        }
      }
      case passive {
        description
          "Device waits for incoming connection at a local 
          endpoint.";
        container passive {
          description
            "Parameters for passively accepting 
            a connection from the monitoring station.";
          leaf network-instance {
            type leafref {
              path "/ni:network-instances/ni:network-instance/"
                 + "ni:name";
            }
            description
              "Network instance used for the passive connection.
               Defaults to the global network instance if not 
               specified.";
          }
          leaf station-address {
            type inet:ip-address;
            mandatory true;
            description
              "IP address of the monitoring station.";
          }
          leaf station-port {
            type inet:port-number;
            description
              "Optional value identifying the origin port of the
               connection. If provided, it MUST match the receiving
               connection.";
          }
          choice local-endpoint {
            mandatory true;
            description "Local endpoint for the connection.";
            case monitored-router-address {
              leaf monitored-router-address {
                type inet:ip-address;
                description
                  "Local IP address to accept the connection.";
              }
            }
            case monitored-router-interface {
              leaf monitored-router-interface {
                type leafref {
                  path "/if:interfaces/if:interface/if:name";
                }
                description
                  "Local interface to accept the connection.";
              }
            }
          }
          leaf monitored-router-port {
            type inet:port-number;
            mandatory true;
            description
              "Local port to accept the connection.";
          }
        }
      }
    }
    leaf dscp {
      type inet:dscp;
      description
        "DSCP value for marking traffic to the monitoring station.";
      reference
        "RFC 6991: Common YANG Data Types";
    }
  }

  grouping bmp-route-monitoring-peer-configuration {
    description
      "General configuration options for route monitoring 
       of a peer.";
    container filters {
      description
        "Filters for selecting which routes to export to 
        the monitoring station.";
      container policy-filter {
        if-feature "bmp-filter-based-on-route-policy";
        description
          "Filter routes using a routing policy from the 
          rt-pol module.  
          The policy should only contain accept/reject actions 
          and match prefix sets.";
        leaf-list export-policy {
          type leafref {
            path "/rt-pol:routing-policy/"
               + "rt-pol:policy-definitions/"
               + "rt-pol:policy-definition/rt-pol:name";
            require-instance true;
          }
          ordered-by user;
          description
            "Ordered list of policy names used to select 
            routes for export.";
        }
        leaf default-export-policy {
          type rt-pol:default-policy-type;
          default "accept-route";
          description
            "Default action if no export policy matches.";
        }
      }
    }
  }

  grouping bmp-peer-ribs-filter {
    description
      "Configuration containers for RIBs under the main 
      BMP container.";
    container address-families {
      description
        "List of address families for route monitoring.";
      list address-family {
        key "address-family-id";
        description
          "Address family, as defined in the BGP model.";
        leaf address-family-id {
          type identityref {
            base bt:afi-safi-type;
          }
          description
            "Address family identifier.";
        }
        leaf enabled {
          type boolean;
          default "true";
          description
            "Enables route monitoring messages for this address 
            family.";
        }
        container peers-configurations {
          description
            "Each peer under this BGP instance can be configured by 
             at most one of the following containers. 
             If the peer is not covered by any, 
             then no BMP route monitoring message
             should include information from/to that peer.
             If the peer is covered by more than one, then the
             priority is:
             1. peer
             2. peer-groups
             3. peer-type
             4. bmp-peer-selectors

             New child containers or new bmp-peer-selectors 
             instances SHOULD provide a way of unambiguously 
             selecting which configuration container should 
             be selected 
             for a peer in case of multiple matches. 

             Note that if the implementation supports module
             ietf-bmp-bgp-dependencies, the peer configurations 
             under the BGP container have priority over the 
             configurations under this container.";
          container peers {
            description
              "Configuration for individual peers.";
            list peer {
              key "peer-id";
              description
                "Peer identifier.";
              leaf peer-id {
                type string;
                description
                  "Identifier of the peer.";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables route monitoring messages for this peer.";
              }
              uses bmp-route-monitoring-peer-configuration;
            }
          }
          container peer-groups {
            description
              "Configuration for peer groups.";
            list peer-group {
              key "peer-group-id";
              description
                "Peer group identifier.";
              leaf peer-group-id {
                type string;
                description
                  "Identifier of the peer group.";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables route monitoring messages for 
                  this peer group.";
              }
              uses bmp-route-monitoring-peer-configuration;
            }
          }
          container bmp-peer-selectors {
            description
              "Configuration for peers selected by BMP peer 
              selectors.";
            list bmp-peer-selector {
              key "bmp-selector-id";
              description
                "Identification of peers
                 for which we send BMP data to the collector
                 using a peer type defined using a peer-types-bmp.
                 For instance, to create a default for all
                 peers use bmp-peer-selectors-all-peers";
              leaf bmp-selector-id {
                type identityref {
                  base bmp-peer-selectors;
                }
                description
                  "BMP peer selector identity.";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables routing monitoring messages
                   for the peer(s).";
              }
              uses bmp-route-monitoring-peer-configuration;
            }
          }
          container bgp-peer-types {
            description
              "Generic identification of peers to configure.";
            list bgp-peer-type {
              key "bgp-peer-type-id";
              description
                "Identification of peers
                 for which we send BMP data to the collector
                 using BGP peer-type (e.g. internal, external)
                ";
              leaf bgp-peer-type-id {
                type bt:peer-type;
                description
                  "BGP peer type.";
              }
            }
            leaf enabled {
              type boolean;
              default "true";
              description
                "Enables routing monitoring messages
                 for the peer(s).";
            }
            uses bmp-route-monitoring-peer-configuration;
          }
        }
      }
    }
  }

  grouping generic-network-instance-configuration {
        description
          "Generic configuration of a network instance.";
        leaf enabled {
          type boolean;
          default "true";
          description
            "Enables route monitoring
             messages for the network instance.";
        }
        container adj-rib-in-pre {
          description
            "Configuration for the adj-rib-in pre-policy.";
          reference
            "RFC7854: BGP Monitoring Protocol (BMP), Section 2.";
          uses bmp-peer-ribs-filter;
        }
        container adj-rib-in-post {
          description
            "Configuration for the adj-rib-in post-policy";
          reference
            "RFC7854: BGP Monitoring Protocol (BMP), Section 2.";
          uses bmp-peer-ribs-filter;
        }
        container local-rib {
          description
            "Configuration for the local-rib.";
          reference
            "RFC9069: Support for Local RIB in the BGP Monitoring
             Protocol (BMP), Section 3.";
          container address-families {
            description
              "List of address families to enable for local-rib.";
            list address-family {
              key "address-family-id";
              description
                "Address family to enable for local-rib";
              leaf address-family-id {
                type identityref {
                  base bt:afi-safi-type;
                }
                description
                  "Address family id to enable for local-rib";
              }
              uses bmp-route-monitoring-peer-configuration;
            }
          }
        }
        container adj-rib-out-pre {
          description
            "Configuration for the adj-rib-out pre-policy";
          uses bmp-peer-ribs-filter;
          reference
            "RFC8671: Support for Adj-RIB-Out in the BGP Monitoring
             Protocol (BMP) , Section 3.";
        }
        container adj-rib-out-post {
          description
            "Configuration for the adj-rib-out post-policy";
          uses bmp-peer-ribs-filter;
          reference
            "RFC8671: Support for Adj-RIB-Out in the BGP Monitoring
             Protocol (BMP) , Section 3.";
        }
      }

  grouping bmp-route-monitoring-sources {
    description
      "Configuration of route monitoring sources.";
    reference
      "RFC7854:  BGP Monitoring Protocol, Section 5.";
    container network-instance-configuration {
      description
        "This container offers options for configuring BMP
        route-monitoring messages for each network instance either
        selecting it through its name or through a
        network-instance-selectors.

        Network-instance-selectors are instances of bmp-ni-types that
        select one or more network instances for configuration.  For
        instance, bmp-ni-types-all-ni to configure all network
        instances (serving as a default). 

        Network-instance can be at most configured by one of the
        containers. If the network instance is not covered by any,
        then no BMP route monitoring message should include that
        network instance. If more than one container matches 
        the network instance, the priority for selecting the 
        container to use for configuration is:

         1. The configuration under the BGP container, if supported
            by the implementation (see
            ietf-bmp-bgp-dependencies.yang)
         2. For any other named network instance, the configuration
            under the element listed with its name under the
            network-instance container.
         3. The configuration under network-instance-groups of type
            bmp-ni-types-non-global-ni if existing and not the global
            network instance.
         4. the configuration under network-instance-groups under the
            element bmp-ni-types-all-ni.

         If the implementation has a name for the global network
         instance (e.g. 'main') it can be configure directly under
         the network-instances container.

         New identities under bmp-ni-types or augmentations of this
         container in the future SHOULD provide a clear way of
         selecting the configuration container for a network-instance
         without ambiguity.";

      container network-instances {
        description 
          "Configuration for specific network instances";

        list network-instance {
          key "network-instance-id";
          description
            "Network instance to monitor using BMP.";
          leaf network-instance-id {
            type leafref {
              path "/ni:network-instances/ni:network-instance/"
                 + "ni:name";
            }
            description
              "Name of the network instance.";
          }
          uses generic-network-instance-configuration;
      }
      }

      container network-instance-selectors {
        description "Configuration of network instances. Uses 
         bmp-ni-types to identify one or a group of 
         network instances to configure.";
        list network-instance-selector {
          key "network-instance-selector-id";
          description
            "Network instance(s) to monitor using BMP.";
          leaf network-instance-selector-id {
            type identityref {
              base bmp-ni-types;
            }
            description
              "Configures one or multiple network instances selected
               based on a bmp-ni-types identity (e.g.
               bmp-ni-types-all-ni for all of them).";
          }
          uses generic-network-instance-configuration;

      }
      }
    }
  }

  container bmp {
    description
      "Top-level container for BMP configuration.";
    container bmp-monitoring-stations {
      description
        "List of BMP monitoring stations.";
      list bmp-monitoring-station {
        key "id";
        description
          "Configuration for a BMP monitoring station.";
        leaf id {
          type string;
          description
            "Unique identifier for the monitoring station.";
        }
        leaf description {
          type string;
          description 
            "Description of the BMP monitoring station.";
        }
        container connection {
          description
            "Connection parameters for the monitoring station.";
          uses bmp-ip-connection;
          container tcp-options {
            description
              "TCP options for the connection to the monitoring 
               station.";
            leaf maximum-segment-size {
              type uint16;
              description
                "Maximum segment size for the TCP connections.
                 In the absence of this container, the system
                 will select the maximum segment size for this
                 connection.";
            }
            // Taken from the bgp yang module
            leaf mtu-discovery {
              type boolean;
              default "true";
              description
                "Enables path MTU discovery for the TCP sessions
                 (true) or disables it (false).";
              reference
                "RFC 1191: Path MTU discovery.";
            }
          }
          leaf initial-delay {
            type uint32;
            units "seconds";
            default "0";
            description
              "Initial delay before connecting to the monitoring 
               station.
               Useful for allowing BGP sessions to stabilize 
               before starting BMP.";
          }
          container backoff {
            description
              "Configures the backoff strategy after a connection
               retry";
            reference
              "RFC7854 Section 3.2";
            choice backoff-options {
              description
                "Options for backoff strategies";
              reference
                "RFC7854 Section 3.2";
              case simple-exponential {
                description
                  "Simple exponential backoff with limits.";
                container simple-exponential {
                  description
                    "Simple exponential backoff with limits.
                     Starts with the initial backoff and doubles
                     the backoff after every retry until reaching the
                     maximum backoff.";
                  leaf initial-backoff {
                    type uint32;
                    units "seconds";
                    default "30";
                    description
                      "Initial backoff time";
                  }
                  leaf maximum-backoff {
                    type uint32;
                    units "seconds";
                    default "720";
                    description
                      "Maximum backoff time";
                  }
                }
              }
            }
          }
        }
        container bmp-data {
          description
            "Configuration of BMP data sent to the monitoring 
            station.";
          leaf initiation-message {
            type string;
            description
              "User-defined message to append to the
               initiation message.";
            reference
              "RFC7854:  BGP Monitoring Protocol,
               Section 4.3 and 4.4";
          }
          container bmp-statistics-report {
            presence "Enable BMP statistics report.";
            description
              "Configuration for periodic statistics reports.";
            reference
              "RFC7854:  BGP Monitoring Protocol,
               Section 4.8";
            leaf statistics-interval {
              type uint32;
              units "seconds";
              mandatory true;
              description
                "Interval between statistics report messages.";
            }
          }
          container bmp-route-monitoring {
            description
              "Configuration of the data sources for
               route-monitoring messages";
            uses bmp-route-monitoring-sources;
          }
          container bmp-route-mirroring {
            presence 
              "Enable BMP route mirroring to the monitoring 
               station.";
            description
              "Configuration for route mirroring to the 
               monitoring station.";
          }
        }

        container session-stats {
          config false;
          description
            "Operational statistics for the monitoring station.
             Counters are reset after each successful 
             connection or reset.";
          leaf discontinuity-time {
            type yang:date-and-time;
            mandatory true;
            description
              "The time on the most recent occasion at which any
               one or more of this station's counters suffered a
               discontinuity. If no such discontinuities have
               occurred since the last re-initialization of the
               local management subsystem, then this node contains
               the time the local management subsystem
               re-initialized itself.";
          }
          leaf established-session {
            type boolean;
            description
              "Indicates if the session is currently
               established.";
          }
          leaf total-route-monitoring-messages {
            type uint64;
            description
              "Number of route-monitoring messages sent.";
          }
          leaf total-statistics-messages {
            type uint64;
            description
              "Number of statistics messages sent.";
          }
          leaf total-peer-down-messages {
            type uint64;
            description
              "Number of peer-down messages sent.";
          }
          leaf total-peer-up-messages {
            type uint64;
            description
              "Number of peer-up messages sent.";
          }
          leaf total-initiation-messages {
            type uint64;
            description
              "Number of initiation messages sent";
          }
          leaf total-route-mirroring-messages {
            type uint64;
            description
              "Number of route-mirroring messages sent.";
          }
          leaf total-termination-messages {
            type uint64;
            description
              "Number of termination messages sent.";
          }

          grouping bmp-af-stats-with-peers {
            description
              "Generic statistics for an address family that can be 
              disaggregated by peers";

            container peers-stats {
              description
               "Peer stats";
              list peer {
                key "peer-id";

                description
                  "List of peers";

                leaf peer-id {
                  type string;
                  description 
                    "Peer id";
                }

                leaf enabled {
                  type boolean;
                  description
                    "Indicates if route monitoring messages are
                     currently enabled for the peer under this 
                     network instance, address family, and RIB.";
                }

                leaf 
                  total-route-monitoring-updated-prefixes-per-peer {
                  type uint64;
                  description
                    "Number of prefixes updated for this peer.";
                }
                leaf 
                  total-route-monitoring-withdraw-prefixes-per-peer {
                  type uint64;
                  description
                    "Number of prefixes withdrawn for this peer.";
                }

              }
            }
          }

          grouping bmp-af-stats {

            description
              "Group for statistics for an address family.";
            leaf enabled {
                type boolean;
                description
                  "Indicates if any route monitoring messages
                   are currently enabled for the address family
                   within the RIB.";
              }
              leaf total-route-monitoring-updated-prefixes-per-af {
                type uint64;
                description
                  "Number of prefixes updated for this address 
                   family.";
              }
              leaf total-route-monitoring-withdraw-prefixes-per-af {
                type uint64;
                description
                  "Number of prefixes withdrawn for this address 
                   family.";
              }

          }

          grouping bmp-rib-with-peers-stats {
            description
              "Generic statistics for a RIB with peers.";
            container address-families {
            description
              "List of address families to list stats.";
            list address-family {
              key "address-family-id";
              description
                "Address family to enable for local-rib";
              leaf address-family-id {
                type identityref {
                  base bt:afi-safi-type;
                }

                description
                  "Address family ID for local-rib.";
              }
                uses bmp-af-stats;
                uses bmp-af-stats-with-peers;
              }
            }

          }

          grouping bmp-rib-stats {
            description
              "Generic statistics per RIB.";
            leaf enabled {
              type boolean;
              description
                "Indicates if any Route Monitoring messages are 
                 currently enabled for the RIB.";
            }
            leaf total-route-mirroring-messages-per-rib {
              type uint64;
              description
                "Number of route-mirroring messages sent for 
                this RIB.";
            }
            
          }


          container route-monitoring-stats {
            description 
              "Statistics of route monitoring messages disaggregated 
               by RIB and peers where applicable.";
            container network-instances-stats {
              description
                "Stats per network-instance";
              list network-instance {
                key 'network-instance-name';

                description
                  "Network instance stats list";

                leaf network-instance-name {
                  type leafref {
                    path "/ni:network-instances/ni:network-instance/"
                       + "ni:name";
                  }
                  description 
                    "Name of the network instance.";
                }
                leaf enabled {
                  type boolean;
                  description
                    "Indicates if route monitoring messages are
                     currently enabled for the network instance.";
                }

                leaf total-route-mirroring-messages-per-ni {
                  type uint64;
                  description
                    "Number of route-mirroring messages sent for 
                     this network instance.";
                }

                container ribs-stats {
                  description 
                    "Statistics for the different RIBs.";
                  container adj-rib-in-pre {
                    description
                      "Statistics for adj-rib-in-pre.";
                    uses bmp-rib-stats;
                    uses bmp-rib-with-peers-stats;

                  }

                  container adj-rib-in-post {
                    description
                      "Statistics for adj-rib-in-post";
                    uses bmp-rib-stats;
                    uses bmp-rib-with-peers-stats;

                  }

                  container local-rib {
                    description
                      "Statistics for local-rib";
                    uses bmp-rib-stats;
                    container address-families {
                      description
                        "List of address families to for stats.";
                      list address-family {
                        key "address-family-id";
                        description
                          "Address family to enable for local-rib";
                        leaf address-family-id {
                          type identityref {
                            base bt:afi-safi-type;
                          }
                          description
                            "Address family ID for local-rib";
                        }
                          uses bmp-af-stats;
                        }
                      }

                  }

                  container adj-rib-out-pre {
                    description
                      "Statistics for adj-rib-out-pre";
                    uses bmp-rib-stats;
                    uses bmp-rib-with-peers-stats;

                  }

                  container adj-rib-out-post {
                    description
                      "Statistics for adj-rib-out-post";
                    uses bmp-rib-stats;
                    uses bmp-rib-with-peers-stats;

                  }


                }
            }

            }

            }
        }
        container actions {
          nacm:default-deny-all;
          description
            "Container with actions for BMP operation.";
          action session-reset {
            description
              "Resets the session for a station.";
            output {
              choice outcome {
                description
                  "Output of the reset operation. Either a success or
                   failure. For the latter, the reason for the
                   error is provided.";
                leaf success {
                  type empty;
                  description
                    "Reset successful.";
                }
                leaf failure {
                  type string;
                  description
                    "Reset could not be performed.
                     The reason is included in the field.";
                }
              }
            }
          }
          action session-counter-reset {
            description
              "Resets the counters of a BMP monitoring station.";
            output {
              choice outcome {
                description
                  "Output of the reset operation. Either a success or
                   failure. For the latter, the reason for the
                   error is provided.";
                leaf success {
                  type empty;
                  description
                    "Counter reset successful.";
                }
                leaf failure {
                  type string;
                  description
                    "Reset could not be performed.
                     The reason is included in the field.";
                }
              }
            }
          }
        }
      }
    }

  }

}
<CODE ENDS>
            ]]></sourcecode>
        </figure>
      </section>
      <section title="BGP dependencies for BMP YANG Module" anchor="ietf-bmp-bgp-dependencies.yang">
        <figure>
          <sourcecode><![CDATA[
<CODE BEGINS> file "ietf-bmp-bgp-dependencies.yang@2022-01-27.yang"
module ietf-bmp-bgp-dependencies {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bmp-bgp-dependencies";
  prefix bmp-ietf-dep;

  import ietf-bmp {
    prefix bmp;
  }

  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA Version).";
  }

  import ietf-bgp {
    prefix bgp;
    reference
      "I-D.draft-ietf-idr-bgp-model-17:
       BGP YANG module for Service Provider Network.";
  }

  import ietf-bgp-types {
    prefix bt;
    reference
      "RFC AAAA: BGP YANG module for Service Provider Network.
       RFC-EDITOR: please update XXX with the RFC ID assigned
       to I-D.ietf-idr-bgp-model";
  }

  organization
    "IETF GROW Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/grow/>
     WG List:  <mailto:grow@ietf.org>

     Author:  Camilo Cardona
        <mailto:camilo@ntt.net>

     Author:  Paolo Lucente
        <mailto:cpaolo@ntt.net>

     Author:  Thomas Graf
        <mailto:thomas.graf@swisscom.com>

     Author:  Benoit Claise
        <mailto:benoit.claise@huawei.com>";
  description
    "This module specifies a structure for BMP
     (BGP Monitoring Protocol) configuration and monitoring.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

     Copyright (c) 2022 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 9196
     (https://www.rfc-editor.org/info/rfc9196); see the RFC itself
     for full legal notices.";

  revision 2025-01-02 {
    description
      "initial version";
    reference
      "RFC YYYY: BMP YANG Module
       RFC-EDITOR: please update YYYY with this RFC ID";
  }
  grouping bmp-ni-peer-ribs-filter {
    description
      "Containers for configuring RIBs under the ietf-bgp:bgp
       container.";
    container address-families {
      description
        "container for lists of address-families";
      list address-family {
        key "address-family-id";
        description
          "List of address families.
           The name of the address family, as defined
           in the BGP model is used for keying.";
        leaf address-family-id {
          type identityref {
            base bt:afi-safi-type;
          }
          description
            "Address family id to configure";
        }
        leaf enabled {
          type boolean;
          default "true";
          description
            "Enables route monitoring messages
             for the address family";
        }
        container peers-configurations {
          description
            "Every peer under the configured network instance can be
            at most configured by one of the next containers.  If the
            peer is not covered by any, then no BMP message should
            include information from/to that peer.  If the peer is
            covered by more than one, then the priority is:
             1. peers
             2. peer-groups
             3. peer-type
             4. bmp-peer-selectors

             New child containers or new bmp-peer-selectors instances
             SHOULD provide a way of unambiguously selecting which
             configuration container should be selected for a peer in
             case multiple matches.
            ";
          container bmp-peer-selectors {
            description
              "Generic identification of peers to configure.";
            list bmp-peer-selector {
              key "bmp-selector-id";
              description
                "Identification of peers
                 for which we send BMP data to the collector
                 using a peer type defined using a peer-types-bmp.
                 For instance, to create a default for all
                 peers use bmp-peer-selectors-all-peers";
              leaf bmp-selector-id {
                type identityref {
                  base bmp:bmp-peer-selectors;
                }
                description
                  "Peers to configure using a BMP peer selector";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables routing monitoring messages
                   for the peer(s).";
              }
              uses bmp:bmp-route-monitoring-peer-configuration;
            }
          }
          container peer-types {
            description
              "Generic identification of peers to configure.";
            list peer-type {
              key "peer-type-id";
              description
                "Identification of peers
                 for which we send BMP data to the collector
                 using BGP peer-type (e.g. internal, external)
                ";
              leaf peer-type-id {
                type bt:peer-type;
                description
                  "BGP Peer type to configure";
              }
            }
            leaf enabled {
              type boolean;
              default "true";
              description
                "Enables routing monitoring messages
                 for the peer(s).";
            }
            uses bmp:bmp-route-monitoring-peer-configuration;
          }
          container peer-groups {
            description
              "Identification of peer-groups
               to configure";
            list peer-group {
              key "peer-group";
              description
                "Identification of peer-groups
                 for which we send BMP data to the collector";
              leaf peer-group {
                type leafref {
                  path "../../../../../../../../../../../"
                     + "bgp:peer-groups/bgp:peer-group/"
                     + "bgp:name";
                }
                description
                  "Peergroup to configure";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables routing monitoring messages
                   for the peer-group(s).";
              }
              uses bmp:bmp-route-monitoring-peer-configuration;
            }
          }
          container peers {
            description
              "Identification of peers
               for which we send BMP data to the collector";
            list peer {
              key "peer-id";
              description
                "Identification of peers
                 for which we send BMP data to the collector";
              leaf peer-id {
                type leafref {
                  path "../../../../../../../../../../../"
                     + "bgp:neighbors/bgp:neighbor/"
                     + "bgp:remote-address";
                }
                description
                  "Peer to configure";
              }
              leaf enabled {
                type boolean;
                default "true";
                description
                  "Enables routing monitoring messages
                   for the peer(s).";
              }
              uses bmp:bmp-route-monitoring-peer-configuration;
            }
          }
        }
      }
    }
  }

  // Augment the BGP module to include data for network instances
  

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bgp:bgp" {
    description
      "Augments the BGP container under control-plane-protocol.  It
       can be used to configure the global BGP instance, but also the
       network-instances under the module ietf-network-instance";
    container bmp-data {
      description
        "Container for the configuration of BMP data
         related to this BGP instance";
      container bmp-monitoring-stations {
        presence 
          "If this container exists, the network instance must be
          configured using this";
        description
          "Container for the configuration of BMP data
           related to this BGP instance";
        list bmp-monitoring-station {
          key "id";
          description
            "Container for the configuration of BMP data for this
             monitoring-station related to this BGP instance";
          leaf id {
            // TODO: We have not been able to configure
            // the schema mount to recognize this yet. 
            // Until we solve it, we will keep it as it is.
            //type leafref {
            //  path "/bmp:bmp/bmp:bmp-monitoring-stations/"
            //        + "bmp:bmp-monitoring-station/bmp:id";
            //}
            type string;
            description
              "Identification string for the monitoring station";
          }
          container bmp-route-monitoring {
            presence "The presence of this container means the
                      Network instance it contains MUST
                      be configured using it";
            description
              "Configuration of the data sources for
               route-monitoring messages for this network-instance";
            leaf enabled {
              type boolean;
              default "true";
              description
                "Enables routing monitoring
                 messages for the network instance.";
            }
            container adj-rib-in-pre {
              description
                "Configuration for the adj-rib-in pre-policy";
              reference
                "RFC7854: BGP Monitoring Protocol (BMP), Section 2.";
              uses bmp-ni-peer-ribs-filter;
            }
            container adj-rib-in-post {
              description
                "Configuration for the adj-rib-in post-policy";
              reference
                "RFC7854: BGP Monitoring Protocol (BMP), Section 2.";
              uses bmp-ni-peer-ribs-filter;
            }
            container local-rib {
              description
                "Configuration for the local-rib";
              reference
                "RFC9069: Support for Local RIB in the BGP Monitoring
                 Protocol (BMP), Section 3.";
              container address-families {
                description
                  "List of address families to enable for
                   local-rib.";
                list address-family {
                  key "address-family-id";
                  description
                    "Address family to enable for local-rib";
                  leaf address-family-id {
                    type identityref {
                      base bt:afi-safi-type;
                    }
                    description
                      "Address family id to enable for local-rib";
                  }
                  uses bmp:bmp-route-monitoring-peer-configuration;
                }
              }
            }
            container adj-rib-out-pre {
              description
                "Configuration for the adj-rib-out pre-policy";
              uses bmp-ni-peer-ribs-filter;
              reference
                "RFC8671: Support for Adj-RIB-Out in the BGP
                 Monitoring Protocol (BMP) , Section 3.";
            }
            container adj-rib-out-post {
              description
                "Configuration for the adj-rib-out post-policy";
              uses bmp-ni-peer-ribs-filter;
              reference
                "RFC8671: Support for Adj-RIB-Out in the BGP
                 Monitoring Protocol (BMP) , Section 3.";
            }
          }
        }
      }
    }
  }
}
<CODE ENDS>
            ]]></sourcecode>
        </figure>
      </section>
      <section title="TCP dependencies for BMP YANG Module" anchor="ietf-bmp-tcp-dependencies.yang">
        <figure>
          <sourcecode><![CDATA[
<CODE BEGINS> file "ietf-bmp-tcp-dependencies.yang@2022-01-27.yang"
module ietf-bmp-tcp-dependencies {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bmp-tcp-dependencies";
  prefix bmp-tcp;

  import ietf-bmp {
    prefix bmp;
  }

  import ietf-tcp-common {
    prefix tcpcmn;
    reference
      "I-D.ietf-netconf-tcp-client-server: YANG Groupings for TCP
       Clients and TCP Servers.";
  }
  import ietf-key-chain {
    prefix key-chain;
    reference
      "RFC 8177: YANG Key Chain.";
  }

  organization
    "IETF GROW Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/grow/>
     WG List:  <mailto:grow@ietf.org>

     Author:  Camilo Cardona
        <mailto:camilo@ntt.net>

     Author:  Paolo Lucente
        <mailto:cpaolo@ntt.net>

     Author:  Thomas Graf
        <mailto:thomas.graf@swisscom.com>

     Author:  Benoit Claise
        <mailto:benoit.claise@huawei.com>";
  description
    "This module specifies a structure for BMP
     (BGP Monitoring Protocol) configuration and monitoring.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

     Copyright (c) 2022 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 9196
     (https://www.rfc-editor.org/info/rfc9196); see the RFC itself
     for full legal notices.";

  revision 2025-01-02 {
    description
      "initial version";
    reference
      "RFC YYYY: BMP YANG Module
       RFC-EDITOR: please update YYYY with this RFC ID";
  }
  augment "/bmp:bmp/bmp:bmp-monitoring-stations/"
    + "bmp:bmp-monitoring-station/bmp:connection/bmp:tcp-options" {
    description "Augment the tcp options of the BMP model";

    uses tcpcmn:tcp-common-grouping;
    container secure-session {
      presence "Means the session should be secure. ";
      description
        "Container for describing how a particular BMP session
         is to be secured.";
      choice authentication {
        mandatory true;
        case ao {
          leaf ao-keychain {
            type key-chain:key-chain-ref;
            description
              "Reference to the key chain that will be used by
               this model. Applicable for TCP-AO and TCP-MD5
               only";
            reference
              "RFC 8177: YANG Key Chain.";
          }
          description
            "Uses TCP-AO to secure the session. Parameters for
             those are defined as a grouping in the TCP YANG
             model.";
          reference
            "RFC 5925 - The TCP Authentication Option.";
        }
        case md5 {
          leaf md5-keychain {
            type key-chain:key-chain-ref;
            description
              "Reference to the key chain that will be used by
               this model. Applicable for TCP-AO and TCP-MD5
               only";
            reference
              "RFC 8177: YANG Key Chain.";
          }
          description
            "Uses TCP-MD5 to secure the session. Parameters for
             those are defined as a grouping in the TCP YANG
             model.";
          reference
            "RFC 5925: The TCP Authentication Option.";
        }
        description
          "Choice of TCP authentication.";
      }
    }
  }
}
<CODE ENDS>
            ]]></sourcecode>
        </figure>
      </section>
    </section>
    <section title="Security Considerations" anchor="security-considerations">
      <t> 
         The YANG module specified in this document defines a schema for data
          that is designed to be accessed via network management protocols such
          as NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>. The lowest NETCONF layer is the secure transport
          layer, and the mandatory-to-implement secure transport is Secure
          Shell (SSH) <xref target="RFC6242"/>. The lowest RESTCONF layer is
          HTTPS, and the mandatory-to-implement secure transport is TLS <xref target="RFC8446"/>. The NETCONF Access Control Model (NACM) <xref target="RFC8341"/> provides the means to restrict access for
          NETCONF or RESTCONF users to a preconfigured subset of all
          available NETCONF or RESTCONF protocol operations and content. 
      </t>
      <t>
         BGP data is sensitive for security considerations. The model described
          in this document could be used to send BGP information to malicious
          BMP stations. Write access to this model SHOULD therefore be
          properly protected. 
      </t>
      <t>
          The session-reset action can demand a considerable amount of resources
          from network elements. It SHOULD thus be protected from unauthorized access.
      </t>
    </section>
    <section title="IANA Considerations" anchor="iana-considerations">
      <section title="The IETF XML Registry">
        <t>
           This document registers a URIs in the IETF XML 
           registry <xref target="RFC3688"/>.  Following the format in 
           <xref target="RFC3688"/>, the following registrations are
           requested:</t>
        <t>
          <figure>
            <sourcecode>
   URI: urn:ietf:params:xml:ns:yang:ietf-bmp
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.
             </sourcecode>
          </figure>
        </t>
      </section>
      <section title="The YANG Module Name Registration">
        <t>
           This document registers the following YANG module in the "
           YANG Module Names" registry  
           registry <xref target="RFC6020"/>:</t>
        <t>
          <figure>
            <sourcecode>
   Name: ietf-bmp
   Namespace: urn:ietf:params:xml:ns:yang:ietf-bmp
   Prefix: bmp
   Reference: [This RFC-to-be]
             </sourcecode>
          </figure>
        </t>
      </section>
    </section>
    <section title="Open Issues">
      <t>
        <list counter="a">
          <t>The security considerations section will have to be aligned with 
              https://trac.ietf.org/trac/ops/wiki/yang-security-guidelines</t>
        </list>
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>
      <?rfc include="reference.RFC.3688.xml"?>
      <?rfc include="reference.RFC.6241.xml"?>
      <?rfc include="reference.RFC.6242.xml"?>
      <?rfc include="reference.RFC.6991.xml"?>
      <?rfc include="reference.RFC.7854.xml"?>
      <?rfc include="reference.RFC.8671.xml"?>
      <?rfc include="reference.RFC.9069.xml"?>
      <?rfc include="reference.RFC.8040.xml"?>
      <?rfc include="reference.RFC.8174.xml"?>
      <?rfc include="reference.RFC.8349.xml"?>
      <?rfc include="reference.RFC.8446.xml"?>
      <?rfc include="reference.RFC.8341.xml"?>
      <?rfc include="reference.RFC.6020.xml"?>
      <?rfc include="reference.RFC.8529.xml"?>
      <?rfc include="reference.RFC.1191.xml"?>
      <?rfc include="reference.RFC.8177.xml"?>
      <?rfc include="reference.RFC.9293.xml"?>
      <?rfc include='reference.I-D.ietf-idr-bgp-model.xml'?>
      <?rfc include='reference.I-D.ietf-netconf-tcp-client-server.xml'?>
    </references>
    <!--
    <references title="Informative References">
    </references>
        -->
    <?rfc needLines="100"?>
    <!--   
    <section title="Changes between revisions">
      </t>   
      <t>v00 - v01
        <list style="symbols">
          <t>Placeholder: xxx</t>
          <t>Placeholder: yyy</t>
        </list>
      </t>
    </section>    
  -->
    <section title="Examples">
      <t>This section shows some examples of BMP configuration using the
            model.</t>
      <section title="Example one">
        <t>In this example, the device connects to a monitoring station
            using an active connection. 
            The devices sends route monitoring messages for the global
            instance, the adj-rib-in-pre RIB, the IPv4/IPv6 address family,
            and external peers.
            </t>
        <t>
          <figure anchor="example_one">
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version="1.0"?>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
  <bmp-monitoring-stations>
    <bmp-monitoring-station>
      <id>1</id>
      <connection>
        <active>
          <station-address>192.0.2.1</station-address>
          <station-port>57992</station-port>
          <monitored-router-address>192.0.2.2</monitored-router-addr\
ess>
        </active>
      </connection>
      <bmp-data>
        <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                <network-instance-selector-id>bmp-ni-types-all-ni</n\
etwork-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <peers-configurations>
                        <bgp-peer-types>
                          <bgp-peer-type>
                            <bgp-peer-type-id>external</bgp-peer-typ\
e-id>
                          </bgp-peer-type>
                        </bgp-peer-types>
                      </peers-configurations>
                    </address-family>
                    <address-family>
                      <address-family-id xmlns:bt="urn:ietf:params:x\
ml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <peers-configurations>
                        <bgp-peer-types>
                          <bgp-peer-type>
                            <bgp-peer-type-id>external</bgp-peer-typ\
e-id>
                          </bgp-peer-type>
                        </bgp-peer-types>
                      </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
            </network-instance-selectors>
          </network-instance-configuration>
        </bmp-route-monitoring>
      </bmp-data>
    </bmp-monitoring-station>
  </bmp-monitoring-stations>
</bmp>
]]></sourcecode>
          </figure>
        </t>
      </section>
      <section title="Example two">
        <t>In the next example, the device connects to a monitoring station
            using a passive connection, over the network-instance monitoring.
            The configuration of route monitoring messages is more complex than
            in the previous example.  It shows how to combine the configuration
            of general identities of network instances and peers (e.g.
            bmp-ni-types-all-ni for NI, external for peers), and individual
            configurations to support a more complex requirement. This is what
                the example expects to configure:</t>
        <t>
          <list style="symbols">
            <t> For the global network instance,
            the device sends updates for adj-rib-in-pre, address families IPv4
            and IPv6. It sends updates for all external peers except peer
            198.51.100.11, which is disabled.</t>
            <t>Network instance monitoring is disabled for route monitoring messages. </t>
            <t>For the rest of network
            instances, we are enabling messages from adj-rib-in-pre, address
                families IPv4/IPv6, and for all peers.</t>
          </list>
        </t>
        <t>
          <figure anchor="example_two">
            <sourcecode><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
  <control-plane-protocols>
    <control-plane-protocol>
      <type xmlns:bgp="urn:ietf:params:xml:ns:yang:ietf-bgp">bgp:bgp\
</type>
      <name>BGP</name>
      <bgp xmlns="urn:ietf:params:xml:ns:yang:ietf-bgp">
        <global>
          <as>64496</as>
          <identifier>192.0.2.1</identifier>
        </global>
        <neighbors>
          <neighbor>
            <!-- Neighbor-specific configuration parameters -->
            <remote-address>198.51.100.11</remote-address>
            <peer-as>64497</peer-as>
          </neighbor>
          <!-- Additional neighbors if needed -->
        </neighbors>
        <!-- Additional BGP configuration elements -->
        <bmp-data xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp-bgp-de\
pendencies">
            <bmp-monitoring-stations>
            <bmp-monitoring-station>
                <id>2</id>
                <bmp-route-monitoring>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                        <address-family-id xmlns:bt="urn:ietf:params\
:xml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                  <peers-configurations>
                      <peers>
                        <peer>
                          <peer-id>198.51.100.11</peer-id>
                          <enabled>false</enabled>
                        </peer>
                      </peers>
                        <peer-types>
                        <peer-type>
                          <peer-type-id>external</peer-type-id>
                        </peer-type>
                        </peer-types>
                  </peers-configurations>
                    </address-family>
                    <address-family>
                        <address-family-id xmlns:bt="urn:ietf:params\
:xml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                  <peers-configurations>
                      <peers>
                        <peer>
                          <peer-id>198.51.100.11</peer-id>
                          <enabled>false</enabled>
                        </peer>
                      </peers>
                        <peer-types>
                        <peer-type>
                          <peer-type-id>external</peer-type-id>
                        </peer-type>
                        </peer-types>
                  </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
                </bmp-route-monitoring>
            </bmp-monitoring-station>
            </bmp-monitoring-stations>
        </bmp-data>
      </bgp>
    </control-plane-protocol>
  </control-plane-protocols>
</routing>
<bmp xmlns="urn:ietf:params:xml:ns:yang:ietf-bmp">
    <bmp-monitoring-stations>
      <bmp-monitoring-station>
        <id>2</id>
        <connection>
          <passive>
            <network-instance>monitoring</network-instance>
            <station-address>192.0.2.1</station-address>
            <monitored-router-address>192.0.2.2</monitored-router-ad\
dress>
            <monitored-router-port>57993</monitored-router-port>
          </passive>
        </connection>
        <bmp-data>
          <bmp-route-monitoring>
          <network-instance-configuration>
            <network-instance-selectors>
              <network-instance-selector>
                  <network-instance-selector-id>bmp-ni-types-all-ni<\
/network-instance-selector-id>
                <adj-rib-in-pre>
                  <address-families>
                    <address-family>
                        <address-family-id xmlns:bt="urn:ietf:params\
:xml:ns:yang:ietf-bgp-types">bt:ipv6-unicast</address-family-id>
                      <peers-configurations>
                      <bmp-peer-selectors>
                        <bmp-peer-selector>
                            <bmp-selector-id>bmp-peer-selectors-all-\
peers</bmp-selector-id>
                        </bmp-peer-selector>
                      </bmp-peer-selectors>
                  </peers-configurations>
                    </address-family>
                    <address-family>
                        <address-family-id xmlns:bt="urn:ietf:params\
:xml:ns:yang:ietf-bgp-types">bt:ipv4-unicast</address-family-id>
                      <peers-configurations>
                    <bmp-peer-selectors>
                        <bmp-peer-selector>
                          <bmp-selector-id>bmp-peer-selectors-all-pe\
ers</bmp-selector-id>
                      </bmp-peer-selector>
                    </bmp-peer-selectors>
                      </peers-configurations>
                    </address-family>
                  </address-families>
                </adj-rib-in-pre>
              </network-instance-selector>
          </network-instance-selectors>
              <network-instances>
              <network-instance>
                <network-instance-id>monitoring</network-instance-id>
                <enabled>false</enabled>
              </network-instance>
          </network-instances>
          </network-instance-configuration>
          </bmp-route-monitoring>
        </bmp-data>
      </bmp-monitoring-station>
    </bmp-monitoring-stations>
  </bmp>
]]></sourcecode>
          </figure>
        </t>
      </section>
    </section>
    <section title="Acknowledgements" numbered="no">
      <t>
          The authors would like to thank Yimin Shen, Jeff Haas, Pierre Vander
            Vorst, and Tom Petch for their review and feedback.
        </t>
    </section>
  </back>
</rfc>
<!-- Local Variables: -->
<!-- fill-column:72 -->
<!-- End: -->
