BGP Local Autonomous System
CUSTOMER uses XYZ ISP. Assume that if in a case XYZ goes down or overtakes by another ISP…

The Border Gateway Protocol (BGP) is the routing protocol that glues the internet together. BGP allows different autonomous systems (AS), such as Internet Service Providers, to exchange routing information with each other.
This allows each AS to build a consistent view of the global internet routing table and calculate the best paths to deliver traffic.
As such, BGP is crucially necessary for the smooth functioning and stability of internet connectivity.
BGP communities are an attribute that network operators can attach to groups of routes in BGP.
They are designed to provide more fine-grained control over traffic flows and routing policies. BGP communities are widely used by operators for purposes like traffic engineering, restricting route advertisement, monitoring, etc.
BGP communities are tags that essentially categorize or color routes with specific attributes. They are made up of 32-bit values and can be attached to routes by an operator within their AS.
The community values themselves don’t have any intrinsic meaning, but they allow operators to mark routes to indicate things like where they should be advertised or not, whether they should be preferred or not, what type of traffic they carry, etc.
Other BGP routers can then match these community values to decide how to treat the routes – whether to accept, prefer over other routes, or filter them out.
In this way, BGP communities allow operators a simple yet powerful tool to control the flow of routes in the network.
They are widely used because they enable network policies that are difficult or impossible to achieve in BGP without communities.
The main types of BGP communities are:
These are 32-bit values typically structured as two 16-bit numbers, like 1:60. They allow grouping and labeling of up to 65536 community values. Standard communities are very commonly used for basic traffic engineering and policy needs.
Also 32-bit values but extended to a structure of three parts – target, subfield, and local administrator field. This allows grouping routes into over 2 billion possible community values for very granular control. Extended communities enable policies difficult to implement with standard communities.
These provide 96-bit community values, structured as 32-bit autonomous system numbers, 32-bit user-defined values, and 32-bit user-defined values. The vastly larger namespace allows extremely flexible community patterns for advanced policies.
There are several key use cases of BGP communities:
To effectively leverage BGP communities, network operators should:
In summary, BGP communities are a beneficial mechanism for network operators to enact customized routing policies while maintaining core internet reliability and performance. Following best practices allows network operators to safely unlock the power of BGP communities.