- Cisco BGP Overview
- BGP 4
- Configuring a Basic BGP Network
- BGP Support for 4-byte ASN
- IPv6 Routing: Multiprotocol BGP Extensions for IPv6
- IPv6 Routing: Multiprotocol BGP Link-Local Address Peering
- IPv6 Multicast Address Family Support for Multiprotocol BGP
- Connecting to a Service Provider Using External BGP
- BGP Named Community Lists
- BGP Prefix-Based Outbound Route Filtering
- BGP Route-Map Continue Support for Outbound Policy
- Removing Private AS Numbers from the AS Path in BGP
- Configuring BGP Neighbor Session Options
- BGP Neighbor Policy
- BGP Dynamic Neighbors
- BGP Support for Next-Hop Address Tracking
- BGP Restart Neighbor Session After Max-Prefix Limit Reached
- BGP Support for Dual AS Configuration for Network AS Migrations
- Configuring Internal BGP Features
- BGP VPLS Auto Discovery Support on Route Reflector
- BGP NSF Awareness
- IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family
- BGP Support for BFD
- BGP Support for MTR
- BGP Link Bandwidth
- iBGP Multipath Load Sharing
- BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN
- Loadsharing IP Packets Over More Than Six Parallel Paths
- BGP Policy Accounting
- BGP Policy Accounting Output Interface Accounting
- BGP Cost Community
- BGP Support for IP Prefix Import from Global Table into a VRF Table
- BGP Support for IP Prefix Export from a VRF Table into the Global Table
- BGP per Neighbor SoO Configuration
- Per-VRF Assignment of BGP Router ID
- BGP Next Hop Unchanged
- BGP Event-Based VPN Import
- BGP Best External
- BGP PIC Edge for IP and MPLS-VPN
- Configuring BGP: RT Constrained Route Distribution
- Configuring BGP Consistency Checker
- BGP MIB Support
- Cisco-BGP-MIBv2
- BGP Additional Paths
- BGP Attribute Filter and Enhanced Attribute Error Handling
- BGP—Support for iBGP Local-AS
- BGP-Multiple Cluster IDs
- BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard
- BGP-VPN Distinguisher Attribute
- BGP-VRF-Aware Conditional Advertisement
- BGP Diverse Path Using a Diverse-Path Route Reflector
- BGP Graceful Shutdown
BGP Named Community Lists
The BGP Named Community Lists feature allows the network operator to assign meaningful names to community lists and increases the number of community lists that can be configured.
- Finding Feature Information
- Information About BGP Named Community Lists
- How to Use BGP Named Community Lists
- Configuration Examples for BGP Named Community Lists
- Additional References for BGP Named Community Lists
- Feature Information for BGP Named Community Lists
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Information About BGP Named Community Lists
BGP COMMUNITIES Attribute
A BGP community is a group of routes that share a common property, regardless of their network, autonomous system, or any physical boundaries. In large networks, applying a common routing policy by using prefix lists or access lists requires individual peer statements on each networking device. Using the BGP COMMUNITIES attribute, BGP speakers with common routing policies can implement inbound or outbound route filters based on the community tag, rather than consult long lists of individual permit or deny statements. A COMMUNITIES attribute can contain multiple communities.
A route can belong to multiple communities. The network administrator defines the communities to which a route belongs. By default, all routes belong to the general Internet community.
In addition to numbered communities, there are several predefined (well-known) communities:
no-export—Do not advertise this route to external BGP peers.
no-advertise—Do not advertise this route to any peer.
internet—Advertise this route to the Internet community. All BGP-speaking networking devices belong to this community.
local-as—Do not send this route outside the local autonomous system.
gshut—Community of routes gracefully shut down.
The COMMUNITIES attribute is optional, which means that it will not be passed on by networking devices that do not understand communities. Networking devices that understand communities must be configured to handle the communities or else the COMMUNITIES attribute will be discarded. By default, no COMMUNITIES attribute is sent to a neighbor. In order for a COMMUNITIES attribute to be sent to a neighbor, use the neighbor send-community command.
BGP Community Lists
A BGP community list is used to create groups of communities to use in a match clause of a route map. A community list can be used to control which routes are accepted, preferred, distributed, or advertised, for example. You can also use a community list to set, append, or modify the communities of a route.
Standard community lists are used to specify well-known communities and community numbers.
Expanded community lists are used to filter communities using a regular expression. Regular expressions are used to specify patterns to match COMMUNITIES attributes.
A BGP named community list allows you to assign a meaningful name to a community list. A named community list can be configured using community numbers, well-known communities, or regular expressions. All the rules of numbered community lists apply to named community lists, except that there is no limit on the number of named community lists that can be configured.
Note | A maximum of 100 standard community lists and 100 expanded community lists can be configured. A named community list does not have this limitation. |
How to Use BGP Named Community Lists
Filtering Traffic Using Community Lists
Perform this task to filter traffic by creating a BGP community list, referencing the community list within a route map, and then applying the route map to a neighbor.
In this task, Router B in the figure below is configured with route maps and a community list to control incoming routes.
1.
enable
2.
configure
terminal
3.
router
bgp
autonomous-system-number
4.
neighbor
{ip-address |
peer-group-name}
remote-as
autonomous-system-number
5.
address-family
ipv4
[unicast |
multicast |
vrf
vrf-name]
6.
neighbor
{ip-address |
peer-group-name}
route-map
route-map-name {in |
out}
7.
exit
8.
exit
9.
route-map
map-name
[permit |
deny] [sequence-number]
10.
match
community
{standard-list-number |
expanded-list-number |
community-list-name [exact]}
11.
set
weight
weight
12.
exit
13.
route-map
map-name
[permit |
deny] [sequence-number]
14.
match
community
{standard-list-number |
expanded-list-number |
community-list-name [exact]}
15.
set
community
community-number
16.
exit
17.
ip
community-list
{standard-list-number |
standard
list-name {deny |
permit} [community-number] [AA:NN] [internet] [local-AS] [no-advertise] [no-export]} | {expanded-list-number |
expanded
list-name {deny |
permit}
regular-expression}
18. Repeat Step 17 to create all the required community lists.
19.
exit
20.
show
ip
community-list
[standard-list-number |
expanded-list-number |
community-list-name] [exact-match]
DETAILED STEPS
Examples
The following sample output verifies that community list 1 has been created and it permits routes that have a community attribute of 100:
Device# show ip community-list 1 Community standard list 1 permit 100
The following sample output verifies that community list 2 has been created and it effectively permits all routes by specifying the internet community:
Device# show ip community-list 2 Community standard list 2 permit internet
Filtering Traffic Using Extended Community Lists
Perform this task to filter traffic by creating an extended BGP community list to control outbound routes.
In this task, Router B in the figure above is configured with an extended named community list to specify that the BGP peer at 192.168.1.2 is not sent advertisements about any path through or from autonomous system 50000. The IP extended community-list configuration mode is used and the ability to resequence entries is shown.
Note | A sequence number is applied to all extended community list entries by default, regardless of the configuration mode. Explicit sequencing and resequencing of extended community list entries can be configured only in IP extended community-list configuration mode, not in global configuration mode. |
1.
enable
2.
configure
terminal
3.
ip
extcommunity-list
{expanded-list-number |
expanded
list-name |
standard-list-number |
standard
list-name}
4. [sequence-number] {deny [regular-expression] | exit | permit [regular-expression]}
5. Repeat Step 4 for all the required permit or deny entries in the extended community list.
6.
resequence
[starting-sequence] [sequence-increment]
7.
exit
8.
router
bgp
autonomous-system-number
9.
neighbor
{ip-address |
peer-group-name}
remote-as
autonomous-system-number
10. Repeat the prior step for all of the required BGP peers.
11.
address-family
ipv4
[unicast |
multicast |
vrf
vrf-name]
12.
network
network-number
[mask
network-mask]
13.
end
14.
show
ip
extcommunity-list
[list-name]
DETAILED STEPS
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 |
enable
Example: Device> enable |
Enables privileged EXEC mode. | ||||
Step 2 |
configure
terminal
Example: Device# configure terminal |
Enters global configuration mode. | ||||
Step 3 |
ip
extcommunity-list
{expanded-list-number |
expanded
list-name |
standard-list-number |
standard
list-name}
Example: Device(config)# ip extcommunity-list expanded DENY50000 |
Enters IP extended community-list configuration mode to create or configure an extended community list. | ||||
Step 4 | [sequence-number] {deny [regular-expression] |
exit |
permit [regular-expression]}
Example: Device(config-extcomm-list)# 10 deny _50000_ Example: Device(config-extcomm-list)# 20 deny ^50000 .* |
Configures an expanded community list entry.
| ||||
Step 5 | Repeat Step 4 for all the required permit or deny entries in the extended community list. |
— | ||||
Step 6 |
resequence
[starting-sequence] [sequence-increment]
Example: Device(config-extcomm-list)# resequence 50 100 |
Resequences expanded community list entries.
| ||||
Step 7 |
exit
Example: Device(config-extcomm-list)# exit |
Exits expanded community-list configuration mode and enters global configuration mode. | ||||
Step 8 |
router
bgp
autonomous-system-number
Example: Device(config)# router bgp 45000 |
Enters router configuration mode for the specified routing process. | ||||
Step 9 |
neighbor
{ip-address |
peer-group-name}
remote-as
autonomous-system-number
Example: Device(config-router)# neighbor 192.168.3.2 remote-as 50000 |
Adds the IP address or peer group name of the neighbor to the specified autonomous system BGP neighbor table of the local router. | ||||
Step 10 | Repeat the prior step for all of the required BGP peers. |
— | ||||
Step 11 |
address-family
ipv4
[unicast |
multicast |
vrf
vrf-name]
Example: Device(config-router)# address-family ipv4 unicast |
Specifies the IPv4 address family and enters address family configuration mode.
| ||||
Step 12 |
network
network-number
[mask
network-mask]
Example: Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 |
(Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table.
| ||||
Step 13 |
end
Example: Device(config-router-af)# end |
Exits address family configuration mode and enters privileged EXEC mode. | ||||
Step 14 |
show
ip
extcommunity-list
[list-name]
Example: Device# show ip extcommunity-list DENY50000 |
Displays configured BGP expanded community list entries. |
Examples
The following sample output verifies that the BGP expanded community list DENY50000 has been created, with the output showing that the entries to deny advertisements about autonomous system 50000 have been resequenced from 10 and 20 to 50 and 150:
Device# show ip extcommunity-list DENY50000 Expanded extended community-list DENY50000 50 deny _50000_ 150 deny ^50000 .*
Configuration Examples for BGP Named Community Lists
Example: Filtering Traffic Using COMMUNITIES Attributes
This section contains two examples of the use of BGP COMMUNITIES attributes with route maps.
The first example configures a route map named set-community, which is applied to the outbound updates to the neighbor 172.16.232.50. The routes that pass access list 1 are given the well-known COMMUNITIES attribute value no-export. The remaining routes are advertised normally. The no-export community value automatically prevents the advertisement of those routes by the BGP speakers in autonomous system 200.
router bgp 100 neighbor 172.16.232.50 remote-as 200 neighbor 172.16.232.50 send-community neighbor 172.16.232.50 route-map set-community out ! route-map set-community permit 10 match address 1 set community no-export ! route-map set-community permit 20 match address 2
The second example configures a route map named set-community, which is applied to the outbound updates to neighbor 172.16.232.90. All the routes that originate from autonomous system 70 have the COMMUNITIES attribute values 200 200 added to their already existing communities. All other routes are advertised as normal.
route-map bgp 200 neighbor 172.16.232.90 remote-as 100 neighbor 172.16.232.90 send-community neighbor 172.16.232.90 route-map set-community out ! route-map set-community permit 10 match as-path 1 set community 200 200 additive ! route-map set-community permit 20 ! ip as-path access-list 1 permit 70$ ip as-path access-list 2 permit .*
Additional References for BGP Named Community Lists
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
BGP commands |
Standards and RFCs
Standard/RFC |
Title |
---|---|
RFC 1997 |
BGP Communities Attribute |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for BGP Named Community Lists
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
BGP Named Community Lists |
The BGP Named Community Lists feature introduces a new type of community list called the named community list. The BGP Named Community Lists feature allows the network operator to assign meaningful names to community lists and increases the number of community lists that can be configured. A named community list can be configured with regular expressions and with numbered community lists. All rules of numbered communities apply to named community lists except that there is no limitation on the number of community attributes that can be configured for a named community list. |