BGP Communities

A BGP community is bit of “extra information” that you can add to one of more prefixes which is advertised to BGP neighbors. This extra information can be used for things like traffic engineering or dynamic routing policies. There are 4 well known BGP communities that you can use or you can pick a numeric value that you can use for your own policies.

Here are the 4 well known BGP communities:

  • Internet: advertise the prefix to all BGP neighbors.
  • No-Advertise: don’t advertise the prefix to any BGP neighbors.
  • No-Export: don’t advertise the prefix to any eBGP neighbors but can be sent to sub-AS’s within the same confederation.
  • Local-AS: don’t advertise the prefix outside of the sub-AS (this one is used for BGP confederations).

Refer to below topology for reference

  • If R2 receive a prefix with a no-advertise community, it will not be sent to any BGP neighbor.
  • If R2 receive a prefix with no-export community, it will be sent to all neighbors within AS2000, specifically, R1, R3, and R4.
  • If R2 receive a prefix with local-as community, it will be sent only within sub-AS, specifically, only to R1.
  • If R2 receive a prefix with internet community (which is the default if no communities are configured) then it will be sent to all routers in all AS’es including P1.
CommunitiesRoute-map
Allows you to group routes that share common properties, think of Communities as Labels used to manipulate traffic. Route maps can do this but requires 100 or thousands of lines to accomplish the same task.
Scalability: More suitable for large and complex network where consistency in applying and easier management of routing policies is an important factor.More suitable for small and easy network.
Communities also have no impact on route selection processes which means you can affect route propagation without affecting how BGP routers choose the best path.
Require higher level of planning to make it useful and workable.