BGP Communities

BGP communities can provide additional capability by tagging routers and modifying the BGP policy on other routers that are upstream or downstream.

BGP communities are an optional transitive BGP attribute that can travel from AS to AS on a route.

The BGP community itself is a 32-bit integer that is included with a route. It is displayed on routers a single 32-bit number or two 16-bit numbers in a format of x:y. The x:y format is known as the new format.

Private BGP communities typically follow a convention where the first 16 bits of the new format are the originating AS number, and the second 16 bits represent a pattern defined by the originating AS. The community pattern can vary between organisations, but they do not need to be registered or published.

RFC4360 expanded BGP communities by adding the extended format. The extended BGP communities provides structures for various parts of information and are commonly used for VPN services.

There is an additional RFC8092 which provides support for communities larger than 32 bits.

Enabling BGP Community Support

On Cisco IOS and IOS XE routers, community advertisement is not enabled by default. It can be turned on a neighbour specific basis with the following command:

neighbor send-community

An optional keyword to this command is what communities are to be sent, with the choices standard, extended, or both. If no keyword is specified, standard is chosen by default.

Conditional Matching with BGP Communities

By matching BGP communities set on a condition, it can control the routes that are advertised to neighbours or routes that are accepted inbound by neighbours.

To conditionally match a route based on its community, it requires the creation of a Community Access Control List which can be used with a route-map. An example of the commands use is:

ip community-list 10 standard permit 123:456

route-map CHECK-COMMUNITY deny 10
 match community 10

router bgp 65164
 address-family ipv4 unicast
  neighbor route-map CHECK-COMMUNITY in

Well Known Communities

RFC 1997 defines a set of well known communities that use the range 4,294,901,760 to 4,294,967,295.

All routers that implement BGP must also implement well-known communities. Examples of three well known communities are:


This well known community is used for identifying routes that should be advertised out to the internet. Where there are larger BGP networks used in enterprise, advertised routes that should be advertised out to the internet should have this community set. This is an safeguard that can be set on the edge BGP routers to ensure only routes with the ‘Internet’ tag are advertised out to the internet. Additional configuration is required for this to work correctly on the edge BGP routers – it is not automatic.


Routes with the No_Advertise community set should not be advertised to any BGP peer, iBGP or eBGP.


Routes with the No_Export community set should not be advertised to any eBGP peer. The route will be advertised to iBGP peers

Private Communities

A private community can be set through a route-map, using the set community keywords. Any previous communities set to the route are overwritten, but can be kept using the additive keyword.




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.