<?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-fan-bess-pm-bgp-02" ipr="trust200902">
  <front>
    <title abbrev="BGP Extension For L3VPN PM">BGP Extension For L3VPN
    Performance Monitoring</title>

    <author fullname="Jiajia Fan" initials="J. " surname="Fan">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

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

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

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

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

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

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

    <author fullname="Shunwan Zhuang" initials="S. " surname="Zhuang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>Huawei Bld., No.156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

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

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

    <date day="03" month="March" year="2024"/>

    <abstract>
      <t>This document describes a new VT address family in BGP to exchange
      information required for apply performance monitoring in MPLS/BGP VPN,
      as described in <xref target="I-D.dong-l3vpn-pm-framework"/>.</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">
      <t>This document describes the BGP encodings and procedures for
      exchanging the information elements required by applying traffic
      performance monitoring in MPLS/BGP VPN, as specified in<xref
      target="I-D.dong-l3vpn-pm-framework"/>.</t>

      <t>Current BGP Labeled VPN Route exchange procedure combines VRF VPN-
      membership Auto-Discovery and L3VPN Label allocation together. While
      applying PM for L3VPN needs BGP extended to support VPN membership
      Auto-Discovery and L3VPN Label allocation in a VRF-to-VRF manner. To
      achieve this, a new Sub address family, called VRF-to-VRF Tunnel(VT)
      Subsequent Address Family, is introduced.</t>

      <t>This document defines two kinds of routes for VT NLRI:</t>

      <t>VPN-Membership A-D Route: for the use of doing VRF VPN membership
      auto-discovery in VRF-to-VRF manner</t>

      <t>VT Labeled Route: for the use of allocating VT Label from Local VRF
      to Remote VRF to setup VRF-to-VRF Tunnel between the pair of VRFs.</t>
    </section>

    <section title="Terminologies">
      <t>This document uses the terminologies defined in [RFC4026]:<list
          style="symbols">
          <t>ERT: Export Route Target</t>

          <t>IRT: Import Route Target</t>

          <t>PE: Provider Edge</t>

          <t>RD: Route Distinguisher</t>

          <t>VRF: Virtual Routing and Forwarding</t>

          <t>VT: VRF-to-VRF Tunnel</t>
        </list></t>
    </section>

    <section title="The New VT Sub Address Family">
      <t>The BGP Multiprotocol Extensions <xref target="RFC4760"/> allow BGP
      to carry routes from multiple "address families". In this document a new
      Subsequent Address Family is introduced, called "VT Sub Address
      Family".</t>

      <section title="VT Sub Address Family">
        <t>VT Address Family uses AFI 1/2 to present IPv4/IPv6 Address Family
        and a specific VT_SAFI(TBD) to present VT Subsequent Address
        Family.</t>

        <t>VT MP_REACH_NLRI and MP_UNREACH_NLRI are formatted as described in
        [RFC4760]</t>

        <t><figure align="center">
            <artwork><![CDATA[+---------------------------------------------------+
| Address Family Identifier (2 octets): 1/2         |
+---------------------------------------------------+
| Subsequent AFI (1 octet): VT_SAFI (TBD)           |
+---------------------------------------------------+
| Length of Next Hop (1 octet): 4                   |
+---------------------------------------------------+
| Next Hop: IPv4 Address                            |
+---------------------------------------------------+
| Reserved (1 octet)                                |
+---------------------------------------------------+
| BGP VT NLRI (Variable)                            |
+---------------------------------------------------+
            Figure 1 VT MP_REACH_NLRI
+---------------------------------------------------+
| Address Family Identifier (2 octets): 1/2         |
+---------------------------------------------------+
| Subsequent AFI (1 octet): VT_SAFI (TBD)           |
+---------------------------------------------------+
| BGP VT NLRI (Variable)                            |
+---------------------------------------------------+
            Figure 2 VT MP_UNREACH_NLRI
]]></artwork>
          </figure></t>

        <t/>
      </section>

      <section title="VT NLRI ">
        <t>BGP VT NLRI has format as depicted in following diagram:</t>

        <t><figure align="center">
            <artwork><![CDATA[+---------------------------------------------------+
| Route Type (1 octet)                              |
+---------------------------------------------------+
| Length (1 octet)                                  |
+---------------------------------------------------+
| Route Type Specific (Variable)                    |
+---------------------------------------------------+
            Figure 3 IPv4 VT-Family NLRI
]]></artwork>
          </figure>Route Type indicates type of route under VT SAFI.</t>

        <t>Type 1: VT VPN membership A-D Route</t>

        <t>Type 2: VT Labeled Route</t>

        <t>Length defines Route Type specific routes length in octets</t>

        <t>Route Type specific route information field, encoded according to
        Route Type definition.</t>

        <t/>

        <section title="VT VPN-membership A-D Route ">
          <t>VT VPN membership A-D Route, concisely named as VT A-D Route
          hereafter, is utilized for VRF-to-VRF VPN Membership Auto-Discovery
          between PEs.</t>

          <t>Its format is defined as following diagram:</t>

          <t><figure align="center">
              <artwork><![CDATA[+--------------------------------------------------+
| RD (8 octets)                                    |
+--------------------------------------------------+
| Local Router's IP Address                        |
+--------------------------------------------------+
        Figure 4 VT VPN Membership A-D Route
]]></artwork>
            </figure>a) RD: RD of one VRF on advertising PE, encoded as
          described in [RFC4364].</t>

          <t>b) Local Router's IP Address: Advertising PE's IPv4/IPv6 address
          &lt;RD, Local Router's IP Address&gt; is defined as Prefix of VT A-D
          Route.</t>

          <t/>
        </section>

        <section title="VT Labeled Route ">
          <t>VT Labeled Route is utilized for VRF-To-VRF Label(s) allocation
          and advertisement, its format is defined as following diagram.</t>

          <t><figure align="center">
              <artwork><![CDATA[+---------------------------------------------------+
| Local RD (8 octets)                               |
+---------------------------------------------------+
| Local Router's IP Address                         |
+---------------------------------------------------+
| Remote VRF's RD (8 octets)                        |
+---------------------------------------------------+
| Remote Router's IP Address                        |
+---------------------------------------------------+
| Label (3 octets)                                  |
+---------------------------------------------------+
         Figure 5 VT Labeled Route Format
]]></artwork>
            </figure>a) Local RD: Route Distinguisher value of one VRF on
          advertising PE, encoded as described in [RFC4364].</t>

          <t>b) Local Router's IP Address: Advertising PE's IPv4/IPv6
          address.</t>

          <t>c) Remote VRF's RD: Route Distinguisher value of Remote VRF
          encoded as described in [RFC4364].</t>

          <t>d) Remote Router's IP Address: Remote PE's IPv4/IPv6 address.</t>

          <t>e) Label: The Label field carries one or more labels that
          corresponds to the stack of labels <xref target="RFC3032"/>. Each
          label is encoded as 3 octets, where the high-order 20 bits contain
          the label value, and the low- order bit contains "Bottom of Stack"
          as defined in <xref target="RFC3032"/>.</t>

          <t>&lt;Local RD, Local Router's IP Address, Remote VRF's RD, Remote
          Router's IP Address&gt; which indicates a pair of VRFs is defined as
          the Prefix of VT Labeled Route.</t>
        </section>
      </section>
    </section>

    <section title="Operations ">
      <t/>

      <section title="VRF-to-VRF VPN Membership Auto Discovery">
        <t>For every PE, it needs to process all its VRF configured and
        generate one VT A-D Route for each VRF respectively.</t>

        <t>RD field MUST be filled with the VRF's RD value.</t>

        <t>Local Router's IP Address field MUST filled with the Advertising
        Router's IP address.</t>

        <t>The VT A-D Route MUST carry all IRTs of the VRF in BGP Update's
        Ext- Community Path Attribute, route importing request of one VRF is
        described by its corresponding VT A-D route. In contrast VPN Labeled
        Routes carry ERTs in BGP Update's Ext-Community Path Attribute.</t>

        <t>If a VRF is created, then its corresponding VT A-D Route MUST be
        generated and advertised.</t>

        <t>If the VRF whose VT A-D Route has been advertised is deleted, then
        the VT A-D Route Withdrawal message MUST be generated and
        advertised.</t>

        <t>If IRT of the VRF whose VT A-D Route has been advertised is
        changed, then a VT A-D Route Update with same Prefix and latest IRTs
        MUST be advertised.</t>

        <t>When receiving PE receives VT A-D Route, VPN relationship matching
        MUST be checked between IRTs in VT A-D Route and ERTs of each Local
        VRF, this process is called VRF-to-VRF VPN membership Auto
        Discovery.</t>

        <t>Either finding one VRF-to-VRF VPN membership newly formed or
        released, receiving PE MUST proceed to the VT Labeled Route processing
        described in next section.</t>
      </section>

      <section title="VRF-to-VRF Labeled Route Exchange ">
        <t/>

        <section title="VT Labeled Route Update ">
          <t>If Receiving PE finds one new VRF-to-VRF VPN membership formed,
          it MUST allocate one VT MPLS Label for the VRF-to-VRF VPN membership
          and the label is advertised to the Remote VRF by VT Labeled
          Route.</t>

          <t>Local RD MUST filled with RD value of the Local VRF which is
          found belong to the same VPN with Remote VRF.</t>

          <t>Local Router's IP Address Must filled with the advertising PE's
          IPv4/ IPv6 address.</t>

          <t>Remote VRF's RD MUST filled with RD value of the Remote VRF which
          belongs to a same VPN with the Local VRF.</t>

          <t>Remote Router's IP Address: Remote PE's IPv4/IPv6 address.</t>

          <t>Label: MUST be filled with one or more MPLS Labels allocated by
          advertising PE for the pair of VRFs.</t>

          <t>Only both sides of a pair of VRFs learnt each other's VT Labeled
          Route advertisement, the VRF-to-VRF tunnel between the pair of VRFs
          is considered setup.</t>

          <t/>
        </section>

        <section title="VT Labeled Route Withdrawal ">
          <t>If receiving PE finds one existing VRF-to-VRF VPN membership
          released then it MUST send out the VT Labeled Route Withdrawal
          message, then release the MPLS Label(s) allocated.</t>

          <t>Local RD MUST be filled with RD value of the Local VRF.</t>

          <t>Local Router's IP Address MUST be filled with the advertising
          PE's IPv4/IPv6 address.</t>

          <t>Remote VRF's RD MUST be filled with RD value of the Remote
          VRF.</t>

          <t>Remote Router's IP Address: MUST be filled with Remote PE's
          IPv4/IPv6 address.</t>

          <t>Label: MUST be filled with ZERO or the MPLS Labels value
          allocated for the VT Labeled Route.</t>

          <t/>
        </section>
      </section>

      <section title="VRF-to-VRF Labeled Route Application ">
        <t>To achieve the goal of converting normal L3VPN MP2P forwarding
        model into P2P model which is required in <xref
        target="I-D.zheng-l3vpn-pm-analysis"/>, after VPNv4 routes received,
        Receiving PE MUST apply VT Labels when downloading VPNv4 Route into
        Data Plan which is in detail described in <xref
        target="I-D.dong-l3vpn-pm-framework"/>.</t>

        <t>Between a pair of PEs both support VT capability, It COULD be an
        implementation option that VPNv4 Routes from a remote VRF WOULD NOT be
        downloaded into a Local VRF's Forwarding Plan until a VT Labeled route
        received from same Remote VRF for the Local VRF.</t>

        <t>If VT Labeled Route withdrawal message is received, receiving PE
        MUST delete VT Labels from Forwarding Plane and VPNv4 Routes MUST be
        kept on Forwarding Plane with original VPNv4 Label as inner Label.</t>

        <t/>
      </section>
    </section>

    <section title="VT Route Selection Consideration  ">
      <t>When receiving and processing VT A-D Route, the BGP best route
      selection procedure described in <xref target="RFC4271"/> MUST be
      followed.</t>

      <t>When receiving and processing VT Labeled Route, the BGP best route
      selection procedure described in <xref target="RFC4271"/> COULD be
      followed.</t>

      <t>Especially VT Labeled Route MUST be advertised ONLY to the BGP peer
      from which the best VT A-D route is received, the VT A-D route contains
      the Remote VRF's RD and Remote PE's IP address.</t>

      <t>If a Peer receives VT A-D or VT Labeled Route originated from itself,
      the route MUST be ignored.</t>

      <t/>
    </section>

    <section title="Deployment Consideration">
      <t>This document currently supports deploying VT SAFI in following two
      manners:</t>

      <t>a) Inner-AS L3VPN with Full-mesh IBGP sessions or Router
      Reflectors.</t>

      <t>b)Inter-AS L3VPN with Option A(VRF-to-VRF)[RFC4364].</t>

      <t>How to support Inter-AS L3VPN Option B(MP-EBGP) and Option-C <xref
      target="RFC4364"/> will be described in this draft's future version.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>A new SAFI value to present VT Subsequent Address Family is required
      and to be allocated by IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This extension to BGP does not change the underlying security
      issues.</t>
    </section>

    <section title="Acknowledgements">
      <t>TBD.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.I-D.dong-l3vpn-pm-framework'?>

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

      <?rfc include="reference.RFC.3032"?>

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

      <?rfc include="reference.RFC.4364"?>

      <?rfc include="reference.RFC.4760"?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.zheng-l3vpn-pm-analysis'?>
    </references>
  </back>
</rfc>
