<?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="info" docName="draft-voyer-6man-extension-header-insertion-10"
     ipr="trust200902">
  <front>
    <title abbrev="SRH Insertion">Deployments With Insertion of IPv6 Segment
    Routing Headers</title>

    <author fullname="Daniel Voyer" initials="D." role="editor"
            surname="Voyer">
      <organization>Bell Canada</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <email>daniel.voyer@bell.ca</email>
      </address>
    </author>

    <author fullname="Clarence Filsfils" initials="C." surname="Filsfils">
      <organization>Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>Belgium</country>
        </postal>

        <email>cfilsfil@cisco.com</email>
      </address>
    </author>

    <author fullname="Darren Dukes" initials="D." role="editor"
            surname="Dukes">
      <organization>Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city>Ottawa</city>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <email>ddukes@cisco.com</email>
      </address>
    </author>

    <author fullname="Satoru Matsushima" initials="S." surname="Matsushima">
      <organization>Softbank</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>Japan</country>
        </postal>

        <email>satoru.matsushima@g.softbank.co.jp</email>
      </address>
    </author>

    <author fullname="John Leddy" initials="J." surname="Leddy">
      <organization>Individual Contributor</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <email>john@leddy.net</email>
      </address>
    </author>

    <author fullname="Zhenbin Li" initials="Z." surname="Li">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country>China</country>
        </postal>

        <email>lizhenbin@huawei.com</email>
      </address>
    </author>

    <author fullname="James Guichard" initials="J." surname="Guichard">
      <organization>Futurewei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <email>james.n.guichard@futurewei.com</email>
      </address>
    </author>

    <date year="2020"/>

    <workgroup>Network Working Group</workgroup>

    <abstract>
      <t>SRv6 is deployed in multiple provider networks.</t>

      <t>This document describes the usage of SRH insertion and deletion
      within the SR domain and how security and end-to-end integrity is
      guaranteed.</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 anchor="INTRO" title="Introduction">
      <t><xref target="I-D.matsushima-spring-srv6-deployment-status"/> records
      multiple SRv6 deployments in multiple networks</t>

      <t>In each deployment, traffic traversing an SR domain is encapsulated
      in an outer IPv6 header for its journey through the SR domain.</t>

      <t>To implement transport services within the SR domain, insertion or
      removal of an SRH after the outer IPv6 header is performed. Any segment
      within the SRH is strictly contained within the SR domain.</t>

      <t>The SR domain always preserves the end-to-end integrity of traffic
      traversing it. No extension header is manipulated, inserted or removed
      from an inner transported packet. The packet leaving the SR domain is
      exactly the same (except for the hop-limit update) as the packet
      entering the SR domain.</t>

      <t>The SR domain is designed with link MTU sufficiently greater than the
      MTU at the ingress edge of the SR domain.</t>
    </section>

    <section anchor="DEP" title="Deployment Report">
      <t>The following deployments are as of November 2019.</t>

      <section anchor="DEPS" title="Deployments">
        <t>Six operators have publicly reported SRv6 deployments with
        commercial traffic supported by linerate hardware. Each deployment
        follows the network design and SRH add/remove behavior described in
        this document.<list>
            <t>Softbank</t>

            <t>China Telecom</t>

            <t>Iliad</t>

            <t>China Unicom</t>

            <t>CERNET2</t>

            <t>MTN Uganda Ltd.</t>
          </list></t>

        <t>Further information can be found in <xref
        target="I-D.matsushima-spring-srv6-deployment-status"/></t>
      </section>

      <section anchor="VEN" title="Vendor and Open-Source Support">
        <t>Eighteen unique implementations of SRv6 are available from multiple
        vendors and open source initiatives that support the SRH add/remove
        behavior described in this document:<list>
            <t>Cisco ASR 9000</t>

            <t>Cisco NCS 5500</t>

            <t>Cisco NCS 560</t>

            <t>Cisco NCS 540</t>

            <t>Cisco ASR1000</t>

            <t>Huawei ATN</t>

            <t>Huawei CX600</t>

            <t>Huawei NE40E</t>

            <t>Hauwei ME60</t>

            <t>Huawei NE5000E</t>

            <t>Huawei NE9000</t>

            <t>Huawei NG-OLT MA5800</t>

            <t>Barefoot Tofino 1 NPU</t>

            <t>Barefoot Tofino 2 NPU</t>

            <t>Broadcom Jericho 1, 1+</t>

            <t>Broadcom Jericho 2</t>

            <t>Linux kernel</t>

            <t>FD.io VPP</t>

            <t>Marvell's Prestera Falcon CX 8500 family</t>

            <t>Intel PAC N3000</t>
          </list></t>

        <t>Further information can be found in <xref
        target="I-D.matsushima-spring-srv6-deployment-status"/></t>
      </section>
    </section>

    <section anchor="SRHINS"
             title="Deployment Experience With SRH Header Operarion">
      <section anchor="SRDOM" title="The SR Domain">
        <t>An SR Domain is defined in <xref target="RFC8402"/>.</t>

        <t>Section 5.2 of <xref
        target="I-D.ietf-6man-segment-routing-header"/> further describes the
        SR domain as a single system with delegation among components. It
        states:<list>
            <t>All intra SR Domain packets are of the SR Domain. The IPv6
            header is originated by a node of the SR Domain, and is destined
            to a node of the SR Domain.</t>

            <t>All inter domain packets are encapsulated for the part of the
            packet journey that is within the SR Domain. The outer IPv6 header
            is originated by a node of the SR Domain, and is destined to a
            node of the SR Domain.</t>
          </list></t>

        <t>In other words, all packets within the SR domain have a source and
        destination address within the SR Domain.</t>

        <t>The SR domain is secured as per Section 5.1 of <xref
        target="I-D.ietf-6man-segment-routing-header"/> and no external packet
        can enter the domain with a destination address equal to a segment of
        the domain.</t>

        <t>In other words, no node outside the SR domain may send packets to,
        nor make direct use of, segments within the SR domain.</t>
      </section>
    </section>

    <section anchor="BASE" title="Baseline Usecase">
      <t>The following abstract illustration shows the SR Domain, how traffic
      is encapsulated when traversing the SR domain, and (in subequent
      sections) how an SRH is inserted and processed for a packet traversing
      the SR domain. It is representative of all deployments in <xref
      target="DEPS"/>.</t>

      <t><figure align="center" anchor="fig_srcdomain">
          <artwork>           + * * * * * * * * * * * * * * * * * * * * +

           *                                         *
   [1]----[3]--------[5]----------------[6]---------[4]---[2]
           *          |                  |           *
                      |                  |
           *          |                  |           *
                     [7]----------------[8]
           *                                         *

           + * * * * * * *  SR Domain  * * * * * * * +
</artwork>
        </figure> <list style="symbols">
          <t>3 and 4 are SR Domain edge routers</t>

          <t>5, 6, 7, and 8 are all SR Domain routers</t>

          <t>1 and 2 are hosts outside the SR Domain</t>
        </list>Since all inter domain packets are encapsulated for the part of
      the packet journey that is within the SR Domain, a packet sent from 1
      and destined to 2 is encapsulated in an outer IP v6 header between nodes
      3 and 4.</t>
    </section>

    <section anchor="SIDBLOCK" title="Choosing an SRv6 SID Block">
      <t>Without revealing the specifics of each deployment, the following
      well-known technique can be used:<list>
          <t>Obtain a GUA block from the respective registry (e.g.
          PPPP:PPP0::/28)</t>

          <t>Sub-allocate a block for SID allocation (e.g.
          PPPP:PPPB:BB00::/40)</t>

          <t>Allocate a /64 SID locator to each node in the domain that needs
          to provide network instruction (e.g. node 4 gets
          PPPP:PPPB:BB00:0004::/64 as a SID locator)</t>
        </list></t>

      <t>Vendors and operators have automated the process of locator
      selection, the details of which are outside the scope of this
      document.</t>
    </section>

    <section anchor="SECDOM" title="Securing the SR Domain">
      <t>The security measures defined in <xref
      target="I-D.ietf-6man-segment-routing-header"/> Section 5.1 are
      applied.</t>

      <t>Protection level 1: filter external traffic entering the SR domain.
      For example, node 4 (on its interface from node 2) applies an ingress
      ACL that drops any packet with DA within the PPPP:PPPB:BB00::/40
      block.</t>

      <t>Protection level 2: filter internal traffic. For example, node 4 (on
      its interface from node 6) applies an ingress ACL that drops any packet
      with DA in PPPP:PPPB:BB00:0004::/64 block if SA is not within the block
      PPPP:PPP0::/28</t>

      <t>Vendors and operators have automated the application of these
      protection levels, the details of which are outside the scope of this
      document.</t>
    </section>

    <section title="MTU within the SR domain">
      <t>The deployments, <xref target="DEPS"/>, leverage the extensively used
      practice of ensuring an MTU within the domain is bigger than the MTU on
      the external links of the domain.</t>

      <t>More specifically, the MTU difference (MTU-Delta) is designed to be
      larger than the maximum encapsulation overhead deemed required by the
      deployment.</t>

      <t>The exact number is operator specific and is outside the scope of
      this document. Some indications on how to plan this are provided in the
      following sections.</t>

      <t>Any packet exceeding the MTU of a link generates an IPv6 ICMP error
      message "packet too big" back to the source of the packet.</t>
    </section>

    <section title="VPN with SRv6">
      <t>The deployments involve the creation of commercial SRv6-based VPN
      traffic as described in <xref
      target="I-D.ietf-bess-srv6-services"/>.</t>

      <t>The salient point to note is that no SRH needs to be inserted to
      realize an SRv6 VPN service.</t>

      <t>The ingress PE encapsulates the inner packet in an outer header and
      sets the outer DA to the END.DT/DX SID signaled by the egress PE.</t>

      <t>MTU-Delta must be &gt;= 40 bytes to allow for the outer IPv6
      encapsulation without fragmentation.</t>
    </section>

    <section title="TILFA with SRv6">
      <t>The deployments involve the delivery of sub-50msec TILFA protection
      to the commercial SRv6-based VPN traffic transported by the operator
      network <xref target="I-D.ietf-rtgwg-segment-routing-ti-lfa"/>.</t>

      <t>In these deployments, when a failure is detected, the Point of Local
      Repair (PLR) inserts an SRH implementing the precomputed TILFA backup
      path.</t>

      <t>The following salient points are discussed:<list>
          <t>SRH insertion process</t>

          <t>The penultimate SID of the inserted SRH is of PSP flavor</t>

          <t>MTU-delta planning</t>
        </list></t>

      <section title="SRH Insertion Process">
        <t>When an SRH is inserted by an intermediate node it walks the IPv6
        header chain to the first header after the IPv6 header and inserts the
        SRH prior to that header.</t>

        <t><figure align="center" anchor="fig_srh_insert">
            <artwork> 
   +---------------+------------
   |  IPv6 header  | IPv4 header
   |  VPN Service  |
   | Next Header = |
   |      IPv4     |
   +---------------+------------
                   ^-SRH insertion here
                              </artwork>
          </figure></t>

        <t>An SR Policy headend within the SR domain inserts an SRH as
        follows:<list style="numbers">
            <t>Determine where to insert the SRH.</t>

            <t>Copy the destination address from the IPv6 header to Segment
            List[0] of the SRH to be inserted. This ensures the original
            destination address is restored upon execution of the final
            segment in the inserted SRH.</t>

            <t>Increase the IPv6 header payload length field by the length in
            bytes of the inserted SRH.<vspace/> If the resulting payload
            length exceeds 2^16 bytes generate an ICMP "Packet To Big" error
            message to the source with an MTU of 2^16 minus the length in
            bytes of the SRH and discard the packet.<vspace/> Note: this does
            not occur in reported deployments given the MTU design
            constraint.</t>

            <t>Set the SRH next header field to the value in the next header
            field of the header that will precede the SRH.</t>

            <t>Set the next header field of the header that will precede the
            SRH to the routing extension header (43)</t>

            <t>Set the IPv6 destination address to the first segment in the
            segment list of the SRH to be inserted. This segment may or may
            not be present in the SRH depending on the use of a reduced SRH,
            see section 4.1.1 of <xref
            target="I-D.ietf-6man-segment-routing-header"/>.</t>

            <t>Insert the SRH into the packet at the location it should be
            inserted and resubmit the packet to the IPv6 module for
            transmission to the new destination.</t>
          </list></t>
      </section>

      <section title="The Penultimate SID of the Inserted SRH is of PSP flavor">
        <t>The TILFA protection service is essentially a transparent service:
        it seeks to make the loss of a link, node or SRLG invisible to the
        transport service. It is also a very transient service as it only
        lasts a few hundreds of msec while the IGP converges.</t>

        <t>Consistent with this transparent service definition, the
        deployments leverage a TILFA computation that ensures that the
        penultimate SID of the inserted SRH is of PSP flavor.</t>
      </section>

      <section title="MTU-delta">
        <t>The vendors reporting the listed deployments have collectively
        deployed TILFA in tens of SR-MPLS networks, in 6 SRv6 networks and
        have simulated their SRv6 algorithm in tens of collected real
        topologies. The inferred experience is that the probability that a
        TILFA backup path requires more than 2 SRv6 SIDs is very rare.</t>

        <t>MTU-Delta must be &gt;= 80 bytes.<list>
            <t>40 bytes (VPN service)</t>

            <t>+ 8 (SRH) (TILFA)</t>

            <t>+ 2 * 16 (2 TILFA SID's)</t>
          </list></t>

        <t>The maximum encapsulation size of any node within the SR domain is
        limited to a specific value, this maximum is used to calculate the
        maximum link MTU of interfaces ingress to the SR domain.</t>
      </section>
    </section>

    <section title="Security Considerations">
      <t><xref target="SECDOM"/> describes the method of securing the SR
      domain in the deployments listed.</t>

      <t>All security considerations discussed in <xref
      target="I-D.ietf-6man-segment-routing-header"/> are equally applicable
      when an SRH insertion is performed.</t>
    </section>

    <section title="IANA Considerations">
      <t>This document doesn't introduce any IANA request.</t>
    </section>

    <section title="Contributors">
      <t>The authors would like to thank the following for their
      contributions: Robert Raszuk, Stefano Previdi, Stefano Salsano, Antonio
      Cianfrani, David Lebrun, Olivier Bonaventure, Prem Jonnalagadda, Milad
      Sharif, Hani Elmalky, Ahmed Abdelsalam, Arthi Ayyangar, Dirk Steinberg,
      Wim Henderickx.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

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

      <?rfc include="reference.I-D.ietf-bess-srv6-services.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-rtgwg-segment-routing-ti-lfa.xml"?>

      <?rfc include="reference.I-D.matsushima-spring-srv6-deployment-status.xml"?>
    </references>
  </back>
</rfc>
