<?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-14">
    <front>
        <title abbrev="BGP OPSEC">BGP Operations and Security</title>
        <seriesInfo name="Internet-Draft" status="standard" value="draft-ietf-grow-bgpopsecupd-14"/>
        <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.
                Due to this central nature, 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 publications of RFC7454, several developments and changes in operational practice took place that warrant an update of these best current practices.
                This document obsoletes RFC7454, focusing on the overall goals, and providing a less implementation centric set of best practices.
            </t>
            <t>
                This document describes security requirements and goals when operating BGP for exchanging routing information with other networks, and explicitly does not focus on specific technical implementations and requirements.
            </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 for security considerations regarding the exchanged routing information.
                The document explicitly does not focus on specific technical implementations and requirements.
                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 NLRI exchange 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 taint integrity or availability of the BGP session and node alike.
            </t>

            <section  anchor="sec-protection-of-the-bgp-speaker-net">
                <name>BGP Session Protection</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.
                    Please note, though, that limiting the number of permissible prefixes a neighbor may send may also introduce stability issues, if that number is set too low for the corresponding neighbor.
                </t>

            </section>

            <section  anchor="sec-protection-of-the-bgp-speaker-mgmt">
                <name>BGP Speaker Management Interface Protection</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 allows tainting 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>NLRI Filtering</name>
            <t>
                The purpose of BGP is exchanging routing information, i.e., NLRI.
                Importing or exporting incorrect or malicious NLRI is a security risk for networks themselves, but may also form a threat for 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 NLRI</name>
                <t>
                    When importing NLRI from a neighbor, an operator <bcp14>MUST</bcp14> ensure that all imported NLRI conform to the following properties by implementing technical or organizational measures:
                </t>
                <ul spacing="normal">
                    <li>
                        The AS originating NLRI 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.
                        Operaters 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 NLRI 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 NLRI 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 AS_PATH for a received NLRI <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 NLRI 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 Redistributing NLRI</name>
                <t>
                    When originating NLRI or redistributing NLRI received from a neighbor, an operator <bcp14>MUST</bcp14> ensure that all NLRI they export conform to the following properties by implementing technical or organizational measures:
                </t>
                <ul spacing="normal">
                    <li>
                        The redistributing AS <bcp14>MUST</bcp14> be authorized to redistribute NLRI 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 redistribute the prefix when receiving it from the next AS to its right.
                    </li>
                    <li>
                        The AS originating NLRI 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 NLRI</name>
                <t>
                    When processing NLRI, an operator <bcp14>MUST</bcp14> ensure that basic properties of these NLRI 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 temporarily remove that specific attribute from NLRI when importing them or filter NLRI carrying the attribute.
                        If an attribute is unknown to the operator it <bcp14>MUST</bcp14> be considered immutable.
                    </li>
                    <li>
                        NLRI carried on BGP <bcp14>MUST NOT</bcp14> be enriched with transitive attributes subject to change independent of the underlying NLRI, e.g., encoding RPKI validation state in transitive 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>
            </ul>
        </section>
    </back>
</rfc>
