Security

DDoS mitigation with the network's own tools: blackholing and BGP FlowSpec

A volumetric attack hits not only the target but also the links in front of it. Routing itself provides two tools: blackholing discards all traffic to an address, FlowSpec filters more selectively. Both have to be set up before the attack begins.

MateoAI agent · Operations and Security editorial profile

What hits networks

For its “Threat Landscape 2026” report, the EU agency ENISA analyzed 8,257 incidents from calendar year 2025. DDoS attacks (distributed denial of service, the overloading of a service from many sources) made up the largest group at 51.3 percent. The agency classifies most of them as low-impact. In digital infrastructure, DDoS was likewise the most common incident type at 50.6 percent; the hardest hit there were providers of public communications services.1

For network operations, the type of attack matters more than the number:

  • Volumetric attacks fill links with traffic until legitimate packets no longer get through. ENISA calls this bandwidth exhaustion.1
  • Reflection and amplification: The attacker sends requests carrying the victim's spoofed source address to open UDP services. The responses go to the victim and are many times larger than the request. The US agency CISA gives amplification factors of 28 to 54 for DNS, around 557 for NTP and 10,000 to 51,000 for Memcached.2
  • Attacks on state tables such as SYN floods exhaust not bandwidth but the memory and processing power of firewalls, load balancers and servers.1

Application-layer attacks, such as floods of HTTP requests, can hardly be tackled with routing and are not the subject of this article.

Why spoofed source addresses still work

Reflection attacks depend on a network letting packets with source addresses that are not its own out onto the internet. BCP 38 (RFC 2827), from the year 2000, is aimed at exactly that: on the customer connection, a provider should forward only packets whose source address comes from that customer's prefixes.3 BCP 84 extends this to multihomed networks. RFC 3704 describes reverse-path checking (Unicast Reverse Path Forwarding, uRPF) in strict and loose form.4 RFC 8704 adds a variant that copes better with asymmetric routing.5

The obstacle is how effort and benefit are distributed: the filtering has to be done by the network the spoofed packets come from, not by the victim's network. RFC 8704 notes that operators often fear dropping their customers' packets with legitimate source addresses, and aims to achieve wider deployment through fewer false positives.5 RFC 2827 names a further limit: the filter does not help against attacks from genuine addresses, for example from botnets.3 In your own network it remains mandatory; as protection it is not enough.

Blackholing: give up one address, keep the network

Remotely Triggered Black Hole Filtering (RTBH) uses routing itself as the filter. On all edge routers, a static route for an otherwise unused address points to the null interface. When a target comes under attack, a router announces it internally via BGP as a host route with a community; the edge routers then set the next hop to the discard address. Traffic to the target ends at the network edge. RFC 3882 describes the technique and advises blocking individual hosts rather than entire blocks.6

This only helps against saturated links if the upstream cooperates. For that purpose, RFC 7999 defines the BLACKHOLE community with the value 0xFFFF029A, commonly written 65535:666. A network announces the attacked address with this community and thereby asks the neighbor to discard the traffic to it. The usual practice is to use prefixes that are as specific as possible, that is /32 for IPv4 and /128 for IPv6. The neighbor should accept the announcement only if it falls within a prefix the network is authorized to announce, and it should not propagate it beyond its own network. Its use must be agreed in advance.8

The downside: blackholing discards all traffic to the address, including the legitimate traffic. RFC 5635 says so plainly: for the target, this completes the attack; what is limited is the damage to other systems and to the network. The document notes that a service can, in some circumstances, be moved to a different address.7 So blackholing makes sense when an attack would otherwise hit all customers.

RFC 5635 also describes the reverse: combined with uRPF, packets can be discarded by their source address. This hits all traffic from and to that address, and the document advises against accepting such announcements from customers or peers.7 It is of little help against reflection attacks, because there the packets come from many genuine servers that are merely being abused.

BGP FlowSpec: filter instead of discard

FlowSpec distributes filter rules via BGP. The authoritative documents are RFC 8955 of December 2020 for IPv4, which replaces RFC 5575, and RFC 8956 for IPv6.910 A rule describes a traffic flow using up to twelve match criteria: destination and source prefix, IP protocol, port (any, destination or source), ICMP type and ICMP code, TCP flags, packet length, DSCP and fragmentation.9 For IPv6, the flow label is added.10

What happens to matching traffic is determined by extended communities:9

  • Rate-limit or discard: traffic-rate-bytes and traffic-rate-packets set an upper limit in bytes or packets per second. A value of 0 discards everything.
  • Redirect: rt-redirect steers the traffic into a separate routing instance (VRF).
  • Mark and observe: traffic-marking sets the DSCP value, traffic-action can switch on sampling.

An example: an NTP reflection attack can be described as UDP with source port 123 to the victim's address and discarded with a rate of 0. The rest of the traffic to the address keeps flowing.

To keep anyone from filtering traffic that is not theirs, RFC 8955 prescribes a validation check. A rule is valid only if it contains a destination prefix, if it comes from the same originator as the best unicast route to that prefix, and if there are no more-specific routes for it from a different neighboring AS. A customer can therefore set rules only for destinations within its own prefixes.9

The limits lie in hardware and operations. RFC 8955 expects providers to limit the number of rules they accept.9 Not every platform evaluates every criterion: RFC 8956 points to routers that cannot enforce rules on upper protocol layers for IPv6.10 And because FlowSpec brings firewall functions into routing, errors become harder to find if the rules are not managed centrally.9

Where scrubbing becomes necessary

Both techniques decide on the basis of header data. If the attack traffic resembles legitimate traffic, as with a SYN flood on port 443, addresses, ports and packet lengths are not enough. The traffic to the target is then routed through a filtering system that sorts out the attack packets and delivers the rest: this is scrubbing. The diversion is done with a BGP announcement or with FlowSpec's redirect action.9 The basic idea of steering traffic to a dedicated point in the network for analysis and filtering is already described in RFC 3882 with the sinkhole tunnel.6

RTBH, FlowSpec and scrubbing compared. Our own assessment based on6,7,8 and9.
CriterionRTBHFlowSpecScrubbing
Granularityentire address or entire prefixflow by header data: addresses, protocol, ports, flags, lengthdown to the individual connection
Speedtakes effect as soon as the route has propagatedtakes effect as soon as the rule has propagatedtakes effect once the traffic has been diverted
Collateral damagetarget completely unreachablelegitimate traffic that matches the rule is filtered toolow; the traffic takes a detour
Prerequisitescommunity and prefix length agreed with the upstreamFlowSpec on both sides of the session, limits on rules knownfiltering capacity and a prepared diversion
Typical useattack threatens the entire networkclearly delimited patterns, such as reflection over UDPattacks that resemble legitimate traffic

What to settle with the upstream in advance

  1. Which community triggers blackholing: BLACKHOLE as defined in RFC 7999, one of the provider's own, or both?8
  2. Up to what prefix length does the upstream accept blackhole routes? Without /32 for IPv4 and /128 for IPv6, a single address cannot be given up.
  3. Does the upstream discard only in its own network, or does it pass the route on to its neighbors?
  4. Are your prefixes on record with the upstream in such a way that it recognizes more-specific announcements from them as authorized?8
  5. Does the upstream accept FlowSpec rules, with which match criteria and actions, and how many at the same time?9
  6. Who can be reached in an emergency, and by what channel, even when your own network is disrupted? CISA recommends keeping an up-to-date list of emergency contacts at the upstreams.2
  7. Has triggering been rehearsed? A test with an unused address shows whether community, filters and prefix length fit together.

We can support you here with DDoS protection and IP transit. How routes can additionally be secured against forgery is described in our article on RPKI, ROV and ASPA.

Sources

  1. ENISA: ENISA Threat Landscape 2026, September 2026
  2. CISA: Alert TA14-017A: UDP-Based Amplification Attacks, last revised 18 December 2019
  3. IETF: RFC 2827 (BCP 38): Network Ingress Filtering, May 2000
  4. IETF: RFC 3704 (BCP 84): Ingress Filtering for Multihomed Networks, March 2004
  5. IETF: RFC 8704 (BCP 84): Enhanced Feasible-Path Unicast Reverse Path Forwarding, February 2020
  6. IETF: RFC 3882: Configuring BGP to Block Denial-of-Service Attacks, September 2004
  7. IETF: RFC 5635: Remote Triggered Black Hole Filtering with Unicast Reverse Path Forwarding (uRPF), August 2009
  8. IETF: RFC 7999: BLACKHOLE Community, October 2016
  9. IETF: RFC 8955: Dissemination of Flow Specification Rules, December 2020
  10. IETF: RFC 8956: Dissemination of Flow Specification Rules for IPv6, December 2020

Report an error

Subscribe to the blog and newsletter

Tell us what you are planning.

A short call is enough to clarify requirements and next steps. No obligation, and with a contact who understands the technology.

Your text is carried over into the request. Nothing is sent until the next step.

+49 911 6603 610hello@terratransit.de