<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?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="exp" docName="draft-ietf-idr-vpn-prefix-orf-39"
     ipr="trust200902">
  <front>
    <title abbrev="RD-ORF">VPN Prefix Outbound Route Filter (VPN Prefix ORF)
    for BGP-4</title>

    <author fullname="Wei Wang" initials="W" surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>102209</code>

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

        <email>weiwang94@foxmail.com</email>
      </address>
    </author>

    <author fullname="Aijun Wang" initials="A" surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Beiqijia Town, Changping District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>102209</code>

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

        <email>wangaj3@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Haibo Wang" initials="H" surname="Wang">
      <organization>Huawei Technologies</organization>

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

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

        <email>rainsword.wang@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Gyan S. Mishra" initials="G" surname="Mishra">
      <organization>Verizon Inc.</organization>

      <address>
        <postal>
          <street>13101 Columbia Pike</street>

          <city>Silver Spring</city>

          <code>MD 20904</code>

          <country>United States of America</country>
        </postal>

        <facsimile/>

        <email>hayabusagsm@gmail.com</email>

        <uri/>
      </address>
    </author>

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

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

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100095</code>

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

        <phone/>

        <facsimile/>

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

        <uri/>
      </address>
    </author>

    <date day="30" month="April" year="2026"/>

    <area>RTG Area</area>

    <workgroup>IDR Working Group</workgroup>

    <keyword>RFC</keyword>

    <abstract>
      <t>This document defines a new type of Outbound Route Filter (ORF),
      known as the Virtual Private Network (VPN) Prefix ORF. The VPN Prefix
      ORF mechanism is applicable when VPN routes from different Virtual
      Routing and Forwarding (VRF) instances are exchanged through a single
      shared Border Gateway Protocol (BGP) session. The purpose of the VPN
      Prefix ORF mechanism is to control the overload of VPN routes based on
      Route Distinguisher (RD), Route Target (RT) and other necessary routing
      information. This mechanism is applicable to intra-domain scenarios.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The BGP Maximum Prefix feature <xref target="RFC4486"/> is often used
      at the network boundary to control the number of prefixes injected into
      the network. However, in scenarios where VPN routes from multiple VRFs
      are advertised over a shared BGP session, there is a lack of appropriate
      methods to control route flooding within one VRF. This flooding can
      overwhelm the processing of VPN routes in other VRFs, consequently
      degrading their performance (e.g., causing route drops, processing
      delays, and abnormal customer services). Therefore, it is desirable to
      control excessive VPN route advertisements individually for each VRF
      within such a shared BGP session.</t>

      <t>Several solutions can be used to alleviate this problem:<list
          style="symbols">
          <t>Route Target Constraint (RTC) as defined in <xref
          target="RFC4684"/></t>

          <t>Address Prefix ORF as defined in <xref target="RFC5292"/></t>

          <t>Covering Prefixes Outbound Route Filter (CP-ORF) mechanism as
          defined in <xref target="RFC7543"/></t>

          <t>Provider Edge (PE) - Customer Edge (CE) edge peer Maximum
          Prefix</t>

          <t>Configuring the Maximum Prefix for each VRF on edge nodes</t>
        </list></t>

      <t>However, each existing solution has its own limitation as described
      in Section 3.</t>

      <t>This document propose a new type of Outbound Route Filter (ORF),
      called the VPN Prefix ORF. This mechanism is event-driven and does not
      require pre-configuration. When the number of VPN routes in a VRF
      exceeds the prefix limit, the router identifies the VPN prefix (Route
      Distinguisher (RD), Route Target (RT), source PE, etc.) of the overload
      VPN routes (VPN routes that exceed the maximum number of storable VPN
      routes of the corresponding VRF on the receiver and thus cannot be
      imported.) and sends a VPN Prefix ORF message to the BGP peer that
      announced these overload VPN routes. Upon receiving a VPN Prefix ORF
      entry, the BGP speaker filters and withdraws any overload VPN routes
      that were previously announced to its peer.</t>

      <t>The purpose of this mechanism is to control the overload VPN routes,
      avoid route churn effects and resource exhaustion when a VRF overloads.
      The VPN Prefix ORF mechanism is applicable when VPN routes from
      different VRFs are exchanged via a shared BGP session.</t>

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

    <section title="Terminology">
      <t>The following terms are used in This document:<list style="symbols">
          <t>AFI: Address Family Identifier, defined in <xref
          target="RFC4760"/></t>

          <t>ASBR: Autonomous System Border Router</t>

          <t>BGP: Border Gateway Protocol, defined in <xref
          target="RFC4271"/></t>

          <t>EVPN: BGP/MPLS Ethernet VPN, defined in <xref
          target="RFC7432"/></t>

          <t>MPLS: Multi-Protocol Label Switching</t>

          <t>ORF: Outbound Route Filter, defined in <xref
          target="RFC5291"/></t>

          <t>Quota: A threshold to limit the number of VPN routes under
          specific granularities (such as &lt;PE&gt;, &lt;RD, Source
          AS&gt;)</t>

          <t>RD: Route Distinguisher, defined in <xref target="RFC4364"/></t>

          <t>RIB: Routing Information Base</t>

          <t>RR: Route Reflector, provides a simple solution to the problem of
          Internal Border Gateway Protocol (iBGP) full mesh connection in
          large-scale iBGP implementation <xref target="RFC4456"/></t>

          <t>RT: Route Target, defined in <xref target="RFC4364"/></t>

          <t>SAFI: Subsequent Address Family Identifier, defined in <xref
          target="RFC4760"/></t>

          <t>VPN: Virtual Private Network, defined in <xref
          target="RFC4364"/></t>

          <t>VRF: VPN Routing and Forwarding, defined in <xref
          target="RFC4364"/></t>
        </list></t>

      <t/>
    </section>

    <section title="Existing Solutions">
      <section title="Route Target Constraint (RTC)">
        <t>RTC <xref target="RFC4684"/> can only filter the VPN routes from
        any uninterested VRFs, if the route overload comes from an interested
        VRF, the RTC mechanism can't filter them.</t>
      </section>

      <section title="Address Prefix ORF">
        <t>Using Address Prefix ORF <xref target="RFC5292"/> to filter VPN
        routes requires a pre-configuration, but it is impossible to know in
        advance which prefix may exceed the predefined threshold.</t>
      </section>

      <section title="CP-ORF Mechanism">
        <t><xref target="RFC7543"/> defines the Covering Prefixes ORF
        (CP-ORF). A BGP speaker sends a CP-ORF to a peer in order to pull
        routes that cover a specified host address. A prefix covers a host
        address if it can be used to forward traffic towards that host
        address.</t>

        <t>CP-ORF is applicable in Virtual Hub-and-Spoke <xref
        target="RFC7024"/> VPN and also BGP/MPLS Ethernet VPN (EVPN) <xref
        target="RFC7432"/> networks, but its primary function is to retrieve
        interested VPN prefixes and it cannot be used to filter overload of
        VPN prefixes dynamically.</t>
      </section>

      <section title="PE-CE edge peer Maximum Prefix">
        <t>The BGP Maximum-Prefix feature controls the number of prefixes
        received from a neighbor. Configuring it on every PE-CE link can
        prevent VPN route overload. However, relying solely on sender-side
        protection is insufficient. If the sender has not configured Maximum
        Prefix, the VPN Prefix ORF mechanism can still prevent VPN route
        overload.</t>
      </section>

      <section title="Configuring the Maximum Prefix for each VRF on edge nodes">
        <t>When a VRF overloads, some implementations may stop importing
        routes. Any additional VPN routes are held in the Routing Information
        Base (RIB). However, PEs still need to parse the incoming BGP
        messages, which consumes CPU cycles and further burdens the overloaded
        PE.</t>

        <t>The VPN Prefix ORF mechanism improves upon this by enabling the
        overloaded PE to signal the VPN routes matching the overload criteria
        back to the sender. The sender can then suppress these routes at the
        source, eliminating wasted processing and preserving resources for
        non-overloaded VRFs.</t>
      </section>
    </section>

    <section anchor="Encodings" title="VPN Prefix ORF Encoding">
      <t>This section describes the encoding of VPN Prefix ORF entries. The
      VPN Prefix ORF entries are carried in the BGP ROUTE-REFRESH message as
      defined in <xref target="RFC5291"/>. A BGP ROUTE-REFRESH message can
      carry one or more ORF entries. VPN Prefix ORF entries consist
      exclusively of Match fields with the value DENY. VPN Prefix ORF entries
      are evaluated in sequential order based on the Sequence field, defined
      below. When no VPN Prefix ORF entries in a non-empty VPN Prefix ORF
      match the route that is passed through the ORF, the Match criterion for
      the route is considered PERMIT. The format of a ROUTE-REFRESH message
      carrying VPN Prefix ORF entries is as follow:</t>

      <t><list style="symbols">
          <t>AFI (2 octets). The AFI MUST be set to IPv4, IPv6, or Layer 2 VPN
          (L2VPN).</t>

          <t>SAFI (1 octet). If the AFI is set to IPv4 or IPv6, the SAFI can
          be set to MCAST-VPN, or MPLS-Labeled VPN. If the AFI is set to
          L2VPN, the SAFI can be set to BGP EVPN, VPLS, or MCAST-VPLS. The
          combination relationships between SAFI and AFI are presented in
          Table 1:<figure>
              <artwork align="center"><![CDATA[             Table 1 Allowed SAFI and AFI combinations
+-----------+-------------------------+----------------------------+
|    AFI    |          SAFI           |          Document          |
+-----------+-------------------------+----------------------------+
|IPv4(1)/   |MCAST-VPN(5)             | [RFC6514]                  |
|IPv6(2)    +-------------------------+----------------------------+
|           |MPLS-labeled VPN address | [RFC4364][RFC8277][RFC9252]|
|           |(128)                    |                            |
+-----------+-------------------------+----------------------------+
|L2VPN(25)  |BGP EVPNs(70)            | [RFC7432]                  |
|           +-------------------------+----------------------------+
|           |VPLS(65)                 | [RFC4761][RFC6074]         |     
|           +-------------------------+----------------------------+
|           |MCAST-VPLS(8)            | [RFC7117]                  |
+-----------+-------------------------+----------------------------+
]]></artwork>
            </figure></t>

          <t>When-to-refresh (1 octet): the value MUST be IMMEDIATE or
          DEFER.</t>

          <t>ORF Type (1 octet): The type of VPN Prefix ORF is 66.</t>

          <t>Length of ORF entries (2 octets)</t>
        </list>A VPN Prefix ORF entry contains a common part and type-specific
      part. The encoding of the common part is shown in Figure 1.<figure>
          <artwork align="center"><![CDATA[ +-----------------------------------------+
 |                                         |
 |            Action (2 bits)              |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |             Match (1 bit)               |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |      Overload VPN routes process        |
 |             method (1 bit)              |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |            Reserved (4 bits)            |
 |                                         |
 +-----------------------------------------+
 
Figure 1: VPN Prefix ORF type-common part encoding
]]></artwork>
        </figure><list style="symbols">
          <t>Action (2 bits): the value is ADD, REMOVE or REMOVE-ALL as
          described in <xref target="RFC5291"/>. If the received ORF entry
          contains an unrecognized value(0x11), such an ORF entry MUST be
          removed.</t>

          <t>Match (1 bit): the value is PERMIT(0) or DENY(1) as described in
          <xref target="RFC5291"/>. For the purpose of this document, only the
          DENY value is permitted. This bit MUST be set to DENY(1).</t>

          <t>Overload VPN routes process method (1 bit): if the value is set
          to 0, it means the receiver of such message MUST withdraw all
          previously advertised overload VPN routes that match the ORF's
          type-specific part. If the value is set to 1, it means the sender of
          the VPN Prefix ORF message will refuse to accept VPN routes matching
          the overload criteria and that the receiver of the VPN Prefix ORF
          message MUST NOT announce VPN routes matching the overload criteria.
          The default value is 0. Note well, this bit is specific to the ORF
          Type introduced by this document.</t>

          <t>Reserved (4 bits): These bits are set to zero and ignored by the
          receiver.</t>
        </list>VPN Prefix ORF also contains a type-specific part. The encoding
      of the type-specific part is shown in Figure 2.</t>

      <t><figure>
          <artwork align="center"><![CDATA[ +-----------------------------------------+
 |                                         |
 |             Sequence (4 octets)         |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |             Length (2 octets)           |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |      Route Distinguisher (8 octets)     |
 |                                         |
 +-----------------------------------------+
 |                                         |
 |        Optional TLVs (variable)         |
 |                                         |
 +-----------------------------------------+
 
Figure 2: VPN Prefix ORF type-specific encoding
]]></artwork>
        </figure><list style="symbols">
          <t>Sequence: Identifies the order in which the VPN Prefix ORF is
          generated and evaluated. It uniquely identifies a VPN Prefix ORF
          entry, along with the AFI/SAFI, ORF-Type, and Route Distinguisher.
          The Sequence SHOULD be non-contiguous to facilitate the insertion of
          new rules at a later stage, which means the receiver should not
          assume the sequence numbers are contiguous; a gap in sequence
          numbers (e.g., receiving sequence N then N+k, k&gt;1) is valid.</t>

          <t>Length: Specifies the length of this VPN Prefix ORF entry.</t>

          <t>Route Distinguisher: Distinguishes different user routes. The VPN
          Prefix ORF filters the VPN routes it intends to send based on Route
          Distinguisher. If the RD is set to 0, it indicates all VPN
          prefixes.</t>

          <t>Optional Type-Length-Values (TLVs): Carries potential additional
          information to provide extensibility for the VPN Prefix ORF
          mechanism. Its format is shown in Figure 3. If one or more TLV(s)
          are unrecognized, the entire VPN Prefix ORF entry MUST be
          discarded.<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   |       value (variable)        :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Figure 3 The format of optional TLV(s)]]></artwork>
            </figure></t>
        </list>Note that if the Action component of an ORF entry specifies
      REMOVE-ALL, the ORF entry does not include the type-specific part.</t>

      <t>When the BGP ROUTE-REFRESH message carries VPN Prefix ORF entries, it
      MUST be set as follows:</t>

      <t><list style="symbols">
          <t>The ORF-Type MUST be set to 66 (VPN Prefix ORF).</t>

          <t>The purpose of VPN Prefix ORF is to block unwanted VPN prefixes;
          therefore, the "Action" of a valid entry MUST be set to "DENY". VPN
          routes that do not match any corresponding VPN Prefix ORF entries
          MUST be imported into the corresponding VRF.</t>
        </list></t>

      <t>According to <xref target="RFC5291"/>, if any field in a VPN Prefix
      ORF entry in the message contains an unrecognized value, the entire
      specified ORF previously received is removed.</t>

      <t>A BGP speaker that is willing to receive ORF entries from its peer,
      or a BGP speaker that would like to send ORF entries to its peer,
      advertises this capability by using the Outbound Route Filtering
      Capability defined in <xref target="RFC5291"/>.</t>

      <section title="Source PE TLV (including 3 types)">
        <t>The Source PE TLV is defined to identify the originator of the VPN
        routes. The sender of the VPN Prefix ORF MUST check for the existence
        of the Source PE Extended Community (SPE EC; see section 6) on the VPN
        route being matched. If the SPE EC exists, the sender MUST include its
        value in the Source PE TLV. Otherwise, the value of Source PE TLV MUST
        be set to the Next Hop address.</t>

        <t>The Source PE TLV MUST appear at most once within an individual ORF
        entry. If an ORF entry contains multiple Source PE TLVs, the entire
        ORF entry MUST be ignored.</t>

        <t>The source PE TLV supports the following types:<list
            style="symbols">
            <t>IPv4 Source PE TLV: Type = 1, Length = 4 octets, value = Next
            Hop address in IPv4 format.</t>

            <t>IPv6 Source PE TLV: Type = 2, Length = 16 octets, value = Next
            Hop address in IPv6 format (global IPv6 address only).</t>

            <t>Source PE identifier TLV: Type = 3, Length = 4 octets, value =
            the value of ORIGINATOR_ID in the Source PE Extended
            Community.</t>
          </list></t>
      </section>

      <section title="Route Target TLV">
        <t>The Route Target TLV is defined to identify the RT of the
        overloaded VPN routes. The RT and RD can be used together to filter
        VPN routes if the source VRF contains multiple RTs, and the VPN routes
        with different RTs MAY be assigned to different VRFs on the
        receiver.</t>

        <t>If this TLV contains only one RT but multiple RTs are configured on
        the VPN route, the VPN prefix ORF receiver MUST check whether the RT
        included in this TLV exists among the configured RTs. If so, it MUST
        filter out the VPN route.</t>

        <t>The Route Target TLV is defined as:<list style="empty">
            <t>Type = 5, Length = 8*n octets (where n is the number of RTs
            associated with the overloaded VPN routes), value = the RT
            value(s) of the overload VPN routes. If multiple RTs are included,
            an exact match is required.</t>
          </list></t>
      </section>

      <section title="Route Type TLV">
        <t>This TLV applies to all VPN routes containing a route type field,
        to distinguish between different types of VPN routes and enable more
        granular control.</t>

        <t>The encoding of the Route Type TLV is as follow:<list style="empty">
            <t>Type = 6, Length = 1 octet, value = the value of Route Type
            field of the overload routes.</t>
          </list></t>
      </section>
    </section>

    <section title="The general procedures of the VPN Prefix ORF mechanism">
      <section title="Process of VPN Prefix ORF mechanism on sender">
        <t>The operation of the VPN Prefix ORF mechanism on each sender is
        independent. Each sender makes a local judgment to determine whether
        it needs to send a VPN Prefix ORF message to its upstream peer.
        Operators can configure the algorithms according to their specific
        circumstances.</t>

        <t>This section specifies procedures for a receiving BGP speaker to
        process VPN route information received from a sending BGP speaker. The
        VPN route information includes VPN routes and associated Route
        Distinguishers (RDs). The receiving BGP speaker determines the newly
        received VPN routes and evaluates whether installation of those routes
        would cause the configured VPN route limit for the associated VRF to
        be exceeded.</t>

        <t>If the configured VPN route limit for a VRF is exceeded, the
        receiving BGP speaker SHOULD send a VPN Prefix ORF message to the
        sending BGP speaker requesting that transmission of the identified VPN
        routes cease. </t>

        <t>Before originating a VPN Prefix ORF message, the receiving BGP
        speaker MUST compare the Route Targets (RTs) associated with the
        affected VPN routes against the import RTs configured on other VRFs of
        the device. If any RT associated with a VPN route is also imported by
        another VRF, the receiving BGP speaker MUST NOT originate a VPN Prefix
        ORF message for that route. </t>

        <t>The procedures described in this section apply to iBGP peers within
        the same Autonomous System (AS). VPN route identification is based on
        the RD. VPN Prefix ORF information is carried using ORF entries within
        a ROUTE-REFRESH message. </t>

        <t>The receiving BGP speaker includes the following information in the
        VPN Prefix ORF message: </t>

        <t><list style="symbols">
            <t>ORF entries carried within a ROUTE-REFRESH message.</t>

            <t>An Action field in each ORF entry indicating that the receiving
            BGP speaker requests installation of the specified outbound route
            filter.</t>

            <t>A Match field in each ORF entry indicating that VPN route
            updates matching the specified ORF entry are to be denied.</t>

            <t>An RD value identifying the affected VPN routes, encoded in the
            type-specific portion of the ORF entry. If multiple VRFs on a PE
            import VPN routes associated with the same RD, and only a subset
            of those VRFs exceed their configured route limits, the PE MUST
            NOT originate a VPN Prefix ORF entry for that RD.</t>
          </list></t>

        <t>When the VPN Prefix ORF mechanism is triggered, the VPN Prefix ORF
        sender MUST send alarm information to network operators.</t>

        <t>The procedures for senders of VPN Prefix ORF entries are described
        below:</t>

        <figure>
          <artwork><![CDATA[S01. When VPN routes with a specific RD are installed in 
     multiple VRFs, for each VRF v {
S02.     If (the total number of received prefixes + the number
         of prefixes already in VRF v exceeds its configured 
         prefix limit) {
S03.         RT_set = the set of Route Targets that were to be
             imported into VRF v.
S04.         overload_RD_source_pairs = all <RD, Source PE> 
             tuples from the newly received routes that were 
             sent for incorporation into VRF v.

             // Check if any RT in RT_set is also imported by 
                another VRF that has NOT exceeded its limit
S05.         conflict_exists = FALSE;
S06.         For each RT r in RT_set {
S07.             For each other VRF u on the VPN Prefix ORF sender {
S08.                 If (r is in the import RT list of VRF u) {
S09.                     conflict_exists = TRUE;
S09a                     break;
S10.                 }
S10a                 If (conflict_exists == TRUE) {
S10b                     break;
S10c                 }  
S11.             }
S12.         }

S13.         If (conflict_exists == TRUE) {
S14.             // Cannot send ORF: would block routes needed
                    by non-overloaded VRFs
S15.             Send warning message to the operator.
                 Continue with next VRF.
S16.         }

S17.         // Safe to send ORF entries
S18.         For each <RD_x, PE_y> in overload_RD_source_pairs {
S19.             Collect all RTs carried by routes with RD=RD_x 
                 from source PE_y that are imported into VRF v.

S20.             Construct a VPN Prefix ORF entry with:
S21.                 Action = ADD,
S22.                 Match = DENY,
S23.                 Overload VPN routes process method = 0,
S24.                 Sequence = Generate unique Sequence number,
S25.                 Route Distinguisher = RD_x,
S26.                 Optional TLVs include:
S27.                     Source PE TLV = PE_y,
S28.                     Route Target TLV = RT_list.

S29.             Send a BGP ROUTE-REFRESH message containing this 
                 ORF entry to the upstream BGP peer (e.g., RR).
S30.             Send an alarm message to the operator indicating 
                 VRF v overload and ORF transmission.
S31.         }
S32.     } Else {
S33.         // No overload in this VRF; no ORF triggered
S34.         Continue normal route processing.
S35.     }
S36. }]]></artwork>
        </figure>

        <t/>

        <section title="Intra-domain Scenarios and Solutions">
          <t>For intra-AS VPN deployment, there are two scenarios:<list
              style="symbols">
              <t>unique RD (per VPN, per PE).</t>

              <t>the same RD (per VPN, same on all PEs)</t>
            </list></t>

          <t>Detailed descriptions about the above solutions are provided in
          Appendix B.</t>
        </section>
      </section>

      <section title="Protocol process of VPN Prefix ORF mechanism on receiver">
        <t>The VPN Prefix ORF is primarily used to block unwanted BGP updates.
        When the receiver receives a VPN Prefix ORF entry, it MUST check first
        whether the "Match" bit is "DENY" or not.</t>

        <t>If the "Match" bit is "PERMIT", the entry MUST be discarded and a
        warning MUST be sent to the operator.</t>

        <t>The default entry for the VPN Prefix ORF type is "Permit All",
        which means that all routes that do not match the existing entries in
        the VPN Prefix ORF table shall be advertised. The following procedures
        will only be evaluated when the "Match" bit is "DENY".</t>

        <t>The receiver of VPN Prefix ORF entries (which may be an RR, ASBR,
        or PE) performs the following actions upon receiving a VPN Prefix ORF
        entry from its BGP peer:<figure>
            <artwork><![CDATA[S01. The receiver checks the combination of <AFI/SAFI, ORF-Type, 
     Sequence, Route Distinguisher> in the received VPN Prefix 
     ORF entry.
S03. If (Action == ADD) {
S04     If (entry exists) {
            Replace existing entry.
                           } 
S05     else {
              Add new entry.
             }
         } 
 S06 else if (Action == REMOVE) {
 S07      If (entry exists) {
                             Remove entry.
                            }
          } 
 S08 else if (Action == REMOVE-ALL) {
         Remove all matching VPN Prefix ORF entries.
          } 
 S09  else {
          Handle as malformed or unsupported Action.
           }

]]></artwork>
          </figure></t>

        <t>The filtering conditions for stored VPN Prefix ORF entries include
        the RD and RT of the overloaded VPN Prefix Route.</t>

        <t>If the SPE EC is not attached to the BGP Update message for the VPN
        prefixes, the receiver MUST use the NEXT_HOP or ORIGINATOR_ID
        attribute as the originator of the VPN prefix to match against the VPN
        Prefix ORF entry.</t>

        <t>After installing the filter entries for outbound VPN prefixes, the
        receiver performs the following actions before sending VPN
        routes:<figure>
            <artwork><![CDATA[S01. The receiver checks if there are matching filtering conditions
     in the ORF-Policy table for the VPN routes. 
S02. If (no matching filtering conditions exist) {
S03.     The receiver sends the VPN routes.
S04. } else {
S05.     If (the "Overload VPN routes process method" bit is set
         to 0) {
S06.         The receiver withdraws all the VPN routes identified 
             by RD, RT, and any relevant information in the optional
             TLVs within the entry, and stops sending the 
             corresponding VPN routes to the sender of the VPN 
             Prefix ORF entry.
S07.     } else {
S08.         The receiver stops sending the newly learnt matched VPN
             routes according to the value of RD, RT, and any relevant
             information in optional TLVs within the entry to the 
             sender of the VPN Prefix ORF entry.

S09. }
}
]]></artwork>
          </figure></t>

        <t>The procedure above can be used for route refresh processing after
        receiving an ORF update and the usual VPN route propagation. A change
        to the ORF prefixes triggers a rescan of the relevant routing
        information, followed by a route refresh. In contrast, regular
        individual VPN route updates are only subject to matching against the
        existing ORF rules.</t>

        <t>The route-refresh procedure as specified in <xref
        target="RFC5291"/> is modified in the presence of VPN Prefix ORF Type
        entry with O-bit set to 1. The receiver is required to keep track of
        routes matching the ORF entries with O-bit set to 1 that have been
        already sent to the peer before those ORF entries were received and
        continue to advertise them even if denied by those ORF entries during
        both route-refresh processing and subsequent updates received for
        those routes.</t>
      </section>
    </section>

    <section title="Source PE Extended Community">
      <t>Next Hop does not always identify the source as seen in the following
      scenarios:<list style="symbols">
          <t>a PE MAY have multiple addresses, so that its BGP peer MAY
          receive several different next hop addresses from the same
          source.</t>

          <t>In an Option B inter-domain scenario, the ASBR will change the
          Next Hop.</t>
        </list></t>

      <t>ORIGINATOR_ID is a non-transitive attribute generated by an RR to
      identify the source, but ORIGINATOR_ID cannot be advertised outside the
      local AS. To address these scenarios, this section defines a new
      Extended Community: Source PE Extended Community (SPE EC), which is
      designed to transmit the identifier of the source PE. The value of the
      SPE EC can be set by the source PE, RR, or Autonomous System Boundary
      Router (ASBR). Once set and attached to a BGP UPDATE message, its value
      MUST NOT be altered along the advertisement path.</t>

      <t/>

      <t>The peering AS number of the source PE can be conveyed by the Source
      AS Extended Community, as defined in <xref target="RFC6514"/></t>

      <t>The format of SPE EC is shown as Figure 4. <figure>
          <artwork align="center"><![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 (TBD)        |          ORIGINATOR_ID        :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
:     ORIGINATOR_ID (cont.)     |            Reserved           :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 4 The format of SPE EC
]]></artwork>
        </figure></t>

      <t>Where:<list style="symbols">
          <t>Type(16 bit): Specifies the type value assigned by IANA, now it
          is TBD.</t>

          <t>ORIGINATOR_ID(32 bit): Specifies the identifier of the source
          PE.</t>

          <t>Reserved(16 bit): The sender MUST set the Reserved field to 0 and
          a received MUST ignore the Reserved field.</t>
        </list></t>

      <t>An RR/ASBR SHOULD perform the following actions:<list style="symbols">
          <t>Check for the existence of the SPE EC. If it exists, the RR/ASBR
          MUST NOT change it.</t>

          <t>If the SPE EC does not exist, check for the existence of the
          ORIGINATOR_ID. If it exists, put it into the SPE EC.</t>

          <t>If the ORIGINATOR_ID does not exist, put the router-id of the
          source PE into the SPE EC.</t>
        </list></t>

      <t>This section extends route reflection behaviors, meaning that if
      support for this feature extension is required, the RR MUST perform the
      additional actions specified above.</t>
    </section>

    <section title="Operational Considerations">
      <section title="General Considerations for the &gt; deployment of VPN Prefix ORF mechanism">
        <t>Figure 5 illustrates the intra-domain topology of the application
        of VPN Prefix ORF mechanism.</t>

        <figure>
          <artwork><![CDATA[ +----------------------------------------------------------------+
 |    +-------+                                       +-------+   |
 |    |  PE1  +----------------+    +-----------------+  PE4  |   |
 |    +-------+                |    |                 +-------+   |
 |                             |    |                             |
 |                             |    |                             |
 |                           +-+----+-+                           |
 |                           |   RR   |                           |
 |                           +-+----+-+                           |
 |                             |    |                             |
 |                             |    |                             |
 |    +-------+                |    |                 +-------+   |
 |    |  PE2  +----------------+    +-----------------+  PE3  |   |
 |    +-------+                                       +-------+   |
 |                                                                |
 |                             AS 100                             |
 +----------------------------------------------------------------+
 
             Figure 5 Intra-domain network topology
]]></artwork>
        </figure>

        <t>To achieve the finer control of VPN prefixes, the VPN Prefix ORF
        mechanism needs both the sender and receiver of such message support
        the procedures described in this document. It influences only the
        advertisement and withdrawn of overloaded routes, and has no impact to
        other non-matched VPN routes. It can lessen the receiving and parsing
        stress of the overloaded routes on the VPN prefixes routes receiver
        timely.</t>

        <t>In order to reduce the complex configuration, it is RECOMMENDED
        that PEs within the network use the same formula to calculate the
        quota value, start from the basic mode, to the granular mode that
        described in the following section. Once such mechanism is triggered,
        it is RECOMMENDED that the operator to identify the source of
        overloaded VPN routes, based on the VPN Prefix ORF message, to find
        the root cause of overloaded VPN routes (malicious inject, or error
        manual configuration etc.), eliminate the advertisements of the
        overloaded VPN routes at the source and recover the advertisement of
        VPN routes into normal states.</t>

        <t>The algorithm that triggers the VPN Prefix ORF may lead some CPU
        consumption on the BGP speaker, but it depends on the implementation
        of such algorithm. Actually, it requires only the judgement whether
        the overloaded VPN routes are required also by other VRFs on the same
        device. The implementation of this mechanism should give the
        flexibility on controlling of advertisement of VPN Prefix ORF message,
        and also the withdrawn methods of the overloaded VPN routes, based on
        the description of this document.</t>
      </section>

      <section title="Quota value calculation">
        <t>The VPN Prefix ORF mechanism is designed for intra-domain BGP/MPLS
        IP VPN <xref target="RFC4364"/> and BGP/MPLS Ethernet VPN (EVPN) <xref
        target="RFC7432"/> deployments where multiple VRFs on a Provider Edge
        (PE) router exchange VPN routes via a single shared iBGP session
        (typically with a Route Reflector).</t>

        <t>This mechanism operates in two modes:<list style="symbols">
            <t>Basic mode: Triggered solely by local VRF-level prefix limits.
            No per-source quota configuration is required. In this mode, the
            PE sends a VPN Prefix ORF only if all VRFs that import the same
            Route Target(s) have exceeded their respective prefix limits.</t>

            <t>Granular mode (optional): Enabled when operators configure
            per-&lt;Route Distinguisher, Source PE&gt; quotas via their
            Network Management System (NMS) or CLI. This enables finer-grained
            control, allowing ORF triggering even if only one VRF exceeds its
            limit while others sharing the same RT remain non-overloaded,
            provided that the overload routes originate from a specific
            source.</t>
          </list></t>

        <t>Quota is a threshold to limit the number of VPN routes under
        specific granularities (such as &lt;PE&gt;, &lt;RD, Source AS&gt;). In
        deployment, quota values SHOULD be set and delivered by the Network
        Management System (NMS).</t>

        <t>When the granular mode is enabled, an operator may configure a
        quota for each &lt;RD, Source PE&gt; tuple imported into a VRF. This
        quota represents the maximum number of prefixes allowed from that
        specific source for the given RD.</t>

        <t>The quota value can be derived based on historical traffic
        patterns, service level agreements (SLAs), or static provisioning via
        NMS/CLI. It is not a prerequisite for the VPN Prefix ORF mechanism to
        operate; the mechanism defaults to VRF-level prefix limit enforcement
        if no per-source quotas are configured.</t>

        <t>If the quota value is set to (VRF prefix limit/the number of PEs),
        whenever new PE access is added to the network, the quota value SHOULD
        be re-evaluated or adjusted accordingly.</t>

        <t>To avoid frequent changes to the quota value, the value SHOULD be
        set based on the following formula:</t>

        <t>Quota=MIN[(Adjust Coefficient)*&lt;PE,CE Prefix
        Limit&gt;*&lt;Number of PEs within the VPN, includes the possibility
        of expansion in futures&gt;, Local VRF Prefixes Limit]</t>

        <t>It should be noted that the above formula is only an example;
        operators can use different formulas based on actual needs in the
        management plane.</t>
      </section>

      <section title="Withdraw of VPN Prefix ORF entries">
        <t>When the VPN Prefix ORF mechanism is triggered, the device SHOULD
        notify the network operator. </t>

        <t>Withdrawal of VPN Prefix ORF entries is manually initiated and
        requires the following conditions: </t>

        <t>1. The network operator has confirmed that the overload condition
        causing the VRF route limit to be exceeded has been resolved. </t>

        <t>2. The network operator has identified the VPN Prefix ORF entry to
        be withdrawn. Devices SHOULD maintain records of originated VPN Prefix
        ORF entries for this purpose. </t>

        <t>To withdraw VPN Prefix ORF entries, the operator configures the
        originating device to send a VPN Prefix ORF entry with the Action
        field set to REMOVE or REMOVE-ALL. The withdrawal request MUST include
        sufficient information to identify the target ORF entry. Automatic
        withdrawal of VPN Prefix ORF entries is not defined. </t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>Security considerations for this work are the same as what is
      documented in <xref target="RFC4271"/>.</t>

      <t>A compromised or misconfigured BGP peer could potentially send an
      excessive number of VPN Prefix ORF entries. Since these entries are
      processed on the VPN Prefix ORF receiver, an unbounded number of VPN
      Prefix ORF entries could consume excessive system resources (CPU cycles
      for route filtering and memory for storing the entries). On devices that
      support the VPN Prefix ORF mechanism, it is necessary to enforce a
      per-peer limit on the number of VPN Prefix ORF entries. Once this limit
      is exceeded, this device will ignore all newly received VPN Prefix ORF
      entries to prioritize its own stability, rather than continuously
      processing new filter rules advertised by the peer.</t>
    </section>

    <section title="IANA Considerations">
      <section anchor="iana" title="VPN Prefix Outbound Route Filter">
        <t>This document defines a new Outbound Route Filter type, named "VPN
        Prefix Outbound Route Filter (VPN Prefix ORF)", and assigns a value of
        66 from the BGP Outbound Route Filtering (ORF) Types space which is
        under the "Border Gateway Protocol (BGP) Parameters" registry
        group.</t>

        <figure align="center">
          <artwork><![CDATA[ +==========+=========================+=========================+
 | Value    | Description             | Reference               |
 +====================================+=========================+
 | 66       | VPN Prefix ORF          | This document           |
 +----------+-------------------------+-------------------------+
]]></artwork>
        </figure>

        <t/>
      </section>

      <section title="VPN Prefix ORF TLV types">
        <t>This document defines a new "VPN Prefix ORF TLV Type" registry in
        the "Border Gateway Protocol (BGP) Parameters" registry group. The
        registration policies, per <xref target="RFC8126"/>, for this registry
        are as follows:<figure align="center">
            <artwork><![CDATA[Under "Border Gateway Protocol (BGP) Parameters"
Registry: "VPN Prefix ORF TLV Type"
 +==========+=========================+
 | Range    | Registration Procedures |
 +====================================+
 | 0-127    | IETF Review             |
 +----------+-------------------------+
 | 128-255  | First Come First Served |
 +----------+-------------------------+
]]></artwork>
          </figure></t>

        <t>IANA should make initial assignments as follows:</t>

        <t><figure align="center">
            <artwork><![CDATA[ +=========+==========================+===========================+
 | Value   | Description              | Reference                 |
 +=========+==========================+===========================+
 | 0       | Reserved                 | This document             |
 +---------+--------------------------+---------------------------+
 | 1       | IPv4 Source PE TLV       | This document             |
 +---------+--------------------------+---------------------------+
 | 2       | IPv6 Source PE TLV       | This document             |
 +---------+--------------------------+---------------------------+
 | 3       | Source PE Identifier TLV | This document             |
 +---------+--------------------------+---------------------------+
 | 4       | Route Target TLV         | This document             |
 +---------+--------------------------+---------------------------+
 | 5       | Route Type TLV           | This document             |
 +---------+--------------------------+---------------------------+
 | 6-127   | Unassigned               |                           |
 +---------+--------------------------+---------------------------+
 | 128-255 | Unassigned               |                           |
 +---------+--------------------------+---------------------------+
]]></artwork>
          </figure></t>
      </section>

      <section title="Source PE Extended Community">
        <t>This document defines a new BGP Transitive Extended Community Type
        called "Source PE Extended Community" under "BGP Transitive Extended
        Community Types"<figure align="left">
            <artwork><![CDATA[ Under "BGP Transitive Extended Community Types"
 +============+===============================+===========================+
 | Type Value |         Name                  | Reference                 |
 +============+===============================+===========================+
 | TBD        | Source PE Extended Community  | This document             |
 +------------+-------------------------------+---------------------------+       ]]></artwork>
          </figure></t>
      </section>

      <section title="Common part of ORF entry">
        <t>IANA is requested to make a new "ORF Entry Bits" registry in the
        "Border Gateway Protocol (BGP) Parameters" registry group. The
        registration policy for this registry is IETF Review.</t>

        <t>IANA should make initial assignments as follows:</t>

        <t><figure align="left">
            <artwork><![CDATA[ +==============+==============+===========================+===========+
 | Bit Position | Name         | Description               | Reference |
 +==============+==============+===========================+===========+
 | 0-1          | Action       | The value of this field   |  RFC5291  |
 |              |              | is 0 for ADD,1 for REMOVE,|           |
 |              |              | and 2 for REMOVE-ALL.     |           |
 +--------------+--------------+---------------------------+-----------+
 | 2            | Match        | The value of this field is|  RFC5291  |
 |              |              | 0 for PERMIT and 1 for    |           |
 |              |              |  DENY.                    |           |
 +--------------+--------------+---------------------------+-----------+
 | 3            | Overload VPN | The value of this field is| This      |
 |                routes       | 0 for withdrawn all       | document  |
 |              | process      | overload VPN routes, and 1|           |
 |              | method       | for refusing to receive   |           |
 |              |              | VPN routes matching the   |           |
 |              |              | overload criteria.        |           |
 +--------------+--------------+---------------------------+-----------+
 | 4-7          | Unassigned   |                           |  RFC5291  |
 +--------------+--------------+---------------------------+-----------+

]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Contributor">
      <t>Shunwan Zhuang</t>

      <t>Huawei Technologies</t>

      <t>Huawei Building, No.156 Beiqing Rd.</t>

      <t>Beijing</t>

      <t>Beijing, 100095 China</t>
    </section>

    <section title="Acknowledgement">
      <t>Jeffrey Haas, Robert Raszuk, Jim Uttaro, Jakob Heitz, Jeff Tantsura,
      Rajiv Asati, John E Drake, Gert Doering, Shuanglong Chen, Enke Chen,
      Srihari Sangli and Igor Malyushkin are thanked for their valuable
      comments on This document.</t>

      <t>Thanks Qian Wang and Penglun Zhang for their development work on the
      FRR-based implementation of the technical solution described in this
      document.</t>
    </section>
  </middle>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    <section anchor="topology" title="Experimental topology">
      <t>The experimental topology is shown in Figure 6.<figure align="center">
          <artwork><![CDATA[+------------------------+             +------------------------+
|                        |             |                        |
|                        |             |                        |
| +---------+            |             |            +---------+ |
| |   PE1   |            |             |            |   PE3   | |
| +---------+            |             |            +---------+ |
|            \           |             |           /            |
|              \+---------+    EBGP   +---------+/              |
|               |         |           |         |               |
|               |  ASBR1  |-----------|  ASBR2  |               |
|               |         |           |         |               |
|               +---------+           +---------+               |
|              /         |             |         \              |
| +---------+/           |             |           \+---------+ |
| |   PE2   |            |             |            |   PE4   | |
| +---------+            |             |            +---------+ |
|                        |             |                        |
|         AS1            |             |           AS2          |
+------------------------+             +------------------------+
               Figure 6 The experimental topology
]]></artwork>
        </figure></t>

      <t>This topology can be used to verify the following:<list
          style="symbols">
          <t>whether the VPN Prefix ORF mechanism can block overload routes in
          intra-domain scenarios.</t>

          <t>whether the VPN Prefix ORF mechanism conflicts with an existing
          mechanism and causes failure.</t>

          <t>whether the quota value leads to route flapping.</t>
        </list></t>

      <t>This document is experimental in order to determine if the proposed
      mechanism could block the overload routes as expected or not, and
      whether it would cause other potential network failures or operational
      challenges. The status of the document may be changed to proposed
      standard once there is sufficient deployment experience and issues
      identified, if any, are addressed.</t>

      <t/>
    </section>

    <section title="Intra-domain Scenarios and Solutions">
      <t>This section describes the workflow of some example scenarios for
      illustrative purposes.</t>

      <section title="Scenario 1: unique RD (per VPN, per PE)">
        <t>In this scenario, PE1-PE4 and RR are iBGP peers. RD is allocated
        per VPN per PE. The overload VPN routes only carry one RT. the network
        topology is shown in Figure 7.<figure>
            <artwork><![CDATA[ +----------------------------------------------------------------+
 |    +-------+                                       +-------+   |
 |    |  PE1  +----------------+    +-----------------+  PE4  |   |
 |    +-------+                |    |                 +-------+   |
 | VPN1(RD11,RT1)              |    |              VPN2(RD12,RT2) |
 | VPN2(RD12,RT2)              |    |                             |
 |                           +-+----+-+                           |
 |                           |   RR   |                           |
 |                           +-+----+-+                           |
 |                             |    |                             |
 |                             |    |                             |
 |    +-------+                |    |                 +-------+   |
 |    |  PE2  +----------------+    +-----------------+  PE3  |   |
 |    +-------+                                       +-------+   |
 | VPN1(RD21,RT1)                                  VPN1(RD31,RT1) |
 | VPN2(RD22,RT2,RT1)                              VPN2(RD32,RT2) |
 |                                                                |
 |                             AS 100                             |
 +----------------------------------------------------------------+
              Figure 7 Network Topology of Scenario 1
]]></artwork>
          </figure></t>

        <t>When PE3 sends an excessive number of VPN routes with RT1, and both
        PE1 and PE2 import VPN routes with RT1, the process of overload VPN
        routes will influence performance of VRFs on PEs. PEs and RR need to
        have appropriate mechanisms to identify and control the advertising of
        overload VPN routes.</t>

        <t>a) PE1</t>

        <t>If no quota value is set on PE1 and each VRF on PE1 has a prefix
        limit, when PE1 receives VPN routes from its BGP peer, it performs the
        following actions:</t>

        <t><figure>
            <artwork><![CDATA[S01. If (the prefix limit for VPN1 VRF is exceeded){
S02.     PE1 sends a VPN Prefix ORF message to the 
         RR and a warning message to the operator.
         The VPN Prefix ORF message carries the 
         following parameters: RD set to RD31, RT 
         value set to RT1, and source PE set to PE3.
         The RR processes the overload VPN routes 
         and controls the number of VPN routes based
         on the value of the "Overload VPN routes 
         process method" field.
S03. } else {
S04.     PE1 does not trigger the VPN Prefix ORF 
         mechanism and only performs VPN route 
         filtering for the target VRF.
S05. }
]]></artwork>
          </figure></t>

        <t>NOTE: When the prefix limit for the VPN1 VRF is exceeded, no other
        VRFs on PE1 import VPN routes with RT1. PE1 sends a VPN Prefix ORF
        message to the RR and a warning message to the operator.</t>

        <t>If a quota is configured for each &lt;RD31, source PE3&gt; tuple
        imported into a VRF and each VRF has a prefix limit, when PE1 receives
        VPN routes from its BGP peer, it performs the following actions:</t>

        <t><figure>
            <artwork><![CDATA[S01. If (VPN routes associated with <RD31, PE3>
     tuple exceed the quota) {
S02.     If (the prefix limit of the VPN1 VRF
         is not exceeded) {
S03.         PE1 sends a warning message to the 
             operator, and the VPN Prefix ORF 
             mechanism is not triggered.
S04.     } else {
S05.         PE1 generates a BGP ROUTE-REFRESH
             message containing a VPN Prefix ORF
             entry with the parameters (RD = RD31, 
             source PE = PE3, RT = RT1), and sends
             this entry to the RR.
             The RR processes the overload VPN 
             routes based on the value of the
             "Overload VPN routes process method".
S06.     }
S07. }
]]></artwork>
          </figure></t>

        <t>b) PE2</t>

        <t>If no quota value is set on PE2 and each VRF on PE2 has a prefix
        limit, when PE2 receives VPN routes from its BGP peer, it performs the
        following actions:</t>

        <t><figure>
            <artwork><![CDATA[S01. If (the prefix limit for the VPN1 VRF is exceeded) {
S02.     If (the prefix limit for the VPN2 VRF is exceeded) {
S03.         PE2 sends a VPN Prefix ORF message to the RR and a 
             warning message to the operator. The VPN Prefix ORF
             message specifies the RD set to RD31 and the RT 
             value set to RT1. The RR processes the overload VPN
             routes and controls the number of VPN routes based
             on the value of the "Overload VPN routes process 
             method" field.
S04.     } else {
S04. } else {
S05.     PE2 does not trigger the VPN Prefix ORF mechanism and 
         only performs VPN route filtering for the target VRF.
S06. }
]]></artwork>
          </figure></t>

        <t>NOTE: PE2 does not directly trigger the VPN Prefix ORF mechanism
        when the prefix limit of the VPN1 VRF is exceeded, because the VPN2
        VRF imports VPN routes with RT1. PE2 triggers the mechanism only when
        the prefix limits for both the VPN1 and VPN2 VRFs are exceeded.</t>

        <t>If a quota is configured for each &lt;RD31, source PE3&gt; tuple
        imported into a VRF and each VRF has a prefix limit, when PE2 receives
        VPN routes from its BGP peer, it performs the following actions:</t>

        <t><figure>
            <artwork><![CDATA[S01. If (the VPN routes associated with the <RD31, PE3> tuple
     exceed the quota) {
S02.     If (the prefix limit of the VPN1 VRF is not exceeded) {
S03.         PE2 sends a warning message to the operator, and the
             VPN Prefix ORF mechanism is not triggered.
S04.     } else {
S05.         If (the prefix limit of the VPN2 VRF is not exceeded)
             {
S06.             PE2 does not trigger the VPN Prefix ORF mechanism
                 and only performs VPN route filtering for the 
                 target VPN1 VRF, stopping the import of VPN routes
                 associated with <RD31, PE3>.
S07.         } else {
S08.             PE2 generates a BGP ROUTE-REFRESH message 
                 containing a VPN Prefix ORF entry with the 
                 parameters (RD31, source PE = PE3, RTs = RT1 and 
                 RT2), and sends this entry to the RR. The RR 
                 processes the overload VPN routes based on the 
                 value of the "Overload VPN routes process method"
                 field.
S09.         }
S10.     }
S11. }
]]></artwork>
          </figure></t>

        <t/>
      </section>

      <section title="Scenario 2: the same RD (per VPN, same on all PEs)">
        <t>In this scenario, PE1-PE4 and RR are iBGP peers. RD is allocated
        per VPN. One/Multiple RTs are associated with the overload VPN routes
        and are imported into different VRFs on other PEs. The network
        topology is shown in Figure 8.<figure>
            <artwork align="center"><![CDATA[+----------------------------------------------------------------+
|                                                                |
|                                                                |
|    +-------+                                       +-------+   |
|    |  PE1  +----------------+    +-----------------+  PE4  |   |
|    +-------+                |    |                 +-------+   |
| VPN1(RD1,RT1)               |    |              VPN2(RD12,RT2) |
| VPN2(RD12,RT2)              |    |                             |
|                           +-+----+-+                           |
|                           |   RR   |                           |
|                           +-+----+-+                           |
|                             |    |                             |
|                             |    |                             |
|    +-------+                |    |                 +-------+   |
|    |  PE2  +----------------+    +-----------------+  PE3  |   |
|    +-------+                                       +-------+   |
| VPN1(RD1,RT1)                                VPN1(RD1,RT1,RT2) |
|                                              VPN2(RD32,RT2)    |
|                                                                |
|                             AS 100                             |
|                                                                |
+----------------------------------------------------------------+

              Figure 8 Network Topology of Scenario 2
]]></artwork>
          </figure></t>

        <t>When PE3 sends an excessive number of VPN routes associated with
        RD1, RT1 and RT2, and both PE1 and PE2 import VPN routes with RT1, the
        process of overload VPN routes can affect the performance of the VRFs
        on PEs.</t>

        <t>a) PE1</t>

        <t>If no quota value is set on PE1 and each VRF on PE1 has a prefix
        limit, PE1 does not directly trigger the VPN Prefix ORF mechanism when
        the prefix limit of the VPN1 VRF is exceeded, because the VPN2 VRF
        imports VPN routes with RT2. This case is similar to that of PE2
        without a quota in Scenario 1, with modifications as follows:</t>

        <t><figure>
            <artwork><![CDATA[S03.         PE1 sends a VPN Prefix ORF message to the RR and a 
             warning message to the operator. The VPN Prefix ORF
             message specifies the RD set to RD1, the RT values 
             set to RT1 and RT2, and the source PE identified as 
             PE3. The RR processes the overload VPN routes and 
             controls the number of VPN routes based on the value 
             of the "Overload VPN routes process method" field.
]]></artwork>
          </figure></t>

        <t>If a quota is configured for each &lt;RD1, source PE3&gt; tuple
        imported into a VRF and each VRF has a prefix limit, this case is
        similar to that of PE2 with a quota in Scenario 1, with modifications
        as follows:</t>

        <t><figure>
            <artwork><![CDATA[S08.             PE1 generates a BGP ROUTE-REFRESH message 
                 containing a VPN Prefix ORF entry with the 
                 parameters (RD1, source PE = PE3, RTs = RT1
                 and RT2), and sends this entry to the RR. The RR
                 processes the overload VPN routes based on the 
                 value of the "Overload VPN routes process method"
                 field.
]]></artwork>
          </figure></t>

        <t>b) PE2</t>

        <t>If no quota value is set on PE2 and each VRF on PE2 has a prefix
        limit, since only the VPN1 VRF needs to import VPN routes with RT1,
        this case is similar to that of PE1 without a quota in Scenario 1,
        with modifications as follows:</t>

        <t><figure>
            <artwork><![CDATA[S02.     PE2 sends a VPN Prefix ORF message to the RR and a 
         warning message to the operator. The VPN Prefix ORF
         message specifies the RD set to RD1, the RT values set
         to RT1 and RT2, and the source PE identified as PE3. 
         The RR processes the overload VPN routes and controls
         the number of VPN routes based on the value of the 
         "Overload VPN routes process method" field.
]]></artwork>
          </figure></t>

        <t>If a quota is configured for each &lt;RD31, source PE3&gt; tuple
        imported into a VRF and each VRF has a prefix limit, this case is
        similar to that of PE1 with a quota in Scenario 1, with modifications
        as follows:</t>

        <t><figure>
            <artwork><![CDATA[S05.         PE2 generates a BGP ROUTE-REFRESH message containing
             a VPN Prefix ORF entry with the parameters (RD1, 
             source PE = PE3, RTs = RT1 and RT2), and sends this 
             entry to the RR. The RR processes the overload VPN 
             routes based on the value of the "Overload VPN routes
             process method" field.
]]></artwork>
          </figure></t>

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

    <section title="Applicability">
      <t>Using scenario 1 in Appendix B, this section demonstrates how to
      determine each field when the sender generates a VPN Prefix ORF entry.
      Assuming an IPv4 network. When the VPN Prefix ORF mechanism is triggered
      on PE1, PE1 generates a VPN Prefix ORF entry that contains the following
      information:<list style="symbols">
          <t>AFI is equal to IPv4</t>

          <t>SAFI is equal to MPLS-labeled VPN address</t>

          <t>When-to-refresh is equal to IMMEDIATE</t>

          <t>ORF Type is equal to VPN Prefix ORF</t>

          <t>Length of ORF entries is equal to 45</t>

          <t>Action is equal to ADD</t>

          <t>Match is equal to DENY</t>

          <t>Overload VPN routes process method is equal to 0</t>

          <t>Sequence is equal to 1</t>

          <t>Length is equal to 31</t>

          <t>Route Distinguisher is equal to RD31</t>

          <t>Optional TLV:<list style="symbols">
              <t>Type is equal to 1 (Source PE TLV)</t>

              <t>Length is equal to 4</t>

              <t>value is equal to PE3's IPv4 address</t>

              <t>Type is equal to 4 (Source AS TLV)</t>

              <t>Length is equal to 4</t>

              <t>value is equal to PE3's source AS number</t>

              <t>Type is equal to 5 (Route Target TLV)</t>

              <t>Length is equal to 8</t>

              <t>value is equal to RT1</t>
            </list></t>
        </list></t>
    </section>
  </back>
</rfc>
