BGP Essentials: BGP Communities
BGP communities are extra attributes you can attach to an IP route carried by BGP. You can use communities to indicate which routes should be propagated or filtered (for example, the well-known NO_EXPORT community signifies that the route it’s attached to shall not be sent outside of the local AS), to influence route selection on remote routers or to trigger other BGP-dependent IOS features (for example, quality-of-service marking based on BGP).
Each BGP community is a 32-bit value. The best practice dictates that the top 16 bits should be the AS number of the network defining the community meaning and the bottom 16 bits are defined by the network administrator.
For example, if you use BGP communities to control QoS marking within your network, the top 16 bits should be your AS number. If you’re using a BGP community to mark backup BGP routes before they are sent to your ISP, you should use the BGP community defined by your ISP (and thus the top 16 bits are the ISP’s AS number).
The only mechanism to set BGP community in Cisco IOS is the set community command in a route-map.
You can set BGP communities in any point where you can use a route-map within BGP:
- on routes you’re receiving from a neighbor with the neighbor route-map in router configuration command;
- on routes you’re sending to a neighbor with the neighbor route-map out router configuration command;
- on routes originated into BGP with the network route-map router configuration command;
- on routes redistributed into BGP with the redistribute route-map router configuration command.
The BGP communities are transitive BGP attribute, meaning that they should be propagated to all BGP neighbors.
I appreciate if you can write a short form of a post about the usage of "network route-map" command, as it's unclear to many people. In addition, there are very few and rare documents which explain the usage of route-map with the network command.
Thanks Ivan :)
You can also create a community list which permits only a specified community... sorta like an as-path access-list.
Ex. #ip community-list 1 permit 65001:17
Then you wan to match on that community-list.
#route-map CLIST_IN permit 10
#match community 1 (leave off the -list)
Consider an eBGP route update (without a RT value) is received by a BGP peer in a VRF and successfully installed in the VRF routing table.
Also consider that the same VRF is configured with a export map which has a match criteria for this received prefix and set action to attach an RT vlaue (65500:5).
If there is no requirement exist in this VRF to advertise this received prefix to any other BGP peer, will the configured export map come in action to set the RT vlaue (6500:5) with the received and already existing prefix entry in the BGP table?
Can i use this additive keyword to update the community value with existing community value list at the time of network add ?
Thanks.