Standard, extended and large communities, the well-known ones, and how ISPs use them.
Advanced · 20 min read
You'll learn to read and set standard communities, use the well-known values, match a community in a route map, and say what extended and large communities add.
A label that travels with the route
The attributes you have used so far change how a route is chosen. A community does something different: it tags a route so that other routers can recognise it and apply policy. The tag is optional and transitive, so it can pass through many networks. By convention a standard community is written AS:value, such as 64501:80.
A community follows the route
On small screens, swipe sideways or focus the diagram and use the arrow keys.
The tag does nothing until a policy matches it.
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.
Well-known communities
Well-known communities
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Most real policy uses private AS:value tags instead.
Well-known communities
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Each item on the left, with what it means on the right.
What each well-known community does in practice
The well-known communities are the easiest to try, because they need no agreement with anyone: every BGP router understands them. Each one limits how far a route may be advertised. Think of them as a boundary around the route.
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.
no-export
R1 receives a prefix from a neighbour with no-export attached. R1 installs it and uses it normally, and advertises it to its iBGP peers, which also keep the tag. None of them advertise it to an eBGP neighbour. This is the community to attach on routes learned from a provider so that you never pass them on to another provider.
no-advertise
The route is kept and used by the router that received it, and is sent to no BGP neighbour at all, iBGP included. Use it to test a route on one router, or to hold a route that only that router needs.
local-AS
In a confederation, a router in one sub-AS sees a neighbour in another sub-AS as a confederation eBGP peer, and no-export would allow the route to cross that boundary. local-AS is stricter: the route stays inside its own sub-AS. Outside a confederation it behaves like no-export.
route-map TAG-NO-EXPORT permit 10
set community no-export additive
!
router bgp 64500
address-family ipv4 unicast
neighbor 192.0.2.1 route-map TAG-NO-EXPORT in
neighbor 10.255.0.2 send-community
R1. Routes from ISP A are kept inside AS 64500. send-community on the iBGP neighbour passes the tag to R2 so that R2 also refuses to export them. Use no-advertise or local-AS in the set line for the other behaviours.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R2#show ip bgp community no-export
Network Next Hop Metric LocPrf Weight Path
*>i 203.0.113.0 10.255.0.1 0 100 0 64501 i
Lists every route carrying the community. To see the tag on one prefix, run show ip bgp 203.0.113.0 and look for the Community line, which reads no-export for this route.
Replace or add to existing tags
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Without additive, a set community command replaces every community on the route, including ones the provider set.
Send, match and set
Three steps make communities work. First, allow them to be sent. Second, match them with a community list. Third, act on them in a route map.
Without and with send-community
On small screens, swipe sideways or focus the diagram and use the arrow keys.
Missing send-community is the most common reason tags do not arrive.
ip bgp-community new-format
ip community-list standard ISPA-PREFER permit 64501:80
route-map ISPA-IN permit 10
match community ISPA-PREFER
set local-preference 80
route-map ISPA-IN permit 20
router bgp 64500
address-family ipv4 unicast
neighbor 192.0.2.1 send-community
neighbor 192.0.2.1 route-map ISPA-IN in
R1. new-format makes IOS XE show AS:value instead of one large decimal number. Sequence 10 lowers the preference of routes ISP A has tagged 64501:80. Sequence 20 passes everything else unchanged.
To tag routes you send, set the community in an outbound route map. Use additive so existing tags are kept instead of replaced.
route-map TO-ISPB permit 10
match ip address prefix-list COMPANY-ONLY
set community 64502:200 additive
R2. Asks ISP B to apply whatever policy 64502:200 means in its published list. Check the provider's documentation first; the number here is an example.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp 203.0.113.0
BGP routing table entry for 203.0.113.0/24, version 8
Paths: (1 available, best #1, table default)
64501
192.0.2.1 from 192.0.2.1 (11.11.11.11)
Origin IGP, metric 0, localpref 80, valid, external, best
Community: 64501:80
The Community line shows the tag, and localpref 80 shows the route map acted on it. If the line is missing, check that the neighbour sends communities and that new-format is set.
Extended and large communities
Extended communities are 8 bytes and carry typed values such as the route targets used by MPLS VPNs. Large communities are 12 bytes, written global:local1:local2. The first field is a full 32-bit AS number, which standard communities cannot hold, and the two local fields leave room for a function and a parameter.
Standard and large communities
On small screens, swipe sideways or focus the diagram and use the arrow keys.
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.
Communities let one network give others a simple way to ask for a behaviour without sharing its internal design. A provider may publish a table such as set 64501:80 to lower local preference, or a value that blocks advertisement to a certain region. Inside a company, tags mark where a route was learned so that policy elsewhere can act on it.
Three typical uses of communities
On small screens, swipe sideways or focus the diagram and use the arrow keys.
A published table of values is the contract between networks.
Check your understanding
Predict · scenario 1
A route arrives with a community but your neighbours downstream never see it. What is the most likely cause?
Predict · scenario 2
What does no-export do?
Predict · scenario 3
Why use set community ... additive?
FAQ
Are communities sent by default on Cisco IOS XE?
No. A neighbour must be configured with send-community, otherwise tags are stripped when the route is advertised.
Does a community change how a route is chosen?
Not by itself. A community is a label. Policy somewhere, usually a route map, reads the label and changes an attribute such as local preference.
What is a large community?
A 12-byte tag in the form global:local1:local2, defined in RFC 8092, that supports 4-byte AS numbers in the first field. Support depends on the release, so check yours.