What is BGP communities and their usage in BGP network.
What is a BGP Community?
A BGP community is a tag (a 32-bit value) that can be assigned to BGP routes to group them into logical categories. These tags allow routers to apply policies consistently to multiple routes without configuring each one individually.
Usefulness of BGP Communities in a BGP Network
- Traffic Engineering – Helps in controlling inbound and outbound traffic paths based on defined policies.
- Route Filtering & Manipulation – Allows ISPs or enterprises to filter and modify route attributes (e.g., local preference, MED).
- Routing Policy Simplification – Reduces configuration complexity by applying policies to groups of routes instead of individual ones.
- Influencing Peering Behavior – Controls how routes are advertised or suppressed to peers.
- Blackhole Routing – Used for DDoS mitigation by marking traffic to be dropped by upstream providers.
Usage of BGP Communities
BGP communities are used by attaching specific values to routes, and routers act based on predefined policies. Some common types include:
- Standard Communities (Well-Known):
no-export(65535:65281) → Do not advertise outside the local AS.no-advertise(65535:65282) → Do not advertise to any BGP peers.local-AS(65535:65283) → Advertise only within the local AS.
- Custom Communities:
- Defined by network operators (e.g.,
65000:100to set local preference). - Used for traffic engineering (e.g.,
65000:200to de-prefer a route).
- Defined by network operators (e.g.,
- Large Communities (96-bit) – Used when a 32-bit standard community is not sufficient, particularly for ISPs with multiple ASNs.
Example Configuration in Cisco IOS
router bgp 65000
neighbor 192.168.1.1 remote-as 65001
neighbor 192.168.1.1 send-community
route-map SET-COMMUNITY permit 10
set community 65000:100 additive
This sets the community 65000:100 on routes advertised to neighbor 192.168.1.1.
Conclusion : Last words
BGP communities provide flexibility and control in large networks by simplifying policy enforcement and traffic engineering. They are crucial for ISPs and enterprises to implement efficient routing strategies.