<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC5226 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC6396 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6396.xml">
<!ENTITY I-D.ietf-idr-add-paths SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-add-paths.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-grow-mrt-add-paths-02" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Additional Paths Extensions in MRT">
		Multi-Threaded Routing Toolkit (MRT)
		Routing Information Export Format with
		BGP Additional Paths 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>NL</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="January" year="2017" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>Operations and Management</area>

    <workgroup>Global Routing Operations</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>MRT</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
    <t>
    	This document updates the Multi-threaded Routing Toolkit (MRT)
		export format for Border Gateway Protocol (BGP) routing information
		by extending it to support 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 routing information base snapshots.
	</t>
	<t>
		The <xref target="I-D.ietf-idr-add-paths">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="I-D.ietf-idr-add-paths"/>.
	</t>

    </section>
    <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>
	<section title="Rationale">
	<t>
		MRT parsers are usually stateless. In order to parse BGP messages which contain data structures that depend on
		the capabilities negotiated during the BGP session setup, the so-called MRT subtypes are utilized.
	
		The <xref target="I-D.ietf-idr-add-paths">Advertisement of Multiple Path</xref> extension for BGP alters
        the encoding of the BGP NLRI format for withdraws and announcements. Therefore new BGP4MP/BGP4MP_ET subtypes as defined
		in <xref target="RFC6396"/> are required to signal to
		a MRT parser how to parse the NLRI.
	</t>
	<t>
		In <xref target="RFC6396">section 4.3</xref> of the MRT specification 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="I-D.ietf-idr-add-paths"/> 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</xref>. These enhancements
		continues 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</xref>. However, for the specific case of the 4
		AFI/SAFI specific RIB subtypes, the existing RIB Entries field is re-defined
		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 allowing 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 additional-paths support" 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</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>
        This document requests that IANA assign the following subtype codes to the <eref target="https://www.iana.org/assignments/mrt/mrt.xhtml">MRT name space</eref>:
	</t>
	
    <section title="BGP4MP/BGP4MP_ET Subtype codes:">
        <t>
            <list style="empty">
                <t>BGP4MP_MESSAGE_ADDPATH = 8 (<xref target="bgp4mp-add-path-subtypes"/>)</t>
                <t>BGP4MP_MESSAGE_AS4_ADDPATH = 9 (<xref target="bgp4mp-add-path-subtypes"/>)</t>
                <t>BGP4MP_MESSAGE_LOCAL_ADDPATH = 10 (<xref target="bgp4mp-add-path-subtypes"/>)</t>
                <t>BGP4MP_MESSAGE_AS4_LOCAL_ADDPATH = 11 (<xref target="bgp4mp-add-path-subtypes"/>)</t>
            </list>
        </t>
        <t>
            The values provided above are suggested as they are used in implementations.
        </t>
	</section>

	<section title="TABLE_DUMP_V2 Subtype codes:">
	    <t>
	        <list style="empty">
                <t>RIB_IPV4_UNICAST_ADDPATH = 8 (<xref target="tabledumpv2-add-path-specific"/>)</t>
                <t>RIB_IPV4_MULTICAST_ADDPATH = 9 (<xref target="tabledumpv2-add-path-specific"/>)</t>
                <t>RIB_IPV6_UNICAST_ADDPATH = 10 (<xref target="tabledumpv2-add-path-specific"/>)</t>
                <t>RIB_IPV6_MULTICAST_ADDPATH = 11 (<xref target="tabledumpv2-add-path-specific"/>)</t>
                <t>RIB_GENERIC_ADDPATH = 12 (<xref target="tabledumpv2-add-path-generic"/>)</t>
	        </list>
	    </t>
        <t>
            The values provided above are suggested as they are used in implementations.
        </t>
	</section>
    
   	</section>

    <section anchor="Security" title="Security Considerations">
	<t>
		It is not believed that this document adds any additional security considerations.
	</t>
	<t>
		However, the security considerations of <xref target="RFC6396"/> are equally applicable
		to this document, and 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 additional-paths capability 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 split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      &RFC2119;
      &RFC6396;
      &I-D.ietf-idr-add-paths;
    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->
      &RFC2629;
      &RFC3552;
      &RFC5226;
    </references>
  </back>
</rfc>
