BGP Communities: Wire Formats and Well-Known Values

Cover image: BGP communities, standard type 8, extended type 16 and large type 32, well-known NO_EXPORT, BLACKHOLE and GRACEFUL_SHUTDOWN

Log in to the public route server at RouteViews and ask it for every route tagged NO_EXPORT: show ip bgp community no-export returns nothing. Ask for 65535:666, the BLACKHOLE community, and you get two aggregates, a /23 and a /22. Ask for 65535:0, GRACEFUL_SHUTDOWN, and you get 241 prefixes from 104 origin ASes. All three are BGP communities: tags of 4 bytes that routers copy from AS to AS without having to understand them. Some of them have a fixed meaning that every router obeys. Most of them mean only what a network's policy says they mean, and many of them travel much further than their owner intended. This part covers standard communities (RFC 1997), their 8-byte extended and 12-byte large successors, the well-known values, and how operators build a policy language out of them. A GoBGP lab shows what a router really does with each one, and a full RIPE RIS table shows how 7 million real routes use them.

TL;DR
  • What it is: COMMUNITIES is path attribute type 8, optional transitive, flags 0xC0: a list of 32-bit values, written ASN:value. It never changes best-path selection by itself; policy that matches it does.[1]
  • Three sizes: standard 4 bytes (type 8), extended 8 bytes with a type and sub-type (type 16, route targets, SoO, link bandwidth, color), large 12 bytes ASN:x:y with a 32-bit ASN (type 32).[1][2][3]
  • Built-in actions: only NO_EXPORT, NO_ADVERTISE and NO_EXPORT_SUBCONFED. BLACKHOLE, GRACEFUL_SHUTDOWN and NOPEER need policy. In our lab GoBGP passed a /24 tagged BLACKHOLE to both eBGP neighbours and ignored NOPEER.[1][6][7][8][20]
  • Errors: a COMMUNITIES length that is not a non-zero multiple of 4 means treat-as-withdraw (RFC 7606). GoBGP did that for length 6 but kept the route for length 0.[5][20]
  • Real table: 41.7 % of IPv4 routes in RIS rrc14 carry communities, 0.85 % large and 0.23 % extended. Three of the full-table peers send none at all. Route targets, VXLAN encapsulation and SR color communities show up on public Internet routes.[21]
BGP path attribute tree with well-known mandatory, well-known discretionary, optional transitive and optional non-transitive groups; Community highlighted as optional transitive
Figure 1. You are here: COMMUNITIES is the second optional transitive attribute in Pat's classification, after AGGREGATOR (part 11). Extended and large communities came later as separate attribute types.

What BGP communities are

RFC 1997 (August 1996, R. Chandra, P. Traina and T. Li) defines the attribute in one sentence: "The COMMUNITIES path attribute is an optional transitive attribute of variable length. The attribute consists of a set of four octet values, each of which specify a community."[1] A community is a group of destinations that share a property, and the RFC leaves it to each network to decide what that property is. The encoding convention is that "the first two octets of the community value" carry an AS number and the last two are "defined by the AS". That is why communities are written 65010:100, and why the tag 2914:410 belongs to NTT (AS 2914) and means whatever NTT documents.[1][13]

The idea is older than the RFC number suggests: RFC 1998, published the same month, already described how a provider can let customers set their own LOCAL_PREF by tagging routes, instead of the provider writing a per-customer configuration for every backup arrangement.[10] That is still the main use today. Part 9 of this series showed the LOCAL_PREF tiers that the tags drive.

Four properties follow from the definition, and almost every operational problem with communities comes from forgetting one of them:

  • Optional. A route does not need to carry communities, and a BGP implementation does not have to understand them.
  • Transitive. If a router accepts the route and passes it on, it passes the communities too, including tags it has never heard of. A router that does not recognise the attribute at all passes it with the Partial bit set (RFC 4271 section 5).[11] RouteViews' Cisco IOS 15.5 does not know large communities, so it prints them as unknown transitive attribute: flag 0xE0 type 0x20: 0xE0 is optional + transitive + Partial.[22]
  • No meaning of its own. Unlike LOCAL_PREF or MED, the attribute is not part of the decision process. A community influences routing only through policy that matches it and then sets something else (LOCAL_PREF, prepends, a next hop, a reject).
  • A set, freely edited. RFC 1997 says a speaker "may modify this attribute according to the local policy". Every network on the path can add, remove or replace tags. When routes are aggregated without ATOMIC_AGGREGATE, the aggregate "should have a COMMUNITIES path attribute which contains all communities from all of the aggregated routes".[1]

Two ranges are reserved: 0x00000000-0x0000FFFF (0:x) and 0xFFFF0000-0xFFFFFFFF (65535:x). The second range holds the well-known communities. The first one is reserved, yet it is widely used in practice, as the RIS data below shows.[1][12]

Who sends communities by default

Because communities carry policy, vendors disagree on whether they leave the router at all without explicit configuration. This is the first thing to check when a neighbour says it cannot see your tags:

ImplementationiBGPeBGPKnob
Cisco IOS / IOS XEnot sentnot sentneighbor X send-community [standard|extended|both][15]
Cisco IOS XRalways sentnot sentsend-community-ebgp, send-extended-community-ebgp[16]
Junossentsent and acceptedremove with community delete in policy[17]
FRRsentsentneighbor X send-community, "Default: enabled"[18]
GoBGP 4.11sentsentobserved in our lab (no knob used)[20]

Cisco's own case study puts it bluntly: "Even if you set the community attribute, this attribute does not transmit to neighbors by default."[15] On IOS the classic display format is also a trap: without ip bgp-community new-format the router shows a community as one 32-bit decimal number instead of AS:value.[15]

Standard, extended and large communities on the wire

Byte layout of BGP standard, extended and large communities, with real hex from a GoBGP lab: 65010:100, NO_EXPORT, route target, non-transitive link bandwidth and large community 4200000001:2:3
Figure 2. Top: value layout of the three community types. Bottom: the attributes exactly as our raw customer speaker sent them to GoBGP in the lab.

Standard communities are the simplest attribute in BGP. The first UPDATE our customer speaker sent in the lab is 58 bytes: the 19-byte header, 2 bytes of withdrawn-routes length, 2 bytes of attribute length, 31 bytes of attributes and 4 bytes of NLRI (198.18.1.0/24). The last attribute is the community list:[20]

c0          flags: optional (0x80) + transitive (0x40)
08          type 8 = COMMUNITIES
08          length 8 = two values
fd f2 00 64 65010:100   (0xfdf2 = 65010, 0x0064 = 100)
fd f2 00 c8 65010:200   (0x00c8 = 200)

There is no count field and no per-value type: the length divided by 4 is the number of tags. A route can carry many of them. The longest list in the RIS table we parsed has 103 values (45.90.30.0/24 via AS 2914), which needs 412 bytes and therefore the Extended Length flag (0xD0). 806 IPv4 routes in that dump carry their COMMUNITIES attribute with that flag.[21]

Extended communities (RFC 4360, February 2006) are 8 bytes each, carried in path attribute type 16. The first octet is a type and the second, for most types, a sub-type. Two bits of the type octet matter: 0x80 (I) marks an IANA-assigned type, and 0x40 (T) marks a value that is not transitive across ASes. The attribute is still optional transitive; the T bit is a per-value rule: "If a route has a non-transitivity extended community, then before advertising the route across the Autonomous System boundary the community SHOULD be removed from the route."[2] The remaining six bytes hold a global administrator (a 2-byte ASN, a 4-byte ASN or an IPv4 address) and a local value. The common values are listed in the IANA registry: 0x00/0x02 is a route target with a 2-byte ASN, 0x00/0x03 route origin (Site of Origin), 0x40/0x04 the non-transitive link bandwidth, 0x03/0x0b color for SR policy and 0x06 the EVPN family.[12] Our lab route carried three of them:

c0 10 18                 flags 0xC0, type 16, length 24 = three values
00 02 fdf2 00000064      route target   65010:100
00 03 fdf2 00000001      route origin   65010:1
40 04 fdf2 4cee6b28      link bandwidth AS 65010, IEEE float 125000000.0 bytes/s = 1 Gbit/s
                         (type 0x40: T bit set = non-transitive)

Route targets are the reason extended communities exist: MPLS L3VPN and EVPN import and export routes by RT. The blog's extended communities overview and the RD vs RT troubleshooting post cover the VPN side. This article stays with what happens to these values at AS borders.

Large communities (RFC 8092, February 2017) solve a problem that 4-byte AS numbers created. The RFC explains why neither older type works: "a two-octet word cannot fit a four-octet ASN", and the six-byte value of an extended community "precludes the common operational practice of encoding four-octet ASNs in both the Global Administrator and the Local Administrator sub-fields."[3] A large community is three 32-bit fields: Global Administrator (the ASN), Local Data Part 1 and Local Data Part 2. RFC 8195 suggests using them as ASN:Function:Parameter, where the ASN is the network "that is expected to perform the action".[4] In the lab, a 4-byte private ASN fits without tricks:

c0 20 18                     flags 0xC0, type 32, length 24 = two values
0000fdf2 00000001 00000064   65010:1:100
fa56ea01 00000002 00000003   4200000001:2:3

The well-known communities

Table of BGP well-known communities: NO_EXPORT, NO_ADVERTISE, NO_EXPORT_SUBCONFED, NOPEER, BLACKHOLE 65535:666, GRACEFUL_SHUTDOWN 65535:0, ACCEPT_OWN, LLGR_STALE, Standby PE, reserved ranges
Figure 3. The well-known communities in the IANA registry that you will actually see, with the RFC that defines each one.

RFC 1997 defined three values with a built-in meaning, and every BGP implementation must act on them:[1]

  • NO_EXPORT (0xFFFFFF01, 65535:65281): routes carrying it "MUST NOT be advertised outside a BGP confederation boundary (a stand-alone autonomous system that is not part of a confederation should be considered a confederation itself)". iBGP and confederation eBGP peers still get the route; real eBGP neighbours do not.
  • NO_ADVERTISE (0xFFFFFF02, 65535:65282): "MUST NOT be advertised to other BGP peers", iBGP included. The route stays on the router that received it.
  • NO_EXPORT_SUBCONFED (0xFFFFFF03, 65535:65283): "MUST NOT be advertised to external BGP peers (this includes peers in other members autonomous systems inside a BGP confederation)". Cisco calls it local-as. Without a confederation it behaves exactly like NO_EXPORT.

Every later well-known value is a request that the receiver may or may not honour:

  • NOPEER (65535:65284, RFC 3765, 2004) is explicitly "advisory": the route "need not be advertised across bilateral peer connections". A router has no way to know which of its sessions are peers rather than customers or transits, so the action always comes from operator policy.[8]
  • BLACKHOLE (65535:666, RFC 7999, October 2016) asks the neighbour to drop traffic to the prefix. Its use "MUST be agreed upon by the two networks", the prefix is "typically as specific as possible, /32 for IPv4 or /128 for IPv6", and a receiver "SHOULD add the NO_ADVERTISE or NO_EXPORT community" so the blackholed host route does not spread.[6] FRR adds NO_ADVERTISE automatically when it receives the BLACKHOLE community.[18]
  • GRACEFUL_SHUTDOWN (65535:0, RFC 8326, March 2018) is set on routes before an eBGP session is taken down for maintenance. The receiver lowers LOCAL_PREF so traffic moves to an alternative path while the old one still works: the value "SHOULD be lower than any of the alternative paths. The RECOMMENDED value is 0."[7] NTT says it honours the community "on all EBGP sessions", and DE-CIX's route servers set LOCAL_PREF 0 for it.[13][14]
  • ACCEPT_OWN (65535:1, RFC 7611) lets a PE accept its own VPN route when a route reflector sends it back, and LLGR_STALE / NO_LLGR (65535:6 / :7, RFC 9494) mark routes kept by long-lived graceful restart.[23]

One more value causes confusion: 0:0, which Cisco calls internet. It is not in the IANA well-known registry. RFC 8642 points this out while documenting a worse problem: vendors disagree on what "set community" does to well-known values. Junos removes all of them, IOS XR keeps 0:0, 65535:0, 65535:1 and the three RFC 1997 values, OpenBGPD's set community removes nothing, and Nokia's replace removes everything.[9] The same one-line policy can therefore drop NO_EXPORT on one platform and keep it on another.

Lab: what a router really does with each community

Documentation tells you what should happen. To see what does happen, we built a small lab of real GoBGP 4.11 daemons on loopback addresses, with four Python speakers that send and receive UPDATEs byte by byte. Router r1 (AS 65001) has one customer, C (AS 65010), which sends tagged routes. It also has three observers: O, a settlement-free peer (AS 65020) with an export policy; T, a transit (AS 65030) with no policy at all, so it shows GoBGP's built-in behaviour; and I, a raw iBGP neighbour inside AS 65001. A second GoBGP router, r2, is an ordinary iBGP neighbour of r1.[20]

Lab topology: GoBGP router r1 AS 65001 with a customer C AS 65010, peer O AS 65020, transit T AS 65030, iBGP observer I and iBGP router r2, plus the import and export community policies
Figure 4. The lab. Python speakers C, O, T and I talk real BGP to GoBGP router r1; r2 is a second GoBGP router in the same AS. The two policies are listed under the diagram.

The import policy on the customer session and the export policy toward the peer use only community logic. This is the GoBGP configuration, trimmed to the interesting statements:

[[defined-sets.bgp-defined-sets.community-sets]]
  community-set-name = "blackhole"
  community-list = ["65535:666"]
[[policy-definitions]]
  name = "cust-in"
  [[policy-definitions.statements]]
    name = "rtbh"                       # /32 + BLACKHOLE only
    [policy-definitions.statements.conditions.match-prefix-set]
      prefix-set = "host-routes"        # 0.0.0.0/0 masklength 32..32
    [policy-definitions.statements.conditions.bgp-conditions.match-community-set]
      community-set = "blackhole"
    [policy-definitions.statements.actions]
      route-disposition = "accept-route"
    [policy-definitions.statements.actions.bgp-actions]
      set-next-hop = "192.0.2.1"
      set-local-pref = 200
      [policy-definitions.statements.actions.bgp-actions.set-community.set-community-method]
        communities-list = ["no-export", "65001:666"]   # options = "add"
  ...                                    # 65535:0 -> LOCAL_PREF 0, all else -> LP 200 + 65001:100
[[policy-definitions]]
  name = "to-peer"                      # export toward O
  ...  65001:0 -> reject-route
  ...  65001:3 -> set-as-path-prepend as = "65001", repeat-n = 3
  ...  always  -> set-community remove ["^65001:.*$"]
Result matrix of the GoBGP community lab: NO_EXPORT, NO_ADVERTISE, NO_EXPORT_SUBCONFED, NOPEER, BLACKHOLE, GRACEFUL_SHUTDOWN, action communities, extended and large communities, per neighbour type
Figure 5. Thirteen tagged routes from customer C and what each observer received. Every cell is taken from the UPDATEs recorded on the wire.

Plain tags: added on ingress, scrubbed on egress (mostly)

Route T1 arrived with 65010:100 65010:200. r1 added its own informational tag 65001:100 ("learned from a customer") and the large community 65001:1:65010 ("learned from AS 65010"). Here is what the three observers received, decoded from the raw bytes:

O  rx len=77  AS_PATH=65001 65010 | COMM=65010:100 65010:200 | LARGE=65001:1:65010
T  rx len=81  AS_PATH=65001 65010 | COMM=65010:100 65010:200 65001:100 | LARGE=65001:1:65010
I  rx len=84  AS_PATH=65010 | LP=200 | COMM=65010:100 65010:200 65001:100 | LARGE=65001:1:65010

The scrub rule on the peer session removed 65001:100 as intended. But the large community 65001:1:65010 went out to the peer anyway, because the rule matched standard communities only. In GoBGP, Junos and FRR, standard, extended and large communities are separate lists with separate delete actions. A scrub policy that does not name all three leaks the other two. The transit T got everything, because it had no export policy. That is also what happens on a router where nobody thought about communities at all.

NO_EXPORT, NO_ADVERTISE and NO_EXPORT_SUBCONFED

The three RFC 1997 values behaved exactly as specified. NO_EXPORT (T2) reached the iBGP observer I and router r2, but neither eBGP neighbour. NO_ADVERTISE (T3) reached nobody: r1 installed it as best path and kept it to itself, and r2's table does not contain 198.18.3.0/24. NO_EXPORT_SUBCONFED (T4), with no confederation configured, behaved like NO_EXPORT. This is r1's table for the most interesting routes, as printed by gobgp global rib:

$ [r1] gobgp global rib -a ipv4
   Network              Next Hop             AS_PATH              Age        Attrs
*> 198.18.2.0/24        127.0.2.124          65010                00:00:24   [{Origin: i} {LocalPref: 200} {Communities: 65010:2, no-export, 65001:100} {LargeCommunity: [ 65001:1:65010]}]
*> 198.18.3.0/24        127.0.2.124          65010                00:00:22   [{Origin: i} {LocalPref: 200} {Communities: 65010:3, no-advertise, 65001:100} {LargeCommunity: [ 65001:1:65010]}]
*> 198.18.6.1/32        192.0.2.1            65010                00:00:18   [{Origin: i} {LocalPref: 200} {Communities: 65010:6, blackhole, no-export, 65001:666}]
*> 198.18.7.0/24        127.0.2.124          65010                00:00:15   [{Origin: i} {Communities: 65010:7, planned-shut, 65001:100}]
*> 198.18.9.0/24        127.0.2.124          65010                00:00:12   [{Origin: i} {LocalPref: 200} {Communities: 65001:3, 65001:100} {LargeCommunity: [ 65001:1:65010]}]
*> 198.18.10.0/24       127.0.2.124          65010                00:00:10   [{Origin: i} {LocalPref: 200} {Communities: 65001:100} {Extcomms: [65010:100], [65010:1], [65010:125000000]} {LargeCommunity: [ 65001:1:65010]}]
*> 198.18.11.0/24       127.0.2.124          65010                00:00:09   [{Origin: i} {LocalPref: 200} {Communities: 65001:100} {LargeCommunity: [ 65010:1:100, 4200000001:2:3, 65001:1:65010]}]

GoBGP prints GRACEFUL_SHUTDOWN as planned-shut, an older name for 65535:0. The route to 198.18.7.0/24 shows no LocalPref at all. The next section explains why.

NOPEER and BLACKHOLE: tags without a built-in action

NOPEER (T5) went to the peer and to the transit unchanged. That is correct for an advisory community: RFC 3765 permits an AS not to readvertise such a route, but it does not require it.[8] If you want to honour NOPEER, write it into your peer export policy, as with any other action community.

The BLACKHOLE tests show why RFC 7999 insists on a prefix-length guard. T6, a /32 with 65535:666, matched the rtbh statement: r1 rewrote the next hop to 192.0.2.1 (in production that address is routed to a discard interface), set LOCAL_PREF 200 and added NO_EXPORT, so only iBGP neighbours got it. On the wire to I:

I  rx len=74  AS_PATH=65010 | NH=192.0.2.1 | LP=200 |
              COMM[len=16]=65010:6 BLACKHOLE NO_EXPORT 65001:666
              c0 08 10 fdf20006 ffff029a ffffff01 fde9029a

T6b, a /24 with the same community, did not match the /32 condition. GoBGP has no built-in BLACKHOLE handling, so the route went on to the peer and the transit with 65535:666 still attached. If a network further on honours BLACKHOLE without checking the prefix length, a whole /24 is dropped. RouteViews shows that this is not theoretical. Two aggregates tagged BLACKHOLE were visible from the other side of the world on 3 December 2026:[22]

show ip bgp community 65535:666
BGP table version is 1565463705, local router ID is 128.223.51.103
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
V*   194.124.206.0/23 217.192.89.50                          0 3303 5405 60550 60550 60550 60550 i
V*   195.180.152.0/22 217.192.89.50                          0 3303 5405 60550 60550 60550 60550 i
V*                    193.0.0.56                             0 3333 5405 60550 60550 60550 60550 i
route-views>

Both prefixes are a /23 and a /22 originated by AS 60550 and carried through AS 5405. They are not host routes, the receivers did not act on the tag, and nobody added NO_EXPORT. The routes were still working, but the tag had travelled at least two AS hops past the network it was meant for. NTT's blackhole service shows the safe pattern: it accepts its own tag 2914:666 only on a /32 or /128 that is "included in the customer's existing ingress BGP filter", and its selective variants (2914:660, 661, 663, 664) limit the drop to a region or country.[13] The blog's RTBH and no-export post walks through the provider side of such a setup.

GRACEFUL_SHUTDOWN: why the LOCAL_PREF value needs a test

In the first run, the policy for 65535:0 said set-local-pref = 0, exactly as RFC 8326 recommends. r1's table above shows the route with no LOCAL_PREF at all. On iBGP, r1 then sent it with LOCAL_PREF 100, GoBGP's default:

I  rx len=69  AS_PATH=65010 | NH=127.0.2.124 | LP=100 | COMM=65010:7 GRACEFUL_SHUTDOWN 65001:100

We read this as GoBGP treating 0 as "not set" in its configuration model. That is our interpretation of the output; we did not trace it in the GoBGP source. The draining still looks like it works when the other path has a higher LOCAL_PREF. We repeated the test with a second customer path, D (AS 65040, AS_PATH 65040 65010, LOCAL_PREF 200), then tagged the primary path with GRACEFUL_SHUTDOWN:

## C now tags GRACEFUL_SHUTDOWN 65535:0 before maintenance
  4.529 C  tx type=2 len=58 ORIGIN=0 | AS_PATH=65010 | NH=127.0.2.124 | COMM[fl=0xc0 len=8]=65010:7 GRACEFUL_SHUTDOWN {c00808fdf20007ffff0000} | NLRI 198.18.7.0/24 C gshut
  4.530 I  rx type=2 len=84 ORIGIN=0 | AS_PATH=65040 65010 | NH=127.0.2.128 | LP=200 | COMM[fl=0xc0 len=8]=65040:1 65001:100 {c00808fe100001fde90064} | LARGE[fl=0xc0 len=12]=65001:1:65010 {c0200c0000fde9000000010000fdf2} | NLRI 198.18.7.0/24 
  5.030 C  rx type=2 len=27 WITHDRAW 198.18.7.0/24 
  5.531 D  rx type=2 len=27 WITHDRAW 198.18.7.0/24 
$ [r1] gobgp global rib 198.18.7.0/24 -a ipv4
   Network              Next Hop             AS_PATH              Age        Attrs
*> 198.18.7.0/24        127.0.2.128          65040 65010          00:00:06   [{Origin: i} {LocalPref: 200} {Communities: 65040:1, 65001:100} {LargeCommunity: [ 65001:1:65010]}]
*  198.18.7.0/24        127.0.2.124          65010                00:00:02   [{Origin: i} {Communities: 65010:7, planned-shut, 65001:100}]

The backup took over: 1 ms after C sent the tagged UPDATE (4.529 s), the iBGP observer received the replacement path through D (4.530 s), with no withdrawal and no gap. But the drained path ranked below the backup only because 100 is lower than 200. If the backup had LOCAL_PREF 80, the GRACEFUL_SHUTDOWN path would have won. With set-local-pref = 1 the attribute is really set:

Network              Next Hop             AS_PATH              Age        Attrs
*> 198.18.7.0/24        127.0.2.128          65040 65010          00:00:06   [{Origin: i} {LocalPref: 200} {Communities: 65040:1, 65001:100} {LargeCommunity: [ 65001:1:65010]}]
*  198.18.7.0/24        127.0.2.124          65010                00:00:03   [{Origin: i} {LocalPref: 1} {Communities: 65010:7, planned-shut, 65001:100}]

Use a value that works on your platform, and verify it with show bgp before your first maintenance window. FRR does this automatically: a receiving FRR router honours the community without policy, and the bgp graceful-shutdown command also sends LOCAL_PREF 0 to its iBGP peers.[18]

Action communities: the customer controls your export

Tests T8 and T9 are the pattern every transit provider offers. 65001:0 means "do not announce to peers": the route reached the transit and the iBGP observer, but not O. 65001:3 means "prepend three times toward peers". O received AS_PATH=65001 65001 65001 65001 65010, while T and I saw the normal path. The action community itself was removed by the scrub rule on the peer session, so the peer saw the result but not the tag. The adj-RIB-out toward O shows both effects:

$ [r1] gobgp neighbor 127.0.2.125 adj-out -a ipv4
   ID  Network              Next Hop             AS_PATH                       AttrsFiltered
   1   198.18.1.0/24        127.0.2.121          65001 65010                   [{Origin: i} {Communities: 65010:100, 65010:200} {LargeCommunity: [ 65001:1:65010]}]not filtered
   1   198.18.5.0/24        127.0.2.121          65001 65010                   [{Origin: i} {Communities: 65010:5, no-peer} {LargeCommunity: [ 65001:1:65010]}]not filtered
   1   198.18.7.0/24        127.0.2.121          65001 65010                   [{Origin: i} {Communities: 65010:7, planned-shut}]not filtered
   1   198.18.9.0/24        127.0.2.121          65001 65001 65001 65001 65010 [{Origin: i} {LargeCommunity: [ 65001:1:65010]}]not filtered
   1   198.18.10.0/24       127.0.2.121          65001 65010                   [{Origin: i} {Extcomms: [65010:100], [65010:1], [65010:125000000]} {LargeCommunity: [ 65001:1:65010]}]not filtered

Extended and large communities across the border

T10 carried a route target, a route origin and a non-transitive link-bandwidth community (0x40/0x04). All three reached the eBGP peer and the transit unchanged. RFC 4360 says the non-transitive value SHOULD be removed before the route crosses an AS boundary.[2] GoBGP 4.11 did not remove it, so on GoBGP that boundary rule has to be written as policy. T11's two large communities, including the 4-byte 4200000001:2:3, were forwarded intact, with r1's own 65001:1:65010 appended.

Duplicates and order

T14 sent 65010:9 65010:1 65010:1 65010:1. GoBGP kept the list exactly as received, duplicates and order included, and appended its own tag at the end. RFC 1997 says nothing about duplicates, and RFC 8092 says that duplicate large communities do not make the attribute malformed.[1][3] In the real table this hardly matters: in the RIS dump below, no IPv4 or IPv6 route had a duplicated standard community, and 47,985 IPv4 routes (2.1 % of those with communities) had an unsorted list.[21]

Malformed communities and RFC 7606

Before 2015, any malformed attribute meant a NOTIFICATION and a session reset, so one bad UPDATE dropped every route on the session. RFC 7606 introduced "treat-as-withdraw" for most attributes. For communities it says the attribute "SHALL be considered malformed if its length is not a non-zero multiple of 4" and the UPDATE "SHALL be handled using the approach of 'treat-as-withdraw'". The same rule applies to extended communities with a multiple of 8, and an "unrecognized Extended Community Type or Sub-Type" must not be treated as an error.[5] RFC 8092 says the same for large communities with a multiple of 12.[3] A wrong Optional or Transitive flag is also malformed under section 3 (c) of RFC 7606.[5]

Table of six malformed BGP community, extended community and large community attributes sent to GoBGP, with treat-as-withdraw results and RFC 7606 comparison
Figure 6. Six malformed community attributes, each sent after a clean announcement of the same prefix, and what GoBGP 4.11 did with them.

Four of the six results match the RFCs. A 6-byte COMMUNITIES attribute withdrew the prefix toward all three observers (I rx len=27 WITHDRAW 198.18.12.0/24), the session stayed up, and the neighbour's Discarded counter went from 0 to 1. The large community of 10 bytes, the extended community of 12 bytes and the COMMUNITIES attribute with flags 0x40 did the same, and the counter ended at 4.[20]

Two results differ from the RFCs. A zero-length COMMUNITIES attribute (c0 08 00) was accepted: r1 kept the route, dropped the empty attribute and re-advertised the prefix without it. RFC 7606 asks for a non-zero multiple of 4, so the route should have been withdrawn. And a COMMUNITIES attribute that arrived with the Partial bit (0xE0) was passed on as 0xC0. RFC 4271 does not let a speaker clear that bit, because it records that some router on the path did not understand the attribute.[11] This is the same behaviour we saw with AGGREGATOR in part 11. In the real table the Partial bit on COMMUNITIES is rare anyway: 4 IPv4 routes in RIS carry it.[21]

Communities in the real Internet table

To see how communities are used at scale, we parsed the full RIPE RIS rrc14 dump of 3 December 2026 00:00 UTC (20 peers at the Palo Alto collector, 1,106,938 IPv4 and 258,798 IPv6 prefixes) with our own MRT reader, and counted every COMMUNITIES, EXTENDED_COMMUNITIES and LARGE_COMMUNITY attribute.[21]

Statistics of BGP communities in the RIPE RIS rrc14 table: 41.7 percent of IPv4 routes carry communities, large 0.85 percent, extended 0.23 percent, which peers strip them, NTT 2914:410 and 2914:420 split
Figure 7. Communities in a full RIS table: how many routes carry them, which peers send them, and how NTT labels every route it exports.

Five findings stand out:

  • What a collector sees depends on who strips. 41.7 % of the 5,581,714 IPv4 routes carry COMMUNITIES (54.0 % of IPv6 routes). That figure is a property of the peers, not of the Internet: NTT, Telecom Italia Sparkle (AS 6762), Hurricane Electric and Internet2 send communities on 100 % of their routes, while three other full-table peers (AS 1280, AS 19151, AS 199524) send them on none. AS 14061 sends large communities on 171 of its 172 routes but no standard ones. Because two full tables carry tags, 97.0 % of IPv4 prefixes have communities on at least one path.
  • Informational tags dominate. The most common values are NTT's 2914:3000 (North America, 790,388 routes) and 2914:2000 (United States), and Sparkle's 6762:31. Every one of NTT's 1,073,181 routes carries exactly one of 2914:410 ("NTT and customer routes", 412,262) or 2914:420 ("Peer routes", 660,919). The documentation and the table agree to the last route.[13][21]
  • The ASN half is usually honest. In 97.3 % of the 9.6 million standard community values, the first 16 bits are an AS that appears in the route's AS_PATH. 2.2 % name a public AS that is not in the path, 0.1 % a private ASN, and 150 values use AS_TRANS 23456, which is the 2-byte placeholder for a 4-byte ASN and therefore not a real community owner. For large communities the Global Administrator is in the AS_PATH in 87.0 % of values.[21]
  • The reserved ranges are in use. 31,765 IPv4 values start with 0 or 65535, and only 19 of them are a registered well-known value. Values like 0:16509 (1,148 times) and 0:6939 follow the IXP route-server convention: DE-CIX documents 0:PEER-AS as "Do not redistribute to $PEER-AS". The route servers remove these tags before redistributing, so the copies in RIS came through other paths.[14][21] Unassigned values such as 65535:30 (4,189 times) also appear.
  • Well-known values hardly appear. No NO_EXPORT and no BLACKHOLE in RIS, which is what correctly working networks produce: NO_EXPORT never crosses an AS boundary, and BLACKHOLE should not either. GRACEFUL_SHUTDOWN appears on 8 IPv6 prefixes via Hurricane Electric, and Standby PE (65535:9) on 19 IPv4 prefixes via NTT.[21]

The typical route carries a few tags. In the IPv4 table, 4 values is the most common count (1,131,653 routes) and 2 the second (744,760), with 9,612,097 values on 2,325,207 routes, an average of 4.1.[21]

What leaks across AS borders

Real BGP community leaks: RouteViews shows zero NO_EXPORT routes, BLACKHOLE on two non-host prefixes, GRACEFUL_SHUTDOWN on 241 prefixes, a non-transitive extended community and route targets, VXLAN encapsulation and Color communities on public routes
Figure 8. Top: RouteViews queries for well-known and unusual communities. Bottom: VPN and data-centre extended communities found on public Internet routes in RIS.

Communities are transitive, so they carry internal information out of a network unless someone removes it. The RIS dump contains 12,922 IPv4 routes with extended communities, almost all of them received from NTT, and the values are telling. 18,659 values are route targets (2-byte and 4-byte AS forms), the import/export keys of MPLS VPNs. 510 are OSPF route-type communities that a PE attaches when it redistributes OSPF into a VPN. 144 are Encapsulation communities and 126 are EVPN Router's MAC communities, the pair that EVPN type-5 routes use for VXLAN. 97 are Color communities, which select SR-TE policies. Examples of the VXLAN pair come from AS 714 routes.[12][21] None of these values does anything on the public Internet, but each one shows how the originating network's VPN, EVPN or SR policy is built. There was not a single non-transitive extended community in the RIS dump, so on these paths someone applies the RFC 4360 rule that GoBGP did not apply in our test. RouteViews shows one exception below.

RouteViews shows the same thing from another collector. One path for 193.0.0.0/21 (RIPE NCC) arrives with an extended community of type 0x43, which IANA's registry places in the non-transitive opaque class. It also carries the Only-to-Customer attribute (type 35, RFC 9234), which RouteViews' IOS does not understand and prints with the Partial bit set. Its value 0x1A79 is AS 6777, the AMS-IX route server ASN:[22][24]

  49788 12552 3333
    91.218.184.60 from 91.218.184.60 (91.218.184.60)
      Origin IGP, localpref 100, valid, external
      Community: 12552:12000 12552:12700 12552:12701 12552:22000
      Extended Community: 0x43:100:0
      unknown transitive attribute: flag 0xE0 type 0x23 length 0x4
        value 0000 1A79 
      path 7F1586C18448 RPKI State valid

GRACEFUL_SHUTDOWN is the most visible leak: 241 prefixes and 684 paths at RouteViews, from 104 origin ASes, carried on by AS 3356, 3549, 101, 49788 and others.[22] A tag that leaks this way is not dangerous by itself, since the far-away receiver usually ignores it. The danger is a network that honours 65535:0 from every session. It would then depreference routes because some network several hops away is doing maintenance. Honour GRACEFUL_SHUTDOWN only from the neighbour whose session is going down, which is how NTT words it: on its own eBGP sessions.[13]

Designing a community scheme

Table of BGP community scheme design: informational communities, local preference, announcement scope, prepend, blackhole and graceful shutdown actions with NTT and DE-CIX values and large community equivalents
Figure 9. The two kinds of communities a network defines, with real NTT and DE-CIX values and the RFC 8195 large-community equivalent.

RFC 8195 separates two kinds of community, and so should your documentation.[4] Informational communities are set by you on ingress and describe the route: where it entered (NTT's 2914:1008 for the San Jose metro), what relationship it came from (2914:410 customer, 2914:420 peer). Your export policy is then a filter on tags instead of a list of prefixes. Part 9 built a tiered LOCAL_PREF scheme on exactly that. Action communities are set by someone else and ask you to do something: change LOCAL_PREF (NTT's 2914:450 to 2914:490 map to LOCAL_PREF 96 to 120), not announce to peers (2914:429), not announce to one peer (65500:nnn), prepend (2914:421-423), or blackhole (2914:666).[13] The blog's inbound traffic engineering post uses these provider communities from the customer's side.

Five rules keep a scheme safe:

  1. Accept action communities only from the sessions they are meant for. A peer must not be able to set your customer LOCAL_PREF tier, and a transit must not be able to blackhole your customer's prefix.
  2. Scrub your own namespace on ingress from every external session, so an outsider cannot inject 65001:x tags that your internal policy trusts. Then scrub your internal tags on egress, in all three lists: our lab leaked 65001:1:65010 because only the standard list was cleaned.
  3. Use large communities for anything that names a 4-byte ASN. DE-CIX offers 6695:0:PEER-AS next to 0:PEER-AS for exactly that reason.[14]
  4. Guard dangerous actions with prefix conditions. Blackhole only /32 and /128 routes inside the customer's registered space, as NTT does.[13]
  5. Publish the scheme. RFC 8195 encourages operators "to publicly publish and maintain documentation on the purpose of each BGP Large Community". NTT's and DE-CIX's pages show what that looks like in practice.[4]

Configuration examples

The same customer policy (a backup tag that lowers LOCAL_PREF, an informational tag, and sending communities to a neighbour) in four syntaxes. These are configuration examples based on the vendor documentation cited, not output from our lab.[15][16][17][18]

! Cisco IOS XE
ip bgp-community new-format
ip community-list standard CUST-BACKUP permit 65001:80
route-map FROM-CUST permit 10
 match community CUST-BACKUP
 set local-preference 80
 set community 65001:100 additive
route-map FROM-CUST permit 20
 set local-preference 200
 set community 65001:100 additive
router bgp 65001
 address-family ipv4 unicast
  neighbor 192.0.2.10 route-map FROM-CUST in
  neighbor 198.51.100.1 send-community both

! Cisco IOS XR (RPL)
community-set CUST-BACKUP
  65001:80
end-set
route-policy FROM-CUST
  if community matches-any CUST-BACKUP then
    set local-preference 80
  else
    set local-preference 200
  endif
  set community (65001:100) additive
end-policy
router bgp 65001
 neighbor 198.51.100.1
  address-family ipv4 unicast
   send-community-ebgp
   send-extended-community-ebgp

# Junos
policy-options {
    community CUST-BACKUP members 65001:80;
    community CUST-TAG members 65001:100;
    community OWN-TAGS members "^65001:.*$";
    policy-statement TO-PEER {
        term scrub { then community delete OWN-TAGS; }
    }
}

! FRR
bgp community-list standard CUST-BACKUP seq 5 permit 65001:80
bgp large-community-list expanded OWN-LARGE seq 5 permit ^65001:
route-map TO-PEER permit 10
 set comm-list OWN-TAGS delete
 set large-comm-list OWN-LARGE delete

Two syntax details cause real outages. In Junos, a community defined with several members matches only routes that carry all of them, because "the routing device interprets this as a logical AND of the community values".[17] And a regular expression without anchors matches more than you meant: 65001:1 also matches 65001:10 and 65001:100. Our GoBGP scrub rule used ^65001:.*$ for that reason.

Troubleshooting and common mistakes

  • Tags missing at the neighbour. Check send-community (IOS), send-community-ebgp (IOS XR) or an export policy that uses set community without additive. Then look at the neighbour's adj-RIB-in, not your own table: show bgp neighbor X advertised-routes shows what left your router.
  • Well-known values vanishing after a policy change. "set" behaves differently per vendor for well-known values (RFC 8642).[9] After migrating a policy between platforms, test NO_EXPORT and GRACEFUL_SHUTDOWN explicitly.
  • A scrub that misses large or extended communities. They are separate lists. Our lab leaked a large community to the peer while the standard list was clean.
  • BLACKHOLE leaking. Without a /32 or /128 condition, a BLACKHOLE-tagged aggregate is treated like a normal route and passed on with the tag, as our T6b test and two RouteViews prefixes show.
  • GRACEFUL_SHUTDOWN not draining. Verify the LOCAL_PREF your policy really sets (GoBGP: 0 meant "unset"), and remember that it only moves traffic if an alternative path exists. Without one the route stays, which is the intended behaviour.
  • Reading 0:x as an AS 0 tag. It is almost always an IXP route-server action ("do not announce to AS x"), copied beyond the IXP.
  • Expecting communities to influence path selection. They do not, until a policy turns them into LOCAL_PREF, MED, AS_PATH length or a reject.

FAQ

What is a BGP community?

A BGP community is a 32-bit tag carried in the COMMUNITIES path attribute (type 8), defined in RFC 1997. It is optional transitive, so routers pass it on even if they do not understand it. It has no effect on best-path selection by itself: routers act on it only when a policy matches it, except for a few well-known values such as NO_EXPORT and NO_ADVERTISE.

What is the difference between standard, extended and large BGP communities?

Standard communities (RFC 1997, type 8) are 4 bytes, written ASN:value with a 16-bit ASN. Extended communities (RFC 4360, type 16) are 8 bytes with a type and sub-type, used for route targets, route origin, link bandwidth, EVPN and SR color. Large communities (RFC 8092, type 32) are 12 bytes, written ASN:value1:value2 with a 32-bit ASN, so 4-byte AS numbers fit.

Does NO_EXPORT stop a route from reaching iBGP peers?

No. NO_EXPORT stops the route at the AS (or confederation) boundary, so iBGP peers still get it. NO_ADVERTISE stops it from being sent to any peer at all. In our GoBGP lab the NO_EXPORT route reached the iBGP observer and r2 but not the two eBGP neighbours, and the NO_ADVERTISE route reached nobody.

Why do my communities not show up on my neighbour?

On Cisco IOS and IOS XE communities are not sent unless you configure neighbor send-community (standard, extended or both). IOS XR sends them to iBGP peers but needs send-community-ebgp and send-extended-community-ebgp for eBGP peers. Junos and FRR send them by default. Also check that an outbound policy is not using set community without additive, which replaces the list.

How does the BLACKHOLE community 65535:666 work?

RFC 7999 reserves 65535:666 so a customer can ask its provider to drop traffic to a prefix, normally a /32 or /128 under DDoS. The receiving network acts only if it has agreed to and configured a policy for it: typically it sets the next hop to a discard address and adds NO_EXPORT or NO_ADVERTISE so the host route does not spread. A router without such a policy treats it like any other tag.

What LOCAL_PREF should GRACEFUL_SHUTDOWN 65535:0 set?

RFC 8326 says the LOCAL_PREF should be lower than any alternative path and recommends 0. Test the value on your platform: in GoBGP 4.11, set-local-pref = 0 left the route with no LOCAL_PREF attribute (shown as 100 on iBGP), while set-local-pref = 1 worked as expected.

Can I use 4-byte AS numbers in standard communities?

No. The first half of a standard community is 16 bits, so a 4-byte ASN does not fit. Use large communities (ASN:function:parameter, RFC 8092 and RFC 8195) or a 4-octet AS-specific extended community. This is why route servers such as DE-CIX offer large-community versions of every action for 4-byte peers.

Next in the series: part 13 moves to the first optional non-transitive attribute in Pat's tree, MULTI_EXIT_DISC: a lab with always-compare-med and deterministic-med, and why MED comparisons depend on the order in which routes arrive.

Part 12 of 26 — BGP Deep Dive
Series hub: BGP in 26 Parts: From EGP to EVPN
Previous: BGP AGGREGATOR Attribute: AS4_AGGREGATOR and AS_TRANS
Next: BGP MED Lab: always-compare-med and deterministic-med (coming soon)

References

[1] R. Chandra, P. Traina, T. Li, RFC 1997: BGP Communities Attribute, August 1996.
[2] S. Sangli, D. Tappan, Y. Rekhter, RFC 4360: BGP Extended Communities Attribute, February 2006.
[3] J. Heitz, J. Snijders (Eds.) et al., RFC 8092: BGP Large Communities Attribute, February 2017.
[4] J. Snijders, J. Heasley, M. Schmidt, RFC 8195: Use of BGP Large Communities, June 2017.
[5] E. Chen, J. Scudder (Eds.) et al., RFC 7606: Revised Error Handling for BGP UPDATE Messages, August 2015: s.3 c, s.7.8, s.7.14.
[6] T. King, C. Dietzel, J. Snijders, G. Doering, G. Hankins, RFC 7999: BLACKHOLE Community, October 2016.
[7] P. Francois, B. Decraene (Eds.) et al., RFC 8326: Graceful BGP Session Shutdown, March 2018.
[8] G. Huston, RFC 3765: NOPEER Community for BGP Route Scope Control, April 2004.
[9] J. Borkenhagen, R. Bush, R. Bonica, S. Bayraktar, RFC 8642: Policy Behavior for Well-Known BGP Communities, August 2019.
[10] E. Chen, T. Bates, RFC 1998: An Application of the BGP Community Attribute in Multi-home Routing, August 1996.
[11] Y. Rekhter, T. Li, S. Hares, RFC 4271: A Border Gateway Protocol 4 (BGP-4), January 2006: s.4.3 (Partial bit), s.5.
[12] IANA, BGP Well-known Communities and BGP Extended Communities registries, read 3 December 2026.
[13] NTT Global IP Network, Routing Policies: BGP customer communities, blackhole, graceful shutdown, read 3 December 2026.
[14] DE-CIX, Route Server Guides: Operational BGP Communities, read 3 December 2026.
[15] Cisco, BGP Case Studies (Document 26634), Community Attribute; Configure an Upstream Provider Network with BGP Community Values (Document 28784), updated 31 October 2025.
[16] Cisco, BGP Configuration Guide for Cisco 8000 (IOS XR): BGP community and extended-community advertisements, September 2026.
[17] Juniper Networks, Routing Policies for BGP Communities (Junos OS), read 3 December 2026.
[18] FRRouting, BGP documentation: well-known communities, send-community, graceful-shutdown, community lists, read 3 December 2026.
[19] GoBGP, Policy configuration (policy.md), read 3 December 2026.
[20] Network freak lab: GoBGP 4.11 routers r1 (127.0.2.121) and r2 (127.0.2.122), raw Python BGP speakers C, O, T, I, D (127.0.2.124-128), 3 December 2026, 01:2x CET. Configs, logs and every captured UPDATE are kept with the article sources.
[21] RIPE NCC, RIS rrc14 bview.20261203.0000.gz, parsed with our own MRT TABLE_DUMP_V2 reader on 3 December 2026.
[22] University of Oregon RouteViews, route-views.routeviews.org (telnet, user rviews, Cisco IOS), show ip bgp community ... and show ip bgp for three prefixes, 3 December 2026 00:22-00:23 UTC.
[23] J. Uttaro et al., RFC 7611: BGP ACCEPT_OWN Community Attribute, August 2015; RFC 9494: Long-Lived Graceful Restart for BGP.
[24] A. Azimov, E. Bogomazov, R. Bush, K. Patel, K. Sriram, RFC 9234: Route Leak Prevention and Detection Using Roles in UPDATE and OPEN Messages (OTC attribute), May 2022.
Figures 1-9: Network freak, drawn from the sources above and our lab.

Try it: BGP Route Lookup: origin AS, AS paths and RPKI check - look up any prefix and see the paths that carry it, free and in your browser.

Comments

Popular posts from this blog

BGP Neighbor States

Reason legend in show ip ospf statistics

Cisco SPAN Port Mirroring for Troubleshooting