<?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 RFC7854 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7854.xml">
	<!ENTITY RFC6396 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6396.xml">
	<!ENTITY I-D.ietf-grow-bmp-tlv SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-tlv.xml">
	<!ENTITY I-D.ietf-grow-bmp-rel SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-rel.xml">
	<!ENTITY I-D.petrie-grow-mrt-bmp SYSTEM "https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.petrie-grow-mrt-bmp.xml">
	<!ENTITY IANA_PS_MSG_TYPE "TBD1">
	<!ENTITY IANA_PS_CODE_PEER_TLV "TBD2">
]>

<?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-grow-bmp-offline-00"
     ipr="trust200902" submissionType="IETF"
     updates="7854">

    <front>
        <title>
	    Making BMP fruible offline
	</title>

        <author fullname="Paolo Lucente" initials="P" surname="Lucente">
            <organization>NTT</organization>
            <address>
                <postal>
                    <street>Veemweg 23</street>
                    <city>Barneveld</city>
                    <code>3771</code>
                    <region>MT</region>
                    <country>NL</country>
                </postal>
                <email>paolo@ntt.net</email>
            </address>
        </author>

        <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="Luuk Hendriks" initials="L." surname="Hendriks">
	    <organization>NLnet Labs</organization>
	    <address>
	        <postal>
	            <street>Science Park 400</street>
	            <city>Amsterdam</city>
	            <code>1098 XH</code>
	            <country>Netherlands</country>
	        </postal>
	        <email>luuk@nlnetlabs.nl</email>
	    </address>
	</author>

        <date year="2024"/>

        <area>General</area>

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

        <abstract>
            <t>
		<xref target="RFC7854">BMP (BGP Monitoring Protocol)</xref> is perfectly
		suited for real-time consumption but less ideal for off-wire historical
		purposes. The main issue is the dependence that parsing BGP Update PDUs
		has on knowing which capabilities have been agreed when establishing
		the BGP session with the peers, which could have happened long time
		ago (days, weeks, months).
	    </t>
            <t>
		This document defines a new optional BMP message type, called Peer Summary,
		that carries a summary of the established BGP sessions along with their
		capabilities and that is intended to be injected in the BMP feed at
		configurable time intervals and/or ad-hoc whenever it is felt necessary to
		improve fruition of BMP data offline.
	    </t>
        </abstract>
    </front>

    <middle>
        <section title="Introduction" anchor="Introduction">
            <t>
		Correctly parsing BGP Update PDUs included in BMP messages (ie. Route
		Monitoring) does require a stateful approach by keeping track of
		capabilities exchanged at BGP Open time as reported by BMP Peer Up
		messages. 
	    </t>
	    <t>
		The role of Peer Up messages is solely BGP session event logging and
		the long-lived nature of sessions does pose the problem that a BGP
		Open message may have been received long time before parsing a BGP
		Update making challenging a stateful approach based on receipt of
		Peer Up.
	    </t>
	    <t>
		<xref target="I-D.ietf-grow-bmp-tlv">TLV support for BMP Route
		Monitoring and Peer Down Messages</xref> defines a Stateless Parsing
		TLV aimed at including relevant capabilities that have an impact in
		BGP Update message parsing as part of optional informational TLV in
		Route Monitoring messages. While the method is valid, in fact it does
		allow with minor effort to encapsulate BMP in MRT format for offline
		consumption as documented by <xref target="I-D.petrie-grow-mrt-bmp">
		Storing BMP messages in MRT Format</xref>, it comes with some drawbacks
		like extra verbosity and increased correlation effort at a BMP exporter.
	    </t>
	    <t>
		This document defines a new optional BMP message type named Peer
		Summary that carries a list of the established BGP sessions, along
		with their capabilities. The general idea is that a Peer Summary
		message is composed by a sequence of one or multiple Peer TLVs with
		the goal of allowing a consumer to re-build the list of established
		BGP sessions like if the sequence of Peer Up messages was just being
		received live by a BMP exporter.
	    </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="Peer Summary message format">
            <t>
		The Peer Summary message starts with a BMP Common Header as defined
		in <xref target="RFC7854">Section 4.1 of</xref> then followed by
		one or multiple Peer TLVs with code-point &IANA_PS_CODE_PEER_TLV;.
            </t>
            <t>
		Each Peer TLV is structured as a plain TLV as defined in <xref
		target="I-D.ietf-grow-bmp-tlv">Section 3 of</xref>. The value
		part contains the BMP Common Header and Peer Up Notification
		body as defined in <xref target="RFC7854">Section 4.10 of</xref>.
            </t>
            <t>
		The Peer Summary message is generated at a BMP station, it MUST
		encapsulate only actually received Peer Up data from BMP exporters.
            </t>
	    <t>
            <figure anchor="BMP-Peer-Summary-format" 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
  +-+-+-+-+-+-+-+-+
  |    Version    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Message Length                         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Msg Type = TBD1|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Type = TBD2 (2 octets)   |     Length (2 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~   Value = Per-Peer Header + Peer Up Notification (variable)   ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      Type = TBD2 (2 octets)   |     Length (2 octets)         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~   Value = Per-Peer Header + Peer Up Notification (variable)   ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  ~    			  Peer TLV 3 .. N 			  ~
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    ]]>
                </artwork>
            </figure>
	    </t>
        <section title="Third party off-wire encoding formats">
            <t>
		While this document does define a way to facilitate replay and more
		in general consumption of raw BMP data offline, similar benefits may
		be harnessed by third party off-wire formats, in which BMP can be
		encapsulated into, for example MRT (Multi-Threaded Routing Toolkit)
		as defined by <xref target="RFC6396">RFC 6396</xref>. As a result of
		that, this document does not recommend a preferred way to store BMP
		data offline. 
            </t>
        </section>
        </section>

        <section title="Operational Considerations">
            <t>
		The Peer Summary message injection in a BMP feed is done by an online
		BMP station for consumption by an offline BMP station. The advantage of
		creating summaries at the online BMP station (for example, as opposed
		to creating them at a BMP exporter) is that it has awareness of how
		offline data is being organized, for example if a new file is created
		every five minutes it may make sense to include the summary at the
		beginning of each file.  
            </t>
	    <t>
		A BMP station receiving multiple Peer Up for the same peer should
		perform state compression and include in the Peer Summary the last
		one received, based on timestamp, at the time the summary is being
		generated. In other words, the summary is not meant, for example if
		a BGP session is flapping, as event reporting and this is left to
		<xref target="I-D.ietf-grow-bmp-rel">BMP Route Event Logging</xref>.
	    </t>
        </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>
		IANA is asked to allocate a new Peer Summary message type in the BMP
		Message Types registry with value &IANA_PS_MSG_TYPE;. IANA is also
		asked to to create a registry within the BMP group, named "BMP Peer
		Summary Message TLVs".
	    </t>
	    <t>
		Registration procedures for this registry are:
	    </t>
<texttable>
        <ttcol align='center'>Range</ttcol>
        <ttcol align='center'>Registration Procedures</ttcol>

        <c>0-32767</c>
        <c>Standards Action</c>
        <c>32768-65530</c>
        <c>First Come, First Served</c>
        <c>65531-65534</c>
        <c>Experimental</c>
        <c>65535</c>
        <c>Reserved</c>
</texttable>
	    <t>
		Initial values for this registry are:
	    </t>
<texttable>
        <ttcol align='center'>Type</ttcol>
        <ttcol align='center'>Description</ttcol>
        <ttcol align='center'>Reference</ttcol>

        <c>&IANA_PS_CODE_PEER_TLV;</c>
        <c>Peer</c>
        <c>this document</c> 
</texttable>
        </section>

    </middle>

    <back>

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

		<?rfc include="reference.RFC.7854.xml"?>
		<?rfc include="reference.RFC.6396.xml"?>

		&I-D.ietf-grow-bmp-tlv;
		&I-D.ietf-grow-bmp-rel;
		&I-D.petrie-grow-mrt-bmp;
        </references>

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

    </back>
</rfc>
