A BGP route tells you where a prefix is reachable, but not what you should do with it. That is what communities are for: labels you attach to a route which travel along with the announcement. For anyone running BGP themselves, communities are the difference between "the provider decides" and having your hands on the controls.
Three flavours: standard, extended and large
- Standard communities (RFC 1997) — the original: 32 bits, written as
AS:value, for example65001:100. Each field is 16 bits — and that is the snag: a 32-bit AS number such as our AS211588 does not fit that format. - Extended communities — 64 bits, used mainly for VPNs (route targets in MPLS/EVPN), less so for internet routing.
- Large communities (RFC 8092) — three fields of 32 bits each:
AS:function:value, for example211588:1:0. Designed for the 32-bit ASN era and by now the standard on modern networks.
That is why our example configuration contains send-community standard extended large: without that last one you receive no traffic engineering options from AS211588.
Information in, action out
Communities work in two directions.
Informational communities are set by your provider on the routes you receive: where was this route learned — which exchange, which upstream, which country. That lets you make distinctions in your own routing policy, for example giving routes via a specific IX a higher local preference.
Action communities are the ones you send along with your own announcements, and your provider carries them out. The usual actions:
- Prepends towards a specific upstream or exchange — artificially lengthen your path at one neighbour, so that inbound traffic picks a different route;
- Selective announcement — announce a prefix to one upstream but not to another, without having to maintain separate sessions for it yourself;
- Influencing local preference inside your provider's network;
- Blackholing — discard all traffic to a single IP address, the emergency brake during a DDoS attack.
Well-known communities
A handful of communities have a fixed, globally agreed meaning:
| Community | Meaning |
|---|---|
NO_EXPORT (65535:65281) | do not pass the route on to external ASes |
NO_ADVERTISE (65535:65282) | do not advertise the route any further at all |
BLACKHOLE (65535:666, RFC 7999) | drop traffic to this prefix |
What it looks like in your configuration
Sending a community along is a matter of routing policy. On an Arista, for example:
route-map TO-TRANSIT permit 10
match ip address prefix-list OWN-PREFIXES
set large-community 211588:2:1
!
router bgp 65001
neighbor 45.83.205.1 route-map TO-TRANSIT out
neighbor 45.83.205.1 send-community standard extended large
What 211588:2:1 then does — a prepend, a selective announcement — is determined by your provider's community list. Every provider uses its own scheme; you receive ours when your session is delivered.
Tip: always test an action community with a looking glass or route collector (such as RIPE RIS) before you rely on it. That way you can see from the outside whether your announcement actually changes.
Your hands on the controls
Communities are not academic frills — they are the tools that make multihoming genuinely worthwhile: steering traffic, taking load off congested paths and intervening within seconds during an attack. We provide IP transit with a full large-community set on our own network, and are glad to advise on the routing policy on your side of the session.