A community attribute is a route tag used to identify BGP routes with the same characteristics. A community attribute is expressed by a set of 4-byte values. The community attributes on the NetEngine 8000 F are expressed in two formats: hexadecimal format (aa:nn) and decimal integer format (community number). The two formats can be converted to each other, as shown in Figure 1.
aa:nn: aa indicates an AS number and nn indicates the community identifier defined by an administrator. The value of aa or nn ranges from 0 to 65535, which is configurable. For example, if a route is from AS 100 and the community identifier defined by the administrator is 1, the community is 100:1.
Community number: It is an integer ranging from 0 to 4294967295. As defined in standard protocols, numbers from 0 (0x00000000) to 65535 (0x0000FFFF) and from 4294901760 (0xFFFF0000) to 4294967295 (0xFFFFFFFF) are reserved.
Community attributes simplify the application, maintenance, and management of route-policies and allow a group of BGP devices in multiple ASs to share a route-policy. The community attribute is a route attribute. It is transmitted between BGP peers and is not restricted by the AS. Before advertising a route with the community attribute to peers, a BGP peer can change the original community attribute of this route.
The peers in a peer group share the same policy, while the routes with the same community attribute share the same policy.
In addition to well-known community attributes, you can use a community filter to define extended community attributes to flexibly control route-policies.
Table 1 lists well-known BGP community attributes.
Community Name |
Community Identifier |
Description |
---|---|---|
Internet |
0 (0x00000000) |
By default, all routes belong to the Internet community. A route with this attribute can be advertised to all BGP peers. |
No_Export |
4294967041 (0xFFFFFF01) |
A route with this attribute cannot be advertised beyond the local AS. |
No_Advertise |
4294967042 (0xFFFFFF02) |
A route with this attribute cannot be advertised to any other BGP peers. |
No_Export_Subconfed |
4294967043 (0xFFFFFF03) |
A route with this attribute cannot be advertised beyond the local AS or to other sub-ASs. |
On the network shown in Figure 2, EBGP connections are established between DeviceA and DeviceB, and between DeviceB and DeviceC. If the No_Export community attribute is configured on DeviceA in AS 10 and DeviceA sends a route with the community attribute to DeviceB in AS20, DeviceB does not advertise the route to other ASs after receiving it.