<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.39 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-zhang-sidrops-aspa-egress-01" category="std" consensus="true" submissionType="IETF" version="3">
  <!-- xml2rfc v2v3 conversion 3.18.0 -->
  <front>
    <title abbrev="ASPA-based AS_PATH Verification for BGP Export">ASPA-based AS_PATH Verification for BGP Export</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-zhang-sidrops-aspa-egress-01"/>
   

    <author initials="J." surname="Zhang" fullname="Jia Zhang">
        <organization>Zhongguancun Laboratory</organization>
        <address>
          <postal>
            <city>Beijing</city>
            <country>China</country>
          </postal>
          <email>zhangj@mail.zgclab.edu.cn</email>
        </address>
      </author>
   


    <date year="2025"/>
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>Operations and Management Area (OPS)</area>
    <workgroup>SIDR Operations Working Group</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is 
          not present, the default is "Network Working Group", which is used by the RFC Editor as 
          a nod to the history of the RFC Series. -->

    <keyword>BGP</keyword>
    <keyword>ASPA</keyword>
    <keyword>Route leak</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This document describes that a BGP speaker may perform AS_PATH verification on the routes it sends to BGP neighbors at external BGP (eBGP) egress 
        based on Autonomous System Provider Authorization (ASPA) objects in the Resource Public Key Infrastructure (RPKI). Before BGP speakers advertise 
        routes to external peers at eBGP egress, performing ASPA-based AS_PATH verification can prevent route leaks to external peers.</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
        <t>Autonomous System Provider Authorization (ASPA) objects in the RPKI can be used to verify BGP AS_PATH for detection and mitigation of route leaks 
            and certain prefix hijacks involving forged origins or forged path-segments with some improbable AS paths. The ASPA object profile is defined in <xref target="I-D.ietf-sidrops-aspa-profile"/>. </t>

        <t> In the procedures of ASPA-based BGP AS_PATH verification defined in <xref target="I-D.ietf-sidrops-aspa-verification"/>, ingress external BGP (eBGP) router of 
            an AS receives routes from its BGP peers, and perform ASPA-based BGP AS_PATH verification and mitigation at eBGP ingress, as recomendations 
            specified in Section 8.1 in <xref target="I-D.ietf-sidrops-aspa-verification"/>. BGP AS_PATH verification at eBGP ingress can detect and 
            prevent the route leaks in the routes received from BGP neighbors, but route leaks could occur at the local AS where a BGP speaker 
            exports routes to its external peer at eBGP egress. It lacks the ability to prevent route leaks from occuring at the local AS.</t>
        
        <t>This document describes ASPA-based BGP AS_PATH verification at eBGP egress. It does not change the semantics or procedures of ASPA-based BGP AS_PATH 
            verification defined in <xref target="I-D.ietf-sidrops-aspa-verification"/>. It explains an important use case and specifics of correct implementation 
            of ASPA-based path verification in eBGP egress policies, as <xref target="RFC8893"/> did with RPKI origin validation for BGP export.
            ASPA-based BGP AS_PATH verification at eBGP egress is a little bit 
            different from the process at the eBGP ingress. By AS_PATH verification before sending routes to BGP neighbors at eBGP egress, a BGP speaker 
            can detect and prevent imporper route propagation of route leaks.</t>
      
      <section>
        <name>Requirements Language</name>
        <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>
      <!-- [CHECK] The 'Requirements Language' section is optional -->
    </section>
    
  <section>
    <name>Suggested Reading</name>
    <t>
      It is assumed that the reader understands BGP<xref target="RFC4271"/>, RPKI<xref target="RFC6480"/>,  
      ASPA object profile<xref target="I-D.ietf-sidrops-aspa-profile"/>, 
      ASPA-based BGP AS_PATH verification<xref target="I-D.ietf-sidrops-aspa-verification"/>, and RPKI-ROV for BGP export<xref target="RFC8893"/>.
    </t>
  </section>

    <section>
      <name> ASPA-based AS_PATH Verification at eBGP Egress</name>

      <t>When a BGP speaker advertises a route to an external peer through eBGP egress, the BGP speaker prepends its own AS number to the AS_PATH of 
        the route, and performs ASPA-based AS_PATH verification before sending the route to the external peer. </t>

      <section>
        <name>Procedure of Verification</name>
        <t>Suppose the BGP speaker is at AS X, and its external peer is at AS Y, and the AS_PATH P of the route to be advertised to external peer 
            by the BGP speaker is represented by {AS X, AS(N), ..., AS(2), AS(1)},  where AS(1) is the origin AS, and AS X is the local AS number 
            added by the BGP speaker of AS X at eBGP egress. </t>
        <figure anchor="fig1" align="left" suppress-title="false" pn="figure-1">
            <name slugifiedName="secnario">Illustration of the eBGP egress.</name>
            <artwork align="left" name="" type="" alt="">
    <![CDATA[
                        +------------------------+              
                        |          AS X          |              
                        |                        |              
        +-------+  eBGP |  +----+  iBGP  +----+  | eBGP  +--------+
        | AS(N) |-------->>| R1 |------>>| R2 |-------->>|  AS Y  |
        +-------+       |  +----+        +----+ \|       +--------+
                        |                        \                         
                        +------------------------+\              
                                                   \ eBGP egress         
    ]]>
    </artwork>
          </figure>   
        
        
        <t>The method of ASPA-based AS_PATH verification at the eBGP egress of the BGP speaker is described as follows:</t>

        <t>1. Regard the external neighbor AS Y as the virtual receiving/validating AS point. </t>

        <t>2. The BGP roles of AS X and AS Y, including Customer, Provider, Route Server (RS), Route Server Client (RS-client) and Peer, are defined in <xref target="RFC9234"/>, and they can be 
            configured locally and used for the path verification.</t>

        <t>3. If AS X is the Customer or Peer to AS Y, or, AS Y is a (transparent or non-transparent) Route Server (RS) and AS X is a RS-client, 
            use the upstream path verification algorithm (described in <xref target="I-D.ietf-sidrops-aspa-verification"/>) to verify the AS_PATH P. </t>

        <t>4. If AS X is the Provider to AS Y, use the downstream path verification algorithm (described 
            in <xref target="I-D.ietf-sidrops-aspa-verification"/>) to verify the AS_PATH P.</t>
            
            
      </section>

      <section>
        <name>Scenarios that do not require egress verification</name>
        <t>In some scenarios, there is no requirement to perform egress ASPA-based path verification.</t>

        <t>1. Mutual-transit. If the relation between two ASes is mutual-transit, they MAY export all kinds of routes to 
            each other (<xref target="I-D.ietf-sidrops-aspa-verification"/>). There is no route leak violating valley-free route policy.</t>
             
        <t>2. A Route Server exports to a RS-client. The functionality of a Route Server is to exchange routes among member ASes at an Internet Exchange Provider (IXP) 
            according to pre-configured rules. The responsibility of route leak happened at an IXP is at member ASes, not at Route Servers. Therefore, 
            there is no need to do path verification at RS egress,  regardless of whether the RS is a transparent RS or a non-transparent RS. Additionally, 
            even if verification is performed at the egress, as shown in  <xref target="fig2"/>, both the egress and ingress verification are upstream. 
            Therefore, if the verification result at the ingress is not "Invalid", the verification result at the egress should also not be "Invalid". 
            Therefore, ASPA verification is not performed at the egress of the Route Server to the RS-client.</t>
            <figure anchor="fig2" align="left" suppress-title="false" pn="figure-2">
                <name slugifiedName="RS">The verification at both the egress and ingress are upstream.</name>
                <artwork align="left" name="" type="" alt="">
        <![CDATA[
RS Client              RS                                   RS Client 
  AS(N)     ->        AS X                 ->                 AS Y 
                        |                                       |
                        |                                       |
     +-----------------------------------------+    +-----------------------+
     |   R1(Ingress) -IBGP->  R2(Egress)       |    |       R3(Ingress)     |
     +-----------------|-----------------------+    +-----------------------+
     |     AS_PATH     |       AS_PATH         |    |        AS_PATH        |
     | AS(N) ... AS(1) | AS X  AS(N) ... AS(1) |    | AS X  AS(N) ... AS(1) |
     +-----------------|-----------------------+    +-----------------------+
     |    Upstream     |        Upstream       |    |        Upstream       |
     +-----------------------------------------+    +-----------------------+
        ]]>
        </artwork>
              </figure>  
      </section>
    </section>

    <section anchor="operation">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Operational Considerations</name>
      <t>
         The peering relationships between the local AS and its external neighbor ASes, including Customer-Provider/Provider-Customer, Peer-Peer, 
         Route Server (RS) and RS-client, mutual-transit, are used in path verification procedures to determine whether upstream or downstream procedures 
         should be applied. There are the following possible ways to know the relations between the local AS and its external neighbor AS: (1) The first way 
         is to use the BGP Role Capabilities exchanged in the BGP OPEN message as specified in <xref target="RFC9234"/>. (2) The second way is to use ASPA objects 
         registered by the local AS and its external neighbor AS. (3) Another possible way is to use local configuration. When the relation of two neighboring 
         ASes is mutual-transit, they are Customers of each other in BGP roles. It can be confirmed by BGP roles advertised in the BGP OPEN message, or 
         configuration in local file. If a mutual-transit relation is identified as Cutomer-Provider, a false positive of route leak may be generated in path 
         verification.
      </t>
    </section>


    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>
        The security considerations that apply to ASPA-based AS_PATH verification (see <xref target="I-D.ietf-sidrops-aspa-verification"/>) also apply to 
        the procedure described in this document.
      </t>
    </section>

    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>This document has no IANA actions</t>
    </section>
    

    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6480.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4271.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8893.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9234.xml"/>
        

        <!-- The recommended and simplest way to include a well known reference -->

      </references>
 
      <references>
        <name>Informative References</name>
        <reference anchor="I-D.ietf-sidrops-aspa-profile" target="https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-profile-18">
        <front>
        <title>A Profile for Autonomous System Provider Authorization</title>
        <author initials="A." surname="Azimov" fullname="Alexander Azimov">
        <organization>Yandex</organization>
        </author>
        <author initials="E." surname="Uskov" fullname="Eugene Uskov">
        <organization>JetLend</organization>
        </author>
        <author initials="R." surname="Bush" fullname="Randy Bush">
        <organization>Internet Initiative Japan</organization>
        </author>
        <author initials="J." surname="Snijders" fullname="Job Snijders">
        <organization>Fastly</organization>
        </author>
        <author initials="R." surname="Housley" fullname="Russ Housley">
        <organization>Vigil Security, LLC</organization>
        </author>
        <author initials="B." surname="Maddison" fullname="Ben Maddison">
        <organization>Workonline</organization>
        </author>
        <date month="June" day="25" year="2024"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-aspa-profile-18"/>
        </reference>


        <reference anchor="I-D.ietf-sidrops-aspa-verification" target="https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-aspa-verification-18">
        <front>
        <title>BGP AS_PATH Verification Based on Autonomous System Provider Authorization (ASPA) Objects</title>
        <author initials="A." surname="Azimov" fullname="Alexander Azimov">
        <organization>Yandex</organization>
        </author>
        <author initials="E." surname="Bogomazov" fullname="Eugene Bogomazov">
        <organization>Qrator Labs</organization>
        </author>
        <author initials="R." surname="Bush" fullname="Randy Bush">
        <organization>Internet Initiative Japan &amp; Arrcus, Inc.</organization>
        </author>
        <author initials="K." surname="Patel" fullname="Keyur Patel">
        <organization>Arrcus</organization>
        </author>
        <author initials="J." surname="Snijders" fullname="Job Snijders">
        <organization>Fastly</organization>
        </author>
        <author initials="K." surname="Sriram" fullname="Kotikalapudi Sriram">
        <organization>USA National Institute of Standards and Technology</organization>
        </author>
        <date month="February" day="29" year="2024"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-aspa-verification-17"/>
        </reference>
      
      </references>
    </references>
    
    
    <!--
    <section>
      <name>Appendix 1 [REPLACE/DELETE]</name>
      <t>This becomes an Appendix [REPLACE]</t>
    </section>
    -->

<!--
    <section anchor="Acknowledgements" numbered="false"> -->
      <!-- [REPLACE/DELETE] an Acknowledgements section is optional -->
<!--      <name>Acknowledgements</name>
      <t>This template uses extracts from templates written by Pekka Savola, Elwyn Davies and 
        Henrik Levkowetz. [REPLACE]</t>
    </section>
    -->

 <!--     <section anchor="Contributors" numbered="false">-->
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
 <!--     <name>Contributors</name>
      <t>Thanks to all of the contributors. [REPLACE]</t>-->
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
  <!--   </section>
-->


 </back>
</rfc>
