<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC6396 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6396.xml">
<!ENTITY RFC7911 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7911.xml">
]>
<?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 number="8050" category="std" submissionType="IETF" consensus="yes"
  ipr="trust200902">

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

  <front>
    <title abbrev="Additional Path Extensions in MRT">
		Multi-Threaded Routing Toolkit (MRT)
		Routing Information Export Format with
		BGP Additional Path Extensions
	</title>
    <author fullname="Colin Petrie" initials="C." surname="Petrie">
    	<organization>RIPE NCC</organization>
      	<address>
        	<postal>
				<street>Stationsplein 11</street>
          		<city>Amsterdam</city>
                <code>1012 AB</code>
          		<country>The Netherlands</country>
        	</postal>
        	<email>cpetrie@ripe.net</email>
      	</address>
    </author>
    <author fullname="Thomas King" initials="T." surname="King">
		<organization abbrev="DE-CIX">DE-CIX Management GmbH</organization>
		<address>
			<postal>
				<street>Lichtstrasse 43i</street>
				<city>Cologne</city>
				<code>50825</code>
				<country>Germany</country>
			</postal>
			<email>thomas.king@de-cix.net</email>
		</address>
	</author>

    <date month="May" year="2017" />

    <area>Operations and Management</area>

    <workgroup>Global Routing Operations</workgroup>

    <keyword>MRT</keyword>

    <abstract>
    <t>
    	This document extends the Multi-threaded Routing Toolkit (MRT)
		export format for Border Gateway Protocol (BGP) routing information
		by supporting the advertisement of multiple paths in BGP extensions.
	</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
    <t>
      	The <xref target="RFC6396">MRT record format</xref> was developed to provide researchers
      	and engineers a means to encapsulate, export, and archive routing protocol transactions
      	and RIB snapshots.
	</t>
	<t>
		The <xref target="RFC7911">Advertisement of Multiple Paths in BGP</xref>
		defines a BGP extension to allow the advertisement of multiple paths for the same address
		prefix without the new paths implicitly replacing any previous ones.
	</t>
	<t>
		This document contains an optional extension to the MRT format <xref target="RFC6396"/>
		and introduces additional definitions of MRT subtype fields to permit representation of
		multiple path advertisements <xref target="RFC7911"/>.
	</t>

    </section>
	<section title="Rationale">
	<t>
		MRT parsers are usually stateless. In order to parse BGP messages that contain data structures that depend on
		the capabilities negotiated during the BGP session setup, the MRT subtypes are utilized.
	
		The <xref target="RFC7911">Advertisement of Multiple Paths</xref> extension for BGP alters
        the encoding of the BGP Network Layer
   Reachability Information (NLRI) format for withdraws and announcements. Therefore, new BGP4MP/BGP4MP_ET subtypes as defined
		in <xref target="RFC6396"/> are required to signal to
		an MRT parser how to parse the NLRI.
	</t>
	<t>
		In Section 4.3 of the MRT
		specification <xref target="RFC6396" />, RIB subtypes are specified. Prefix length
		and prefix fields are encoded in the same manner as the BGP
		NLRI encoding. In order to support Path Identifier information
		as defined in <xref target="RFC7911"/>, new subtypes need to be added.
	</t>
	<t>
		The following two sections define the required subtypes.
	</t>
	</section>

    <section anchor="bgp4mp-add-path-subtypes" title="MRT Subtypes for Types BGP4MP/BGP4MP_ET">
	<t>
		This document defines the following new subtypes:
		<list style="symbols">
			<t>BGP4MP_MESSAGE_ADDPATH</t>
			<t>BGP4MP_MESSAGE_AS4_ADDPATH</t>
			<t>BGP4MP_MESSAGE_LOCAL_ADDPATH</t>
			<t>BGP4MP_MESSAGE_AS4_LOCAL_ADDPATH</t>
		</list>
	</t>
	<t>
		The fields of these message types are identical to the equivalent non-additional-path versions
		specified in <xref target="RFC6396">Section 4.4 of</xref>. These enhancements
		continue to encapsulate the entire BGP message in the BGP message field.
	</t>
	</section>

	<section anchor="tabledumpv2-add-path-subtypes" title="MRT Subtypes for Type TABLE_DUMP_V2">
	<t>
		This document defines the following new subtypes:
		<list style="symbols">
			<t>RIB_IPV4_UNICAST_ADDPATH</t>
			<t>RIB_IPV4_MULTICAST_ADDPATH</t>
			<t>RIB_IPV6_UNICAST_ADDPATH</t>
			<t>RIB_IPV6_MULTICAST_ADDPATH</t>
			<t>RIB_GENERIC_ADDPATH</t>
		</list>
	</t>
	<t>
		The fields of these message types are identical to the equivalent non-additional-path versions
		specified in <xref target="RFC6396">Section 4.3
		of</xref>. However, for the case of the 4 AFI/SAFI-specific RIB subtypes,
		the existing RIB Entries field is redefined
		as detailed in the sections below.
	</t>

	<section anchor="tabledumpv2-add-path-specific" title="AFI/SAFI-Specific RIB Subtypes">
	<t>
		In order to preserve the record compaction achieved by using the most
		common subtypes and allow multiple RIB Entries to be stored in a single
		TABLE_DUMP_V2 record, the existing RIB Entries field is redefined for use
		within the new AFI/SAFI-specific RIB subtypes defined by this document as follows:
	</t>
	<figure title="RIB Entries for AFI/SAFI-Specific RIB Subtypes with Support for Additional Paths" anchor="RIBEntries">
		<artwork>
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Peer Index            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
    |                         Originated Time                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
    |                         Path Identifier                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
    |      Attribute Length         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    BGP Attributes... (variable)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
	<t>
		This adds a field to the RIB Entries record to store the Path
		Identifier when used with the
		RIB_IPV4_UNICAST_ADDPATH, RIB_IPV4_MULTICAST_ADDPATH,
		RIB_IPV6_UNICAST_ADDPATH, and RIB_IPV6_MULTICAST_ADDPATH
		subtypes. 
	</t>
	</section>

	<section anchor="tabledumpv2-add-path-generic" title="RIB_GENERIC_ADDPATH Subtype">
	<t>
		The fields of this subtype are identical to the equivalent non-additional-path 
		versions specified in <xref target="RFC6396">Section 4.3.3 of</xref>. These fields continue to 
		encapsulate the raw and additional-path-enabled AFI/SAFI/NLRI in the record, and the
		raw attributes in the RIB Entries.
	</t>
	<t>
		For clarity, the RIB Entries in this subtype are not redefined.
	</t>
	</section>

	</section>

    <section anchor="IANA" title="IANA Considerations">
	<t>
        IANA has assigned the subtype codes defined below in the "Multi-threaded
	Routing Toolkit (MRT)" registry &lt;https://www.iana.org/assignments/mrt&gt;.
	</t>
	
    <section title="BGP4MP/BGP4MP_ET Subtype Codes">
        <t>The following have been registered in the "BGP4MP Subtype Codes"
	and "BGP4MP_ET Subtype Codes" registries:
            <list style="empty">
                <t>8   BGP4MP_MESSAGE_ADDPATH  (RFC 8050)</t>
                <t>9   BGP4MP_MESSAGE_AS4_ADDPATH (RFC 8050)</t>
                <t>10  BGP4MP_MESSAGE_LOCAL_ADDPATH (RFC 8050)</t>
                <t>11  BGP4MP_MESSAGE_AS4_LOCAL_ADDPATH (RFC 8050)</t>
            </list>
        </t>
	</section>

	<section title="TABLE_DUMP_V2 Subtype Codes">
	    <t>The following have been registered in the "TABLE_DUMP_V2 Subtype
	    Codes" registry: 
	        <list style="empty">
                <t>8   RIB_IPV4_UNICAST_ADDPATH (RFC 8050)</t>
                <t>9   RIB_IPV4_MULTICAST_ADDPATH (RFC 8050)</t>
                <t>10  RIB_IPV6_UNICAST_ADDPATH (RFC 8050)</t>
                <t>11  RIB_IPV6_MULTICAST_ADDPATH (RFC 8050)</t>
                <t>12  RIB_GENERIC_ADDPATH (RFC 8050)</t>
	        </list>
	    </t>
	</section>
    
   	</section>

    <section anchor="Security" title="Security Considerations">
	<t>
		It is not believed that this document adds any additional security considerations.
		However, the security considerations of <xref target="RFC6396"/> are equally applicable
		to this document, because this document permits the export of more
		detailed routing data.
	</t>
	<t>
		An organization that uses the MRT format to store their BGP
		routing information should be aware that supporting 
		these extensions permits more detailed network path
		information to be stored and should consider the implications
                of this within their environment. 
	</t>
	<t>
        An organization that peers with public BGP collectors and enables the
	capability for additional paths on a peering session 
        should be aware that it is exporting not only its best paths, but potentially other paths within its networks.  
        The BGP peer should consider any and all implications of exposing this additional data.
    </t>
    </section>

  </middle>

  <back>

    <references title="Normative References">
      &RFC6396;
      &RFC7911;
    </references>

  </back>
</rfc>
