Overview
Describes BGP large communities, outlining restrictions and guidelines, and provides instructions for configuring named community sets, integrating large communities with route policies, setting attributes, applying and deleting filters, and verifying configurations using show commands.
BGP large community is a BGP routing attribute that
-
enables grouping of network destinations for routing policies
-
encodes both 4-byte autonomous system numbers (ASNs) and operator-assigned local values, and
-
supports complex route-matching and policy operations using community values.
BGP communities allow network operators to tag routes with information that can influence route acceptance, rejection, preference, or redistribution. Traditional BGP community attributes use 4 bytes, making them insufficient for encoding both 4-byte ASNs (introduced in RFC 6793) and local values. BGP extended communities can encode 4-byte ASNs in the global administrator field, but limitations in the local administrator field still exist.
Importance of BGP large communities
To address these limitations, BGP large communities were introduced. Each large community consists of three 4-byte, unsigned integers separated by colons (for example, 1:2:3). The first field typically encodes the ASN, while the other two fields are set by the operator.
Policy matching with BGP large communities
BGP large communities can be matched or set in route-policy languages (RPL) using flexible syntax and are compatible with various expressions for advanced policy matching.
Expressions used in BGP large community policies
You can use these expressions in route-policy statements to match or set BGP large community values (fields are separated by colons):
-
[x..y]— Specifies a range between x and y, inclusive. -
*— Stands for any number. -
peeras— Substitutes the ASN of the BGP neighbor (inbound or outbound as appropriate). -
not-peeras— Matches any number except the ASN of the neighbor. -
private-as— Matches a private ASN in the ranges [64512..65534] and [4200000000..4294967294].
Regular expressions can also be used for matches or deletes:
-
ios-regex example:
'^5:.*:7$'is equivalent to the expression5:*:7.