· 7 min read

RTBH Blackhole Routing: When a /32 Blackhole Makes Sense

Remote Triggered Black Hole (RTBH) is a BGP technique that tells your upstream to discard all traffic destined for one IP address, usually a /32, so a DDoS attack stops saturating your link. It works, but it works by finishing the attack's job: the targeted IP goes offline for everyone, legitimate users included. That tradeoff decides when RTBH is the right tool and when it isn't.

What RTBH Actually Does

Normally, BGP carries routes that point traffic toward your network. With RTBH, you announce a specific route, typically a single host such as 203.0.113.10/32, and tag it with a blackhole community. Your upstream sees the tag and installs a discard route for that prefix. Packets for that address are dropped at the provider edge, before they reach your port.

The standard community is BLACKHOLE, 65535:666, defined in RFC 7999. Many providers also publish their own provider-specific communities, so always check your upstream's documentation before relying on the well-known value.

There are two flavors:

How the Mechanism Works

  1. Your monitoring detects a volumetric flood aimed at 203.0.113.10.
  2. Your router announces 203.0.113.10/32 to the upstream with community 65535:666 (and often NO_EXPORT, 65535:65281, so it does not spread further).
  3. The upstream validates that you own the covering prefix, accepts the /32 as a special case, and sets its next hop to a discard interface.
  4. Attack traffic dies at the upstream's edge. Your link recovers and the other IPs in your block keep working.

The key point: only that one address is sacrificed. Without RTBH, a flood that fills your uplink takes down every service behind it.

When a /32 Blackhole Makes Sense

RTBH is a good fit when:

When It Is the Wrong Tool

Configuration Examples

Documentation addresses are used below: your ASN is AS64496, the upstream is AS64497 at 198.51.100.1, and the victim is 203.0.113.10.

BIRD 2

protocol static rtbh4 {
    ipv4;
    # Add a route here only during an attack
    route 203.0.113.10/32 blackhole;
}

filter export_to_upstream {
    if proto = "rtbh4" then {
        bgp_community.add((65535, 666));
        bgp_community.add((65535, 65281));   # NO_EXPORT
        accept;
    }
    # normal export policy for your regular prefixes
    if net = 203.0.113.0/24 then accept;
    reject;
}

protocol bgp upstream {
    local as 64496;
    neighbor 198.51.100.1 as 64497;
    ipv4 {
        import none;
        export filter export_to_upstream;
    };
}

Apply with birdc configure, then verify with birdc show route export upstream.

FRRouting

ip route 203.0.113.10/32 Null0

ip prefix-list RTBH-HOSTS seq 5 permit 203.0.113.0/24 ge 32 le 32

route-map TO-UPSTREAM permit 10
 match ip address prefix-list RTBH-HOSTS
 set community 65535:666 no-export
route-map TO-UPSTREAM permit 20
 match ip address prefix-list MY-PREFIXES

router bgp 64496
 address-family ipv4 unicast
  network 203.0.113.10/32
  neighbor 198.51.100.1 route-map TO-UPSTREAM out

The prefix-list with ge 32 le 32 matters: it makes sure only host routes inside your own block can get the blackhole tag. Check with show ip bgp neighbors 198.51.100.1 advertised-routes.

Local null route (optional)

On the victim host or edge router, a local discard route avoids wasting CPU on traffic that still arrives:

ip route add blackhole 203.0.113.10/32

Automating the Trigger

Manual blackholing at 3 a.m. is slow. A common pattern is:

  1. A flow-based detector (NetFlow, sFlow, or IPFIX) flags traffic to one destination that crosses a threshold.
  2. A script adds the static blackhole route and reloads the routing daemon.
  3. A timer removes the route after a cool-down period, and you check whether the attack has stopped.

NixMon is a flow-based network monitoring and DDoS detection system that fits the first step of this workflow. Detection tells you which destination is under attack, so you blackhole the right /32 instead of guessing.

Drawbacks to Plan For

1. The victim is offline. This is the fundamental cost. Treat RTBH as damage containment, not mitigation.

2. It is all or nothing. RTBH cannot distinguish attack packets from legitimate ones. Flowspec or scrubbing can.

3. Upstream support varies. Some providers accept only /32 for IPv4 and /128 for IPv6, some accept wider prefixes, and some have no customer-triggered blackhole at all. Read the documentation first, and test before an incident.

4. RPKI can interfere. If your ROA has a maxLength of 24, a /32 announcement is technically RPKI-invalid. Reputable providers exempt blackhole-tagged routes from that check, but not all do. Confirm this with your upstream. Do not widen your ROA maxLength to /32 just to make RTBH work, because that opens the door to more-specific hijacks.

5. Attackers can use it against you. If automation blackholes anything that crosses a threshold, an attacker can trigger a flood just to take the IP offline. Add sanity checks and a cap on how many hosts can be blackholed at once.

6. Withdrawal is easy to forget. Stale blackhole routes keep a healthy IP dead long after the attack ends. Use expiry timers and alerts.

Common Mistakes and Fixes

Mistake Fix
Blackhole announced without the community Verify the route carries 65535:666 at the upstream with a looking glass or show route ... all
Route rejected by the upstream Check that the prefix is covered by your registered route object and ROA, and that the provider accepts /32s
Whole /24 blackholed by accident Use a prefix-list restricted to ge 32 le 32
Route leaks to other networks Add NO_EXPORT and keep export filters strict
Service still down after the attack Remove the static route and confirm the withdrawal at the upstream

RTBH Versus Scrubbing

RTBH and scrubbing solve different problems. RTBH drops all traffic to protect your network. Scrubbing keeps the service alive by filtering attack traffic and passing clean traffic. If you own an ASN and an IP block, a more practical setup is to keep production traffic on a protected path, then keep RTBH as a fallback for extreme cases.

At Nixcon Group LLC, we operate our own network (AS40368) and offer DDoS protection and firewall services, including NixGuard Edge for networks that announce their own prefixes through a BGP session inside a GRE tunnel. For any setup, ask your provider how blackhole requests are handled, and test it in a maintenance window instead of during an attack.

Quick Checklist

Frequently asked questions

What does RTBH stand for?

RTBH stands for Remote Triggered Black Hole. It is a BGP-based technique where you announce a route tagged with a blackhole community so that an upstream network drops all traffic to that destination.

Does a /32 blackhole stop a DDoS attack?

It stops the attack from hurting your network, but it does so by making the targeted IP unreachable. The attack traffic is dropped upstream, along with legitimate traffic to that address.

Which BGP community is used for blackholing?

The well-known BLACKHOLE community is 65535:666 (RFC 7999). Some providers use their own communities, so check your upstream's documentation.

Why is my /32 blackhole announcement rejected?

Common causes are a missing or wrong community, a provider that does not accept /32 routes, a prefix not covered by your registered route object, or RPKI validation failing because your ROA maxLength is shorter than /32.

Need DDoS protection beyond blackholing? Talk to Nixcon Group LLC.Learn more