<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-bier-ping-08" category="std" ipr="trust200902" obsoletes="" updates="" xml:lang="en" symRefs="true" sortRefs="false" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <!-- Generated by id2xml 1.5.0 on 2023-02-27T22:45:04Z -->
	<front>
    <title abbrev="BIER Ping">BIER Ping and Trace</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-bier-ping-08"/>
    <author initials="N." surname="Kumar" fullname="Nagendra Kumar">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>7200 Kit Creek Road</street>
          <street>Research Triangle Park, NC  27709</street>
          <street>US</street>
        </postal>
        <email>naikumar@cisco.com</email>
      </address>
    </author>
    <author initials="C." surname="Pignataro" fullname="Carlos Pignataro">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>7200 Kit Creek Road</street>
          <street>Research Triangle Park, NC  27709-4987</street>
          <street>US</street>
        </postal>
        <email>cpignata@cisco.com</email>
      </address>
    </author>
    <author initials="N." surname="Akiya" fullname="Nobo Akiya">
      <organization>Big Switch Networks</organization>
      <address>
        <postal>
          <street>Japan</street>
        </postal>
        <email>nobo.akiya.dev@gmail.com</email>
      </address>
    </author>
    <author initials="L." surname="Zheng" fullname="Lianshu Zheng">
      <organization>Individual Contributor</organization>
      <address>
        <postal>
          <street>China</street>
        </postal>
        <email>veronique_cheng@hotmail.com</email>
      </address>
    </author>
    <author initials="M." surname="Chen" fullname="Mach Chen">
      <organization>Huawei Technologies</organization>
      <address>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    <author initials="G." surname="Mirsky" fullname="Greg Mirsky">
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <date year="2023"/>
    
    <workgroup>Network Work group</workgroup>
    
    <abstract>
      <t>
   Bit Index Explicit Replication (BIER) is an architecture that
   provides optimal multicast forwarding through a "BIER domain" without
   requiring intermediate routers to maintain any multicast related per-
   flow state.  BIER also does not require any explicit tree-building
   protocol for its operation.  A multicast data packet enters a BIER
   domain at a "Bit-Forwarding Ingress Router" (BFIR), and leaves the
   BIER domain at one or more "Bit-Forwarding Egress Routers" (BFERs).
   The BFIR router adds a BIER header to the packet.  The BIER header
   contains a bit-string in which each bit represents exactly one BFER
   to forward the packet to.  The set of BFERs to which the multicast
   packet needs to be forwarded is expressed by setting the bits that
   correspond to those routers in the BIER header.</t>
      <t>
   This document describes the mechanism and basic BIER OAM packet
   format that can be used to perform failure detection and isolation on
   the BIER data plane.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   <xref target="RFC8279" format="default"/> introduces and explains BIER architecture that provides
   optimal multicast forwarding through a "BIER domain" without
   requiring intermediate routers to maintain any multicast related per-
   flow state.  BIER also does not require any explicit tree-building
   protocol for its operation.  A multicast data packet enters a BIER
   domain at a "Bit-Forwarding Ingress Router" (BFIR), and leaves the
   BIER domain at one or more "Bit-Forwarding Egress Routers" (BFERs).
   The BFIR router adds a BIER header to the packet.  The BIER header
   contains a bit-string in which each bit represents exactly one BFER
   to forward the packet to.  The set of BFERs to which the multicast
   packet needs to be forwarded is expressed by setting the bits that
   correspond to those routers in the BIER header.</t>
      <t>
   This document describes the mechanism and basic BIER Operations, Administration, and Maintenance (OAM) packet
   format that can be used to perform failure detection and isolation on
   the BIER data plane without any dependency on other layers like the IP layer.</t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions used in this document</name>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
   BFER - Bit Forwarding Egress Router</t>
        <t>
   BFIR - Bit Forwarding Ingress Router</t>
        <t>
   BIER - Bit Index Explicit Replication</t>
   <t>
    DDMAP - Downstream Detailed Mapping TLV</t>
        <t>
   ECMP - Equal Cost Multi-Path</t>
        <t>
   OAM - Operation, Administration, and Maintenance</t>
        <t>
   SI - Set Identifier</t>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="default">
        <name>Requirements Language</name>
        <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" format="default"/> <xref target="RFC8174" format="default"/> 
   when, and only when, they appear in all capitals, as shown here.
   </t>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>BIER OAM</name>
      <t>
   BIER OAM is defined to stay within the BIER layer by directly following
   the BIER header without mandating the need for IP header.  <xref target="RFC8296" format="default"/>
   defines a 4-bit field as "Proto" to identify the payload following
   the BIER header.  When the payload is BIER OAM, the "Proto" field will be
   set to 5 as defined in <xref target="RFC8296" format="default"/></t>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>BIER OAM message format</name>
        <t>
   The BIER OAM packet header format that follows BIER header is as
   follows:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Ver  | Message Type  | Proto |             Reserved          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        OAM Message Length                     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                  Message Type Dependent Data                  ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Ver

   Set to 1.

Message Type

   This document defines the following Message Types:

                Type      Value Field
                --------  ---------------
                  1      BIER Echo Request
                  2      BIER Echo Reply

Proto
]]></artwork>
        <dl newline="false" spacing="normal" indent="3">
          <dt/>
          <dd>
      This field is used to define if there is any data packet
      immediately following the OAM payload which is used for passive
      OAM functionality.  This field is set to 0 if there is no data
      packet following OAM payload.</dd>
        </dl>
        <dl newline="true" spacing="normal" indent="3">
          <dt>OAM Message Length</dt>
          <dd>
	This field defines the length of the OAM message including the
      header and Dependent Data field.
	</dd>
          <dt>The Echo Request/Reply header format is as follows:</dt>
          <dd/>
        </dl>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Ver  | Echo Req/Rep  | Proto |             Reserved          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   QTF |   RTF |   Reply mode  |  Return Code  |    Reserved   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Sender's Handle                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Sequence Number                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                    TimeStamp Sent                             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                  TimeStamp Sent                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                  TimeStamp Received                           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                TimeStamp Received                             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                              TLVs                             ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Proto

   Set to 0 for Echo Request/Reply header.

QTF
]]></artwork>
        <dl newline="false" spacing="normal" indent="3">
          <dt/>
          <dd>
      Querier Timestamp Format.  When set to 2, the Timestamp Sent field
      is (in seconds and microseconds, according to the Initiator's
      clock) in NTP format <xref target="RFC5905" format="default"/>.  When set to 3, the timestamp
      format is in IEEE 1588-2008 (1588v2) Precision Time Protocol
      format.  Any other value MAY be considered as sanity check failure</dd>
        </dl>
        <dl newline="true" spacing="normal" indent="3">
          <dt>RTF</dt>
          <dd>
	Responder Timestamp Format.  When set to 2, the Timestamp Received
      field is (in seconds and microseconds, according to the
      Initiator's clock) in NTP format <xref target="RFC5905" format="default"/>.  When set to 3, the
      timestamp format is in IEEE 1588-2008 (1588v2) Precision Time
      Protocol format.  Any other value MAY be considered as sanity
      check failure.
	</dd>
          <dt>Reply mode</dt>
          <dd>
	The Reply mode is set to one of the below:
	</dd>
        </dl>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                Value      Meaning
                --------  ---------------
                  1        Do not Reply
                  2        Reply via IPv4/IPv6 UDP packet.
                  3        Reply via BIER packet
]]></artwork>
        <t>
   When Reply mode is set to 1, the receiver will not send any reply.
   This mode can be used for unidirectional path validation.  When the
   Reply mode is set to 2, the Responder BFR encapsulates the Echo
   reply payload with IP header.  When the Initiator intends to validate
   the return BIER path, the Reply mode will be set to 3 so that the
   Responder BFR will encapsulates the Echo Reply with the BIER header.</t>
        <dl newline="true" spacing="normal" indent="3">
          <dt>Return Code</dt>
          <dd>
	Set to zero if Type is "BIER Echo Request".  Set to one of the
      value defined in section 3.2, if Type is "BIER Echo Reply".
	</dd>
          <dt>Reserved</dt>
          <dd>
	Set to all zero value.
	</dd>
          <dt>Sender's Handle, Sequence Number, and Timestamp</dt>
          <dd>
            <t>
	The Sender's Handle is filled by the Initiator, and returned
      unchanged by responder BFR.  This value can be used for matching
      the replies to the request.
            </t>
            <t>
	The Sequence Number is assigned by the Initiator and can be used
      to detect any missed replies.
            </t>
            <t>
	The Timestamp Sent is the time when the Echo Request is sent.  The
      TimeStamp Received in Echo Reply is the time (accordingly to
      responding BFR clock) that the corresponding Echo Request was
      received.  The format depends on the QTF/RTF value.
            </t>
          </dd>
          <dt>TLVs</dt>
          <dd>
	Carries the TLVs as defined in <xref target="sect-3.3" format="default"/>.
	</dd>
        </dl>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>Return Code</name>
        <t>
   The responder uses the Return Code field to reply with a validity
   check or other error message to Initiator.  It does not carry any
   meaning in Echo Request and MUST be set to zero.</t>
        <dl newline="true" spacing="normal" indent="3">
          <dt>The Return Code can be one of the following:</dt>
          <dd/>
        </dl>
        <artwork name="" type="" align="left" alt=""><![CDATA[
        Value      Value Meaning
        ------    ---------------
         0      No return code
         1      Malformed Echo Request received
         2      One or more of the TLVs is not supported
         3      Replying BFR is the only BFER in header Bitstring
         4      Replying BFR is one of the BFER in header Bitstring
         5      Packet-Forward-Success
         6      Invalid Multipath Info Request
         8      No matching entry in the forwarding table
         9      Set-Identifier Mismatch
         10     DDMAP Mismatch
]]></artwork>
        <t>
   "No return code" will be used by Initiator in the Echo Request.  This
   value MUST NOT be used in Echo Reply.</t>
        <t>
   "Malformed Echo Request received" will be used by any BFR if the
   received Echo Request packet is not properly formatted.</t>
        <t>
   When a receiver does not support any TLV included in the Echo
   Request, the Return code will be set to "One or more of the TLVs is not supported" carrying the respective TLVs.</t>
        <t>
   When the received header BitString in the Echo Request packet
   contains only its Bit-ID, "Replying BFR is the only BFER in header BitString" is set in the reply.  This value implies that the receiver
   is BFER and the packet is not forwarded to any more neighbors.</t>
        <t>
   When the received header BitString in the Echo Request packet
   contains its Bit-ID in addition to other Bit-IDs, "Replying BFR is one of the BFER in header BitString" is set in the reply.  This
   value implies that the responder is a BFER and the packet is further
   forwarded to one or more neighbors.</t>
        <t>
   Any transit BFR will send the Echo Reply with "Packet-Forward-Success", if the TLV in the received Echo Request is understood and
   forwarding table has forwarding entries for the BitString.  This
   behavior is demonstrated by a transit BFR during traceroute mode.</t>
        <t>
   When the Echo Request is received with multipath info for more than
   one BFER, the Return Code is set to "Invalid Multipath Info Request".</t>
        <t>
   If the BitString cannot be matched in the local forwarding table, the
   BFR will use "No matching entry in the forwarding table" in the reply.</t>
        <t>
   If the BIER-MPLS label in the received Echo Request is not the one
   assigned for SI in Original SI-BitString TLV, "Set-Identifier Mismatch" is set in order to report the mismatch.</t>
      </section>
      <section anchor="sect-3.3" numbered="true" toc="default">
        <name>BIER OAM TLV</name>
        <t>
   This section defines various TLVs that can be used in BIER OAM
   packet.  The TLVs (Type-Length-Value tuples) have the following
   format:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |               Type            |          Length               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  ~                              Value                            ~
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        <t>
   TLV Types are defined below; Length is the length of the Value field
   in octets.  The Value field depends on the TLV Type.</t>
        <section anchor="sect-3.3.1" numbered="true" toc="default">
          <name>Original SI-BitString TLV</name>
          <t>
   The Original SI-BitString TLV carries the set of BFER and carries the
   same BitString that Initiator includes in the BIER header.  This TLV
   has the following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type = 1              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    Set ID     | Sub-domain ID |BS Len|  Reserved              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (first 32 bits)                     ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (last 32 bits)                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          <t>
   Set ID field is set to the value of the Set Identifier to which the
   BitString belongs to.  This value is derived as defined in <xref target="RFC8279" format="default"/></t>
          <t>
   Sub-domain ID is set to the Sub-domain value to which BFER in
   BitString belongs to.</t>
          <t>
   BS Len is set based on the length of BitString as defined in
   <xref target="RFC8296" format="default"/></t>
          <t>
   The BitString field carries the set of BFR-IDs that Initiator will
   include in the BIER header.  This TLV MUST be included by Initiator
   in Echo Request packet</t>
          <t>
   Any Initiator MUST include this TLV in the Echo Request packet.</t>
        </section>
        <section anchor="sect-3.3.2" numbered="true" toc="default">
          <name>Target SI-BitString TLV</name>
          <t>
   The Target SI-BitString TLV carries the set of BFER from which the
   Initiator expects the reply from.This TLV has the following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type = 2              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    Set ID     | Sub-domain ID |BS Len|  Reserved              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (first 32 bits)                     ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (last 32 bits)                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          <t>
   Set ID field is set to the Set Identifier to which the BitString
   belongs to.  This value is derived as defined in <xref target="RFC8279" format="default"/></t>
          <t>
   Sub-domain ID is set to the Sub-domain value to which BFER in
   BitString belongs to.</t>
          <t>
   BS Len is set based on the length of BitString as defined in
   <xref target="RFC8296" format="default"/></t>
          <t>
   The BitString field carries the set of BFR-IDs of BFER(s) that
   Initiator expects the response from.  The BitString in this TLV may
   be different from the BitString in the BIER header and allows to
   control the BFER responding to the Echo Request.  This TLV MUST be
   included by Initiator in BIER OAM packet if the Downstream Mapping
   TLV (section 3.3.4) is included.</t>
        </section>
        <section anchor="sect-3.3.3" numbered="true" toc="default">
          <name>Incoming SI-BitString TLV</name>
          <t>
   The Incoming SI-BitString TLV will be included by Responder BFR in
   Reply message and copies the BitString from BIER header of incoming
   Echo Request message.  This TLV has the following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type = 3              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    Set ID     | Sub-domain ID |BS Len|  Reserved              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (first 32 bits)                     ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (last 32 bits)                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          <t>
   Set ID field is set to the Set Identifier to which the BitString
   belongs to.  This value is derived as defined in <xref target="RFC8279" format="default"/></t>
          <t>
   Sub-domain ID is set to the Sub-domain value to which BFER in
   BitString belongs to.</t>
          <t>
   BS Len is set based on the length of BitString as defined in
   <xref target="RFC8296" format="default"/></t>
          <t>
   The BitString field copies the BitString from the BIER header of the
   incoming Echo Request.  A Responder BFR SHOULD include this TLV in
   Echo Reply if the Echo Request is received with I flag set in
   Downstream Mapping TLV.</t>
          <t>
   An Initiator MUST NOT include this TLV in Echo Request.</t>
        </section>
        <section anchor="sect-3.3.4" numbered="true" toc="default">
          <name>Downstream Mapping TLV</name>
          <dl newline="true" spacing="normal" indent="3">
            <dt>This TLV has the following format:</dt>
            <dd/>
          </dl>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type = 4              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |               MTU             | Address Type  |     Flags     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |               Downstream Address (4 or 16 octets)             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Downstream Interface Address (4 or 16 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |        Sub-tlv Length         |                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
  .                                                               .
  .                      List of Sub-TLVs                         .
  .                                                               .
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

MTU

   Set to MTU value of outgoing interface.

Address Type
]]></artwork>
          <dl newline="false" spacing="normal" indent="3">
            <dt/>
            <dd>
      The Address Type indicates the address type and length of IP
      address for the downstream interface.  The Address type is set to
      one of the below:</dd>
          </dl>
          <artwork name="" type="" align="left" alt=""><![CDATA[
            Type     Addr. Type       DA Length    DIA Length
           -------  ---------------   ----------   ----------
               1       IPv4 Numbered        4              4
               2       IPv4 Unnumbered      4              4
               3       IPv6 Numbered        16            16
               4       IPv6 Unnumbered      16             4
  
            DA Length - Downstream Address field Length
            DIA Length - Downstream Interface Address field Length
]]></artwork>

          <dl newline="true" spacing="normal" indent="3">
            <dt>Flags</dt>
            <dd>
	The Flags field has the following format:
	</dd>
          </dl>
          <artwork name="" type="" align="left" alt=""><![CDATA[
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|     Rsvd    |I|
+-+-+-+-+-+-+-+-+
]]></artwork>
          <t>
   When I flag is set, the Responding BFR MUST include the Incoming SI-
   BitString TLV in Echo Reply message.</t>
          <dl newline="true" spacing="normal" indent="3">
            <dt>Downstream Address and Downstream Interface Address</dt>
            <dd>
              <t>
	If the Address Type is 1, the Downstream Address MUST be set to
      IPV4 BFR-Prefix of downstream BFR and Downstream Interface Address
      is set to the downstream interface address.
              </t>
              <t>
	If the Address Type is 2, the Downstream Address MUST be set to
      IPV4 BFR-Prefix of downstream BFR and Downstream Interface Address
      is set to the index assigned by upstream BFR to the interface.
              </t>
              <t>
	If the Address Type is 3, the Downstream Address MUST be set to
      IPV6 BFR-Prefix of downstream BFR and Downstream Interface Address
      is set to the downstream interface address.
              </t>
              <t>
	If the Address Type is 4, the Downstream Address MUST be set to
      IPv6 BFR-Prefix of downstream BFR and Downstream Interface Address
      is set to the index assigned by upstream BFR to the interface.
              </t>
            </dd>
          </dl>
          <section anchor="sect-3.3.4.1" numbered="true" toc="default">
            <name>Downstream Detailed Mapping Sub-TLVs</name>
            <t>
   This section defines the optional Sub-TLVs that can be included in
   Downstream Mapping TLV.</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
                Sub-TLV Type     Value
                ------------  -------------
                    1         Multipath Entropy Data
                    2         Egress BitString
]]></artwork>
            <section anchor="sect-3.3.4.1.1" numbered="true" toc="default">
              <name>Multipath Entropy Data</name>
              <artwork name="" type="" align="left" alt=""><![CDATA[
     0                   1                   2                   3
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |M|  Reserved     |                                             |
   +-+-+-+-+-+-+-+-+-+                                             |
   |                                                               |
   |                  (Multipath Information)                      |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

M Flag
]]></artwork>
              <dl newline="false" spacing="normal" indent="3">
                <dt/>
                <dd>
      This flag is set to 0 if all packets will be forwarded out through
      the interface defined in the Downstream Mapping TLV.  When set to
      1, Multipath Information will be defined by the Bit masked Entropy
      data.</dd>
              </dl>
              <dl newline="true" spacing="normal" indent="3">
                <dt>Multipath Information</dt>
                <dd>
	Entropy Data encoded as defined in section 3.4
	</dd>
              </dl>
            </section>
            <section anchor="sect-3.3.4.1.2" numbered="true" toc="default">
              <name>Egress BitString</name>
              <t>
   Responder BFR MAY include this Sub-TLV with the rewritten BitString
   in the outgoing interface as defined in section 6.1 of <xref target="RFC8279" format="default"/></t>
              <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    Set ID     | Sub-domain ID |BS Len|  Reserved              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (first 32 bits)                     ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~                                                               ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                BitString  (last 32 bits)                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
            </section>
          </section>
        </section>
        <section anchor="sect-3.3.5" numbered="true" toc="default">
          <name>Responder BFER TLV</name>
          <t>
   The BFER replying to the request MAY include the Responder BFER TLV.
   This TLV identifies the originator of BIER Echo Reply.  This TLV has
   the following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type = 5              |            Length             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Reserved              |           BFR-ID              |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

BFR-ID
]]></artwork>
          <dl newline="false" spacing="normal" indent="3">
            <dt/>
            <dd>
      The BFR-ID field carries the BFR-ID of replying BFER.  This TLV
      MAY be included by Responding BFER in BIER Echo Reply packet.</dd>
          </dl>
        </section>
        <section anchor="sect-3.3.6" numbered="true" toc="default">
          <name>Responder BFR TLV</name>
          <t>
   Any transit BFR replying to the request MAY include the Responder BFR
   TLV.  This is used to identify the replying BFR without BFR-ID.  This
   TLV has the following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     TLV Type = 6              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Reserved              |          Address Type         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  ~                       BFR-Prefix (4 or 16 bytes)              ~
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Length

   The Length field varies depending on the Address Type.

Address Type

   Set to 1 for IPv4 or 2 for IPv6.

BFR-Prefix
]]></artwork>
          <dl newline="false" spacing="normal" indent="3">
            <dt/>
            <dd>
      This field carries the local BFR-Prefix of the replying BFR.  This
      TLV MAY be included by Responding BFR in BIER Echo Reply packet.</dd>
          </dl>
        </section>
        <section anchor="sect-3.3.7" numbered="true" toc="default">
          <name>Upstream Interface TLV</name>
          <t>
   The BFR replying to the request MUST include the Upstream Interface
   TLV.  This TLV identifies the incoming interface and the BIER-MPLS
   label in the incoming Echo Request.  This TLV has the following
   format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     TLV Type = 7              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Reserved              |          Address Type         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  ~                 Upstream Address (4 or 16 bytes)              ~
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Length

   The Length field varies depending on the Address Type.

Address Type
]]></artwork>
          <dl newline="false" spacing="normal" indent="3">
            <dt/>
            <dd>
      Set to 1 for IPv4 numbered, 2 for IPv4 Unnumbered 3 for IPv6
      numbered or 4 for IPv6 Unnumbered.</dd>
          </dl>
          <dl newline="true" spacing="normal" indent="3">
            <dt>Upstream Address</dt>
            <dd>
	As defined in <xref target="sect-3.3.4" format="default"/>
            </dd>
          </dl>
        </section>
        <section anchor="sect-3.3.8" numbered="true" toc="default">
          <name>Reply-To TLV</name>
          <t>
   The Initiator BFR MAY include Reply-To TLV in the Echo Request.  This
   TLV is used by transit BFR or BFER when the reply mode is 2.  The IP
   address will be used to generate the Echo Reply.  This TLV has the
   following format:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
   0                   1                   2                   3
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     TLV Type = 8              |       Length = variable       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Reserved              |          Address Type         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  ~                    Reply-To Address (4 or 16 bytes)           ~
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Length

   The Length field varies depending on the Address Type.

Address Type

   Set to 1 for IPv4 or 2 for IPv6.

Reply-To Address
]]></artwork>
          <dl newline="false" spacing="normal" indent="3">
            <dt/>
            <dd>
      Set to any locally configured address to which the Echo reply
      should be sent.</dd>
          </dl>
        </section>
      </section>
      <section anchor="sect-3.4" numbered="true" toc="default">
        <name>Multipath Entropy Data Encoding</name>
        <t>
   The size of the Entropy field in the BIER header is 20 bits as
   defined in section 2 of <xref target="RFC8296" format="default"/>.  This encoding is similar to the
   Multipath Type 9 encoding defined in Section 3.4.1.1.1 of <xref target="RFC8029" format="default"/>.</t>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Procedures</name>
      <t>
   This section describes aspects of Ping and traceroute operations.</t>
      <section anchor="sect-4.1" numbered="true" toc="default">
        <name>BIER OAM Processing</name>
        <t>
   A BIER OAM packet MUST be sent to the BIER control plane for OAM
   processing if one of the following conditions is true:</t>
        <ul spacing="normal">
          <li>The receiving BFR is a BFER.</li>
          <li>TTL of BIER-MPLS Label expired.</li>
          <li>Router Alert label is present in the label stack.</li>
        </ul>
      </section>
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>Per BFER ECMP Discovery</name>
        <t>
   As defined in <xref target="RFC8279" format="default"/>, BIER follows the unicast forwarding path and
   allows load balancing over ECMP paths between BFIR and BFER.  BIER
   OAM MUST support ECMP path discovery between a BFIR and a given BFER
   and MUST support path validation and failure detection of any
   particular ECMP path between BFIR and BFER.</t>
        <t>
   <xref target="RFC8296" format="default"/> proposes the BIER header with the Entropy field that can be
   leveraged to exercise all ECMP paths.  The Initiator/BFIR will use
   traceroute message to query each hop about the Entropy information
   for each of the downstream paths.  To avoid complexity, it is
   suggested that the ECMP query is performed per BFER by carrying
   required information in BIER OAM message.</t>
        <t>
   The Initiator MUST include Multipath Entropy Data Sub-TLV in
   Downstream Mapping TLV.  It MUST also include the BFER in BitString
   TLV to which the Multipath query is performed.</t>
        <t>
   Any transit BFR will reply with Bit-masked Entropy for each
   downstream path as defined in <xref target="RFC8029" format="default"/></t>
      </section>
      <section anchor="sect-4.3" numbered="true" toc="default">
        <name>Sending BIER Echo Request</name>
        <t>
   The Initiator MUST set the Message Type as 1 and Return Code as 0.
   The Proto field in OAM packet MUST be set to 0.  The choice of the
   Sender's Handle and Sequence Number is a local matter to the
   Initiator and SHOULD increment the Sequence Number by 1 for every
   subsequent Echo Request.  The QTF field is set to Initiator's local
   timestamp format and TimeStamp Sent field is set to the time that the
   Echo Request is sent.</t>
        <t>
   The Initiator MUST include Original SI-BitString TLV.  The Initiator
   MUST NOT include more than one Original SI-BitString TLV.  The
   Initiator infers the Set Identifier value and Sub-domain ID value
   from the respective BitString that will be included in the BIER
   header of the packet and includes the values in "SI" and Sub-Domain
   ID fields respectively.</t>
        <t>
   In Ping mode, the Initiator MAY include Target SI-BitString TLV to
   control the responding BFER(s) by listing all the BFERs from which
   the Initiator expects a response.  In the trace route mode, the
   Initiator MAY include Target SI-Bitstring TLV to control the path
   trace towards any specific BFER or set of BFERs.  The Initiator on
   receiving a reply with Return code as "Replying BFR is the only BFER in header Bitstring" or "Replying router is one of the BFER in header Bitstring", SHOULD unset the respective BFR-id from Target SI-
   BitString for any subsequent Echo Request.</t>
        <t>
   When the Reply mode is set to 2, the Initiator MUST include Reply-To
   TLV (section 3.3.8) in the Echo Request.  The Initiator MUST also
   listen to the UDP port defined in this TLV and process any segment
   received with destination port as the value defined in the TLV and
   sent to control plane for BIER OAM payload processing.</t>
        <t>
   The Initiator MAY include Downstream Mapping TLV (section 3.3.4) in
   the Echo Request to query additional information from transit BFRs
   and BFERs.  In case of ECMP discovery, the Initiator MUST include the
   Multipath Entropy Data Sub-TLV and SHOULD set the Target SI-BitString
   TLV carrying a specific BFER ID.</t>
        <t>
   The Initiator MUST encapsulate the OAM packet with BIER header and
   MUST set the Proto as 5 and further encapsulates with BIER-MPLS
   label.  In ping mode, the BIER-MPLS Label TTL MUST be set to 255.  In
   traceroute mode, the BIER-MPLS Label TTL is set successively starting
   from 1 and MUST stop sending the Echo Request if it receives a reply
   with Return code as "Replying router is the only BFER in BIER header Bitstring" from all BFER listed in Target SI-BitString TLV.</t>
      </section>
      <section anchor="sect-4.4" numbered="true" toc="default">
        <name>Receiving BIER Echo Request</name>
        <t>
   Sending a BIER OAM Echo Request to control plane for payload
   processing is triggered as mentioned in section 4.1.</t>
        <t>
   Any BFR on receiving Echo Request MUST perform the basic sanity
   check.  If the BFR cannot parse the OAM Dependent data payload
   completely because the value in the OAM Message Length field is
   incorrect, BFR MUST send Echo Reply with Return Code set to
   "Malformed Echo Request received" if the OAM Message Length is
   incorrect.  If the packet sanity check is fine, it SHOULD initiate
   the below set of variables:</t>
        <dl newline="true" spacing="normal" indent="3">
          <dt>Reply-Flag</dt>
          <dd>
	This flag is initially set to 1.
	</dd>
          <dt>Interface-I</dt>
          <dd>
	The incoming interface on which the Echo Request was received.
      This MAY be used to validate the Downstream Detailed
      Mapping TLV (DDMAP) info and to populate the
      Upstream Interface TLV.
	</dd>
          <dt>BIER-Label-L</dt>
          <dd>
	The BIER-MPLS Label received as the top label of the received Echo
      Request.  This MAY be used to validate if the packet is traversing
      the desired Set Identifier and sub-domain path.
	</dd>
          <dt>Header-H</dt>
          <dd>
	The BIER header of the received Echo Request.  It can be used to
      validate the DDMAP info and to populate the Incoming SI-BitString
      TLV.  Also, it can be used to perform Entropy calculation
      considering a different field in the header and reply via
      Multipath Entropy Data Sub-TLV.
	</dd>
        </dl>
        <t>
   BFR MUST initialize the Best-return-code variable to the null value.</t>
        <t>
   BFR will populate the Interface-I with the identifier of the
   interface over which the Echo Request is received, the top label in
   the MPLS stack of the received Echo Request to BIER-Label-L, and the
   BIER header to BIER-Header.  If the received Echo Request carries
   Target SI-BitString TLV, a BFR SHOULD run boolean AND operation
   between BitString in Header-H and BitString in Target SI-BitString
   TLV.  If the resulting BitString is all-zero, reset Reply-Flag=0 and
   go to section 4.5.  Else:</t>
        <ul spacing="normal">
          <li>If the BIER-Label-L does not correspond to the local label
      assigned for {sub-domain, BitStringLen, SI} in Original SI-
      BitString TLV, Set the Best-return-code to "Set-Identifier Mismatch" and Go to section 4.5.</li>
        </ul>
<t>
* /* This step allows the detection of a synchronization problem in the upstream BFR between
BIER-Label and {sub-domain, BitStringLen, SI} that might cause an unintended packet leak between sub-domains. */
</t>

        <ul spacing="normal">
          <li>Set the Best-return-code to "One or more of the TLVsis not supported" if any of the TLVs in the Echo Request message is not
      supported.  Go to section 4.5.</li>
          <li>If the BitString in Header-H does not match the BitString in
      Egress BitString Sub-TLV of DDMAP TLV, set the Best-return-code to
      "DDMAP Mismatch" and go to section 4.5.  When there are more than
      one DDMAP TLV in the received Request packet, the Downstream
      Address and Downstream Interface Address should be matched with
      Interface-I to identify the right DDMAP TLV and then perform the
      BitString match.</li>
        </ul>
        <t>
        * /* This step allows the detection of a deviation between the BIER control plane and the BIER
        forwarding plane in the upstream node that may result in a forwarding loop or packet duplication. */
        </t>

        <ul spacing="normal">
          <li>Set the Best-return-code to "Invalid Multipath Info Request", when
      the DDMAP TLV carries Multipath Entropy Data Sub-TLV, and if the
      Target SI-BitString TLV in the received Echo Request carries more
      than 1 BFER id.  Go to section 4.5.  Else, list the ECMP
      downstream neighbors to reach BFR-id in Target SI-BitString TLV,
      calculate the Entropy considering the BitString in Header-H and
      Multipath Entropy Data Sub-TLV from received Echo Request.  Store
      the Data for each Downstream interface in a temporary variable.
      Set the Best-return-code to 5 (Packet-Forward-Success) and goto
      <xref target="sect-4.5" format="default"/>
          </li>
        </ul>
        <t>
           * /* This step instructs the node to calculate the Entropy Data for each
      downstream interface to reach the BFER in Target SI-BitString
      TLV by considering the incoming BitString and Entropy Data.*/
      </t>

        <ul spacing="normal">
          <li>Set the Best-return-code to "Replying router is the only BFER in BIER header Bitstring", and go to section 4.5 if the responder is
      BFER and there are no more bits in BIER header Bitstring left for
      forwarding.</li>
          <li>Set the Best-return-code to "Replying router is one of the BFER in BIER header Bitstring", and include Downstream Mapping TLV, if the
      responder is BFER and there are more bits in BitString left for
      forwarding.  Also, include the Multipath information as defined in
      <xref target="sect-4.2" format="default"/> if the received Echo Request carries Multipath Entropy
      Data Sub-TLV.  Go to section 4.5.</li>
          <li>Set the Best-return-code to "No matching entry in the forwarding table", if the forwarding lookup defined in section 6.5 of
      <xref target="RFC8279" format="default"/> does not match any entry for the received BitString in
      BIER header.</li>
        </ul>
        <t>
           * /* This step allows the detection of the missing BFR-id in the node's BIER forwarding table.
           It is difficult to detect the absence of the BFR-id if the Request includes more than one BFR-ids in
           the BitString and so may need to include the BFER-id that is not responding to detect such failure. */
      </t>

        <ul spacing="normal">
          <li>Set the Best-return-code to "Packet-Forward-Success", and include
      Downstream Mapping TLV.  Go to section 4.5</li>
        </ul>
      </section>
      <section anchor="sect-4.5" numbered="true" toc="default">
        <name>Sending Echo Reply</name>
        <t>
   If Reply-Flag=0, BFR MUST release the variables and MUST not send any
   response to the Initiator.  If Reply-Flag=1, proceed as below:</t>
        <t>
   The Responder BFR SHOULD include the BitString from Header-H to
   Incoming SI-BitString TLV and include the Set ID, Sub-domain ID and
   BS Len that corresponds to BIER-Label-L.  Responder BFR SHOULD
   include the Upstream Interface TLV and populate the address from
   Interface-I.</t>
        <t>
   When the Best-return-code is "Replying BFR is one of the BFER in header Bitstring", it MUST include Responder BFER TLV.</t>
        <dl newline="false" spacing="normal" indent="3">
          <dt/>
          <dd>
      If the received Echo Request had DDMAP with Multipath Entropy Data
      Sub-TLV, Responder BFR MUST include DDMAP as defined in
      <xref target="sect-3.3.4" format="default"/> for each outgoing interface over which the packet
      will be replicated and include the respective Multipath Entropy
      Data Sub-TLV.  For each outgoing interface, respective Egress
      BitString MUST be included in DDMAP TLV.</dd>
        </dl>
        <dl newline="false" spacing="normal" indent="3">
          <dt/>
          <dd>
      If the received Echo Request had DDMAP without Multipath Entropy
      Data Sub-TLV, Responder BFR MUST include DDMAP as defined in
      <xref target="sect-3.3.4" format="default"/> for each outgoing interface over which the packet
      will be replicated.  For each outgoing interface, respective
      Egress BitString MUST be included in DDMAP TLV.</dd>
        </dl>
        <t>
   When the Best-return-code is "Replying BFR is the only BFER in header Bitstring", it MUST include Responder BFER TLV.</t>
        <t>
   The Responder MUST set the Message Type as 2 and Return Code as Best-
   return-code.  The Proto field MUST be set to 0.</t>
        <t>
   The Echo Reply can be sent either as BIER-encapsulated or IP/UDP
   encapsulated depending on the Reply mode in received Echo Request.
   When the Reply mode in received Echo Request is set to 3, Responder
   appends BIER header listing the BitString with BFIR ID (from Header-
   H), set the Proto to 5 and set the BFIR as 0.  When the Reply mode in
   received Echo Request is set to 2, Responder encapsulates with IP/UDP
   header.  The UDP destination port MUST be set to TBD1, and the source
   port MAY be set to TBD1 or other random local value.  The source IP
   is any local address of the responder and destination IP is derived
   from Reply-To TLV.</t>
      </section>
      <section anchor="sect-4.6" numbered="true" toc="default">
        <name>Receiving Echo Reply</name>
        <t>
   The Initiator upon receiving the Echo Reply will use the Sender's
   Handle to match with Echo Request sent.  If no match is found, the
   Initiator MUST ignore the Echo Reply.</t>
        <t>
   If receiving Echo Reply have Downstream Mapping, the Initiator SHOULD
   copy the same to subsequent Echo Request(s).</t>
        <t>
   If one of the Echo Reply is received with Return Code as "Replying BFR is one of the BFER in header Bitstring", it SHOULD reset the BFR-
   id of the responder from Target SI-BisString TLV in subsequent Echo
   Request.</t>
   <t>
   /* This step helps avoid any BFR that is both BFER and transit BFR to respond with Echo Reply continuously. */
   </t>
      </section>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   This document requests a UDP port TBD1 to be allocated by IANA for
   BIER Echo.</t>
      <t>
   This document requests the IANA to create and manage the below
   registries and sub-registries:</t>
      <section anchor="sect-5.1" numbered="true" toc="default">
        <name>BIER OAM Registry</name>
        <t>
   IANA is requested to create and maintain "BIER OAM Parameters"
   registry.</t>
      </section>
      <section anchor="sect-5.2" numbered="true" toc="default">
        <name>Message Types, Reply Modes, Return Codes</name>
        <t>
   IANA is requested to create a "Message Type" sub-registry under "BIER OAM Parameters" registry and assign the Message Types defined in
   section 3.1</t>
        <t>
   IANA is requested to create a "Echo Reply Mode" sub-registry under
   "BIER OAM Parameters" registry and assign the Echo Reply Modes
   defined in section 3.1</t>
        <t>
   IANA is requested to create a "Echo Return Codes" sub-registry under
   "BIER OAM Parameters" registry and assign the Return Codes defined in
   section 3.2</t>
      </section>
      <section anchor="sect-5.3" numbered="true" toc="default">
        <name>TLVs</name>
        <t>
   The TLVs and Sub-TLVs defined in this document is not limited to Echo
   Request or Reply message types and is applicable for other message
   types.  The TLVs and Sub-TLVs requested by this document for IANA
   consideration are the following:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
          Type        Sub-Type            Value Field
        -------      --------            -----------
          1                               Original SI-BitString
          2                               Target SI-BitString
          3                               Incoming SI-BitString
          4                               Downstream Mapping
          4              1                Multipath Entropy Data
          4              2                Egress BitString
          5                               Responder BFER
          6                               Responder BFR
          7                               Upstream Interface
]]></artwork>
      </section>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The security consideration for BIER Ping is similar to ICMP  <xref target="RFC0792"/> or LSP
   Ping <xref target="RFC8029"/>, <xref target="RFC6425"/>.  As with ICMP or LSP Ping, BFR can be exposed to Denial-
   of-Service (DoS) attacks, and it is RECOMMENDED to regulate the BIER
   Ping packet flow to the control plane.  A rate limiter SHOULD be
   applied to avoid any attack.</t>
      <t>
   As with ICMP or LSP Ping, a traceroute can be used to obtain network
   information.  It is RECOMMENDED that the implementation checks the
   integrity of BFIR of the Echo messages against any local secured list
   before processing the message further</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>Acknowledgement</name>
      <t>
   The authors would like to thank Antoni Przygienda, Eric Rosen, Faisal
   Iqbal, Jeffrey (Zhaohui) Zhang,DIA Length - Downstream Interface Address field Length and Shell Nakash for their review and
   comments.</t>
      <t>
   The authors would like to thank Mankamana Mishra for his thorough
   review and comments.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5905.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8029.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8279.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8296.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6425.xml"/>
      </references>
      <references>
      
        <name>Informative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0792.xml"/>
      </references>
    </references>
  </back>
</rfc>
