Communities · Lesson 01 of 01
Tagging routes with communities
A community is a label you attach to a route so that a downstream router — often in another AS — can act on it without matching prefixes.
Written lesson
A tag, not a rule
A community is a 32-bit value, written ASN:value by convention (e.g. 65001:100). It carries no behaviour of its own — it is a label. The power is the agreement: a provider publishes 'tag a route 65001:80 and we will set local-preference 80 on it', and a customer tags accordingly to shape traffic without the provider writing per-prefix policy. Communities scale policy across an AS boundary the way prefixes never could.
Configuration
Set a community, and act on one
route-map TAG permit 10
set community 65001:80
!
route-map ACT permit 10
match community 80
set local-preference 80
!
ip community-list standard 80 permit 65001:80
!
router bgp 65001
address-family ipv4 unicast
neighbor 203.0.113.9 send-community
neighbor 203.0.113.9 route-map TAG outWritten lesson
Well-known communities
A few communities are reserved and universally understood. no-export keeps a route inside the AS (or confederation) — it is advertised to iBGP but not to eBGP peers. no-advertise stops it being advertised to anyone. local-as (no-export-subconfed) keeps it within a confederation sub-AS. These are the everyday tools for saying 'use this route here but do not let it escape'.
send-community is off by default
The single most common community mistake is forgetting neighbor x send-community. Without it you tag routes correctly and then strip the tag on the way out, and the downstream policy never fires.