<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.6 -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc comments="yes"?>
<rfc category="std" docName="draft-dong-idr-sr-policy-vtn-01"
     ipr="trust200902">
  <front>
    <title abbrev="BGP SR Policy for VTN">BGP SR Policy Extensions for Virtual
    Transport Network</title>

    <author fullname="Jie Dong" initials="J." surname="Dong">
      <organization>Huawei Technologies</organization>

      <address>
        <email>jie.dong@huawei.com</email>
      </address>
    </author>

    <author fullname="Zhibo Hu" initials="Z." surname="Hu">
      <organization>Huawei Technologies</organization>

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

    <author fullname="Ran Pang" initials="R." surname="Pang">
      <organization>China Unicom</organization>

      <address>
        <email>pangran@chinaunicom.cn</email>
      </address>
    </author>

    <date day="11" month="July" year="2021"/>

    <workgroup>IDR Working Group</workgroup>

    <abstract>
      <t>Segment Routing (SR) Policy is a set of candidate paths, each
      consisting of one or more segment lists and the associated information.
      The header of a packet steered in an SR Policy is augmented with an
      ordered list of segments associated with that SR Policy. In scenarios
      where multiple Virtual Transport Networks (VTNs) exist in the network,
      the VTN in which the SR policy is instantiated may also need to be
      specified, so that the header of the packet can also be augmented with
      the information associated with the VTN. An SR Policy candidate path can
      be distributed using BGP SR Policy. This document defines extensions to
      BGP SR policy to specify the VTN associated with the SR policy.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>The concept of Segment Routing (SR) policy is defined in <xref
      target="I-D.ietf-spring-segment-routing-policy"/>. An SR Policy is a set
      of candidate paths, each consisting of one or more segment lists. The
      head end of an SR Policy may learn multiple candidate paths for an SR
      Policy. The header of a packet steered in an SR Policy is augmented with
      an ordered list of segments associated with that SR Policy. The BGP
      extensions to distribute SR Policy candidate paths is defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>.</t>

      <t>The concept of Virtual Transport Network (VTN) is introduced in <xref
      target="I-D.ietf-teas-enhanced-vpn"/>. A VTN is a virtual underlay
      network which has customized network topology and a set of dedicated or
      shared network resources. In a network, different VTNs may be created to
      meet different service requirements, and different services can be
      mapped to different VTNs.</t>

      <t>In scenarios where multiple virtual networks (VTNs) exist in the
      network, the identifier of VTN in which the SR policy is instantiated
      may also need to be specified, so that the header of data packet can
      also be augmented with the information of the associated VTN. This
      document defines the BGP extensions to specify the VTN ID associated
      with a candidate path of SR policy.</t>
    </section>

    <section anchor="specification-of-requirements"
             title="Specification of Requirements">
      <t>The key words &ldquo;MUST&rdquo;, &ldquo;MUST NOT&rdquo;,
      &ldquo;REQUIRED&rdquo;, &ldquo;SHALL&rdquo;, &ldquo;SHALL NOT&rdquo;,
      &ldquo;SHOULD&rdquo;, &ldquo;SHOULD NOT&rdquo;,
      &ldquo;RECOMMENDED&rdquo;, &ldquo;MAY&rdquo;, and &ldquo;OPTIONAL&rdquo;
      in this document are to be interpreted as described in RFC 2119 <xref
      target="RFC2119"/>.</t>
    </section>

    <section title="VTN Information Encoding in SR Policy">
      <t>In order to specify the VTN the candidate path of SR policy is
      associated with, a new sub-TLV called "VTN sub-TLV" is defined in the
      BGP Tunnel Encapsulation Attribute <xref
      target="I-D.ietf-idr-tunnel-encaps"/>. The VTN sub-TLV can be carried in
      the BGP Tunnel Encapsulation Attribute with the tunnel type set to SR
      Policy.</t>

      <t>The VTN sub-TLV is optional and MUST NOT appear more than once for
      one SR Policy candidate path. If the VTN sub-TLV appears more than once,
      the associated BGP SR Policy NLRI is considered malformed and the
      "treat-as-withdraw" strategy of <xref target="RFC7606"/> is applied.</t>

      <t>The VTN sub-TLV has the following format:</t>

      <t><figure>
          <artwork><![CDATA[    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |   Length      |     Flags     |   RESERVED    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         VTN ID (4 octets)                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                        Figure 1. VTN Sub-TLV]]></artwork>
        </figure></t>

      <t>where:</t>

      <t><list style="symbols">
          <t>Type: 123</t>

          <t>Length: 6</t>

          <t>Flags: 1-octet flag field. None is defined at this stage. The
          flags SHOULD be set to zero on transmission and MUST be ignored on
          receipt.</t>

          <t>RESERVED: 1 octet of reserved bits. All of the reserved bits
          SHOULD be set to zero on transmission and MUST be ignored on
          receipt.</t>

          <t>VTN ID: A 32-bit global significant identifier which is used to
          identify a VTN. Value 0 and 0xFFFFFFFF are reserved.</t>
        </list>The encoding structure of BGP SR Policy with the VTN sub-TLV is
      expressed as below:</t>

      <figure>
        <artwork><![CDATA[         SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>
         Attributes:
            Tunnel Encaps Attribute (23)
               Tunnel Type: SR Policy
                   Binding SID
                   Preference
                   Priority
                   Policy Name
                   Explicit NULL Label Policy (ENLP)
                   VTN
                   Segment List
                       Weight
                       Segment
                       Segment
                       ...
                   ...]]></artwork>
      </figure>

      <t/>
    </section>

    <section title="Procedures">
      <t>When a candidate path of SR policy is associated with a specific VTN,
      the originating node of SR policy SHOULD include the associated VTN in
      the BGP Tunnel Encapsulation Attribute of the BGP SR policy. The setting
      of other fields and attributes in BGP SR policy SHOULD follows the
      mechanism as defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>.</t>

      <t>When a BGP speaker receives an SR Policy which is acceptable and
      usable according to the rules as defined in <xref
      target="I-D.ietf-idr-segment-routing-te-policy"/>, and the SR Policy
      candidate path selected as the best candidate path is associated with a
      VTN, the receiver node of the SR policy SHOULD encapsulate VTN-specific
      information to the header of packets steered to the SR policy. For SR
      Policy with IPv6 data plane, the possible approach is to encapsulate the
      VTN-ID to the packet using the mechanism defined in <xref
      target="I-D.dong-6man-enhanced-vpn-vtn-id"/>. For SR Policy with MPLS
      data plane, the usage of the VTN information is similar, the possible
      mechanism to encapsulate the VTN-ID to the packet is defined in <xref
      target="I-D.li-mpls-enhanced-vpn-vtn-id"/></t>

      <t>Although the proposed mechanism allows that different candidate paths
      in one SR policy be associated with different VTNs, in normal network
      scenarios it is considered that the mapping between service to VTN is
      consistent, in such case all candidate paths of one SR policy are
      associated with the same VTN.</t>
    </section>

    <section anchor="security-considerations" title="Security Considerations">
      <t>The security considerations of BGP and BGP SR policy apply to this
      document.</t>
    </section>

    <section anchor="iana-considerations" title="IANA Considerations">
      <t>IANA has assigned the sub-TLV type as defined in Section 3 from "BGP
      Tunnel Encapsulation Attribute sub-TLVs" registry.</t>

      <t><figure>
          <artwork align="center"><![CDATA[      Value     Description                     Reference
      ----------------------------------------------------
       123        VTN                         This document
]]></artwork>
        </figure></t>
    </section>

    <section anchor="acknowledgments" title="Acknowledgments">
      <t>The authors would like to thank Guoqi Xu, Lei Bao and Haibo Wang for
      the review and discussion of this document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <reference anchor="RFC2119"
                 target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement
          Levels</title>

          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>

          <date month="March" year="1997"/>

          <abstract>
            <t>In many standards track documents several words are used to
            signify the requirements in the specification. These words are
            often capitalized. This document defines these words as they
            should be interpreted in IETF documents. This document specifies
            an Internet Best Current Practices for the Internet Community, and
            requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>

        <seriesInfo name="BCP" value="14"/>

        <seriesInfo name="RFC" value="2119"/>

        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>

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

      <?rfc include='reference.I-D.ietf-idr-segment-routing-te-policy'?>

      <?rfc include='reference.I-D.ietf-idr-tunnel-encaps'?>

      <?rfc include='reference.RFC.7606'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-teas-enhanced-vpn'?>

      <?rfc include='reference.I-D.dong-6man-enhanced-vpn-vtn-id'?>

      <?rfc include='reference.I-D.li-mpls-enhanced-vpn-vtn-id'?>
    </references>
  </back>

  <!---->
</rfc>
