<?xml version="1.0" encoding="UTF-8"?>
<rfc category="std" docName="draft-lin-grow-bmp-cap-notification-00" submissionType="IETF"
ipr="trust200902" consensus="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude">
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: full3667, noModification3667, noDerivatives3667
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>

    <title abbrev="BMP Peer Capability Update Notification">
    Peer Capability Update Notification in BGP Monitoring Protocol (BMP)</title>
    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Changwang Lin" initials="C."
            surname="Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <street>8 Yongjia North Road</street>
          <!-- Reorder these if your country does things differently -->
          <city>Beijing</city>
          <region>Haidian District</region>
          <code>100094</code>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
        <!-- uri and facsimile elements may also be added -->
      </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>
	<author fullname="Mukul Srivastava" initials="M."
            surname="Srivastava">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>10 Technology Park Dr</street>

          <!-- Reorder these if your country does things differently -->

          <city>Westford</city>

          <region>MA</region>

          <code>01886</code>

          <country>USA</country>
        </postal>

        <email>msri@juniper.net</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	<author fullname="Jinming Li" initials="J."
            surname="Li">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>32 Xuanwumen West Street</street>
          <!-- Reorder these if your country does things differently -->

          <city>Beijing</city>

          <region>Xicheng District</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>lijinming@chinamobile.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date year="2025" />
    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>GROW</workgroup>

    <keyword>BMP</keyword>
    <keyword>BGP</keyword>
    <keyword>Capability</keyword>

<abstract>
<t>
	When BGP Dynamic Capability is supported, dynamic updates of capabilities are
  allowed over an established BGP session. At present, after the BGP session is established,
  the monitored router sends a BMP Peer Up Notification message first,
  containing the initial capabilities. If BGP Dynamic Capability is supported,
  using BMP Peer Up Notification messages to report subsequent capability changes
  for a BGP session becomes inappropriate. This document defines a new Peer Capability
  Update Notification message type in BMP to report peer capability changes.
</t>

</abstract>

  </front>

  <middle>

<section anchor="Introduction" title="Introduction">
<t>
  <xref target="I-D.ietf-idr-dynamic-cap"/> introduces BGP Dynamic Capability,
  which enables dynamic updates of capabilities over an established BGP session.
  This feature allows BGP speakers to negotiate capabilities without disrupting
  the existing session.
</t>
<t>
  When a BGP session is established, a BMP Peer UP Notification message containing
  the initial capabilities is first sent to monitor this session <xref target="RFC7854"/>.
  If BGP Dynamic Capability is implemented, subsequent capability changes can be
  reported to the monitoring station by resending a Peer UP Notification message
  that includes all current capabilities. The capabilities in the latter message
  must override those in the former.
</t>
<t>
  Normally, a BMP Peer Up Notification message should only be sent once when
  a BGP session is established. If the BMP Peer Up Notification message is sent multiple times,
  the monitoring station may mistakenly interpret the event as a peer session re-established,
  potentially causing the clearing of previously received route monitoring messages for
  the affected peers in that session. In this case, all routing monitoring messages for
  those peers must be resent, significantly increasing the network load.
</t>
<t>
  Therefore, when BGP Dynamic Capability is implemented, using BMP Peer Up Notification
  messages to report subsequent capability changes becomes unsuitable.
</t>
<t>
  To avoid potential problems caused by the above solution, this document defines
  a new BMP message type, Peer Capability Update Notification, for reporting BGP dynamic capability changes.
</t>
</section>
<section anchor="Terminology" title="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>
</section>
<section anchor="Capability Notification Message" title="Peer Capability Update Notification Message">
<t>
  This section defines a new BMP message type for monitoring BGP dynamic capabilities.
  The assigned value for this message type is placed in the Message Type field of the
  common header.
</t>
<t>
  Message Type = TBD: Peer Capability Update Notification
</t>
  <section anchor="Message Format" title="Message Format">
    <t>
      This section defines the Peer Capability Update Notification BMP message format, as illustrated in Figure 1.
      The message consists of four components: a Common Header, a Per-Peer Header, a CAP Flags,
      and a BGP Dynamic Capability PDU.
    </t>
    <t>
      The Common Header and Per-Peer Header follow the same format as defined in Sections 4.1 and 4.2
      of <xref target="RFC7854"/> respectively. The BGP Dynamic Capability PDU uses the format specified in Section 3
      of <xref target="I-D.ietf-idr-dynamic-cap"/>. The Peer CAP Flags field is defined as follows:
    </t>
    <t><figure>
      <artwork align="center" name="Figure 1"><![CDATA[
   +---------------------------------------+
   |       Common Header                   |
   +---------------------------------------+
   |       Per-Peer Header                 |
   +---------------------------------------+
   |       Peer CAP Flags                  |
   +---------------------------------------+
   |       BGP Dynamic Capability PDU      |
   +---------------------------------------+

Figure 1: Peer Capability Update Notification Message Format]]></artwork>
    </figure></t>
    <t>
      Peer CAP Flags (1 byte): This field provides status information about the Capability Update,
      including the direction of the BGP Dynamic Capability PDU. The direction flag fields are defined as follows:
    </t>
    <t><figure>
      <artwork align="center" name="Figure 1"><![CDATA[
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|T|   Reserved  |
+-+-+-+-+-+-+-+-+]]></artwork>
    </figure></t>
    <t>
      The T flag (1 bit) signals the direction of the BGP Dynamic Capability PDU:
    </t>
    <t>
      <list style="symbols">
      <t>1: Received from a peer.</t>
      <t>0: Sent to a peer.</t>
      </list>
    </t>
    <t>
      The remaining bits are reserved for future use. They MUST be transmitted as 0
      and their values MUST be ignored on receipt.
    </t>
    <t>
      The BMP Peer Capability Update Notification MUST be sent before sending any
      Route Monitoring message corresponding to the updated capability for the Peer.
    </t>
  </section>
</section>

<section anchor="Use Cases" title="Example and Use Case">
<t>
	The Peer Capability Update Notification message of BMP provides real-time notifications of
  BGP dynamic capability changes.
</t>
<t>
  Consider a BGP speaker with a peer that supports both BGP Dynamic Capability and
  VPNv4 Address Family Identifier/Subsequent Address Family Identifier (AFI/SAFI) <xref target="RFC4364"/>,
  where the corresponding BGP session is already established.
  When this peer subsequently enables the EVPN address family <xref target="RFC7432"/>, the BGP speaker will
  send a BGP Dynamic Capability message containing Multiprotocol Extensions Capability
  for BGP-4 (including EVPN AFI/SAFI information) <xref target="RFC4760"/>. If the peer is being monitored via BMP,
  the BGP speaker must generate a BMP Peer Capability Update Notification message (with the T flag set to 0)
  to report this capability change, before sending any Route Monitoring Messages for EVPN address family.
</t>
</section>

<section anchor="Operational Considerations" title="Operational Considerations">
<t>
	When a BGP speaker sends a BGP Dynamic Capability message to its peer,
  the generation of a corresponding BMP Peer Capability Update Notification message
  (with the T flag set to 0) should be generated immediately and not need to await
  successful receipt of the BGP Dynamic Capability acknowledgment (ACK),
  per the procedures in <xref target="I-D.ietf-idr-dynamic-cap"/>.
</t>
<t>
	When a BGP speaker receives a BGP Dynamic Capability message from its peer,
  a corresponding BMP Peer Capability Update Notification message (with the T flag set to 1)
  should be generated immediately.
</t>
<t>
	If a new BGP capability is added, after both the corresponding BMP Peer Capability Update
  Notification message with the T flag set to 0 and that with the T flag set to 1 are
  sent to monitoring station, the route information and End-of-RIB (EOR) of corresponding peer will be sent via BMP.
</t>
<t>
	If an existing BGP capability is removed, only the corresponding BMP Peer Capability
  Update Notification messages will be sent, but the route withdrawal information of
  corresponding peer will not be sent via BMP.
</t>
</section>

<section anchor="Security Considerations" title="Security Considerations">
<t>
	The security considerations in Section 11 of <xref target="RFC7854"/> apply to this document.
  It is also believed that this document does not add any additional security considerations.
</t>
</section>

<section anchor="IANA Considerations" title="IANA Considerations">
<t>
  This document requests IANA to assign the following new parameter in the BMP Parameters registry
  (maintained at https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml).
</t>
<t>
  New BMP Message Type:
</t>
<t>
  Value: TBD (to be assigned by IANA)
</t>
<t>
  Name: Peer Capability Update Notification
</t>
<t>
  Reference: This document
</t>
</section>

<!-- <section anchor="Acknowledgements" title="Acknowledgements">
<t>
	The author would like to thank xxx for his valuable input.
</t>
</section> -->

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
  <references title="References">
    <references title="Normative References">
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4364.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4760.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7432.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-dynamic-cap.xml"/>
    </references>
  </references>
  <section anchor="Appendix A-1" title="Option 1">
  <t>
    In addition to the aforementioned solutions (Using New BMP Type or Peer Up Notification)
    to report the BGP Capability changes, This document can also define a New TLV as part of
    Peer Up Notification or other available BMP Message types defined in existing documents.
  </t>
  <t>
    The New TLV format is defined below:
  </t>
  <t><figure>
  <artwork align="center" name="Figure 1"><![CDATA[
+---------------------------------------+
|       Type (2 byte)                   |
+---------------------------------------+
|       Length (2 byte)                 |
+---------------------------------------+
|       Peer CAP Flags (1 byte)         |
+---------------------------------------+
|       BGP Dynamic Capability PDU      |
+---------------------------------------+]]></artwork>
  </figure></t>
  <t>
    Type = TBD: Peer Capability Update Notification;
  </t>
  <t>
    Length: indicates the length of value in this TLV, including Peer CAP Flags and BGP Dynamic Capability PDU;
  </t>
  <t>
    Peer CAP Flags and BGP Dynamic Capability PDU is same with the definition of Section 3.1 in this document.
  </t>
  </section>
  </back>
</rfc>
