Use it to mark routes in one place and act on the mark somewhere else, to signal a provider how to treat your routes, or when routes are tagged but nothing happens.
BGP Communities Deep Reference
A BGP community is a tag attached to a route, written as AS:value (for example 65000:100). The tag does nothing by itself; routers act on it through policy — set LOCAL_PREF, filter or prepend when a tag is present. A few well-known communities, such as NO_EXPORT and NO_ADVERTISE, have a built-in meaning.
1. neighbor X send-community both — communities are not sent by default on IOS.
2. show ip bgp <prefix> — Community / Large Community fields.
3. Well-known: NO_EXPORT, NO_ADVERTISE; match with ip community-list in a route-map.
route-map sets the community (additive) → send-community toward the neighbour → neighbour receives the tag → community-list matches in its route-map → action (LOCAL_PREF, filter, prepend) → result in its BGP table
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
neighbor <peer> send-community [standard|extended|both]Primary Commands
Configuration and operational commands for this Topic.
neighbor <peer> send-community [standard|extended|both]ReferenceEnables transmission of selected community attribute types to a BGP peer.
Cisco IOS XE · mixedmatch community <list-name>ReferenceMatch a standard community list in a route map.
Cisco IOS / IOS XE · mixed · configuresset community <AA:NN> additiveReferenceAdd a standard community while preserving existing values.
Cisco IOS / IOS XE · mixed · configuresset local-preference <value>ReferenceSet AS-internal exit preference on routes selected by a route map.
Cisco IOS / IOS XE · mixed · configuresneighbor <peer> route-map <name> {in|out}ReferenceAttach BGP import or export policy in the chosen address family.
Cisco IOS / IOS XE · mixed · configuresip community-list standard <name> permit <AA:NN>ReferenceDefine a standard community match list.
Cisco IOS / IOS XE · mixed · configuresset large-community <GA:LD1:LD2> additiveReferenceAdd a 12-octet large community on supported IOS XE releases.
Cisco IOS / IOS XE · mixed · configuresShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification — read-only Verify boundary
show ip bgp 203.0.113.0/24
show ip bgp community 65000:100
show ip community-list
show route-map
show ip bgp neighbors 10.0.0.2
show ip bgp neighbors 10.0.0.2 advertised-routes
show ip route 203.0.113.0
Read exact-prefix detail on both endpoints: community values, LOCAL_PREF and path source. Community filtering is standard-community lookup; use supported exact-prefix detail for extended/large attributes. show route-map confirms clauses, but its packet counters are not authoritative BGP route hit counters.
Step 2 Operational verification and known-good state Verify boundary
show ip bgp 203.0.113.0/24
show ip bgp community 65000:100
show ip community-list
show route-map
The prefix detail prints a Community: line when the route carries any. The second command lists all routes with a given community. The community lists and route maps show what is matched and how often.
Check in the order of the three steps: is the community on the route where it is set, is it on the route at the neighbour, and does the neighbour's route map count a match.
Known-good: the route carries the intended community on the receiving router and the action tied to it is visible on the route.
Step 3 Failure Signatures Narrow the fault
- Tag present locally but absent remotely: inspect send-community, AF and export policies along every hop.
- Tag survives but preference stays 100: wrong policy direction, unattached route map or earlier matching sequence.
- Unexpected loss of routes: implicit deny because the deliberate fallback permit is missing.
- Existing tags disappear: set community without additive replaces standard values.
- NO_ADVERTISE route missing at iBGP peer: expected standardized restriction; NO_EXPORT instead allows internal propagation.
- Large tag missing with standard propagation enabled: verify deployed release support and downstream policy rather than assuming both covers every implementation.
Step 4 Failure signatures and troubleshooting branches Narrow the fault
- The community is on the route locally but not at the neighbour.
send-communityis missing towards that neighbour — or towards the next one along. - Existing communities vanished. A
set communitywithoutadditivereplaced them. - The community arrives but nothing happens. No route map matches it, or the route map is not applied to that neighbour and direction.
- The value looks like a large number.
ip bgp-community new-formatis not configured; the tag is the same. - A route is not advertised to an eBGP neighbour for no visible reason. It carries
no-export. - The policy changed but the routes did not. Refresh with
clear ip bgp <neighbor> soft inorsoft out.
Step 5 When the problem is really fixed Narrow the fault
- The route shows the intended community where it is set and on the router that acts on it.
- The matching route-map clause counts hits.
- The resulting attribute or filtering is visible on the route.
- Communities that should be preserved are still present.
Subtopics
Go one level deeper into this subject.
Cisco IOS does not send communities to a neighbour unless neighbor … send-community is configured. set community replaces all existing communities unless you add additive. ip bgp-community new-format shows them as AS:value. NO_EXPORT keeps a route inside the AS; NO_ADVERTISE stops it at the receiving router.
show ip bgp <prefix> → Community: line on the path. show ip community-list → what your policy matches. show route-map → the clause that sets or matches the community. show running-config | include send-community → is it sent at all.
ReferenceWhat it is2 sections · depth on demand
Direct Answer
BGP communities tag routes with policy metadata. A custom tag has no automatic routing effect: a configured import/export policy must interpret it. Well-known communities such as NO_EXPORT and NO_ADVERTISE have standardized advertisement restrictions.
Mechanics & mental model
A BGP community is a tag attached to a route. It does nothing by itself; routers along the way can be configured to match on the tag and act — prefer the route, filter it, prepend it. Communities let one router classify a route and others apply policy without each needing its own prefix lists.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
Communities are how larger networks and service providers keep policy manageable: mark a route once where it enters, act on the mark everywhere else. They also fail quietly — on Cisco IOS a community is not even sent to a neighbour unless that is configured, and a route map can erase the existing tags without anyone noticing.
ReferenceHow it works1 section · depth on demand
Technical Mechanics
Standard and well-known communities
Standard communities are optional transitive 32-bit values, conventionally displayed as two 16-bit fields AA:NN. 65000:100 is an operator-defined label, not inherently a LOCAL_PREF value. NO_EXPORT (0xFFFFFF01) prevents advertisement outside the BGP confederation boundary, or the AS when no confederation exists. NO_ADVERTISE (0xFFFFFF02) prevents advertisement to any BGP peer, including iBGP. NO_EXPORT_SUBCONFED (0xFFFFFF03; Cisco local-AS spelling) additionally prevents advertisement to external peers in another confederation member AS.
Extended Communities
RFC 4360 uses 8-octet typed values with transitive/non-transitive classes. Route Targets control VPN import/export through VRF policy; Site of Origin can identify origin sites. An RT is not a NEXT_HOP or an RD. Carrying an extended community alone does not establish a VPN route, label or forwarding path.
Large Communities
RFC 8092 uses 12-octet values: a 32-bit Global Administrator plus two 32-bit local fields, displayed as GA:LD1:LD2 (for example 4200000000:100:20). This supports four-octet AS administrators without squeezing them into a standard 16-bit field. Large communities are optional transitive; their custom meaning still comes from policy.
Propagation and route policy
Apply a route map in the correct AF and direction. match community selects community-list matches; set community changes tags, and additive preserves existing standard communities. Without additive existing values are replaced. A matching permit entry applies its sets; unmatched routes hit the route map’s implicit deny unless a deliberate later permit exists. Empty permit 100 below allows other routes unchanged. BGP route policy acts on NLRI, unlike interface ip policy route-map packet-based routing.
Cisco neighbor send-community both enables standard and extended propagation. On IOS XE releases supporting the documented Large Community feature, standard/both also carries large communities; do not invent a send-community large syntax or assume universal release support. Inspect the receiver to confirm each attribute survives all policy/peering hops.
ReferenceImportant terms & boundaries4 sections · depth on demand
Official Sources
Proof Boundaries
A visible community proves local metadata, not the neighbor’s import decision. Local advertised-routes output may not expose all post-export attribute rewrites; remote accepted-prefix detail is needed. NO_EXPORT is an advertisement boundary, not a firewall or guarantee that traffic stays in the AS. Device verification requires actual observed state; these samples are not Evidence.
In depth
Designing with BGP communities
A community is a 4-byte tag attached to a route. It does nothing by itself, but policy anywhere along the way can match it. RFC 1997 defines the COMMUNITIES attribute:
- Type 8, optional transitive, a list of 4-byte values.
- Written by convention as AS:value.
- The ranges 0x00000000–0x0000FFFF and 0xFFFF0000–0xFFFFFFFF are reserved.
It also defines three well-known communities:
- NO_EXPORT: don't advertise outside the AS or confederation.
- NO_ADVERTISE: don't advertise to any peer.
- NO_EXPORT_SUBCONFED: don't advertise to external peers, including confederation members.
A community plan
| Range (AS 65010) | Meaning | Set where |
|---|---|---|
| 65010:100 | Learned from a customer | Inbound from customers |
| 65010:200 | Learned from a peer | Inbound from IXP peers |
| 65010:300 | Learned from transit | Inbound from transit providers |
| 65010:1xxx | Learned at site xxx | Inbound at each edge |
| 65010:666 | Blackhole request | Customers, for DDoS mitigation |
| 65010:80 / 65010:120 | Set LOCAL_PREF to 80 / 120 | Customer requests |
Typical policies built on it
| Policy | Implementation |
|---|---|
| Send only customer routes to peers and transit | Outbound: permit community 65010:100, deny the rest |
| Let customers lower their own preference | Inbound: match 65010:80, set local-preference 80 |
| Keep internal routes internal | Set NO_EXPORT on routes that mustn't leave the AS |
| Trace where a route entered the network | Site communities |
Extended and large communities
Standard communities only hold a 2-byte AS. Large communities (RFC 8092, 12 bytes: ASN:value1:value2) work with 4-byte AS numbers. Extended communities (8 bytes) are used for route targets in VPNs.
R1(config)# ip community-list standard CUSTOMER permit 65010:100
R1(config)# ip community-list standard LOWER-PREF permit 65010:80
R1(config)# route-map FROM-CUSTOMER permit 10
R1(config-route-map)# match community LOWER-PREF
R1(config-route-map)# set local-preference 80
R1(config-route-map)# set community 65010:100 additive
R1(config)# route-map FROM-CUSTOMER permit 20
R1(config-route-map)# set community 65010:100 additive
R1(config)# route-map TO-TRANSIT permit 10
R1(config-route-map)# match community CUSTOMER
R1(config)# ip bgp-community new-format
R1# show bgp ipv4 unicast community 65010:100 | include Total|Network
R1# show bgp ipv4 unicast 192.0.2.0/24 | include Community
Remember to send them
Communities only reach a neighbour if send-community is configured for it. Use additive, or existing communities are replaced. ip bgp-community new-format shows values as AS:value instead of one large number.
Documented example, not captured output.
Mechanics and state ownership
A standard community is a 32-bit number, written as two halves AS:value — for example 65000:100. Displaying it in that form requires ip bgp-community new-format; otherwise it is shown as one large decimal number. What a value means is purely an agreement: it is whatever the routers' policies make of it.
The life of a community has three steps, and each can fail separately:
1. Set. A route map adds it: set community 65000:100 additive. Without additive, the communities already on the route are replaced.
2. Send. neighbor <ip> send-community must be configured for each neighbour that should receive it. It is off by default, for iBGP as well as eBGP.
3. Match. The receiving router defines ip community-list standard CUST permit 65000:100 and uses match community CUST in a route map that then sets LOCAL_PREF, filters, or whatever is intended.
A few well-known communities have a built-in effect: no-export keeps a route from being advertised to eBGP neighbours, no-advertise from being advertised to anyone, and local-AS from leaving the local sub-AS.
Extended and large communities are separate attributes with longer formats; they need send-community extended or both.
ReferenceConfiguration & state1 section · depth on demand
Configuration — Cisco IOS / IOS XE
Default VRF IPv4 unicast; peer 10.0.0.2 already has same-AS transport and AF activation. Import raises LOCAL_PREF for tag 65000:100; export adds that tag only to 203.0.113.0/24. The last permit intentionally passes other routes. These examples do not originate a prefix.
ip bgp-community new-format
ip community-list standard PREFERRED permit 65000:100
ip prefix-list TAG-PREFIX permit 203.0.113.0/24
route-map IBGP-IN permit 10
match community PREFERRED
set local-preference 200
route-map IBGP-IN permit 100
route-map IBGP-OUT permit 10
match ip address prefix-list TAG-PREFIX
set community 65000:100 additive
route-map IBGP-OUT permit 100
router bgp 65000
address-family ipv4 unicast
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 route-map IBGP-IN in
neighbor 10.0.0.2 route-map IBGP-OUT out
exit-address-family
Separate Large Community tagging example for an IOS XE release supporting the feature: set large-community 4200000000:100:20 additive in the matched export route-map entry. Verify support and receiving attributes. Do not replace the standard import match with a large-community match without defining its list/policy.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab addressing; local AS 65000; loopbacks carried in the IGP.
! sender
ip bgp-community new-format
route-map TAG-OUT permit 10
set community 65000:200 additive
router bgp 65000
address-family ipv4 unicast
neighbor 10.0.0.2 send-community both
neighbor 10.0.0.2 route-map TAG-OUT out
!
! receiver
ip bgp-community new-format
ip community-list standard BACKUP permit 65000:200
route-map ACT-IN permit 10
match community BACKUP
set local-preference 50
route-map ACT-IN permit 20Expected output
show ip bgp 203.0.113.0 255.255.255.0Expected state: On the receiver: the community is present and the action took effect.
BGP routing table entry for 203.0.113.0/24
Paths: (1 available, best #1, table default)
65010
10.0.0.1 from 10.0.0.1 (1.1.1.1)
Origin IGP, metric 0, localpref 50, valid, internal, best
Community: 65000:200
! Illustrative output, not captured Evidence.The `Community:` line proves the tag arrived (so `send-community` works), and `localpref 50` proves the receiver's route-map matched it. No Community line at all usually means `send-community` is missing on the sender.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → BGP Communities Deep Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
BGP Communities Deep Reference operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for BGP Communities Deep Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Input/session | Correct peer, source, AF and route context | Session/source/input state disagrees | Exact peer/source/prefix detail |
| Policy/protocol | BGP communities as policy metadata carried with routes, including standard/well-known community handling, match/set policy, propagation to neighbors and the distinction between marking a route and proving the intended import/export action occurred matches intended design | the community is never set, the neighbor does not transmit the relevant community attribute, a community-list matches a different representation, route-map direction or sequence is wrong, a broad permit bypasses the intended action, or the community is correct but the operator assumes that alone proves export suppression or path preference | Compare policy/attributes/propagation |
| Route/forwarding | Expected result reaches RIB/FIB | Control-plane state exists but installed path disagrees | RIB/FIB/CEF + next-hop proof |
| Closure | Original workload passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
BGP Communities — Fast Check
Community policy evidence in six steps
1. Inspect route communities.
2. Verify peer sends communities.
3. Match community-list.
4. Check route-map sequence/direction.
5. Confirm resulting attribute/export.
6. Verify downstream route.
Deep reference
Healthy vs suspicious evidence
Expected Output — illustrative
Authored illustration; not a device capture. Field wording varies with IOS / IOS XE release.
Origin IGP, localpref 200, valid, internal, best
Community: 65000:100
Large Community: 4200000000:100:20
The label and preference are distinct attributes. In this example LOCAL_PREF 200 is consistent with import policy, but compare policy attachment and competing paths to establish causality. Large Community is shown only for the separate feature-enabled tagging case.