Skip to content
LinkState
Go back

Map RTBH containment failures before they become route leaks

Introduction to Remote Triggered Blackhole Design

Remote Triggered Blackhole (RTBH) injects a specially‑crafted route (usually a /32 host route or a more specific prefix) into the routing infrastructure so that matching packets are forwarded to a null0 or discard‑only next‑hop. The trigger is typically a BGP community, a static route, or a route‑map set by a detection system (DDoS scrubber, IDS/IPS) and propagated to edge or core routers.

RTBH is a containment primitive, not a policing mechanism. Its goal is to drop malicious traffic as close to the source as possible while ensuring the drop‑instruction does not leak beyond the intended trust boundary and affect legitimate traffic elsewhere.


Blackhole Intent and Containment Objectives

ObjectiveDescriptionContainment Boundary
Local dropPackets matching the blackhole prefix are discarded on the router that receives the trigger.Ingress interface of the enforcing router (or VRF).
Scope limitationThe blackhole route must not be advertised beyond a defined set of routers (e.g., only within the AS‑internal iBGP mesh or a specific peer‑group).Route‑filtering/distribute‑list or outbound‑policy on the advertising router.
No collateral impactLegitimate traffic to unrelated prefixes must continue to flow unchanged.Proper longest‑prefix match (LPM) logic and absence of overlapping more‑specifics.
Visibility & auditThe trigger source and the set of routers that installed the blackhole must be logged for forensic analysis.Syslog, flow‑export, or BGP‑monitoring (BMP) hooks.

Failure of any boundary—most often a missing or mis‑configured outbound route filter—turns the local mitigation into an upstream leak, propagating the discard instruction to peers or transit providers and causing unintended denial‑of‑service for innocent destinations.


Understanding Blackhole Propagation

Network Topology Considerations

RTBH relies on the underlying routing topology to carry the trigger. Typical deployments fall into three patterns:

  1. Edge‑only injection – Detection system injects a static blackhole route on the edge router; the route is redistributed into iBGP (or IS‑IS/OSPF) only within the AS.
  2. BGP community‑based injection – Detection system sends a BGP UPDATE with a well‑known community (e.g., 65000:666) to a route‑reflector; routers with a matching inbound route‑map install the blackhole next‑hop.
  3. Central controller model – An SDN controller pushes flow‑rules that install a discard action; the controller communicates via NETCONF/gNMI or gRPC to the forwarding plane.

The propagation path is the set of routers that receive the UPDATE (or redistribution) and install the blackhole. Containment requires that this set be exactly the intended enforcement domain.

Traffic Flow and Blackhole Triggering Mechanisms

StepActionProtocol/MechanismTypical CLI (IOS‑XR/Junos)
1Detection system identifies malicious src/dstNetFlow, sFlow, IDSmonitor session 1 type erspan-source
2System generates triggerBGP community, static route, or REST APIrouter bgp 65000<br> neighbor 10.0.0.1 remote-as 65000<br> neighbor 10.0.0.1 send-community both
3Trigger propagates via routing protocoliBGP mesh, route‑reflector, or OSPF redistributionaddress-family ipv4 unicast<br> neighbor 10.0.0.2 activate
4Receiving router evaluates inbound policyRoute‑map, prefix‑list, or community‑matchroute-map BLACKHOLE-IN permit 10<br> match community 65000:666<br> set next-hop discard
5Router installs blackhole entryRIB → FIB, null0 or discard‑next‑hopshow route 203.0.113.45/32*> via Null0, metric 0
6Outbound policy decides whether to re‑advertiseOutbound route‑filter, distribute‑list, or ORFneighbor 10.0.0.3 outbound route-map BLACKHOLE-OUT<br>route-map BLACKHOLE-OUT deny 10<br> match community 65000:666<br>route-map BLACKHOLE-OUT permit 20

If step 6 is missing or mis‑configured, the blackhole route leaks to external peers (transit, customers, or IXPs), turning a local containment into an upstream denial‑of‑service.


Containment Strategies and Policy Boundaries

Network Segmentation and Isolation Techniques

Access Control Lists (ACLs) and Firewall Rules

ACLs provide defense‑in‑depth, catching packets that might escape the null0 due to mis‑ordered route‑maps or overlapping prefixes.

Cisco IOS‑XR – inbound ACL on the edge interface

ipv4 access-list BLACKHOLE-ACL
  10 deny ipv4 any 203.0.113.45/32
  20 permit ipv4 any any
!
interface GigabitEthernet0/0/0/0
  ipv4 access-group BLACKHOLE-ACL ingress

If the routing blackhole fails (e.g., route not installed), the ACL still enforces the drop. Conversely, an ACL that permits the blackhole prefix (mis‑ordered ACE) can become a leak path.

Route Filtering and Redistribution Policies

The core containment mechanism is outbound route filtering at the point where the blackhole route could leave the trusted domain.

Junos – outbound filter suppressing community 65000:666

policy-options {
    policy-statement BLACKHOLE-OUT {
        term deny-bh {
            from {
                community [ BLACKHOLE ];
            }
            then reject;
        }
        term accept-all {
            then accept;
        }
    }
}
community BLACKHOLE members [ 65000:666 ];
protocols {
    bgp {
        group internal {
            type internal;
            neighbor 10.0.0.2 {
                export [ BLACKHOLE-OUT ];
            }
        }
    }
}

If the export statement is omitted or mis‑typed, the blackhole route will be advertised to external peers.


Identifying and Mitigating Blackhole Leaks

Troubleshooting Methodologies and Tools

  1. Verify local installationshow route <prefix> or show ip bgp <prefix> to confirm the null0/discard next‑hop.
  2. Check outbound policyshow route advertising-protocol bgp <neighbor> (IOS) or show route receive-protocol bgp <neighbor> (Junos) to see what is being sent.
  3. Capture BGP updates – Enable BMP or debug bgp updates on a route‑reflector to observe whether the blackhole community appears in updates sent to peers.
  4. Flow analysis – NetFlow/IPFIX or sFlow to see if traffic destined for the blackhole prefix is still reaching upstream interfaces.
  5. Packet capture – Mirror the interface facing the peer and confirm that packets are dropped locally versus forwarded.

Analyzing Network Logs and Traffic Patterns

Code Examples: Configuring ACLs and Route Filters

Cisco IOS‑XR – ACL + outbound route‑map

! 1. Define blackhole prefix
ipv4 prefix-list BLACKHOLE-PREFIX seq 5 permit 203.0.113.45/32

! 2. Route‑map to suppress advertisement
route-map BLACKHOLE-OUT deny 10
  match ip address prefix-list BLACKHOLE-PREFIX
!
route-map BLACKHOLE-OUT permit 20
  set community 65000:666 additive   ! optional: tag for internal tracking

! 3. Apply to eBGP neighbor (upstream transit)
router bgp 65000
  neighbor 203.0.113.1 remote-as 65001
  address-family ipv4 unicast
    send-community both
    neighbor 203.0.113.1 route-map BLACKHOLE-OUT out

Junos – ORF to suppress blackhole advertisement

policy-options {
    policy-statement ORF-BLACKHOLE {
        term reject-bh {
            from {
                community [ BLACKHOLE ];
            }
            then reject;
        }
        term accept {
            then accept;
        }
    }
}
community BLACKHOLE members [ 65000:666 ];
protocols {
    bgp {
        group transit {
            type external;
            neighbor 203.0.113.1 {
                peer-as 65001;
                orphan;
                import [ ORF-BLACKHOLE ];
            }
        }
    }
}

CLI Examples: Verifying Blackhole Containment

Verify local blackhole installation (IOS‑XR)

RP/0/RP0/CPU

Share this post on:

Previous Post
Average RTT is not enough to validate tc
Next Post
Translating Between OpenConfig and Native Namespaces