BGP Communities Attribute
updated by
Extracted elements (13)
Communities were introduced to reduce the management complexity of BGP policy: by tagging destinations with community values, operators avoid maintaining large prefix- and AS-path-based filter rule databases and the out-of-band update processes they require.
The community mechanism enables advertising both an aggregate prefix and its component more-specific prefixes while ensuring the more-specifics do not propagate beyond neighboring peers, solving a practical aggregation problem without requiring complex per-prefix filters.
The COMMUNITIES path attribute may be used with BGP version 2 and all subsequent versions of BGP unless specifically noted otherwise.
A BGP speaker receiving a route with the COMMUNITIES path attribute MAY modify this attribute according to local policy.
A BGP speaker receiving a route without a COMMUNITIES path attribute MAY append this attribute to the route when propagating it to peers.
All routes received carrying a COMMUNITIES attribute containing NO_EXPORT_SUBCONFED (0xFFFFFF03) MUST NOT be advertised to external BGP peers, including peers in other member ASes inside a BGP confederation.
The well-known community values (NO_EXPORT, NO_ADVERTISE, NO_EXPORT_SUBCONFED) shall be implemented in any community-attribute-aware BGP speaker.
When aggregating a range of routes that does not carry ATOMIC_AGGREGATE, the resulting aggregate SHOULD have a COMMUNITIES path attribute containing all communities from all aggregated routes.
Community attribute values 0x00000000–0x0000FFFF and 0xFFFF0000–0xFFFFFFFF are reserved. All other values encode an autonomous system number in the high two octets, with the low two octets defined by that AS.
The COMMUNITIES path attribute is an optional transitive BGP path attribute of variable length. It consists of a set of four-octet values, each specifying a community. All routes with this attribute belong to the communities listed.
RFC 1997 reserves the well-known community values NO_EXPORT (0xFFFFFF01), NO_ADVERTISE (0xFFFFFF02), and NO_EXPORT_SUBCONFED (0xFFFFFF03), and reserves the ranges 0x00000000–0x0000FFFF and 0xFFFF0000–0xFFFFFFFF for special use.
The RFC explicitly states that security issues are not discussed. Implementations should be aware that the COMMUNITIES attribute is optional and transitive, meaning it may be propagated across ASes and could be used to influence routing policy in unintended ways if not filtered.
The COMMUNITIES attribute has Type Code 8. It is encoded as a sequence of 32-bit (four-octet) community values; the attribute length is variable depending on the number of communities carried.