<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[]>
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes" ?>
<rfc category="std" ipr="trust200902" docName="draft-lapukhov-bgp-ila-afi-02" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="draft-lapukhov-bgp-ila-afi">Use of BGP for dissemination of ILA mapping information</title>
    <author initials="P." surname="Lapukhov" fullname="Petr Lapukhov">
      <organization>Facebook</organization>
      <address>
        <postal>
          <street>1 Hacker Way</street>
          <city>Menlo Park</city>
          <region>CA</region>
          <code>94025</code>
          <country>US</country>
        </postal>
        <email>petr@fb.com</email>
      </address>
    </author>
    <date year="2016"/>
    <area>Routing</area>
    <workgroup>Inter-Domain Routing</workgroup>
    <keyword>Internet Draft</keyword>
    <keyword>BGP</keyword>
    <keyword>ILA</keyword>
    <abstract>
      <t>
        <xref target="I-D.herbert-nvo3-ila">Identifier-Locator Addressing</xref> relies on splitting the 128-bit IPv6 address into identifier and locator parts to implement identifier mobility, and network virtualization. This document proposes a method for distributing the identifier to locator mapping information using <xref target="RFC4760">Multiprotocol Extensions for BGP-4</xref>.
      </t>
    </abstract>
    <note 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>
    </note>
  </front>
  <middle>
    <section title="Introduction" anchor="intro" toc="default">
      <t>
        Under the ILA proposal, IPv6 address is split in 64-bit identifier (lower address bits) and locator (higher address bits) portions. The locator part is determined dynamically from a mapping table that maintains associations between the location-independent identifiers and topologically significant locators. The hosts that collectively implement and maintain such mappings are referred to as "ILA domain" in this document. The ILA domain has a globally unique 64-bit SIR (Standard Identifier Representation) prefix assigned to it (see <xref target="I-D.herbert-nvo3-ila"/> for more details on SIR prefix use).
      </t>
      <t>
        This document proposes a new address family identifier (AFI) for the purpose of disseminating the locator-identifier mappings among the nodes participating in the ILA domain. For example, this extension could be used to propagate the mappings from ILA hosts to ILA routers and allow the routers to perform their function (see <xref target="I-D.herbert-nvo3-ila"/> for definition of the "ILA router" functions). Additional information that provides more detailed examples of deployment scenarios using BGP could be found in <xref target="I-D.lapukhov-ila-deployment"/>.
      </t>
    </section>
    <section title="BGP ILA AFI" toc="default">
      <t>
        This document introduces a new AFI known as a "Identifier-Locator Addressing AFI" (ILA AFI) with the actual value to be assigned by IANA. The purpose of this AFI is disseminating the mapping information in the ILA domain, e.g. between ILA hosts and ILA routers. This document defines the use of SAFI values of "1" (unicast) and "2" (multicast) only.
      </t>
    </section>
    <section title="Capability Advertisement" toc="default">
      <t>
        A BGP speaker that wishes to exchange ILA mapping information MUST use the Multiprotocol Extensions Capability Code, as defined in <xref target="RFC4760"/>, to advertise the corresponding AFI/SAFI pair.
      </t>
    </section>
    <section title="Disseminating Identifier-Locator mapping information" toc="default">
      <section title="Advertising ILA mapping information">
        <t>
          For the purpose of ILA mapping encoding, the 8-octet locator field SHALL be encoded in the "next-hop address" field. The "length of the next-hop address" MUST be set to "8". The identifiers bound to the locator SHALL be encoded within the NLRI portion of MP_REACH_NLRI attribute. The NLRI portion of MP_REACH_NLRI starts with the two-octet "Length of identifiers" field, with the value being multiple of 8. The rest of the NLRI is a collection of 8-octet identifiers that are bound to the locator specified in the "next-hop address" field.
        </t>
        <t>
          <figure title="MP_REACH_NLRI Layout" anchor="mp_reach_nlri" suppress-title="false" align="left" alt="" width="" height="">
            <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
    +---------------------------------------------------------+
    | Address Family Identifier (2 octets)                    |
    +---------------------------------------------------------+
    | Subsequent Address Family Identifier (1 octet)          |
    +---------------------------------------------------------+
    | Length of Next Hop Address (1 octet, set to "8")        |
    +---------------------------------------------------------+
    | Locator value (8 octets)                                |
    +---------------------------------------------------------+
    | Reserved (1 octet), must be zero                        |
    +---------------------------------------------------------+
    | Length of NLRI field (2 octets, multiple of 8)          |
    +---------------------------------------------------------+
    | Identifiers (variable, 8 octets each)                   |
    +---------------------------------------------------------+
            </artwork>
          </figure>
        </t>
      </section>
      <section title="Withdrawing ILA mapping information">
        <t>
          Withdrawal of ILA mapping information is performed via an MP_UNREACH_NLRI attribute advertisement organized as following:
        </t>
        <t>
          <figure title="MP_UNREACH_NLRI Layout" anchor="mp_unreach_nlri" suppress-title="false" align="left" alt="" width="" height="">
            <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
    +---------------------------------------------------------+
    | Address Family Identifier (2 octets)                    |
    +---------------------------------------------------------+
    | Subsequent Address Family Identifier (1 octet)          |
    +---------------------------------------------------------+
    | Length of witdrawn identifiers (2 octets)               |
    +---------------------------------------------------------+
    | Identifiers (variable, 8 octets each)                   |
    +---------------------------------------------------------+
            </artwork>
          </figure>
        </t>
      </section>
    </section>
    <section title="Interpreting the mapping information" toc="default">
      <section title="Unicast SAFI">
      <t>
        Only the locator part of ILA address is used for packet routing, and every node that hosts an identifier is expected to have a unique /64 prefix routable within the scope of the ILA domain. The identifiers advertised under the ILA AFI are expected to be used by the data-plane implementation to perform match on a full IPv6 address and decide whether the locator portion of the address needs a re-write. It is up to the implementation to decide which full 128-bit IPv6 addresses need a rewrite, e.g. by matching on a Standard Identifier Representation (SIR) prefix as defined in <xref target="I-D.herbert-nvo3-ila"/>.
      </t>
      <t>
        The locator rewrite information comes from the next-hop "address" associated with the identifier. The next-hop field of MP_REACH_NLRI attribute in general is not expected to be used for any routing resolutions/lookups by the BGP process. It should primarily be used to create a rewrite rule in the data-plane forwarding table. The actual forwarding decision is then based on subsequent lookup in the forwarding table to find the next hop to send the packet to.
      </t>
      <t>
        In some scenarios, resolving the next-hop attribute via additional lookups tables might be necessary. For example, for environments that deploy MPLS (<xref target="RFC3031"/>) forwarding, the locator may resolve to a label stack that is required to perform further forwarding. In this case, the ILA address rewrite will be accompanied by additional actions, such as label stack imposition. These decisions have to be made in implementation dependant fashion.
      </t>
      </section>
      <section title="Multicast SAFI">
        <t>
          Multicast SAFI retain the same encoding format, with a different SAFI value. For multicast packets, the RPF check process SHALL be modified for use with ILA source addresses. Specifically, source ILA IPv6 addresses with the identifier portion matching the mapping table SHALL be mapped to proper locator, prior to performing the RPF check. The ILA source addresses need to be identified by some means specific to ILA implementation, e.g. by matching on configured SIR prefixes. The ILA addresses that do not match any mapping entry SHALL be considered as failing the RPF check.
        </t>
      </section>
    </section>
    <section title="Inter-domain mapping exchange">
      <t>
        The ILA mappings are only unique with an ILA domain - it is possible that different domains may re-use the same identifiers. To make identifiers globally unique, they MUST be concatenated with the SIR prefix assigned to each ILA domain. These globally unique identifiers may then be exchanged between multiple ILA domains. IANA will be requested to allocate new SAFI value called "VPN-ILA" SAFI to facilitate exchange of inter-domain ILA mappings. The MP_REACH_NLRI attributes exchanged over this SAFI will look as following:
      </t>
      <figure>
        <artwork>
    +---------------------------------------------------------+
    | Address Family Identifier (2 octets)                    |
    +---------------------------------------------------------+
    | Subsequent Address Family Identifier (1 octet)          |
    +---------------------------------------------------------+
    | SIR prefix (8 octets)                                   |
    +---------------------------------------------------------+
    | Length of Next Hop Address (1 octet, set to "8")        |
    +---------------------------------------------------------+
    | Locator value (8 octets)                                |
    +---------------------------------------------------------+
    | Reserved (1 octet), must be zero                        |
    +---------------------------------------------------------+
    | Length of NLRI field (2 octets, multiple of 8)          |
    +---------------------------------------------------------+
    | Identifiers (variable, 8 octets each)                   |
    +---------------------------------------------------------+
        </artwork>
      </figure>
      <t>
        The main difference from the Unicast/Multicast SAFI's is presence of the SIR prefix field in the announcement. Correspondingly, the MP_UNREACH_NLRI will look as following:
      </t>
      <figure>
        <artwork>
    +---------------------------------------------------------+
    | Address Family Identifier (2 octets)                    |
    +---------------------------------------------------------+
    | Subsequent Address Family Identifier (1 octet)          |
    +---------------------------------------------------------+
    | SIR Prefix (8 bytes)                                    |
    +---------------------------------------------------------+
    | Length of witdrawn identifiers (2 octets)               |
    +---------------------------------------------------------+
    | Identifiers (variable, 8 octets each)                   |
    +---------------------------------------------------------+
        </artwork>
      </figure>
      <t>
        The use of domain-specific identifiers would require the ILA hosts and routers to make their ILA cache lookups based on the full 128-bit prefix.
      </t>
    </section>
    <section title="BGP Next-Hop attribute handling with ILA">
      <t>
        This document proposes that the BGP next-hop attribute value encode the locator associated with all identifiers found in MP_REACH_NLRI attribute. It is possible that an intermediate speaker may change the next-hop value. This may be required to ensure all traffic for the associated identifiers is routed through that intermediate speaker. The speaker is expected to maintain the original ILA mappings in its mapping table, and perform additional destination address translation for the ILA packets. This way, a form of loose hop traffic engineering could be realized within an ILA domain.
      </t>
      <t>
        It is common that BGP implementations reset the next-hop value for announcements made over eBGP sessions. Such scenario may be common between two different ILA domains.
      </t>
    </section>
    <section title="Use of Add-Paths extension with ILA AFI">
      <t>
        It could be useful to bind multiple locators to the same identifier, e.g. for the purpose of load-sharing. To make announcing multiple locators possible, the MP_REACH_NLRI and MP_REACH_NLRI attributes are extended to encode the path-identifier per <xref target="I-D.ietf-idr-add-paths"/>, correspondingly enabling the capability for the AFI/SAFI. Specifically, the NLRI field will look as following:
      </t>
      <figure>
        <artwork>
    +---------------------------------------------------------+
    | Path identifier (4 octets)                              |
    +---------------------------------------------------------+
    | Length of NLRI field (2 octets, multiple of 8)          |
    +---------------------------------------------------------+
    | Identifiers (variable, 8 octets each)                   |
    +---------------------------------------------------------+
        </artwork>
      </figure>
      <t>
        Such encoding instructs the receiver to create multiple locator entries for an identifier, differentiated by their path identifiers. Optionally, a weight could be associated with each path using the "link bandwidth" extended community defined in <xref target="I-D.ietf-idr-link-bandwidth"/>
      </t>
    </section>
    <section title="IANA Considerations" toc="default">
      <t>
        For the purpose of this work, IANA would be asked to allocate a value for the new AFI, and the VPN-ILA SAFI.
      </t>
    </section>
    <section title="Manageability Considerations" toc="default">
      <t>
        The ILA mappings distribution is likely to be done using separate infrastructure, independent from the BGP topology used for regular routing information distribution. Most likely there will be a collection of iBGP route-reflectors deployed within each ILA domain, and peering with a BGP process running on each ILA router and ILA host. More details and deployment examples could be found in <xref target="I-D.lapukhov-ila-deployment"/>.
      </t>
    </section>
    <section title="Security Considerations" toc="default">
      <t>
        This document does not introduce any changes in terms of BGP security. Defining ILA security model is outside of scope of this document.
      </t>
    </section>
    <section title="Acknowledgements" toc="default">
      <t>
      The author would like to thank Doug Porter for the original idea and discussion of this proposal.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>
      <?rfc include="reference.RFC.3031.xml"?>
      <?rfc include="reference.RFC.4271.xml"?>
      <?rfc include="reference.I-D.ietf-idr-add-paths"?>
      <?rfc include="reference.I-D.ietf-idr-link-bandwidth"?>
    </references>
    <references title="Informative References">
      <?rfc include="reference.RFC.4760.xml"?>
      <?rfc include="reference.I-D.herbert-nvo3-ila"?>
      <?rfc include="reference.I-D.lapukhov-ila-deployment"?>
    </references>
  </back>
</rfc>
