<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-grow-bmp-adj-rib-out-07" indexInclude="true" ipr="trust200902" number="8671" prepTime="2019-11-05T21:50:04" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="7854" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-grow-bmp-adj-rib-out-07" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8671" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="BMP Adj-RIB-Out">Support for Adj-RIB-Out in the BGP Monitoring Protocol (BMP)</title>
    <seriesInfo name="RFC" value="8671" stream="IETF"/>
    <author fullname="Tim Evens" initials="T" surname="Evens">
      <organization showOnFrontPage="true">Cisco Systems</organization>
      <address>
        <postal>
          <street>2901 Third Avenue, Suite 600</street>
          <city>Seattle</city>
          <region>WA</region>
          <code>98121</code>
          <country>United States of America</country>
        </postal>
        <email>tievens@cisco.com</email>
      </address>
    </author>
    <author fullname="Serpil Bayraktar" initials="S" surname="Bayraktar">
      <organization showOnFrontPage="true">Cisco Systems</organization>
      <address>
        <postal>
          <street>3700 Cisco Way</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>United States of America</country>
        </postal>
        <email>serpil@cisco.com</email>
      </address>
    </author>
    <author fullname="Paolo Lucente" initials="P" surname="Lucente">
      <organization showOnFrontPage="true">NTT Communications</organization>
      <address>
        <postal>
          <street>Siriusdreef 70-72</street>
          <city>Hoofddorp</city>
          <code>2132</code>
          <region>WT</region>
          <country>NL</country>
        </postal>
        <email>paolo@ntt.net</email>
      </address>
    </author>
    <author fullname="Penghui Mi" initials="P" surname="Mi">
      <organization showOnFrontPage="true">Tencent</organization>
      <address>
        <postal>
          <street>Tengyun Building, Tower A, No. 397 Tianlin Road</street>
          <city>Shanghai</city>
          <code>200233</code>
          <region/>
          <country>China</country>
        </postal>
        <email>Penghui.Mi@gmail.com</email>
      </address>
    </author>
    <author fullname="Shunwan Zhuang" initials="S" surname="Zhuang">
      <organization showOnFrontPage="true">Huawei</organization>
      <address>
        <postal>
          <street>Huawei Building, No.156 Beiqing Rd.</street>
          <city>Beijing</city>
          <code>100095</code>
          <region/>
          <country>China</country>
        </postal>
        <email>zhuangshunwan@huawei.com</email>
      </address>
    </author>
    <date month="11" year="2019"/>
    <area>General</area>
    <workgroup>Global Routing Operations</workgroup>
    <keyword>BGP</keyword>
    <keyword>BMP</keyword>
    <keyword>adj-rib-out</keyword>
    <abstract pn="section-abstract">
      <t pn="section-abstract-1">
                The BGP Monitoring Protocol (BMP) only defines access to the
                Adj-RIB-In Routing Information Bases (RIBs).  This document
                updates BMP (RFC 7854) by adding access to the Adj-RIB-Out
                RIBs. It also adds a new flag to the peer header to
                distinguish between Adj-RIB-In and Adj-RIB-Out.
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8671" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t pn="section-boilerplate.2-1">
            Copyright (c) 2019 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.3">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1">
          <li pn="section-boilerplate.3-1.1">
            <t keepWithNext="true" pn="section-boilerplate.3-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="Introduction" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.2">
            <t keepWithNext="true" pn="section-boilerplate.3-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="Terminology" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.3">
            <t keepWithNext="true" pn="section-boilerplate.3-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="Definitions" format="title" sectionFormat="of" target="name-definitions">Definitions</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.4">
            <t keepWithNext="true" pn="section-boilerplate.3-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="Per-Peer Header" format="title" sectionFormat="of" target="name-per-peer-header">Per-Peer Header</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.5">
            <t keepWithNext="true" pn="section-boilerplate.3-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="Adj-RIB-Out" format="title" sectionFormat="of" target="name-adj-rib-out">Adj-RIB-Out</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1.5.2">
              <li pn="section-boilerplate.3-1.5.2.1">
                <t keepWithNext="true" pn="section-boilerplate.3-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="Post-policy" format="title" sectionFormat="of" target="name-post-policy">Post-policy</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.5.2.2">
                <t keepWithNext="true" pn="section-boilerplate.3-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="Pre-policy" format="title" sectionFormat="of" target="name-pre-policy">Pre-policy</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-boilerplate.3-1.6">
            <t keepWithNext="true" pn="section-boilerplate.3-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="BMP Messages" format="title" sectionFormat="of" target="name-bmp-messages">BMP Messages</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1.6.2">
              <li pn="section-boilerplate.3-1.6.2.1">
                <t keepWithNext="true" pn="section-boilerplate.3-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="Route Monitoring and Route Mirroring" format="title" sectionFormat="of" target="name-route-monitoring-and-route-">Route Monitoring and Route Mirroring</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.6.2.2">
                <t keepWithNext="true" pn="section-boilerplate.3-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="Statistics Report" format="title" sectionFormat="of" target="name-statistics-report">Statistics Report</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.6.2.3">
                <t keepWithNext="true" pn="section-boilerplate.3-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="Peer Up and Down Notifications" format="title" sectionFormat="of" target="name-peer-up-and-down-notificati">Peer Up and Down Notifications</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1.6.2.3.2">
                  <li pn="section-boilerplate.3-1.6.2.3.2.1">
                    <t keepWithNext="true" pn="section-boilerplate.3-1.6.2.3.2.1.1"><xref derivedContent="6.3.1" format="counter" sectionFormat="of" target="section-6.3.1"/>.  <xref derivedContent="Peer Up Information" format="title" sectionFormat="of" target="name-peer-up-information">Peer Up Information</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-boilerplate.3-1.7">
            <t keepWithNext="true" pn="section-boilerplate.3-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="Other Considerations" format="title" sectionFormat="of" target="name-other-considerations">Other Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1.7.2">
              <li pn="section-boilerplate.3-1.7.2.1">
                <t keepWithNext="true" pn="section-boilerplate.3-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="Peer and Update Groups" format="title" sectionFormat="of" target="name-peer-and-update-groups">Peer and Update Groups</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.7.2.2">
                <t keepWithNext="true" pn="section-boilerplate.3-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="Changes to Existing BMP Session" format="title" sectionFormat="of" target="name-changes-to-existing-bmp-ses">Changes to Existing BMP Session</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-boilerplate.3-1.8">
            <t keepWithNext="true" pn="section-boilerplate.3-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="Security Considerations" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.9">
            <t keepWithNext="true" pn="section-boilerplate.3-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="IANA Considerations" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-boilerplate.3-1.9.2">
              <li pn="section-boilerplate.3-1.9.2.1">
                <t keepWithNext="true" pn="section-boilerplate.3-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="Addition to BMP Peer Flags Registry" format="title" sectionFormat="of" target="name-addition-to-bmp-peer-flags-">Addition to BMP Peer Flags Registry</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.9.2.2">
                <t keepWithNext="true" pn="section-boilerplate.3-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="Additions to BMP Statistics Types Registry" format="title" sectionFormat="of" target="name-additions-to-bmp-statistics">Additions to BMP Statistics Types Registry</xref></t>
              </li>
              <li pn="section-boilerplate.3-1.9.2.3">
                <t keepWithNext="true" pn="section-boilerplate.3-1.9.2.3.1"><xref derivedContent="9.3" format="counter" sectionFormat="of" target="section-9.3"/>.  <xref derivedContent="Addition to BMP Initiation Message TLVs Registry" format="title" sectionFormat="of" target="name-addition-to-bmp-initiation-">Addition to BMP Initiation Message TLVs Registry</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-boilerplate.3-1.10">
            <t keepWithNext="true" pn="section-boilerplate.3-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="Normative References" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.11">
            <t keepWithNext="true" pn="section-boilerplate.3-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="Acknowledgements" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.12">
            <t keepWithNext="true" pn="section-boilerplate.3-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="Contributors" format="title" sectionFormat="of" target="name-contributors">Contributors</xref></t>
          </li>
          <li pn="section-boilerplate.3-1.13">
            <t keepWithNext="true" pn="section-boilerplate.3-1.13.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="Authors' Addresses" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t pn="section-1-1">
                The BGP Monitoring Protocol (BMP) defines monitoring of the received
                (e.g., Adj-RIB-In) Routing Information Bases (RIBs) per peer.  
                The pre-policy Adj-RIB-In conveys to a BMP receiver all RIB data before
                any policy has been applied.  The post-policy Adj-RIB-In conveys to a
                BMP receiver all RIB data after policy filters and/or modifications
                have been applied.  An example of pre-policy versus post-policy is
                when an inbound policy applies attribute modification or filters.
                Pre-policy would contain information prior to the inbound policy
                changes or filters of data. Post-policy would convey the changed data
                or would not contain the filtered data.
      </t>
      <t pn="section-1-2">

                Monitoring the received updates that the router received before any
                policy has been applied is the primary level of monitoring for most
                use cases.  Inbound policy validation and auditing are the primary
                use cases for enabling post-policy monitoring.

      </t>
      <t pn="section-1-3">

                In order for a BMP receiver to receive any BGP data, the BMP sender
                (e.g., router) needs to have an established BGP peering session and
                actively be receiving updates for an Adj-RIB-In.

      </t>
      <t pn="section-1-4">

                Being able to only monitor the Adj-RIB-In puts a restriction on what
                data is available to BMP receivers via BMP senders (e.g., routers).
                This is an issue when the receiving end of the BGP peer is not
                enabled for BMP or when it is not accessible for administrative
                reasons.  For example, a service provider advertises prefixes to a
                customer, but the service provider cannot see what it advertises via
                BMP. Asking the customer to enable BMP and monitoring of the Adj-RIB-In
                are not feasible.

      </t>
      <t pn="section-1-5">

                BMP <xref target="RFC7854" format="default" sectionFormat="of" derivedContent="RFC7854"/> only
                defines Adj-RIB-In being sent to BMP receivers. This document updates
                the per-peer header defined in <xref target="RFC7854" sectionFormat="of" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7854#section-4.2" derivedContent="RFC7854"/> by
		adding a new flag to distinguish between Adj-RIB-In and Adj-RIB-Out. BMP
		senders use the new flag to send either Adj-RIB-In or Adj-RIB-Out.

      </t>
      <t pn="section-1-6">

                Adding Adj-RIB-Out provides the ability for a BMP sender to send to 
                BMP receivers what it advertises to BGP peers, which can be used for
                outbound policy validation and to monitor routes that were advertised.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-terminology">Terminology</name>
      <t pn="section-2-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-definitions">Definitions</name>
      <dl newline="true" spacing="normal" pn="section-3-1">
        <dt pn="section-3-1.1">Adj-RIB-Out</dt>
        <dd pn="section-3-1.2">As defined in <xref target="RFC4271" format="default" sectionFormat="of" derivedContent="RFC4271"/>, "The Adj-RIBs-Out contains
                        the routes for advertisement to specific peers by means of the
                        local speaker's UPDATE messages."</dd>
        <dt pn="section-3-1.3">Pre-policy Adj-RIB-Out</dt>
        <dd pn="section-3-1.4">The result before applying the outbound policy to an
        Adj-RIB-Out. This normally would match what is in the local RIB.</dd>
        <dt pn="section-3-1.5">Post-policy Adj-RIB-Out</dt>
        <dd pn="section-3-1.6">The result of applying outbound policy to an Adj-RIB-Out. This
        <bcp14>MUST</bcp14> convey to the BMP receiver what is actually
        transmitted to the peer.</dd>
      </dl>
    </section>
    <section anchor="PeerFlags" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-per-peer-header">Per-Peer Header</name>
      <t pn="section-4-1">
                The per-peer header has the same structure and flags as defined in
                <xref target="RFC7854" sectionFormat="of" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7854#section-4.2" derivedContent="RFC7854"/> with
		the addition of the O flag as shown here:
      </t>
      <artwork align="left" name="" type="" alt="" pn="section-4-2">
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|V|L|A|O| Resv  |
+-+-+-+-+-+-+-+-+
</artwork>
      <ul spacing="normal" bare="false" empty="false" pn="section-4-3">
        <li pn="section-4-3.1">
                        The O flag indicates Adj-RIB-In if set to 0 and Adj-RIB-Out if
                        set to 1.
                    </li>
      </ul>
      <t pn="section-4-4">

                The existing flags are defined in <xref target="RFC7854" sectionFormat="of" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7854#section-4.2" derivedContent="RFC7854"/>, and
		the remaining bits are reserved for future use.  They <bcp14>MUST</bcp14> be transmitted as 0, and
		their values <bcp14>MUST</bcp14> be ignored on receipt.

      </t>
      <t pn="section-4-5">
                When the O flag is set to 1, the following fields in the per-peer header are
		redefined:

      </t>
      <ul spacing="normal" bare="false" empty="false" pn="section-4-6">
        <li pn="section-4-6.1">
                        Peer Address: The remote IP address associated with the TCP
                        session over which the encapsulated Protocol Data Unit
			(PDU) is sent.
                    </li>
        <li pn="section-4-6.2">
                        Peer AS: The Autonomous System number of the peer to which the
                        encapsulated PDU is sent.
                    </li>
        <li pn="section-4-6.3">
                        Peer BGP ID: The BGP Identifier of the peer to which the
                        encapsulated PDU is sent.
                    </li>
        <li pn="section-4-6.4">
			Timestamp: The time when the encapsulated routes were advertised
      			(one may also think of this as the time when they were installed
      			in the Adj-RIB-Out), expressed in seconds and microseconds since
      			midnight (zero hour), January 1, 1970 (UTC).  If zero, the time is
			unavailable. Precision of the timestamp is
			implementation-dependent.
                    </li>
      </ul>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-adj-rib-out">Adj-RIB-Out</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-post-policy">Post-policy</name>
        <t pn="section-5.1-1">
                    The primary use case in monitoring Adj-RIB-Out is to monitor the
                    updates transmitted to a BGP peer after outbound policy has been
                    applied. These updates reflect the result after modifications and
                    filters have been applied (e.g., post-policy Adj-RIB-Out). Some
                    attributes are set when the BGP message is transmitted,
                    such as next hop. Post-policy Adj-RIB-Out <bcp14>MUST</bcp14> convey to the BMP
		    receiver what is actually transmitted to the peer.

        </t>
        <t pn="section-5.1-2">
                    The L flag <bcp14>MUST</bcp14> be set to 1 to indicate post-policy.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-pre-policy">Pre-policy</name>
        <t pn="section-5.2-1">
                    Similar to Adj-RIB-In policy validation, pre-policy Adj-RIB-Out can
		    be used to validate and audit outbound policies. For example, a
		    comparison between pre-policy and post-policy can be used to validate
		    the outbound policy.

        </t>
        <t pn="section-5.2-2">
                    Depending on the BGP peering session type -- Internal BGP (IBGP), IBGP route reflector client,
                    External BGP (EBGP), BGP confederations, route server
		    client -- the candidate routes that
                    make up the pre-policy Adj-RIB-Out do not contain all
		    local RIB routes.
                    Pre-policy Adj-RIB-Out conveys only routes that are available based on
                    the peering type.  Post-policy represents the filtered/changed routes
                    from the available routes.

        </t>
        <t pn="section-5.2-3">
                    Some attributes are set only during transmission of the BGP message,
                    i.e., post-policy.  It is common that the next hop may be null, loopback, or
                    similar during the pre-policy phase. All mandatory attributes,
		    such as next hop,
                    <bcp14>MUST</bcp14> be either zero or have an empty length if they are unknown at the
                    pre-policy phase completion.  The BMP receiver will treat zero or empty
                    mandatory attributes as self-originated.
        </t>
        <t pn="section-5.2-4">

                    The L flag <bcp14>MUST</bcp14> be set to 0 to indicate pre-policy.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-bmp-messages">BMP Messages</name>
      <t pn="section-6-1">
                Many BMP messages have a per-peer header, but some are not
                applicable to Adj-RIB-In or Adj-RIB-Out monitoring, such as
                Peer Up and Down Notifications.  Unless otherwise defined, the
                O flag should be set to 0 in the per-peer header in BMP
                messages.
      </t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-6.1">
        <name slugifiedName="name-route-monitoring-and-route-">Route Monitoring and Route Mirroring</name>
        <t pn="section-6.1-1">
                    The O flag <bcp14>MUST</bcp14> be set accordingly to indicate if the route monitor
                    or route mirroring message conveys Adj-RIB-In or Adj-RIB-Out.
        </t>
      </section>
      <section anchor="StatisticsReport" numbered="true" toc="include" removeInRFC="false" pn="section-6.2">
        <name slugifiedName="name-statistics-report">Statistics Report</name>
        <t pn="section-6.2-1">
                    The Statistics Report message has a Stat Type field to indicate the
                    statistic carried in the Stat Data field. Statistics report messages
                    are not specific to Adj-RIB-In or Adj-RIB-Out and <bcp14>MUST</bcp14> have the O
                    flag set to zero. The O flag <bcp14>SHOULD</bcp14> be ignored by the BMP receiver.

        </t>
        <t pn="section-6.2-2">
                    This document defines the following new statistics types:

        </t>
        <ul spacing="normal" bare="false" empty="false" pn="section-6.2-3">
          <li pn="section-6.2-3.1">
                            Stat Type = 14: 
                            Number of routes in pre-policy Adj-RIB-Out. This
			    statistics type is 64-bit Gauge.
                        </li>
          <li pn="section-6.2-3.2">
                            Stat Type = 15:
                            Number of routes in post-policy Adj-RIB-Out. This
			    statistics type is 64-bit Gauge.
                        </li>
          <li pn="section-6.2-3.3">
                            Stat Type = 16: Number of routes
                            in per-AFI/SAFI pre-policy Adj-RIB-Out.  The value is structured
                            as: 2-byte Address Family Identifier (AFI), 1-byte Subsequent Address Family Identifier
                            (SAFI), followed by a 64-bit Gauge.
                        </li>
          <li pn="section-6.2-3.4">
                            Stat Type = 17: Number of routes in per-AFI/SAFI
                            post-policy Adj-RIB-Out.  The value is structured
                            as: 2-byte Address Family Identifier (AFI), 1-byte
                            Subsequent Address Family Identifier (SAFI),
                            followed by a 64-bit Gauge.
                        </li>
        </ul>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-6.3">
        <name slugifiedName="name-peer-up-and-down-notificati">Peer Up and Down Notifications</name>
        <t pn="section-6.3-1">
                    Peer Up and Down Notifications convey BGP peering session state to
                    BMP receivers.  The state is independent of whether or not route
                    monitoring or route mirroring messages will be sent for Adj-RIB-In,
                    Adj-RIB-Out, or both.  BMP receiver implementations <bcp14>SHOULD</bcp14> ignore the
                    O flag in Peer Up and Down Notifications.
        </t>
        <section anchor="PeerUpInfoTlv" numbered="true" toc="include" removeInRFC="false" pn="section-6.3.1">
          <name slugifiedName="name-peer-up-information">Peer Up Information</name>
          <t pn="section-6.3.1-1">
                        This document defines the following Peer Up Information TLV type:

          </t>
          <ul spacing="normal" bare="false" empty="false" pn="section-6.3.1-2">
            <li pn="section-6.3.1-2.1">
              <t pn="section-6.3.1-2.1.1">
                                Type = 4: Admin Label.
                                The Information field contains a free-form UTF-8 string whose byte
				                length is given by the Information Length field.  The value is
				                administratively assigned.  There is no requirement to terminate
				                the string with null or any other character.

              </t>
              <t pn="section-6.3.1-2.1.2">

                                Multiple Admin Labels can be included in the
                                Peer Up Notification.  When multiple Admin
                                Labels are included, the BMP receiver
                                <bcp14>MUST</bcp14> preserve their order.

              </t>
              <t pn="section-6.3.1-2.1.3">

                                The Admin Label is optional.
              </t>
            </li>
          </ul>
        </section>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-other-considerations">Other Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
        <name slugifiedName="name-peer-and-update-groups">Peer and Update Groups</name>
        <t pn="section-7.1-1">
                    Peer and update groups are used to group updates shared by many peers.
                    This is a level of efficiency in implementations, not a true
                    representation of what is conveyed to a peer in either pre-policy or
                    post-policy.

        </t>
        <t pn="section-7.1-2">

                    One of the use cases to monitor post-policy Adj-RIB-Out is to validate and continually
                    ensure the egress updates match what is expected. For example, wholesale peers should
                    never have routes with community X:Y sent to them.  In
		    this use case, there may be
                    hundreds of wholesale peers, but a single peer could have represented the group.

        </t>
        <t pn="section-7.1-3">
                    From a BMP perspective, it should be simple to include a group name in the Peer Up,
		            but it is more complex than that. BGP implementations have evolved to provide
		            comprehensive and structured policy grouping, such
			    as session, AFI/SAFI, and
                    template-based group policy inheritances.

        </t>
        <t pn="section-7.1-4">
                    This level of structure and inheritance of polices does not provide a simple peer group
                    name or ID, such as wholesale peer.

        </t>
        <t pn="section-7.1-5">
                    
This document defines a new Admin Label type for Peer Up Information TLVs
(<xref target="PeerUpInfoTlv" format="default" sectionFormat="of" derivedContent="Section 6.3.1"/>) that can be used instead of
requiring a group name.
These labels have administrative scope
relevance.  For example, labels "type=wholesale" and
"region=west" could be used to monitor expected policies.

        </t>
        <t pn="section-7.1-6">

                    Configuration and assignment of labels to peers are BGP implementation-specific.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
        <name slugifiedName="name-changes-to-existing-bmp-ses">Changes to Existing BMP Session</name>
        <t pn="section-7.2-1">
          In case of any change that results in the alteration of behavior of
          an existing BMP session (i.e., changes to filtering and table names),
          the session <bcp14>MUST</bcp14> be bounced with a Peer Down/Peer Up sequence.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-8">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t pn="section-8-1">
                The considerations in <xref target="RFC7854" sectionFormat="of" section="11" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7854#section-11" derivedContent="RFC7854"/> apply to this
                document. Implementations of this protocol
                <bcp14>SHOULD</bcp14> require establishing sessions with
                authorized and trusted monitoring devices.



It is also believed that this document does
		not add any additional security considerations.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-9">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t pn="section-9-1">IANA has assigned the following new parameters
                to the <eref target="https://www.iana.org/assignments/bmp-parameters/" brackets="none">
                "BGP Monitoring Protocol (BMP) Parameters" registry</eref>.
      </t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-9.1">
        <name slugifiedName="name-addition-to-bmp-peer-flags-">Addition to BMP Peer Flags Registry</name>
        <t pn="section-9.1-1">IANA has made the following assignment for the per-peer header flag
        defined in <xref target="PeerFlags" format="default" sectionFormat="of" derivedContent="Section 4"/> of this
        document:
        </t>
        <table anchor="iana1" align="left" pn="table-1">
          <name slugifiedName="name-addition-to-the-bmp-peer-fl">Addition to the "BMP Peer Flags" Registry</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Flag</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">3</td>
              <td align="left" colspan="1" rowspan="1">O flag</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-9.2">
        <name slugifiedName="name-additions-to-bmp-statistics">Additions to BMP Statistics Types Registry</name>
        <t pn="section-9.2-1">IANA has made the following assignment for the four statistics types
        defined in <xref target="StatisticsReport" format="default" sectionFormat="of" derivedContent="Section 6.2"/> of this
        document:
        </t>
        <table anchor="iana2" align="left" pn="table-2">
          <name slugifiedName="name-additions-to-the-bmp-statis">Additions to the "BMP Statistics Types" Registry</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Stat Type</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">14</td>
              <td align="left" colspan="1" rowspan="1">Number of routes in pre-policy Adj-RIB-Out</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">15</td>
              <td align="left" colspan="1" rowspan="1">Number of routes in post-policy Adj-RIB-Out</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">16</td>
              <td align="left" colspan="1" rowspan="1">Number of routes in per-AFI/SAFI pre-policy Adj-RIB-Out</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">17</td>
              <td align="left" colspan="1" rowspan="1">Number of routes in per-AFI/SAFI post-policy Adj-RIB-Out</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-9.3">
        <name slugifiedName="name-addition-to-bmp-initiation-">Addition to BMP Initiation Message TLVs Registry</name>
        <t pn="section-9.3-1">IANA has made the following assignment per
        <xref target="PeerUpInfoTlv" format="default" sectionFormat="of" derivedContent="Section 6.3.1"/> of this document:
        </t>
        <table anchor="iana3" align="left" pn="table-3">
          <name slugifiedName="name-addition-to-the-bmp-initiat">Addition to the "BMP Initiation Message TLVs" Registry</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Type</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">4</td>
              <td align="left" colspan="1" rowspan="1">Admin Label</td>
              <td align="left" colspan="1" rowspan="1">RFC 8671</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-10">
      <name slugifiedName="name-normative-references">Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC4271" target="https://www.rfc-editor.org/info/rfc4271" quoteTitle="true" derivedAnchor="RFC4271">
        <front>
          <title>A Border Gateway Protocol 4 (BGP-4)</title>
          <author initials="Y." surname="Rekhter" fullname="Y. Rekhter" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="T." surname="Li" fullname="T. Li" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Hares" fullname="S. Hares" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2006" month="January"/>
          <abstract>
            <t>This document discusses the Border Gateway Protocol (BGP), which is an inter-Autonomous System routing protocol.</t>
            <t>The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems.  This network reachability information includes information on the list of Autonomous Systems (ASes) that reachability information traverses. This information is sufficient for constructing a graph of AS connectivity for this reachability from which routing loops may be pruned, and, at the AS level, some policy decisions may be enforced.</t>
            <t>BGP-4 provides a set of mechanisms for supporting Classless Inter-Domain Routing (CIDR).  These mechanisms include support for advertising a set of destinations as an IP prefix, and eliminating the concept of network "class" within BGP.  BGP-4 also introduces mechanisms that allow aggregation of routes, including aggregation of AS paths.</t>
            <t>This document obsoletes RFC 1771.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4271"/>
        <seriesInfo name="DOI" value="10.17487/RFC4271"/>
      </reference>
      <reference anchor="RFC7854" target="https://www.rfc-editor.org/info/rfc7854" quoteTitle="true" derivedAnchor="RFC7854">
        <front>
          <title>BGP Monitoring Protocol (BMP)</title>
          <author initials="J." surname="Scudder" fullname="J. Scudder" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="R." surname="Fernando" fullname="R. Fernando">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Stuart" fullname="S. Stuart">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2016" month="June"/>
          <abstract>
            <t>This document defines the BGP Monitoring Protocol (BMP), which can be used to monitor BGP sessions.  BMP is intended to provide a convenient interface for obtaining route views.  Prior to the introduction of BMP, screen scraping was the most commonly used approach to obtaining such views.  The design goals are to keep BMP simple, useful, easily implemented, and minimally service affecting. BMP is not suitable for use as a routing protocol.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7854"/>
        <seriesInfo name="DOI" value="10.17487/RFC7854"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba" fullname="B. Leiba">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2017" month="May"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <section anchor="Acknowledgements" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t pn="section-appendix.a-1">
                The authors would like to thank John Scudder and Mukul Srivastava for their
		valuable input.
      </t>
    </section>
    <section anchor="Contributors" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-contributors">Contributors</name>
      <t pn="section-appendix.b-1">The following individuals contributed to this document:
</t>
      <ul spacing="normal" bare="false" empty="false" pn="section-appendix.b-2">
        <li pn="section-appendix.b-2.1">Manish Bhardwaj, Cisco Systems</li>
        <li pn="section-appendix.b-2.2">Xianyu Zheng, Tencent</li>
        <li pn="section-appendix.b-2.3">Wei Guo, Tencent</li>
        <li pn="section-appendix.b-2.4">Shugang Cheng, H3C</li>
      </ul>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Tim Evens" initials="T" surname="Evens">
        <organization showOnFrontPage="true">Cisco Systems</organization>
        <address>
          <postal>
            <street>2901 Third Avenue, Suite 600</street>
            <city>Seattle</city>
            <region>WA</region>
            <code>98121</code>
            <country>United States of America</country>
          </postal>
          <email>tievens@cisco.com</email>
        </address>
      </author>
      <author fullname="Serpil Bayraktar" initials="S" surname="Bayraktar">
        <organization showOnFrontPage="true">Cisco Systems</organization>
        <address>
          <postal>
            <street>3700 Cisco Way</street>
            <city>San Jose</city>
            <region>CA</region>
            <code>95134</code>
            <country>United States of America</country>
          </postal>
          <email>serpil@cisco.com</email>
        </address>
      </author>
      <author fullname="Paolo Lucente" initials="P" surname="Lucente">
        <organization showOnFrontPage="true">NTT Communications</organization>
        <address>
          <postal>
            <street>Siriusdreef 70-72</street>
            <city>Hoofddorp</city>
            <code>2132</code>
            <region>WT</region>
            <country>NL</country>
          </postal>
          <email>paolo@ntt.net</email>
        </address>
      </author>
      <author fullname="Penghui Mi" initials="P" surname="Mi">
        <organization showOnFrontPage="true">Tencent</organization>
        <address>
          <postal>
            <street>Tengyun Building, Tower A, No. 397 Tianlin Road</street>
            <city>Shanghai</city>
            <code>200233</code>
            <region/>
            <country>China</country>
          </postal>
          <email>Penghui.Mi@gmail.com</email>
        </address>
      </author>
      <author fullname="Shunwan Zhuang" initials="S" surname="Zhuang">
        <organization showOnFrontPage="true">Huawei</organization>
        <address>
          <postal>
            <street>Huawei Building, No.156 Beiqing Rd.</street>
            <city>Beijing</city>
            <code>100095</code>
            <region/>
            <country>China</country>
          </postal>
          <email>zhuangshunwan@huawei.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
