A community is a label you attach to a route so that routers further along can act on it without matching prefixes one by one. It is the scalable way to express policy.
Advanced · 9 min read
You'll learn to tag routes with a community, send it to a neighbour, match it in a route map, and describe the well-known communities.
What a community is
A community is an optional transitive attribute holding one or more 32-bit tags, written ASN:number such as 64500:100. The tag does nothing by itself. A policy somewhere reads it and acts: filter, set local preference, prepend, or refuse to advertise.
A community is a tag that travels with the route
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The tag carries no meaning on its own. The receiving network decides what each value does, which is why providers publish a community list.
Tagging a route
Attach a tag with set community in a route map, then make sure the neighbour actually receives it with send-community.
route-map TAG-ISPA permit 10
set community 64500:100 additive
!
router bgp 64500
address-family ipv4 unicast
neighbor 192.0.2.1 route-map TAG-ISPA in
neighbor 10.255.0.2 send-community both
end
clear ip bgp 192.0.2.1 soft in
R1. Routes from ISP A are tagged 64500:100 and the tag is sent to R2. Additive keeps any tags the route already had instead of replacing them.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R2#show ip bgp 203.0.113.0
BGP routing table entry for 203.0.113.0/24, version 12
Paths: (1 available, best #1, table default)
64501
10.255.0.1 from 10.255.0.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 64500:100
R2 sees the tag because R1 sent it. Without send-community the Community line would be missing.
Well-known communities
How far a route travels with each well-known community
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The wider the bar, the further the route may be advertised. Use these to keep routes from leaving a boundary without writing a filter.
The four well-known communities
On small screens, swipe sideways or focus the diagram and use the arrow keys.
They limit how far a route spreads.
Using communities to steer traffic
Providers publish community values that act as remote controls. Tag a route with the provider value for prepend once, and the provider prepends for you. Tag it with a local preference value, and the provider lowers its preference for that route. This reaches farther than your own AS can.
Who sends which routes to whom
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Communities are the usual way to mark where a route was learned, so one outbound filter can apply this rule. Leaking provider or peer routes to another provider or peer makes your AS a transit network without being paid for it.
ip community-list standard FROM-CUSTOMER permit 64500:100
!
route-map TO-PEER permit 10
match community FROM-CUSTOMER
route-map TO-PEER deny 20
Advertise to a peer only routes that carry the customer tag. The final deny makes the intent explicit.
Check your understanding
Predict · scenario 1
R1 sets a community with a route map but R2 never sees it. What is missing?
Predict · scenario 2
A route carries no-export. Where is it not advertised?
Predict · scenario 3
What does the additive keyword do in set community?
FAQ
Are communities sent automatically?
No. On Cisco IOS XE you must configure send-community toward each neighbour, or the tag stays on the router.
What does no-export do?
A route carrying no-export is not advertised to eBGP neighbours, which keeps it inside your AS or confederation.
Who defines community values?
The well-known values are standard. Other values are written ASN:number and each network decides its own meaning, so read the provider documentation.