<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
	<!ENTITY IANA_PM_STATS_INVALID "TBD1">
        <!ENTITY IANA_PM_STATS_BEST "TBD2">
	<!ENTITY IANA_PM_STATS_NONSELECTED "TBD3">
	<!ENTITY IANA_PM_STATS_PRIMARY "TBD4">
	<!ENTITY IANA_PM_STATS_BACKUP "TBD5">
	<!ENTITY IANA_PM_STATS_NONINSTALLED "TBD6">
	<!ENTITY IANA_PM_STATS_BEST_EXTERNAL "TBD7">
	<!ENTITY IANA_PM_STATS_ADD_PATH "TBD8">
	<!ENTITY IANA_PM_STATS_FILTERED_IN "TBD9">
	<!ENTITY IANA_PM_STATS_FILTERED_OUT "TBD10">
	<!ENTITY IANA_PM_STATS_STALE "TBD11">
	<!ENTITY IANA_PM_STATS_SUPPRESSED "TBD12">
	<!ENTITY IANA_PM_STATS_TOT_MARKED "TBD13">
	<!ENTITY IANA_PM_STATS_TOT_UNMARKED "TBD14">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-grow-bmp-path-marking-tlv-05"
     ipr="trust200902">
  <front>
    <title abbrev="BMP path status tlv">BMP Extension for Path Status
    TLV</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>

          <region>WT</region>

          <code>2132</code>

          <country>Netherlands</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>paolo@ntt.net</email>

        <uri/>
      </address>
    </author>

    <author fullname="Pierre Francois" initials="P." surname="Francois">
      <organization>INSA-Lyon</organization>

      <address>
        <postal>
          <street/>

          <city>Lyon</city>

          <code/>

          <country>France</country>
        </postal>

        <email>Pierre.Francois@insa-lyon.fr</email>
      </address>
    </author>

    <author fullname="Yunan Gu" initials="Y. " surname="Gu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

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

        <email>guyunan@huawei.com</email>
      </address>
    </author>

    <author fullname="Thomas Graf" initials="T. " surname="Graf">
      <organization>Swisscom</organization>

      <address>
        <postal>
          <street>Binzring 17</street>

          <city>Zurich</city>

          <code>8045</code>

          <country>Switzerland</country>
        </postal>

        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>

    <date day="15" month="May" year="2026"/>

    <abstract>
      <t>The BGP Monitoring Protocol (BMP) provides an interface for obtaining
      BGP path information, which is conveyed through  BMP Route
      Monitoring (RM) messages. This document specifies a BMP extension to
      convey the status of a path after being processed by the BGP process. 
      </t>
    </abstract>

    <note title="Requirements Language">
      <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,
      RFC2119 <xref target="RFC2119"/> and RFC8174  <xref target="RFC8174"/> 
      when, and only when, they appear in all capitals, as shown
      here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Multiple paths with different path statuses (e.g., the "best path",
      "backup path", "invalid", and so on) may co-exist for a given prefix in
      the BGP RIBs after being processed by the BGP decision process.  The path
      status information is not carried in the BGP UPDATE Message
      <xref target="RFC4271"/> or in the BMP Route Monitoring Message <xref
          target="RFC7854"/>.</t>

      <t>External systems can use the path status for various applications.
      For example, operators commonly use path status during  
      troubleshooting. Having such status stored and tracked 
      enables the development of tools that facilitate this process.
      Optimization systems can consider path status in their process, e.g.,
      as a validation source (since it can compare the
      calculated state to the actual outcome of the network, such as primary
      and backup path). Moreover, path status information can
      complement other centralized sources of data. For example, flow
      collectors can leverage it to identify the exact forwarding paths,
          yielding more accurate traffic matrices than existing methods.</t>

      <t>This document defines a Path Status TLV to convey the BGP
      path status to a BMP server. The BMP Path Status TLV is carried in the
      BMP Route Monitoring (RM) Message  <xref target="RFC7854"/>.
      </t>
    </section>

    <section title="Path Status TLV encoding" anchor="path_status">

        <t>The path status TLV follows the common header defined in <xref
            target="I-D.ietf-grow-bmp-tlv"/> and <xref
                target="I-D.ietf-grow-bmp-tlv-ebit"/>.</t>

        <figure>
            <artwork align="center"><![CDATA[ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+-------------------------------+
|            Common TLV Header (Variable bits)                  |
+---------------------------------------------------------------+
|                      Path Status (4 octets)                   |
+---------------------------------------------------------------+
| Reason Code (2 oct., opt.)    |
+-------------------------------+

    Figure 2: Encoding of Path Status TLV ]]></artwork>
          </figure>

            <list style="symbols">
            <t>The common TLV header that can encode IANA-registered TLV or Enterprise-specific markings using <xref target="I-D.ietf-grow-bmp-tlv-ebit"/>.</t>

            <t>Path Status (4 Octets): indicates the path status of the BGP
            Update PDU encapsulated in the RM Message. The path status is encoded
            using a bitmap where each bit position encodes a specific role of the path. 
            Multiple bits may be set when multiple path statuses apply to a path.
            All zeros are reserved for paths with no marking.</t>

            <t>Reason Code (2 Octets, optional): indicates the reason of
            the path status indicated in the Path Status field. The reason
            code field is optional. If no reason code is carried, this field
            is not included. If a reason code is carried, the reason code is
                indicated by a two-byte value.</t>

            </list>

        </section>

        <section title="IANA encoding of Path Status TLV">

        <section title="IANA path status codes">

<table anchor="status_codes">
  <name>IANA-Registered Path Status</name>
  <thead>
    <tr>
      <th align="center">Value</th>
      <th align="left">Path Status</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">0x00000001</td>
      <td align="left">Invalid</td>
    </tr>
    <tr>
      <td align="center">0x00000002</td>
      <td align="left">Best</td>
    </tr>
    <tr>
      <td align="center">0x00000004</td>
      <td align="left">Nonselected</td>
    </tr>
    <tr>
      <td align="center">0x00000008</td>
      <td align="left">Primary</td>
    </tr>
    <tr>
      <td align="center">0x00000010</td>
      <td align="left">Backup</td>
    </tr>
    <tr>
      <td align="center">0x00000020</td>
      <td align="left">Non-installed</td>
    </tr>
    <tr>
      <td align="center">0x00000040</td>
      <td align="left">Best-external</td>
    </tr>
    <tr>
      <td align="center">0x00000080</td>
      <td align="left">Add-Path</td>
    </tr>
    <tr>
      <td align="center">0x00000100</td>
      <td align="left">Filtered in inbound policy</td>
    </tr>
    <tr>
      <td align="center">0x00000200</td>
      <td align="left">Filtered in outbound policy</td>
    </tr>
    <tr>
      <td align="center">0x00000400</td>
      <td align="left">Stale</td>
    </tr>
    <tr>
      <td align="center">0x00000800</td>
      <td align="left">Suppressed</td>
    </tr>
  </tbody>
</table>

          
          <t><xref target="status_codes"/> includes a list of IANA status codes. This list
              might be extended. An explanation of each of
              the types is included next:</t>

            <list style="symbols">

            <t>An invalid route is a route that does not enter the BGP 
                decision process as indicated in <xref target="RFC4271" sectionFormat="of" section="9.1.2">RFC4271</xref>.
            </t> 

            <t>The best route is defined in <xref
                target="RFC4271" sectionFormat="of" section="9.1">RFC4271</xref>.</t> 

            <t>Nonselected routes are those that are not selected in the BGP
            decision process. Backup routes are considered nonselected,
            while the best and primary routes are not considered as
            nonselected.</t>

            <t>A primary route is a path used for traffic forwarding.  See
            <xref
                target="I-D.ietf-rtgwg-bgp-pic">draft-ietf-rtgwg-bgp-pic</xref>.
                    A prefix can have more than one primary path when multipath
                    is configured <xref
                        target="I-D.lapukhov-bgp-ecmp-considerations">draft-lapukhov-bgp-ecmp-considerations</xref>.
                            The best path is also a primary path.</t>

            <t>A backup path is installed in the RIB, but it is not used
            until some or all primary paths become unreachable. Backup paths
            are used for fast convergence in the event of primary path failures.</t>

            <t>A non-installed path refers to the route that is not installed
            into the IP routing table.</t>

            <t>The best external path is
            defined in <xref
            target="I-D.ietf-idr-best-external">draft-ietf-idr-best-external</xref>.</t>

            <t>The add-path status is applied when the advertisement includes
            multiple paths for the same address prefix without the new
            paths implicitly replacing any previous ones 
            <xref target="RFC7911"/>.</t>

            <t>Filtered in inbound policy routes are those that are filtered in
                the Adj-RIB-In policy.</t>
        
            <t>Filtered in outbound policy routes are those that are filtered
                in the Adj-RIB-Out policy.</t>

            <t>Stale routes refer to paths which have been declared stale by the BGP
            Graceful Restart mechanism, as described in <xref
            target="RFC4724" sectionFormat="of" section="4.1"/>.</t>

            <t>Suppressed routes refer to a path which has been declared suppressed
            by the BGP Route Flap Damping mechanism as described 
            in <xref target="RFC2439" sectionFormat="of" section="2.2"/>.</t>

            </list>

        </section>

        <section title="IANA reason codes">
           
            <t><xref target="reasons_codes"/> includes a list of IANA reason
            codes.  This list can be extended in future documents.  This
            document includes a brief explanation of each code and the path
            status they are intended to explain. Please see <xref
                target='path_inconsistencies'/> for notes on potentially
                inconsistencies in the path marking data.</t>

        <list style="symbols">

            <t>Invalid routes due to AS loop and unresolvable nexthop are
                defined in <xref target="RFC4271" sectionFormat="of"
                    section="9.1.2"/>. These codes target routes of type
                    "Invalid".</t>

            <t>The reason codes starting with 'not preferred' are aimed at paths
            not selected as best, and describe the reason they were ranked lower
            in the decision process. AIGP is explained in <xref
                target="RFC7311">RFC7311</xref>. The rest of the codes are
                    described in <xref target="RFC4271" sectionFormat="of"
                        section="9.1.2.2"/>.</t>

        </list>

<table anchor="reasons_codes">
  <name>IANA-Registered Reason Codes</name>
  <thead>
    <tr>
      <th align="center">Value</th>
      <th align="left">Reason Code</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">0x0001</td>
      <td align="left">Invalid due to AS loop</td>
    </tr>
    <tr>
      <td align="center">0x0002</td>
      <td align="left">Invalid due to unresolvable nexthop</td>
    </tr>
    <tr>
      <td align="center">0x0003</td>
      <td align="left">Not preferred for local preference</td>
    </tr>
    <tr>
      <td align="center">0x0004</td>
      <td align="left">Not preferred for AS Path Length</td>
    </tr>
    <tr>
      <td align="center">0x0005</td>
      <td align="left">Not preferred for origin</td>
    </tr>
    <tr>
      <td align="center">0x0006</td>
      <td align="left">Not preferred for MED</td>
    </tr>
    <tr>
      <td align="center">0x0007</td>
      <td align="left">Not preferred for peer type</td>
    </tr>
    <tr>
      <td align="center">0x0008</td>
      <td align="left">Not preferred for IGP cost</td>
    </tr>
    <tr>
      <td align="center">0x0009</td>
      <td align="left">Not preferred for router ID</td>
    </tr>
    <tr>
      <td align="center">0x000A</td>
      <td align="left">Not preferred for peer address</td>
    </tr>
    <tr>
      <td align="center">0x000B</td>
      <td align="left">Not preferred for AIGP</td>
    </tr>
  </tbody>
</table>

      </section>

    </section>

<section anchor="path-marking-stats" title="Path Marking Statistics">

  <t>
    This section defines statistics to account and summarize Path
    Status TLV in the BGP Local-RIB. The statistics specified
    in this section are exported by BMP speakers using the Stats Reports
    message type defined in <xref target="RFC7854">Section 4.8 of</xref>.
  </t>

  <t>
    Unless otherwise stated, all counters defined in this section are
    unsigned 64-bit integers. Counters are maintained per BMP session and
    per monitored peer. The reset behavior of these counters (for example, upon BMP
    session restart or operator-triggered reset) follows the general
    semantics of BMP Stats Reports as defined in <xref target="RFC7854">
    RFC7854</xref>.
  </t>

  <section title="Per-Status Counters">

    <t>
      For each IANA-registered Path Status bit defined in
      <xref target="status_codes"/>, an implementation SHOULD maintain a
      counter that reflects the number of paths currently marked with that
      status.  These counters are conceptually similar to the per-status
      gauges defined for primary, backup, stale, and suppressed routes in
      the BMP RIB statistics document <xref target="I-D.ietf-grow-bmp-bgp-rib-stats"/>.
    </t>

    <t>
      The following counters are defined:
    </t>

    <t>
      <list style="symbols">
        <t>
          Type = &IANA_PM_STATS_INVALID;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Invalid</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_BEST;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Best</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_NONSELECTED;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Nonselected</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_PRIMARY;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Primary</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_BACKUP;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Backup</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_NONINSTALLED;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Non-installed</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_BEST_EXTERNAL;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Best-external</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_ADD_PATH;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Add-Path</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_FILTERED_IN;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Filtered in inbound policy</spanx> status
          bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_FILTERED_OUT;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Filtered in outbound policy</spanx> status
          bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_STALE;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Stale</spanx> status bit set.
        </t>
        <t>
          Type = &IANA_PM_STATS_SUPPRESSED;:
          Current number of paths for which the Path Status TLV has the
          <spanx style="verb">Suppressed</spanx> status bit set.
        </t>
      </list>
    </t>

    <t>
      Since the Path Status field is encoded as a bitmap, multiple status
      bits can be set for a single path.  The corresponding per-status
      counters are incremented independently; that is, a single path may
      contribute to more than one per-status counter.
    </t>

  </section>

  <section title="Generic Path Status Counters">

    <t>
      In addition to the per-status counters defined above, the following
      generic counters MAY be maintained by a BMP implementation:
    </t>

    <t>
      <list style="symbols">
        <t>
          Type = &IANA_PM_STATS_TOT_MARKED;:
          Current number of paths that carry a Path Status TLV with at
          least one status bit set (that is, paths that are explicitly
          marked).
        </t>
        <t>
          Type = &IANA_PM_STATS_TOT_UNMARKED;:
          Current number of paths that either do not carry a Path Status
          TLV or carry a Path Status TLV with all bits set to zero.
        </t>
      </list>
    </t>

  </section>
  </section>

    <section title="Implementation notes">

        <t>The BMP path marking TLV remains optional within BMP
            implementations.</t>

        <t>An implementation of the BMP path marking TLV may not fully support
        marking of all statuses defined in <xref target="status_codes"/> or
        any future extensions. Similarly, an implementation may choose to
        support the inclusion of the reason code (for which support is also
            optional), without necessarily incorporating any of the reason
            codes defined in <xref target="reasons_codes"/> or future
                extensions.</t>

        <t>This document refrains from defining mechanisms for signaling the
            status or reason codes an implementation supports. This could be
            established through external means (e.g. documentation) or
            potentially addressed in a subsequent document.</t>

        <t>The remainder of this section covers additional points related
            to the implementation of the BMP Path Marking TLV.</t>

        <section title="Configuration of BMP Path Marking">

            <t>Implementations supporting the BMP Path Marking TLV should
            provide an option for enabling/disabling the Path Marking
                TLV over BMP monitoring sessions. Furthermore,  the configuration options
            for this TLV should provide the means to enable/disable the
                transmission of reason codes, if the reason codes are supported by the
                implementation.</t>

        </section>


        <section title="Scalability and churn">

            <t>The Path Marking TLV introduces metadata on the routes, which 
            could increase the churn (<xref target="RFC4098" sectionFormat="of"
                section="8.1.6">RFC4098</xref>) of paths within the BMP
                session. For instance, if BMP Path Marking is configured, and a
                non-installed path changes status to a backup route, the
                device should send an update about this path with the new
                markings, even if its BGP attributes remain unchanged.  Enabling reason
                codes could additionally increase the churn. Churn could be
                more pronounced during the start of a BGP session, where the
                    device is processing all available routes.</t>

                <t>If churn is undesired, an implementation could make use of
                "state compression" to hide state until paths converge (<xref
                    target="RFC7854" sectionFormat="of" section="5" />). It 
                    could also initially send BMP routes without the path
                    marking TLV, even if it were configured, and then add them
                    once the implementation considers the path to be stable
                    enough.  This document does not provide a definitive
                    solution for churn since it depends on the capabilities of
                    an implementation and the requirements of an operator. </t>

        </section>


        <section title="Paths with no markings">

            <t>Some BGP routes might not require any type of status or reasons.
            For example, a path in Adj-RIB-In where the BGP best path decision has
            not been applied yet, falls under this category, since there is
            really nothing to mark for that path.  This document suggests applying an
            explicit marking of this route, by attaching a BMP path marking TLV
            with no bits set. This will help BMP monitor stations to differentiate
            this case from those in which markings are not configured, or not yet 
                attached by the device.</t>

        </section>

        <section title="Path markings applicability and consistency" anchor="path_inconsistencies">

            <t>The status and reason codes from <xref target="status_codes"/>
            and <xref target="reasons_codes"/> are included based on use cases
            from network operators and defined following the most relevant
            protocol references available.  While implementations are strongly
                encouraged to align with these code definitions, this document
                does not enforce strict validity rules for code combinations to
                accommodate the diversity of BGP implementations.</t>

            <t>The experience during testing of this TLV revealed scenarios
            where implementations might combine codes differently than
            originally anticipated. For example, one test implementation marked
            routes with both 'Invalid' and 'Best' status bits set, which is
                contradictory from the point of view of <xref
                    target="RFC4271"/>, but made sense for their specific
                    implementation.</t>

            <t> Operators should apply their own validation checks on the data
                from TLVs and discuss potential inconsistencies with their
                vendors, and raise bugs if applicable. </t>

        <section title="Significance of status and origin RIBs">

            <t>This document refrains from imposing on any implementation the requirement to mark
            specific status from specific RIBs. Some implementations might be
            able to mark some status over one RIB while others do it on others.
            For instance, some might be able to mark Adj-RIB-In filtered routes
            when obtained from the Adj-RIB-In pre-policy, while others could do it only
            from the Adj-RIB-In post-policy. To remove ambiguities in implementations,
            it is recommended that the meaning of status (and reason codes)
                does not depend on the origin RIB of a route.</t>

        </section>

        </section>


        <section title="Multiple TLVs assigned to the same route.">

            <t>We advocate for the use of TLV grouping wherever feasible (<xref
                target="I-D.ietf-grow-bmp-tlv" sectionFormat="of"
                section="5.2.1"/>). The inclusion of all marking information
                within a single message is recommended. In situations where
                multiple TLVs are associated with a single route, all markings
                and reasons will be applicable to that route.</t>

        </section>

        <section title="Enterprise-specific status" anchor="ebit_mixed">

            <t>Implementations introducing their own status and reason codes
                are advised to adhere to <xref
                    target="I-D.ietf-grow-bmp-tlv-ebit"/>  and use the
                    enterprise-bit (ebit) for vendor-specific status and
                    reasons.</t>

            <t>For scenarios where a path state combines a standard status with
                an enterprise-specific reason code (or vice versa), the
                following alternatives are presented:</t>

            <t> 
                <list style="symbols">
                    <t>Replication of the standard
            definitions within the enterprise-specific space, thus permitting
                    direct marking within the same packet using the ebit.</t> 
                <t>Assigning two TLVs to the same path(s): one containing the standard
                    part and another housing the vendor-specific part.</t> 
                </list>
            </t>

        </section>

        <section title="Multiple reason codes" anchor="multiple_reasons">
            <t>The path marking TLV was not designed to optimally hold more than
                one reason code per path.  However, if needed
                by a specific use case, the implementation can use two or more
                path markings TLVs for the same path listing the multiple
                reasons that apply to it.</t> 
        </section>

    </section>

    <section title="Acknowledgments">
      <t>We would like to thank Jeff Haas and  Maxence Younsi for their
          valuable comments.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests that IANA assign the following new TLV type
      to the BMP Route Monitoring TLVs.</t>

      <t>Type = 5: indicates that this is the IANA-registered Path
          marking TLV. The value field is defined in <xref target="path_status"/>.</t>

      <t> RFC Editor and IANA registry note: The registry is created with <xref
          target="I-D.ietf-grow-bmp-tlv" section="10"/> and populated with
          initial values 1-4. This document adds value 5 to the registry.
          Please remove this sentence before publishing the document as RFC.
      </t>

  <t>
    In addition, this document requests IANA to assign new statistic types in the
    <eref target="https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml#statistics-types">
    BMP Statistics Types</eref> registry, part of the
    <eref target="https://www.iana.org/assignments/bmp-parameters/bmp-parameters.xhtml">
    BMP parameters</eref> registry group, for the Path Marking Statistics defined
    in <xref target="path-marking-stats"/>.
  </t>

  <t>
    Unless otherwise stated, all statistics defined below are 64-bit unsigned integer
    gauges whose Stat Data value field and Stat Length follow the rules defined in
    <xref target="RFC7854">Section 4.8 of</xref>.
  </t>

  <t>
    This document requests IANA to assign the following new BMP Statistics Types and
    to update the registry to reference the RFC number of this document:
  </t>

  <t>
    <list style="symbols">
      <t>
        Type &IANA_PM_STATS_INVALID;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Invalid</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_BEST;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Best</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_NONSELECTED;: Current number of paths for which the Path
        Status TLV has the <spanx style="verb">Nonselected</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_PRIMARY;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Primary</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_BACKUP;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Backup</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_NONINSTALLED;: Current number of paths for which the Path
        Status TLV has the <spanx style="verb">Non-installed</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_BEST_EXTERNAL;: Current number of paths for which the Path
        Status TLV has the <spanx style="verb">Best-external</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_ADD_PATH;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Add-Path</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_FILTERED_IN;: Current number of paths for which the Path
        Status TLV has the <spanx style="verb">Filtered in inbound policy</spanx>
        status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_FILTERED_OUT;: Current number of paths for which the Path
        Status TLV has the <spanx style="verb">Filtered in outbound policy</spanx>
        status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_STALE;: Current number of paths for which the Path Status TLV
        has the <spanx style="verb">Stale</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_SUPPRESSED;: Current number of paths for which the Path Status
        TLV has the <spanx style="verb">Suppressed</spanx> status bit set.
      </t>
      <t>
        Type &IANA_PM_STATS_TOT_MARKED;: Current number of paths that carry a Path Status
        TLV with at least one status bit set (paths that are explicitly marked).
      </t>
      <t>
        Type &IANA_PM_STATS_TOT_UNMARKED;: Current number of paths that either do not carry
        a Path Status TLV or carry a Path Status TLV with all bits set to zero.
      </t>
    </list>
  </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Using the path status information may affect other applications
          which rely on this information for operational decisions. Operators
          should secure BMP sessions and control access to TLV data to mitigate
          these risks.</t>
    </section>
  </middle>

  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>

      <?rfc include="reference.RFC.8174.xml"?>

      <?rfc include='reference.RFC.4271.xml'?>

      <?rfc include='reference.RFC.7854.xml'?>

      <?rfc include='reference.I-D.ietf-grow-bmp-tlv.xml'?>

      <?rfc include='reference.RFC.7911.xml'?>

      <?rfc include='reference.RFC.4724.xml'?>

      <?rfc include='reference.RFC.2439.xml'?>

      <?rfc include='reference.RFC.7311.xml'?>

      <?rfc include='reference.I-D.ietf-grow-bmp-tlv-ebit.xml'?>

      <?rfc include='reference.I-D.ietf-grow-bmp-bgp-rib-stats'?>
    </references>
    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-idr-best-external.xml'?>

      <?rfc include='reference.I-D.lapukhov-bgp-ecmp-considerations.xml'?>

      <?rfc include='reference.I-D.ietf-rtgwg-bgp-pic.xml'?>

      <?rfc include='reference.RFC.4098.xml'?>
    </references>
  <section title="Implementation Status">
  <t>Note to the Editor: Please remove this section before publication.</t>

  <t>
    This section records the status of known implementations of the BMP Path
    Marking TLV specified in this document. The information is based on
    interoperability and testbed activities, including the Swisscom IETF Daisy
    testbed, and is intended to help reviewers and operators understand current
    implementation and deployment status. This section is non-normative.
  </t>

  <section title="Huawei VRP NE8000">

    <t>
      Huawei implemented the BMP Path Marking TLV, including Path Status and
      Path Reason, on NE8000 platforms running VRP R025C00SPC305T and
      subsequent R025C10 test images.
    </t>

    <t>
      The implementation exports Path Marking information in BMP Route
      Monitoring messages for IPv4 and IPv6 unicast, as well as VPNv4 and VPNv6
      Local-RIB. Support includes ADD-PATH and VPN peer distinguishers.
    </t>

    <t>
      In the test environment, BMP sessions were established from NE8000 PEs to
      a collector and configured to monitor Adj-RIB-In and Adj-RIB-Out, both
      pre-policy and post-policy, as well as VPNv4 and VPNv6 Local-RIB across
      multiple VRF instances.
    </t>

    <t>
      The implementation was exercised against a set of path selection
      scenarios, including best path, backup path, non-installed paths, and
      policy-filtered paths. The exported Path Status bits, such as Best,
      Nonselected, Primary, Backup, and Non-installed, and the corresponding
      Path Reason codes, for example not preferred due to local preference or
      router ID, were verified against the corresponding VRF RIB and BGP routing
      state.
    </t>
  </section>

  <section title="pmacct BMP Collector">

    <t>
      The BMP collector used in the implementation is pmacct with support for
      the Path Marking TLVs as defined in this document.
    </t>

    <t>
      The implementation includes updates to align TLV type and value handling
      with the current draft, as well as changes to the TLV parsing logic to
      correctly process Path Status and Path Reason information in BMP Route
      Monitoring messages.
    </t>

    <t>
      In the implementation tests, the collector is configured to receive BMP
      sessions and export decoded data as JSON logs, including Path Marking TLVs
      where available. This allows comparison between the BGP path state
      observed on the NE8000, for example best, backup, non-installed, or
      policy-filtered, and the corresponding BMP-exported Path Status and Reason
      values.
    </t>

  </section>

  <section title="NetGauze and Wireshark Decoders">

    <t>
      NetGauze is used as an independent BMP decoder to validate the encoding of
      Path Marking TLVs. Updates were made to improve BMPv4 support, including
      handling of ADD-PATH for IPv4/IPv6 MPLS unicast, Loc-RIB Peer Up
      messages, and general BMP message parsing. These changes help decode and
      inspect Route Monitoring messages carrying Path Status and Path Reason
      TLVs.
    </t>

    <t>
      Wireshark nightly builds are used to inspect BMP Route Monitoring messages
      and verify the presence and decoding of Path Marking TLVs, including VPN
      peer distinguishers and SAFI-specific updates. Improvements in BMP TLV and
      Group TLV decoding help inspect VRF context and associated path-marking
      information.
    </t>
  </section>
</section>
  </back>
</rfc>
