<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
        <!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <!ENTITY IANA_RM_CODE_4B_ASN "TBD1">
        <!ENTITY IANA_RM_CODE_PATH_ID "TBD2">
        <!ENTITY IANA_RM_CODE_MULTI_LABELS "TBD3">
        ]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" docName="draft-lucente-bmp-tlv-00"
     ipr="trust200902" submissionType="IETF"
     updates="7854">

    <front>
        <title abbrev="BMP TLV">
	    TLV support for BMP Route Monitoring and Peer Down Messages
	</title>

        <author fullname="Paolo Lucente" initials="P" surname="Lucente">
            <organization>NTT Communications</organization>
            <address>
                <postal>
                    <street>Siriusdreef 70-72</street>
                    <city>Hoofddorp</city>
                    <code>2132</code>
                    <region>WT</region>
                    <country>NL</country>
                </postal>
                <email>paolo@ntt.net</email>
            </address>
        </author>
        <author fullname="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>
                    <region></region>
                    <country>China</country>
                </postal>
                <email>guyunan@huawei.com</email>
            </address>
        </author>
        <author fullname="Henk Smit" initials="H" surname="Smit">
            <organization>Independent</organization>
            <address>
                <postal>
                    <street></street>
                    <city></city>
                    <code></code>
                    <region></region>
                    <country>NL</country>
                </postal>
                <email>hhwsmit@xs4all.nl</email>
            </address>
        </author>

        <date year="2019"/>

        <area>General</area>

        <workgroup>Global Routing Operations</workgroup>
        <keyword>BGP</keyword>
        <keyword>BMP</keyword>
        <keyword>tlv</keyword>

        <abstract>
            <t>
		Most of the message types defined by the BGP Monitoring Protocol (BMP)
		do provision for optional trailing data; however Route Monitoring 
		message (to provide a snapshot of the monitored Routing Information
		Base) and Peer Down message (to indicate that a peering session was
		terminated) do not. Supporting optional data in TLV format across
		all BMP message types allows for an homogeneous and extensible surface
		that would be useful for the most different use-cases that need to
		convey additional data to a BMP station. While this document does not
		want to cover any specific utilization scenario, it defines a simple
		way to support optional TLV data in all message types.
            </t>
        </abstract>
    </front>

    <middle>
        <section title="Introduction" anchor="Introduction">
            <t>
		The BGP Monitoring Protocol (BMP) is defined in <xref target="RFC7854">RFC 7854</xref>.

		<vspace blankLines="1"/>

		The Route Monitoring message consists of:
		<list style="symbols">
			<t>Common Header</t>
			<t>Per-Peer Header</t>
			<t>BGP Update PDU</t>
		</list>

		<vspace blankLines="1"/>

		The Peer Down Notification message consists of:
		<list style="symbols">
			<t>Common Header</t>
			<t>Per-Peer Header</t>
			<t>Reason</t>
			<t>Data (only if Reason code is 1, 2 or 3)</t>
		</list>
	   </t>

           <t>
		This means that both Route Monitoring and Peer Down messages have
		a non-extensible format. In the Route Monitoring case this is limiting
		if wanting to transmit characteristics of transported NLRIs (ie. to
		help stateless parsing) or vendor-specific data; in the Peer Down case
		this is limiting if wanting to match TLVs shipped with the Peer Up.
		The proposal of this document is to bump the BMP version, for backward
		compatibility, and allow all message types to provision for trailing
		TLV data.
            </t>
        </section>

        <section 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">RFC 2119</xref>
		<xref target="RFC8174">RFC 8174</xref> when, and only when, they
		appear in all capitals, as shown here.
            </t>
        </section>

	<section title="TLV encoding">
	    <t>
		TLV data type is already defined in <xref target="RFC7854">Section 4.4</xref>
		for the Initiation and Peer Up message types. A TLV consists of:
	    </t>
	    <t>
		<list style="symbols">
		    <t>
			2 octets of TLV Type,
		    </t>
		    <t>
			2 octets of TLV Length,
		    </t>
		    <t>
			0 or more octets of TLV Value.
		    </t>
		</list>
	    </t>

	    <figure anchor="BMP-TLV-header" align="center">
	    	<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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |        Type (2 octets)        |     Length (2 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |        Value (variable, between, 0 and 65535 octets)          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	    	    ]]>
	    	</artwork>
	    </figure>

	    <t>
		TLVs can be sent in any order. Multiple TLVs of the same type can
		be repeated as part of the same message and it is left to the
		specific use-cases whether all, any, the first or the last TLV
		should be considered. 
	    </t>
	</section>

        <section title="BMP Message Format">
            <section title="Common Header" anchor="CommonHeader">
                <t>
		    <xref target="RFC7854">Section 4.1</xref> defines the Common
		    Header. While the structure remains unaltered, the following
		    two definitions are changed:
		     
		    <list style="symbols">
			<t>
				Version: Indicates the BMP version. This is set
				to '4' for all messages.
			</t>
			<t>
				Message Length: Length of the message in bytes
				(including headers, data, encapsulated messages
				and TLV data if any)
			</t>
		    </list> 
                </t>
            </section>
	    <section title="TLV data in Route Monitoring" anchor="TLVinRM">
		<t>
		    The Route Monitoring message type is defined in <xref target="RFC7854">Section 4.6</xref>.
		    The BGP Update PDU <xref target="RFC4271">Section 4.3</xref> MAY
		    be followed by TLV data. This document defines the following new
		    codes to help stateless parsing of BGP Update PDUs:
                    <list style="symbols">
                        <t>Type = &IANA_RM_CODE_4B_ASN;: the BGP Update PDU is encoded with support for 4-octet AS number capability <xref target="RFC6793">RFC 6793</xref>, value MUST be boolean.</t>
			<t>Type = &IANA_RM_CODE_PATH_ID;: the BGP Update PDU is encoded with ADD-PATH capability <xref target="RFC7911">RFC 7911</xref>, value MUST be boolean.</t>
			<t>Type = &IANA_RM_CODE_MULTI_LABELS;: the BGP Update PDU is encoded with Multiple Labels capability <xref target="RFC8277">RFC 8277</xref>, value MUST be boolean.</t>
                    </list>
		</t>
	    </section>
	    <section title="TLV data in Peer Down" anchor="TLVinPD">
		<t>
		    The Peer Down Notification message type is defined in <xref target="RFC7854">Section 4.9</xref>.
		    TLV data MAY now follow any Reason code.
		</t>
	    </section>
	    <section title="TLV data in other BMP messages" anchor="TLVinOther">
		<t>
		    All other message types defined in <xref target="RFC7854">RFC7854</xref> do already provision for TLV data.
		    It is RECOMMENDED that all future BMP message types will provision for trailing TLV data.
		</t>
	    </section>
        </section>

        <section title="Security Considerations">
            <t>
                It is not believed that this document adds any additional security considerations.
            </t>
        </section>

        <section title="IANA Considerations">
            <t>
		This document defines the following new TLV types for BMP Route Monitoring and Peer Down messages (<xref target="TLVinRM"/>):

		<list style="symbols">
		    <t>
			Type = &IANA_RM_CODE_4B_ASN;: Support for 4-octet AS number capability.
			The value field contains a boolean value. 1 if the BGP Update PDU
			enclosed in the Route Monitoring message was encoded according to the
			capability.
		    </t>
		    <t>
			Type = &IANA_RM_CODE_PATH_ID;: ADD-PATH capability. The value field
			contains a boolean value. 1 if the BGP Update PDU enclosed in the Route
			Monitoring message was encoded according to the capability.
		    </t>
		    <t>
			Type = &IANA_RM_CODE_MULTI_LABELS;: Multiple Labels capability. The
			value field contains a boolean value. 1 if the BGP Update PDU
			enclosed in the Route Monitoring message was encoded according to the
			capability.
		    </t>
		</list>
            </t>
        </section>

    </middle>

    <back>

        <references title="Normative References">
		&RFC2119;
		&RFC8174;

		<?rfc include="reference.RFC.4271.xml"?>
		<?rfc include="reference.RFC.7854.xml"?>
		<?rfc include="reference.RFC.6793.xml"?>
		<?rfc include="reference.RFC.7911.xml"?>
		<?rfc include="reference.RFC.8277.xml"?>
        </references>

        <section anchor="Acknowledgements" title="Acknowledgements" numbered="no">
            <t>
		TBD.
            </t>
        </section>

    </back>
</rfc>
