bgp community-list

Creates and configures a named community list

IP BGP routes have a set of attributes, mandatory and optional. The community and extended community attributes are optional. Optional attributes are specified by network administrators to mark (color) routes received in updates containing these attributes. These marked routes are filtered and special actions applied (accepted, preferred, distributed, or advertised). For example, the NO_EXPORT community, indicates that routes attached to it are local and not to be advertised to external ASs. Similarly, a set of routes using a common routing policy can be tagged to a community, and the policy applied to the community.

A BGP community is a group of routes sharing common attributes. Route updates contain community information in the form of path attributes. These attributes help identify community members.

A BGP community list is a list of deny or permit entries. It is either assigned a name (regular expressions, predefined community names) or a number. Assigning names to communities increases the number of configurable community lists. All rules applicable to numbered communities apply to named communities too. The only difference being in the number of attributes configurable for a named community list.

Since the community attribute is optional, it is shared only between devices that understand communities and are configured to handle communities. By default the community attribute is not sent to neighbors unless the send-community command option is enabled in the BGP neighbor context. For more information, see send-community.

Some of the predefined, globally used communities are:
  • no-export – Routes tagged to this community are not advertised to external BGP peers
  • no-advertise – Routes tagged to this community are not advertised to any BGP peers
  • local-as – Routes tagged to this community are not advertised outside the local AS
  • internet – Routes tagged to this community are advertised to the Internet community. By default all BGP enabled devices belong to this community.
BGP community lists are used in the following context as match clauses:
  • BGP route map context. For more information, see match.
To navigate to the BGP community configuration instance, use the following command:
<DEVICE>(config)#bgp community-list <COMMUNITY-LIST-NAME>
<DEVICE>(config-bgp-community-list-<COMMUNITY-LIST-NAME>)#?
BGP Community List Mode commands:
  deny     Add a BGP Community List deny rule to Specify community to reject
  no       Negate a command or set its defaults
  permit   Add a BGP Community List permit rule to Specify community to accept

  clrscr   Clears the display screen
  commit   Commit all changes made in this session
  do       Run commands from Exec mode
  end      End current mode and change to EXEC mode
  exit     End current mode and down to previous mode
  help     Description of the interactive help system
  revert   Revert changes
  service  Service Commands
  show     Show running system information
  write    Write running configuration to memory or terminal

<DEVICE>(config-bgp-community-list-<COMMUNITY-LIST-NAME>)#
The following table summarizes the BGP community list configuration commands:
Table 1. BGP Community-List Config Mode Commands
Command Description
deny (bgp-community-list) Creates and configures a deny community (expanded or standard) rule
permit (bgp-community-list) Creates and configures a permit community (expanded or standard) rule
no (bgp-community-list) Removes an existing deny or permit community rule from this community list