Pcornel
Networking · Routing › BGP

BGP Communities Deep Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=231

Back to the Topic

Answer

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.

Remember

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.

First checks

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.

Commands

ip community-list standard <name> permit <AA:NN>
Define a standard community match list.
match community <list-name>
Match a standard community list in a route map.
neighbor <peer> route-map <name> {in|out}
Attach BGP import or export policy in the chosen address family.
set community <AA:NN> additive
Add a standard community while preserving existing values.
set large-community <GA:LD1:LD2> additive
Add a 12-octet large community on supported IOS XE releases.
set local-preference <value>
Set AS-internal exit preference on routes selected by a route map.
show ip community-list
Inspect configured standard community-list entries.
neighbor <peer> send-community [standard|extended|both]
Enables transmission of selected community attribute types to a BGP peer.
ip bgp-community new-format
ip community-list standard CUST permit 65000:100
clear ip bgp <neighbor> soft in

Verify in this order

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

Where it usually breaks

underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path

BGP Communities Deep Reference operational reference

BoundaryKnown-good for BGP Communities Deep ReferenceSuspicious signatureNext proof
Input/sessionCorrect peer, source, AF and route contextSession/source/input state disagreesExact peer/source/prefix detail
Policy/protocolBGP 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 designthe 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 preferenceCompare policy/attributes/propagation
Route/forwardingExpected result reaches RIB/FIBControl-plane state exists but installed path disagreesRIB/FIB/CEF + next-hop proof
ClosureOriginal workload passes for explained reasonSymptom moved, was bypassed or state was forcedRegression/failover test

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=231

Confirmation

Confirm action

Continue?