BGP Communities Explained: The Tags That Steer the Internet
A BGP community is a small tag stuck on a route announcement — a pair of numbers like 2914:410 or 65535:666 that tells every network downstream what this route is and what to do with it. Tags mark where a route came from, keep a route from travelling too far, lower its priority before maintenance, and — with the BLACKHOLE tag — order an upstream network to drop all traffic to a prefix that is being drowned by a DDoS attack. This guide decodes the tags, including how to read a real provider's list, and works the blackhole case end to end.
The short answer
What is a BGP community? It is a tag stuck on a route announcement. When one network tells another "you can reach these addresses through me", it can attach small labels — each one a pair of numbers written like 2914:410. The labels say what the route is ("this came from a customer", "this entered our network in Europe") or ask for something to be done ("do not pass this any further", "lower my priority, maintenance is coming", and the dramatic one: "this address is under attack — drop everything sent to it"). Nothing about the tag forces anything. Each network runs its own policy that reads tags and acts. That is the whole mechanism — and it is why the same numbers can mean different things under different first numbers, as the decoder example below shows.
Try the decoder before the theory. The free BGP toolkit on this site has a Community Decoder tab with a sourced database of real values. Paste in 2914:410 and 2914:3200 and it answers from NTT's published routing-policy documents: a customer route, whose origin is Europe. Paste in 65535:666 and it answers BLACKHOLE. Every provider value decoded in this article comes from that same database, so you can check each one yourself as you read.
Think of a parcel moving through sorting offices. The address on the parcel is the prefix — where it is going. The stickers are the communities: FRAGILE, THIS SIDE UP, DO NOT FORWARD, RETURN TO SENDER. A sticker does not move the parcel; the staff at each office read the stickers and handle the parcel accordingly. And just like stickers, several can be on the same parcel at once, saying different things to different offices along the way.
What the tag actually is
The communities attribute was defined in RFC 1997, back in 1996. Technically: it is an optional transitive path attribute (type code 8) — optional, because a router that does not understand it can still pass the announcement along; transitive, because it is meant to travel with the announcement from network to network. Each individual community is four bytes: a 32-bit number, written by convention as two 16-bit halves separated by a colon. The first half is normally the number of the network that defined the tag's meaning — its namespace — and the second half is the meaning within that namespace. An announcement can carry a whole set of communities at once, and routers can add, remove, or replace tags as policy dictates.
Three consequences fall out of that design, and they explain almost every real-world surprise. First, a tag is a request or a note, never a command — the receiving network's policy decides what, if anything, happens. Second, the first number is part of the meaning: the same second number under a different first number is a different tag entirely (the trap in the mistakes section is a famous one). Third, tags only travel if routers are told to send them — on Cisco gear, for example, communities are not sent to a neighbour unless send-community is configured for that neighbour, which is why "my route-map sets it but the other side never sees it" is a rite-of-passage fault.
The well-known tags: the complete working set
A handful of values are standardised so that every BGP implementation on earth is expected to understand them. They all live under the reserved first number 65535. Textbook lists usually stop at the original 1996 three; the working set an operator actually meets is longer, and the two additions — BLACKHOLE and GRACEFUL_SHUTDOWN — are the ones that earn their keep during incidents and maintenance windows.
| Community | Name | What it asks for | When an operator actually uses it |
|---|---|---|---|
| 0:0 | Internet | Advertise this normally, to everyone | The default idea, rarely attached explicitly; some policies match it to mean "a normal public route" |
| 65535:65281 | NO_EXPORT (RFC 1997) | Do not advertise this beyond a confederation boundary — for a standalone network, in practice: do not pass it to other networks | Announcing a backup or internal path to one provider without it leaking to the whole internet |
| 65535:65282 | NO_ADVERTISE (RFC 1997) | Do not advertise this to any other BGP peer at all | A route meant for exactly the network that received it — a private arrangement between two networks |
| 65535:65283 | NO_EXPORT_SUBCONFED (RFC 1997; often shown as local-AS) | Do not advertise outside the local sub-AS inside a confederation | Inside large confederated networks, keeping a route within one member's borders |
| 65535:65284 | NOPEER (RFC 3765) | Do not advertise to bilateral peers — settlement-free routes learned at exchanges should not spill onto paid peer links | Route-server environments at internet exchanges |
| 65535:666 | BLACKHOLE (RFC 7999) | Discard all traffic to this prefix — a remotely triggered black hole | During a DDoS attack: the worked example below |
| 65535:0 | GRACEFUL_SHUTDOWN (RFC 8326) | Treat my paths as last resort (the RFC's procedure sets local preference to 0 on receipt) | Before planned maintenance, so traffic drains away smoothly instead of dropping when the session is shut |
| 65535:1 | ACCEPT_OWN (RFC 7611) | Accept a route even though your own network originated it | A niche VPN case: leaking routes between virtual routing tables on one provider-edge router |
Notice the pattern: the 1996 trio controls spread (how far a route travels), NOPEER refines which kind of peer may receive it, and the two modern additions are incident tools — one for attacks, one for maintenance. If you memorise only two values from this page, make it 65535:666 and 65535:0.
Reading a real provider's list: a worked decode
Most tags you will ever see are not well-known ones. They are the receiving network's own labels, stamped on your route as it entered their network, telling their routers (and anyone who can read their published list) where the route came from. Providers publish these lists in their routing-policy documents; the toolkit's decoder database is built from exactly those documents. Here is a real decode, using values sourced from NTT's published GIN routing policy, AS 2914:
| Tag on the route | Decoder answer | Source |
|---|---|---|
| 2914:410 | NTT DATA and customer routes — originated by NTT or its customers | NTT GIN routing policy docs |
| 2914:420 | Peer routes — received from a peering partner | NTT GIN routing policy docs |
| 2914:3000 | Route origin: North America | NTT GIN routing policy docs |
| 2914:3200 | Route origin: Europe | NTT GIN routing policy docs |
| 2914:3400 | Route origin: Asia | NTT GIN routing policy docs |
Now read a set the way an operator does. A route arrives carrying 2914:410 and 2914:3200. Two stickers, one sentence: this is a customer route, and it entered NTT's network in Europe. Carry 2914:420 instead of 2914:410 and the sentence changes to a peer route — which matters, because most networks prefer customer routes over peer routes when choosing paths (customers pay; peers do not). The tags are how the receiving network's own routers keep that bookkeeping straight across hundreds of routers that each need to make the same decision. Action tags exist too: many providers publish values a customer can attach to ask for something — a lower local preference, or announcement suppression toward one region. The exact values differ per provider, which is precisely why a decoder with sourced entries beats memorising anyone's list.
The centrepiece: blackholing a prefix under attack
It is 2 a.m. and one server is being flooded. The attack traffic aimed at a single host — in this worked example, 203.0.113.50, a documentation address from TEST-NET-3 (RFC 5737), owned by the example network AS 64496 (an ASN reserved for documentation, RFC 5398) — is saturating AS 64496's link to its upstream, AS 64497. The server itself is fine; the pipe is full, and every other service behind that pipe is drowning with it. Filtering at your own edge cannot help: by the time the traffic reaches you, it has already crossed — and filled — the link. The drop has to happen one step earlier, inside the upstream's network, before the traffic ever enters your link.
That is what RFC 7999 standardised. The steps:
Step 1 — announce the victim, alone, with the tag. AS 64496 announces the single most specific prefix it can: 203.0.113.50/32 — one address, not the whole 203.0.113.0/24 block — to AS 64497, tagged 65535:666. RFC 7999 is explicit that the blackholed prefix should be as specific as possible, so the blast radius is one host, not the neighbourhood.
Step 2 — the upstream honours the tag. AS 64497's policy (arranged and tested before any attack — see the mistakes) recognises BLACKHOLE, installs a discard route for 203.0.113.50/32, and per the RFC adds a NO_ADVERTISE or NO_EXPORT-style restriction so the blackhole announcement itself does not propagate across the internet. Attack traffic now dies at the upstream's edge routers, upstream of the congested link.
Step 3 — the link drains. The flood no longer crosses AS 64496's link. Everything else in 203.0.113.0/24 — the other 255 addresses that were collateral damage — comes back. The network survives.
Step 4 — tell the truth about the price. 203.0.113.50 is now unreachable from everywhere, for everyone, legitimate users included. That is not a flaw in the technique; it is the technique. You are sacrificing the one host the attack already took, in order to hand everyone else their service back. When the attack stops, you withdraw the /32 announcement, the discard route disappears, and the host returns.
Two honest caveats belong with the recipe. First, support is by agreement, not by magic: the standardised 65535:666 only works where the upstream has built policy for it, and some providers additionally (or instead) publish their own blackhole value in their own namespace — check your provider's list on a calm day, and test the announcement before you need it. Second, the same mechanism in careless hands is a weapon: an announcement tagged BLACKHOLE for a prefix you do not own would be an attack, which is why upstreams only honour these tags on sessions and prefixes where the customer is entitled to announce them — filtering is what separates the fire alarm from arson.
When 32 bits ran out: large and extended communities
The original tag has a structural ceiling: its first half is 16 bits, so it can name networks numbered 0 to 65535. Modern ASNs are 32 bits. A network whose ASN is, say, 64512-plus-six-digits simply cannot write its own number in its own tags — the namespace it most needs does not fit. Large communities (RFC 8092) are the fix: each value is 12 bytes — a 4-byte Global Administrator followed by two 4-byte operator-defined fields, written with two colons, ASN:value:value. The RFC's own documentation examples are 64496:0:0 and 64496:4294967295:2: the first field names whose list you are reading, the second typically names the kind of signal, the third its parameter. Same idea as 1996, with room for every ASN and a spare field for detail.
Do not confuse either with extended communities (RFC 4360): 8-byte values built for a different job — most famously carrying route targets inside VPN services, where the tag says which virtual network a route belongs to. A rough field guide: standard communities steer and label public routing, large communities are the same job with a bigger namespace, extended communities label membership inside provider VPNs. You will meet all three in real output; the colon count is the quickest tell — one colon is standard, two is large, and extended values print in several vendor-specific forms.
The mistakes that make tags lie
1. Reading the second number and ignoring the first. The trap, from the decoder's own sourced database: 3356:666 appears in Lumen's published list — where it means peer route. It is not BLACKHOLE; BLACKHOLE is 65535:666. The first number is the namespace; 666 is just a number until you know whose list you are reading. Any tool or runbook that decodes by the second field alone will eventually misread a route during an incident.
2. Setting a tag nobody is listening for. A community is a request. If the upstream has no policy for it — or never agreed to honour it — your carefully crafted tag is decoration. Every action tag you rely on (blackhole above all) needs the agreement, the provider's exact expected value, and a live test in a calm window.
3. Forgetting to send them. On Cisco platforms the community attribute is not passed to a neighbour unless that neighbour is configured with send-community. The route-map sets the tag, the local router shows the tag, the neighbour never receives it, and the policy downstream never fires. Check both ends before blaming the values.
4. Blackholing the block instead of the host. Tagging the whole /24 because it was the prefix already in the table takes 256 addresses dark to save one link. RFC 7999's guidance exists for this moment: announce the most specific prefix — the /32 for the one attacked address — and let the rest of the block live.
5. Letting tags leak or accumulate. Internal bookkeeping tags that escape to the internet tell strangers your customer/peer geography; stale action tags left on after an incident quietly keep a host blackholed or a path deprioritised. Scrub at borders deliberately, and put tag removal in the incident checklist, next to tag application.
Try it yourself
Open the free BGP toolkit and use the Community Decoder tab three ways. First, paste 2914:410 2914:3200 and read the sentence the pair makes: a customer route that originated in Europe. Second, paste 65535:666 and 3356:666 side by side and watch the same second number produce two unrelated answers — the namespace lesson, in one screen. Third, paste 65535:0 and check the maintenance tag from the table above. Then look at the toolkit's Filter Generator tab: it builds the prefix-lists and route-maps that keep announcements — tags included — honest at your own border.
- A community is a 32-bit tag written ASN:value (RFC 1997). It does nothing by itself: it is a label that other networks' policies read and act on. A route can carry many tags at once, and the first number is a namespace — 65535:666 means BLACKHOLE, but 3356:666 in one large provider's published list simply means a peer route.
- The well-known tags every engineer should recognise: NO_EXPORT (65535:65281, do not pass this on outside the confederation), NO_ADVERTISE (65535:65282, tell no other peer at all), NO_EXPORT_SUBCONFED (65535:65283), NOPEER (65535:65284), BLACKHOLE (65535:666, RFC 7999 — discard traffic to this prefix), and GRACEFUL_SHUTDOWN (65535:0, RFC 8326 — lower my priority, I am about to do maintenance).
- The blackhole worked example: a host under attack, 203.0.113.50, is announced as the single address 203.0.113.50/32 tagged 65535:666 to an upstream that has agreed in advance to honour it. The upstream drops the attack traffic at its edge and the rest of the network survives — at the honest price that the attacked host goes completely dark until the tag is removed.
- Large communities (RFC 8092) fix the original format's ceiling: a standard tag's first field is only 16 bits, so a network with a 4-byte ASN cannot put its own number there. A large community is 12 bytes — ASN:value:value — so any network can stamp tags in its own namespace, for example the RFC's own documentation example 64496:0:0.