<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!DOCTYPE rfc [
        <!ENTITY nbsp    "&#160;">
        <!ENTITY zwsp   "&#8203;">
        <!ENTITY nbhy   "&#8209;">
        <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902" submissionType="IETF" category="bcp" obsoletes="7454" consensus="true" version="3" docName="draft-ietf-grow-bgpopsecupd-15">
    <front>
        <title abbrev="BGP OPSEC">BGP Operations and Security</title>
        <seriesInfo name="Internet-Draft" status="standard" value="draft-ietf-grow-bgpopsecupd-15"/>
        <author fullname="Tobias Fiebig" initials="T." surname="Fiebig">
            <organization abbrev="MPI-INF">Max-Planck-Institut fuer Informatik</organization>
            <address>
                <postal>
                    <street>Campus E14</street>
                    <city>Saarbruecken</city>
                    <code>66123</code>
                    <country>Germany</country>
                </postal>
                <phone>+49 681 9325 3527</phone>
                <email>tfiebig@mpi-inf.mpg.de</email>
            </address>
        </author>
        <author fullname="Nick Hilliard" initials="N." surname="Hilliard">
            <organization abbrev="INEX">Internet Neutral Exchange Association</organization>
            <address>
                <postal>
                    <street>4027 Kingswood Road</street>
                    <city>Citywest, Dublin</city>
                    <code>D24 AX96</code>
                    <country>Ireland</country>
                </postal>
                <phone>+353 1 433 205 2</phone>
                <email>nick@inex.ie</email>
            </address>
        </author>
        <area>ops</area>
        <workgroup>Global Routing Operations</workgroup>

        <abstract>
            <t>
                The Border Gateway Protocol (BGP) is a critical component in the Internet to exchange routing information between network domains.
                It is important to understand the security and reliability requirements that can and should be met to prevent accidental or intentional routing disturbances.
            </t>
            <t>
                Previously, security considerations for BGP have been described in RFC7454 / BCP194.
                Since the publication of RFC7454, changes in operational practice have taken place, which are partially conflicting with the advice given in RFC7454.
                This document obsoletes RFC7454, and provides less implementation-specific best practices, with the goal of being less prone to becoming outdated or conflicting with changed operational practices.
            </t>
        </abstract>
    </front>

    <middle>
        <section  anchor="sec-introduction">
            <name>Introduction</name>
            <t>
                The Border Gateway Protocol (BGP), specified in <xref target="RFC4271" format="default"/>, is the protocol used in the Internet to exchange routing information between network domains.
                BGP does not directly include mechanisms that control whether the routes exchanged conform to the various guidelines defined by the Internet community.
                Furthermore, the BGP protocol itself, by its design, does not have any direct way to protect itself against threats to confidentiality, integrity, and availability.
            </t>
            <t>
                This document summarizes security properties and requirements when operating BGP for securing the infrastructure as well as security considerations regarding the exchanged routing information.
                Operators are advised to consult documentation and contemporary informational documents concerning methods to ensure that these properties are sufficiently ensured in their network.
            </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>
        </section>

        <section  anchor="sec-scope-of-the-document">
            <name>Scope of the Document</name>
            <t>
                The guidelines defined in this document are intended for BGP when used to exchange generic Internet routing information within the Default-Free Zone (DFZ).
                It specifically does not cover other uses of BGP, e.g., when using BGP for exchanging routes in a data-center context, or other use-cases when using BGP without globally unique identifiers between networks.
                This document does not specify how the outlined requirements and properties can be technically realized at a specific point in time.
                Instead, operators are advised to consult applicable documentation and contemporary informational documents describing implementation specifics (e.g., <xref target="I-D.ietf-grow-routing-ops-sec-inform" format="default"/> and <xref target="I-D.ietf-grow-routing-ops-terms" format="default"/>).
            </t>
        </section>
        <section  anchor="sec-protection-of-the-bgp-speaker">
            <name>Protection of the BGP Speaker and Session</name>

            <t>
                The BGP speaker, i.e., the node running BGP to exchange routing information, needs to be protected from external attempts to impact integrity or availability of the BGP session and the node.
            </t>

            <section  anchor="sec-protection-of-the-bgp-speaker-net">
                <name>Protecting the BGP Session</name>
                <t>
                    To protect a BGP speaker on the network layer, an operator <bcp14>MUST</bcp14> ensure the following properties using technical or organizational measures:
                </t>
                <ul spacing="normal">
                    <li>
                        Prevent off-path attackers from injecting BGP messages into existing sessions.
                    </li>
                    <li>
                        Prevent off-path attackers from interrupting existing sessions.
                    </li>
                    <li>
                        Prevent off-path attackers from preventing the establishment of new sessions.
                    </li>
                    <li>
                        Prevent remote systems from overwhelming the BGP speaker by sending large volumes of unsolicited packets or BGP messages.
                    </li>
                    <li>
                        Ensure that unstable sessions do not threaten the availability of BGP speakers within the network.
                    </li>
                </ul>
                <t>
                    Example technologies to accomplish this include GTSM/TTL-security <xref target="RFC5082" format="default"/>, BGP-MD5 / TCP-AO <xref target="RFC5925" format="default"/>, limiting traffic to the control plane via Control Plane Policing (CoPP), and setting maximum prefix limits for the number of prefixes a neighbor may send.
                    When implementing prefix limits, operators <bcp14>SHOULD</bcp14> be aware of the operational implications of exceeding prefix limits, i.e., a loss of an established session.
                    Hence, operators <bcp14>SHOULD</bcp14> appropriately weigh this impact within the specific operational circumstances, and ensure appropriate prefix limits to not cause outages under normal operations.
                </t>

            </section>

            <section  anchor="sec-protection-of-the-bgp-speaker-mgmt">
                <name>Protecting the Management Interface of the BGP Speaker</name>

                <t>
                    In addition to the control plane / exchange of BGP protocol messages, the management plane of BGP speakers must be appropriately secured.
                    Hence, operators <bcp14>MUST</bcp14> ensure that:
                </t>

                <ul spacing="normal">
                    <li>
                        No unauthorized third-parties can obtain access or connect to the management interface of a BGP speaker in a way that impacts confidentiality, integrity, or availability.
                    </li>
                    <li>
                        External activity towards the management interface does not interfere with the integrity or availability of BGP sessions.
                    </li>
                </ul>

            </section>

        </section>
        <section  anchor="sec-nlri-filtering">
            <name>Route Filtering</name>
            <t>
                The purpose of BGP is to exchange routing information.
                Importing or exporting incorrect or malicious routes is a security risk for receiving networks and may threaten connected and/or remote networks.
                As such, operators <bcp14>MUST</bcp14> ensure the following properties when importing or exporting routing information from their neighbors.
            </t>
            <section  anchor="sec-importing-nlri">
                <name>Importing BGP Routes</name>
                <t>
                    When importing BGP routes from a neighbor, an operator <bcp14>MUST</bcp14> ensure that all imported routes conform to the following properties by implementing technical or organizational measures:
                </t>
                <ul spacing="normal">
                    <li>
                        The AS originating BGP routes for a prefix <bcp14>MUST</bcp14> be globally authorized to originate that prefix. Operators <bcp14>MAY</bcp14> deviate from this for default routes (::/0 and 0.0.0.0/0), if they granted the specific neighbor permission to announce default routes towards them.
                        Operators are cautioned to evaluate carefully how accepting a default route affects their network, as this occludes limitations in forwarding coverage by the upstream from which the default route was received.
                    </li>
                    <li>
                        For received BGP routes with an AS_PATH = {AS1, AS2, ..., ASn}, where AS1 is the neighbor that sent the UPDATE and ASn is the originator, for each k in 1..n−1, AS(k+1) <bcp14>MUST</bcp14> be authorized to export the BGP routes to ASk according to their bilateral routing policy (e.g., provider–customer, peer, or lateral-peer).
                    </li>
                    <li>
                        The AS_PATH <bcp14>MUST NOT</bcp14> contain AS numbers reserved for private <xref target="RFC6996" format="default"/> or special-use cases, except for those AS numbers explicitly dedicated to a special-use that requires their presence in the global routing table <xref target="IANAASNSpec" format="default"/>.
                    </li>
                    <li>
                        The length of the AS_PATH for a received BGP routes <bcp14>MUST NOT</bcp14> exceed the maximum length supported by the local router.
                    </li>
                    <li>
                        The number of transitive BGP attributes, e.g., BGP communities <xref target="RFC1997" format="default"/>, extended BGP communities <xref target="RFC4360" format="default"/>, or Large BGP communities <xref target="RFC8092" format="default"/> attached to a received NLRI <bcp14>MUST NOT</bcp14> exceed the maximum supported by the local router.
                    </li>
                    <li>
                        The number of BGP routes received from a neighbor <bcp14>MUST NOT</bcp14> exceed the resources of the local router.
                    </li>
                </ul>
            </section>
            <section  anchor="sec-exporting-nlri">
                <name>Originating and Propagating BGP Routes</name>
                <t>
                    When originating or propagating BGP routes, an operator <bcp14>MUST</bcp14> ensure that all BGP routes they export conform to the following properties by implementing technical or organizational measures:
                </t>
                <ul spacing="normal">
                    <li>
                        The propagating AS <bcp14>MUST</bcp14> be authorized to propagate BGP routes for the specific prefix when received from the AS directly to its right in the AS_PATH. Additionally, each AS in the AS_PATH not originating the prefix <bcp14>MUST</bcp14> be authorized to propagate the prefix when receiving it from the next AS to its right.
                    </li>
                    <li>
                        The AS originating BGP routes for a prefix <bcp14>MUST</bcp14> be globally authorized to originate that prefix. Operators <bcp14>MAY</bcp14> deviate from this for default routes (::/0 and 0.0.0.0/0), if they originate the default route and the specific neighbor granted them permission to announce default routes towards them.
                    </li>
                    <li>
                        The AS_PATH <bcp14>MUST NOT</bcp14> contain AS numbers reserved for private <xref target="RFC6996" format="default"/> or special-use cases, except for those AS numbers explicitly dedicated to a special-use that requires their presence in the global routing table <xref target="IANAASNSpec" format="default"/>.
                    </li>
                </ul>
            </section>
            <section  anchor="sec-handling-nlri">
                <name>Altering BGP Routes</name>
                <t>
                    When processing BGP routes, an operator <bcp14>MUST</bcp14> ensure that the basic properties of these routes are not altered:
                </t>
                <ul spacing="normal">
                    <li>
                        An operator <bcp14>SHOULD NOT</bcp14> change or remove immutable transitive BGP attributes, e.g., ORIGIN as per <xref target="RFC4271" format="default"/>.
                        In selected cases, if a specific attribute is known to be malicious, an operator <bcp14>MAY</bcp14> either remove that specific attribute from the BGP routes when importing them or filter the routes carrying the attribute.
                        Transitivity of attributes unknown to an operator cannot be established.
                        Treating such attributes as immutable enables incremental deployment of new BGP features, while processing unknown attributes may harm availability if the eBGP speakers used by an operator are unable to handle the attribute safely.
                        Hence, operators <bcp14>SHOULD</bcp14> carefully assess the tradeoff between incremental deployment and BGP security for their network.
                    </li>
                    <li>
                        Routes carried by BGP <bcp14>MUST NOT</bcp14> carry RPKI validation states in transitive BGP path attributes <xref target="I-D.ietf-sidrops-avoid-rpki-state-in-bgp" format="default"/>.
                    </li>
                </ul>
            </section>
        </section>

        <section  anchor="sec-iana-considerations">
            <name>IANA Considerations</name>
            <t>
                This document does not require any IANA actions.
            </t>
        </section>
        <section  anchor="sec-security-considerations">
            <name>Security Considerations</name>
            <t>
                This document is entirely about BGP operational security.
                It lists requirements and properties operators <bcp14>MUST</bcp14> ensure using technical or organizational measures when operating BGP routers in the DFZ.
            </t>
        </section>
    </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://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6996.xml"/>
                <reference anchor="IANAASNSpec" target="https://www.iana.org/assignments/iana-as-numbers-special-registry/iana-as-numbers-special-registry.xhtml">
                  <front>
                    <title>Special-Purpose Autonomous System (AS) Numbers</title>
                    <author>
                      <organization>IANA</organization>
                    </author>
                  </front>
                </reference>
            </references>
            <references>
                <name>Informative References</name>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1997.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4360.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5082.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5925.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7454.xml"/>
                <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8092.xml"/>
                <reference anchor="I-D.ietf-grow-routing-ops-sec-inform" target="https://datatracker.ietf.org/doc/draft-ietf-grow-routing-ops-sec-inform/">
                    <front>
                        <title>Current Options for Securing Global Routing</title>
                        <author fullname="Tobias Fiebig" initials="T." surname="Fiebig">
                            <organization abbrev="MPI-INF">Max-Planck-Institut fuer Informatik</organization>
                        </author>
                        <date month="April" day="9" year="2025"/>
                    </front>
                    <seriesInfo name="Internet-Draft" value="draft-ietf-grow-routing-ops-sec-inform"/>
                </reference>
                <reference anchor="I-D.ietf-grow-routing-ops-terms" target="https://datatracker.ietf.org/doc/draft-ietf-grow-routing-ops-terms/">
                    <front>
                        <title>Currently Used Terminology in Global Routing Operations</title>
                        <author fullname="Tobias Fiebig" initials="T." surname="Fiebig">
                            <organization abbrev="MPI-INF">Max-Planck-Institut fuer Informatik</organization>
                        </author>
                        <date month="April" day="9" year="2025"/>
                    </front>
                    <seriesInfo name="Internet-Draft" value="draft-ietf-grow-routing-ops-terms"/>
                </reference>
                <reference anchor="I-D.ietf-sidrops-avoid-rpki-state-in-bgp" target="https://datatracker.ietf.org/doc/draft-ietf-sidrops-avoid-rpki-state-in-bgp/">
                    <front>
                        <title>Guidance to Avoid Carrying RPKI Validation States in Transitive BGP Path Attributes</title>
                        <author initials="J." surname="Snijders" fullname="Job Snijders">
                            <organization>Fastly</organization>
                        </author>
                        <author initials="T." surname="Fiebig" fullname="Tobias Fiebig">
                            <organization>MPI-INF</organization>
                        </author>
                        <author initials="M. A." surname="Stucchi" fullname="Massimiliano Stucchi">
                            <organization>AS58280.net</organization>
                        </author>
                        <date month="October" day="3" year="2024"/>
                    </front>
                    <seriesInfo name="Internet-Draft" value="draft-ietf-sidrops-avoid-rpki-state-in-bgp"/>
                </reference>
            </references>
        </references>
        <section anchor="acknowledgements" numbered="false" toc="default">
            <name>Acknowledgements</name>
            <t>
                This document has been originally based on <xref target="RFC7454" format="default"/> and we thank the original authors for their work.
            </t>
            <t>
                We thank the following people for reviewing this draft and suggesting changes:
            </t>
            <ul spacing="normal">
                <li>
                    Gert Doerring
                </li>
                <li>
                    Jeff Haas
                </li>
                <li>
                    Geng Nan
                </li>
                <li>
                    Martin Pels
                </li>
                <li>
                    Job Snijders
                </li>
                <li>
                    Berislav Todorovic
                </li>
                <li>
                    Linda Dunbar
                </li>
                <li>
                    Wolfgang Tremmel
                </li>
                <li>
                    Florian Obser
                </li>
                <li>
                    Ben Maddison
                </li>
                <li>
                    Mohamed Boucadair
                </li>
                <li>
                    Tom Petch
                </li>
            </ul>
        </section>
    </back>
</rfc>
