<?xml version='1.0' encoding='utf-8'?>
<!-- draft submitted in xml v3 -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-spaghetti-grow-downgrade-bgp-community-00" ipr="trust200902" xml:lang="en" sortRefs="true" submissionType="IETF" consensus="true" updates="" obsoletes="" symRefs="true" tocInclude="true" version="3">
  <front>
    <title abbrev="DOWNGRADE BGP Community">
      The DOWNGRADE BGP Community for Denial-of-Service Attack Mitigation
    </title>
    <author fullname="Job Snijders" initials="J." surname="Snijders">
      <organization abbrev="BSD">BSD Software Development</organization>
      <address>
        <postal>
          <postalLine>The Netherlands</postalLine>
        </postal>
        <email>job@bsd.nl</email>
        <uri>https://www.bsd.nl</uri>
      </address>
    </author>
    <author fullname="Saku Ytti" initials="S." surname="Ytti">
      <organization>NTT DATA</organization>
      <address>
        <postal>
          <postalLine>Cyprus</postalLine>
        </postal>
        <email>ytti@ntt.net</email>
        <uri>https://www.gin.ntt.net/</uri>
      </address>
    </author>
    <date/>
    <area>Operations and Management Area (OPS)</area>
    <workgroup>GROW</workgroup>
    <keyword>DDoS</keyword>
    <keyword>BGP</keyword>
    <abstract>
      <t>
        This document outlines a method to mitigate Denial of Service (DoS) attacks by using a well-known BGP community named "DOWNGRADE" as signal to neighboring networks to treat traffic destined towards "DOWNGRADE" tagged IP prefixes with low precedence.
        The "downgrade" strategy offers an appealing alternative to Remote Triggered Blackhole (RTBH) filtering, because RTBH filtering completes the DoS attack and hampers the defender's ability to monitor whether the attack is still ongoing.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>
        Denial of Service (DoS) attacks are a common occurance and effective mitigation continues to pose a challenge to network operators globally.
        The traditional approach of signaling neighboring networks to not send <em>any</em> traffic towards the IP prefix under duress poses a significant dilemma: without filtering the destination network segment as a whole suffers from attack, conversely, the use of RTBH filtering itself is an extension of the attack as it causes reachability issues for the beset destination.
        Even worse, reachability issues often persist beyond the actual attack, because RTBH filtering itself negatively impacts the defender's ability to observe the presence of attack traffic.
        From a timing perspective it is hard to use RTBH filtering with tactical precision.
      </t>
      <t>
        This document proposes an different approach, the "downgrade" strategy: rather than defenders requesting neighboring networks to discard traffic wholesale, defenders can request for deprioritization of selected traffic in the forwarding-plane.
        The goal is to protect all other packet traffic from competition with the attack volume aggregate while not completely banning attack traffic from the network.
        The approach allows networks to protect themselves from attack traffic by providing relative preferential treatment to other traffic aggregates.
      </t>
      <t>
        The aforementioned "downgrade" mitigation strategy does not fully resolve DoS attacks as the root cause remains unaddressed, but it might be a better practise than RTBH filtering.
        It should also be noted that approach relies on there being at least some unused capacity during the attack.
      </t>
      <t>
        This document specifies a standard well-known BGP community (<xref target="RFC1997"/>) value for use in the global Internet routing system, describes operational considerations for mitigating through downgrading, and for illustration purposes contains some configuration examples.
      </t>
      <section anchor="reqs-lang">
        <name>Requirements Language</name>
        <t>
          The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>
    <section anchor="community">
      <name>The DOWNGRADE Community</name>
      <t>
        This document defines the use of a new well-known BGP transitive community, <tt>DOWNGRADE</tt>.
      </t>
      <t>
        The semantics of this community allow a network to interpret the presence of this community as an advisory qualification to treat any traffic being sent towards the tagged prefix with lower precedence.
        That is, in the case of congestion, <tt>DOWNGRADE</tt> tagged traffic <bcp14>SHOULD</bcp14> be dropped prior to dropping any other traffic.
      </t>
    </section>
    <section anchor="ops">
      <name>Operational Considerations</name>
      <section>
        <name>Traffic Marking on Egress</name>
        <t>
          Operators <bcp14>SHOULD</bcp14> mark downgraded traffic with Differentiated Services Code Point (DSCP) Class Selector 1 (<tt>CS1</tt>) at the egress to the next network domain.
          Such marking can help the defender in monitoring whether a lower-effort forwarding priority was applied.
        </t>
        <t>
          The CS1 DSCP <tt>'000001'</tt> marking is also known as the Lower-Effort (LE) DSCP marking, see <xref target="RFC8622"/> for more considerations on a Lower-Effort Per-Hop Behavior (LE PHB) .
        </t>
      </section>
      <section>
        <name>Mitigation Duration</name>
        <t>
          The duration of attack mitigation measures using the aforementioned "downgrade" strategy should be proportional to the threat and <bcp14>SHOULD</bcp14> discontinued as soon as the attack has passed.
        </t>
      </section>
      <section anchor="rs">
        <name>Internet Exchange Route Server Transparency</name>
        <t>
          Internet Exchange (IX) Route Servers (RS) (<xref target="RFC7947"/>) <bcp14>SHOULD</bcp14> pass through the <tt>DOWNGRADE</tt> community transparently.
          While IX RS themselves operate in the control-plane, the peers of the RS could benefit from receiving the <tt>DOWNGRADE</tt> community.
        </t>
      </section>
      <section>
        <name>Scope of Downgrade Routes</name>
        <t>
          Similar to how IX RS ought to pass through the <tt>BLACKHOLE</tt> community (see <xref target="rs"/>), the global Internet routing system as a whole likely benefits from downgrading close to the traffic source.
          Operators <bcp14>SHOULD NOT</bcp14> remove the <tt>BLACKHOLE</tt> community from route announcements.
        </t>
      </section>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>
        DoS attacks are a pervasive long-standing issue and happen frequently in network operations.
        Traditional RTBH-based attack mitigation techniques rely on traffic discardure, which unfortunately throws the baby out with the bathwater.
        In contrast, the aforementioned "downgrade" strategy aims to reduce collatoral damage by forwarding as much traffic as possible.
      </t>
      <t>
        BGP announcements carrying the <tt>DOWNGRADE</tt> community should only be accepted and honored if the neighboring network is authorized to advertise the prefix.
        The method of validating announcements is to be chosen according to the operator's routing policy.
      </t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>
        Through this document IANA is requested to register in the "BGP Well-known Communities" registry as follows:
      </t>
      <t>
        <tt>DOWNGRADE (= 0xFFFFTBD)</tt>
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC1997" target="https://www.rfc-editor.org/info/rfc1997" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1997.xml">
          <front>
            <title>BGP Communities Attribute</title>
            <author fullname="R. Chandra" initials="R." surname="Chandra"/>
            <author fullname="P. Traina" initials="P." surname="Traina"/>
            <author fullname="T. Li" initials="T." surname="Li"/>
            <date month="August" year="1996"/>
            <abstract>
              <t>This document describes an extension to BGP which may be used to pass additional information to both neighboring and remote BGP peers. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="1997"/>
          <seriesInfo name="DOI" value="10.17487/RFC1997"/>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC7947" target="https://www.rfc-editor.org/info/rfc7947" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7947.xml">
          <front>
            <title>Internet Exchange BGP Route Server</title>
            <author fullname="E. Jasinska" initials="E." surname="Jasinska"/>
            <author fullname="N. Hilliard" initials="N." surname="Hilliard"/>
            <author fullname="R. Raszuk" initials="R." surname="Raszuk"/>
            <author fullname="N. Bakker" initials="N." surname="Bakker"/>
            <date month="September" year="2016"/>
            <abstract>
              <t>This document outlines a specification for multilateral interconnections at Internet Exchange Points (IXPs). Multilateral interconnection is a method of exchanging routing information among three or more External BGP (EBGP) speakers using a single intermediate broker system, referred to as a route server. Route servers are typically used on shared access media networks, such as IXPs, to facilitate simplified interconnection among multiple Internet routers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7947"/>
          <seriesInfo name="DOI" value="10.17487/RFC7947"/>
        </reference>
        <reference anchor="RFC8622" target="https://www.rfc-editor.org/info/rfc8622" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8622.xml">
          <front>
            <title>A Lower-Effort Per-Hop Behavior (LE PHB) for Differentiated Services</title>
            <author fullname="R. Bless" initials="R." surname="Bless"/>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document specifies properties and characteristics of a Lower- Effort Per-Hop Behavior (LE PHB). The primary objective of this LE PHB is to protect Best-Effort (BE) traffic (packets forwarded with the default PHB) from LE traffic in congestion situations, i.e., when resources become scarce, BE traffic has precedence over LE traffic and may preempt it. Alternatively, packets forwarded by the LE PHB can be associated with a scavenger service class, i.e., they scavenge otherwise-unused resources only. There are numerous uses for this PHB, e.g., for background traffic of low precedence, such as bulk data transfers with low priority in time, non-time-critical backups, larger software updates, web search engines while gathering information from web servers and so on. This document recommends a standard Differentiated Services Code Point (DSCP) value for the LE PHB.</t>
              <t>This specification obsoletes RFC 3662 and updates the DSCP recommended in RFCs 4594 and 8325 to use the DSCP assigned in this specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8622"/>
          <seriesInfo name="DOI" value="10.17487/RFC8622"/>
        </reference>
      </references>
    </references>
    <!--
    <section anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>
        The authors wish to thank <contact fullname="..."/>,
        <contact fullname="..."/>,
        and
        <contact fullname="..."/>
        for their review and feedback.
      </t>
    </section>
-->

    <section anchor="examples">
      <name>Configuration Examples</name>
      <t>
        This section contains configuration examples for a number of commonly used networking and telecommunications equipment manufacturers to illustrate how matching on a BGP community can be used to lower priority in the forwarding-plane.
      </t>
      <t>
        For the sake of brevity, these examples omit configuration stanzas for setting LE DSCP <tt>'000001'</tt> on network domain egress.
      </t>
      <section toc="exclude">
        <name>HPE Juniper Junos</name>
        <sourcecode type="pseudocode" originalSrc="nos/junos.txt">&lt;CODE BEGINS&gt;

forwarding-options {
    family inet {
        filter {
            output ff-qppb-v4;
        }
    }
    family inet6 {
        filter {
            output ff-qppb-v6;
        }
    }
}

routing-options {
    forwarding-table {
        export [ ft-qppb ];
    }
}

policy-options {
   community downgrade members 65535:TBD;  ## FIXME TBD IANA
   policy-statement ft-qppb {
       term qppb-le {
           from community downgrade;
           then {
               destination-class qppb-le;
               accept;
           }
       }
       term rest {
           then {
               accept;
           }
       }
   }
}

firewall {
    family inet {
        filter ff-qppb-v4 {
            term dcu {
                from {
                    destination-class qppb-le;
                }
                then {
                    forwarding-class le;
                    accept;
                }
            }
            term rest {
                then {
                    accept;
                }
            }
        }
    }
    family inet6 {
        filter ff-qppb-v6 {
            term dcu {
                from {
                    destination-class qppb-le;
                }
                then {
                    forwarding-class le;
                    accept;
                }
            }
            term rest {
                then {
                    accept;
                }
            }
        }
    }
}

&lt;CODE ENDS&gt;
</sourcecode>
      </section>
      <section toc="exclude">
        <name>Nokia SR-OS</name>
        <sourcecode type="pseudocode" originalSrc="nos/sros.txt">&lt;CODE BEGINS&gt;

configure {
    policy-options {
        community "downgrade" {
            member "65535:TBD"  ## FIXME TBD IANA
        }
    }
    policy-statemeent "bgp-in" {
        entry 100 {
            from {
                community {
                    name "downgrade"
                }
            }
            action {
                action-type next-entry
                fc l2
                priority low
            }
        }
    }
}

&lt;CODE ENDS&gt;
</sourcecode>
      </section>
      <section toc="exclude">
        <name>Cisco IOS-XR</name>
        <sourcecode type="pseudocode" originalSrc="nos/iosxr.txt">&lt;CODE BEGINS&gt;

community-set downgrade
  65535:TBD  ## FIXME TBD IANA
end-set
!
route-policy qppb-v4
  if community matches-any downgrade then
    set qos-group 1
  else
    pass
  endif
end-policy
!
route-policy qppb-v6
  if community matches-any downgrade then
    set qos-group 1
  else
    pass
  endif
end-policy
!
router bgp ASN
 address-family ipv4 unicast
  table-policy qppb-v4
 !
 address-family ipv6 unicast
  table-policy qppb-v6
 !
!

&lt;CODE ENDS&gt;
</sourcecode>
      </section>
    </section>
  </back>
</rfc>
