<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-alston-idr-crh-bgp-signalling-00">
  <front>
    <title abbrev="SRm6 CRH BGP Signalling">BGP Extensions for IPv6 Compressed Routing Header (CRH)</title>

    <author fullname="Andrew Alston" initials="A." surname="Alston">
      <organization>Liquid Telecom</organization>

      <address>
        <postal>
          <street/>

          <city>Nairobi</city>

          <country>Kenya</country>
        </postal>

        <email>Andrew.Alston@liquidtelecom.com</email>
      </address>
    </author>

    <author fullname="Daniam Henriques" initials="D." surname="Henriques">
      <organization>Liquid Telecom</organization>

      <address>
        <postal>
          <street/>

          <city>Johannesburg</city>

          <country>South Africa</country>
        </postal>

        <email>daniam.henriques@liquidtelecom.com</email>
      </address>
    </author>

    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street/>

          <city>Herndon</city>

          <code>20171</code>

          <region>Virginia</region>

          <country>USA</country>
        </postal>

        <email>rbonica@juniper.net</email>
      </address>
    </author>

    <date day="18" month="November" year="2019"/>

    <area>Routing Area</area>

    <workgroup>Inter-Domain Routing Group</workgroup>

    <keyword>Segment Routing</keyword>

    <keyword>IPv6</keyword>

    <keyword>BGP</keyword>

    <abstract>
      <t>This document describes a new BGP extension for signalling the mapping
	between Segment Identifiers (SID's), as used by a SRm6 Compressed
	Routing Header (CRH) and the IPv6 Addresses they represent. The
        extension defines both a new optional BGP attribute to signal the
	Maximum SID Value (MSV) and a new Sub-Address Family (SAFI) of the IPv6 Address family.</t>
    </abstract>
  </front>

  <middle>
    <section title="Overview">

	<t>The SRm6 Compressed Routing Header uses an ordered sequence of segment identifiers (SID) to specify the end to end path a packet should follow through the network.
	This allows for much smaller header sizes than found in the SRH (Segment Routing Header), which utilizes an ordered sequence of 128 bit IPv6 address to achieve the same goal.
	In addition, this method prevents the overloading of the IPv6 address space.</t>

	<t>This results in the need to signal the mapping between the SIDs used in the CRH and the IPv6 addresses they represent.
	While such signalling can be achieved through IGP extensions <xref
        target="I-D.bonica-lsr-crh-isis-extensions"/> in a single network domain, circumstances may dictate that the SID to address mapping be signaled both to systems
	that do not partake in the IGP used within that network domain, and between autonomous systems.</t>

	<t>It is envisaged that such signalling will be required to signal, among other things, deep packet inspection systems and flow analysis systems that need the ability to see the
	full path a packet is traversing, while at the same time not necessarily partaking in the IGP which would normally be used for such signalling. This also allows signalling of SID
	to Address mapping in environments that do not run an IGP capable of such signalling.</t>

    </section>


    <section anchor="ReqLang" title="Requirements Language">
      <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 <xref
      target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </section>


    <section anchor="SIDSIGNALLING" title="SID Signalling">
      <section anchor="BGPATTRIBUTE" title="BGP Attribute">


      <t>This document describes a new BGP extension for signalling the mapping
	between Segment Identifiers (SIDs) as used by an SRm6 Compressed
	Routing Header (CRH) and the IPv6 Addresses they represent.</t>

      <t>The extension defines both a new optional transitive attribute to signal the
	SID size in Octets and a new Subsequent Address Family Identifier
	(SAFI) of the IPv6 Address family.</t>

     <t>The document defines a new BGP attribute which signals the maximum
	size in octets of a CRH Segment Identifier (SID). The attribute
	MUST be included in any BGP session carrying the CRH signalling SAFI.
	Additionally a new attribute BGP Path Attribute code will need to be assigned by IANA.</t>

     <t>The attribute is comprised of a single octet, which signals the
	maximum length in octets of the SIDs found in the Network Layer
	Reachability Information (NLRI) section of the relevant MP-BGP Attribute.</t>

     <t>Since SIDs in the context of a compressed routing header can be
	either 16bit of 32bit, the attribute value MUST be either 2 or 4 and
	the attribute MUST be ignored if this is not the case. In the event
	of the CRH signalling attribute not being present in a BGP Update
	Message, any BGP Updates containing the CRH SAFI MUST be considered
	malformed and should be ignored.</t>


</section>


      <section anchor="MPREACH" title="MP Reach Attribute">
        <t>The format of the MP Reach Attribute utilized by the CRH SAFI is as per <xref target="RFC4760"/>.
	The AFI MUST be set to 2, and the SAFI is currently TBD (see <xref target="IANASAFI"/>).</t>

	<t>The Nexthop field of the attribute contains no significance and is maintained purely for compatibility. For standardization purposes we maintain
	a next-hop length field of 16 which contains an arbitrary value. Implementations MAY at their discretion use the originating router ID, or 128 bit mapped equivalent,
	in this field for simple identification of mapping source</t>

	</section>


      <section anchor="NLRIFORMAT" title="NLRI Format">

	<t>The format of the NLRI contained within the MP Reach Attribute is
	comprised of a 16bit Length (2 octets) field, followed by a series of
	repeating tuples. The length in octets of the first element of each
	tuple is determined by the SID Length specified in the CRH signalling
	attribute (Section 3.1). The second element of the tuple is an IPv6
	address and MUST be 16 octets in length. The length of the NLRI can
	be calculated as (SID Length+16)*N where N is the number of tuples
	contained within the NLRI.</t>

<figure align="center">
            <artwork align="left">

                           0 1 2 3 4 5 6 7
                          +-+-+-+-+-+-+-+-+
                          |  NLRI Length  |
                          |   2 octets    |
                          +-+-+-+-+-+-+-+-+
                          |               |
                          |     SID 1     |
                          |  (M octets)   |
                          |               |
                          +-+-+-+-+-+-+-+-+
                          |               |
                          | IPv6 Address 1|
                          |  (16 octets)  |
                          |               |
                          +-+-+-+-+-+-+-+-+
                          |               |
                          |     SID N     |
                          |   (N octets)  |
                          |               |
                          +-+-+-+-+-+-+-+-+
                          |               |
                          | IPv6 Address N|
                          |  (16 octets)  |
                          |               |
                          +-+-+-+-+-+-+-+-+

</artwork>
          </figure>

        <t>The CRH SAFI uses a new NLRI defined as follows: where M MUST be the size in octets of the MSV
	signalled via BGP upon session establishment and N specifies a given number of SID/IPv6 Address pairings.</t>

</section>

</section>


    <section anchor="IANA" title="IANA Considerations">
      <t>This document defines new Sub-TLVs in the following existing
      registries:<list style="symbols">
          <t>BGP Path Attributes</t>
          <t>Subsequent Address Family Identifiers (SAFI) Parameters</t>
        </list></t>

      <section anchor="IANABGPATTR"
               title="BGP Path Attributes">
        <t>A new SAFI in the IANA registry for "Subsequent Address Family Identifiers (SAFI) Parameters" will be required:
	<figure align="center">

            <artwork align="center">Codepoint    Description          Reference
-----------------------------------------------
   TBD        SRm6 CRH       This document</artwork>
          </figure></t>
      </section>


      <section anchor="IANASAFI"
               title="Subsequent Address Family Identifiers (SAFI) Parameters">
        <t>A new SAFI in the IANA registry for "Subsequent Address Family Identifiers (SAFI) Parameters" will be required:
	<figure align="center">

            <artwork align="center">Codepoint    Description          Reference
-----------------------------------------------
   TBD        SRm6 CRH Signalling SAFI       This document</artwork>
          </figure></t>
      </section>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t> SRm6 CRH BGP Signalling is envisioned to be run within a trusted domain.</t>

      <t>Further aspects of security are TBD.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors wish to acknowledge Ben Roberts for his support.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.8200'?>

      <?rfc include='reference.RFC.4760'?>

      <?rfc include='reference.RFC.4271'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.I-D.bonica-6man-comp-rtg-hdr'?>

      <?rfc include='reference.I-D.bonica-lsr-crh-isis-extensions'?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.3031"?>

      <?rfc include='reference.I-D.ietf-spring-segment-routing-mpls'?>

      <?rfc include='reference.I-D.ietf-spring-srv6-network-programming'?>

      <?rfc include='reference.I-D.ietf-6man-segment-routing-header'?>

      <?rfc include='reference.I-D.alston-spring-crh-bgp-signalling'?>

    </references>
  </back>
</rfc>
