BGP communities are tags you attach to routes you announce. Your upstream reads them and acts on them: for example, lower the preference of the route, don't announce it to a certain region, or drop all traffic to it.
Common uses
- Traffic engineering: prepend or don't-announce communities to steer inbound traffic between providers.
- Blackholing (RTBH): when a single IP is hit by a large DDoS, you announce that /32 (or /128) with the blackhole community. Your upstream then drops all traffic to that IP at their edge, before it reaches and saturates your links.
Blackholing in practice
- The well-known community is
65535:666(RFC 7999). Many providers also have their own; check their documentation. - Only blackhole the attacked address, never your whole prefix.
- Your upstreams must accept more-specific /32s from you with that community. Agree this with them in advance and test it before you need it.
- Blackholing makes the target unreachable, so the attacker gets what they wanted for that one IP. It protects everything else. For keeping the target online, you need scrubbing instead.
We set up and test blackholing and scrubbing integration as part of our network engineering service. See Recognising and responding to a DDoS attack.