6.4 Control Statements

6.4.3 AS Path Attributes

BGP updates carry a number of path attributes. Some of these, like the AS path, are required. Others are optional, and may or may not appear in any given BGP update.

The aspath-opt option to the group clause, and its variant the mod-aspath option, can be used to generate optional path attributes. Currently only the community attribute is supported. The aspath-opt attribute may also be used on the import clause to allow optional attributes to be considered when determining GateD's preference for the routes in a particular BGP update

The syntax of aspath-opt (and mod-aspath) is as follows:

aspath-opt { 
    [ comm-split autonomous_system community-id ]
    [ community no-export|no-advertise|no-export-subconfed|none ] 
}
mod-aspath { 
    [ comm-split autonomous_system community-id ]
    [ community no-export|no-advertise|no-export-subconfed ] 
}


Communities

Communities may be specified as an AS and a community ID (with the comm-splitkeyword) or as one of the distinguished special communities (with the communitykeyword).

When originating BGP communities, the set of communities which is actually sent is the union of the communities received with the route (if any), those specified in group policy (if any), and those specified in export policy (if any).

When receiving BGP communities, the update is only matched if allcommunities specified in aspath-opt are present in the BGP update. (If additional communities are also present in the update, it will still be matched.)

There is a limit of 25 communities in any single policy clause. This limit may be increased at compile time by increasing the value of AS_COMM_MAX.

comm-split autonomous_system community_id
This causes a community "tag" to be added to the transmitted path attributes. The autonomous_system part of the community should be set to the local AS unless there is a specific need to do otherwise. This associates an AS with a community.
community no-export
This is a special community which indicates that the routes associated with this attribute must not be advertised outside a BGP AS boundary.
community no-advertise
This is a special community which indicates that the routes associated with this attribute must not be advertised to other BGP peers.
community no-export-subconfed
This is a special community which indicates that the routes associated with this attribute must not be advertised to external BGP peers.



community none
This is not actually a community, but rather a keyword which specifies that a received BGP update is only to be matched if no communities are present. It has no effect when originating communities.


Last updated November 22, 1997

gated@gated.merit.edu