BGP Communities

Unanswered Question
Jun 12th, 2007

how can we use the BGP community?

what is the use of it?

I tried to understand notation 64000:3 but what is it means and how can i use that?

any good example?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Edison Ortiz Tue, 06/12/2007 - 07:12

BGP communities are used to group networking devices that share common properties, regardless of network, autonomous system, or any physical boundaries. In large networks applying a common routing policy through prefix lists or access lists requires individual peer statements on each networking device.

Using the BGP community attribute BGP speakers, with common routing policies, can implement inbound or outbound route filters based on the community tag rather than consult large lists of individual permit or deny statements.

The 64000:3 is simply a tag that can be used to manipulate routes.

royalblues Tue, 06/12/2007 - 07:20

BGP communities are a way to implement policies to a set of routes.

There are basically 4 well known BGP communities; No-export, no advertise, local-as and internet

Communities are generally represented in AA:NN format and are used to define policies based on AS

Have a look at these links

HTH, rate if it does


dangal.43 Tue, 06/12/2007 - 09:54

so narayan, here using accesslist you are specify the group of Networks and then assigne the peritcular community to that Networks. let say network1 and netwokr 2 are in community 63000:3 and network 3 and network 4 are in community 63000:4. now if i want to assing thelocal preferance of 150 to community 63000:3 and 200 to 63000:4 then how can i do it?

so using community number i understand only that its grouping of perticular network....

can i have community which define the various neighbor, like neighbor1 and neighbor 2 in community 63000:3 and neighbor 3 and neighbor 4 in community 63000:4?

Edison Ortiz Tue, 06/12/2007 - 10:15

ip bgp-community new-format

ip community-list 3 permit 63000:3

ip community-list 4 permit 63000:4


route-map community permit 10

match community 3

set local-preference 150

route-map community permit 20

match community 4

set local-preference 200

route-map community permit 30

dangal.43 Tue, 06/12/2007 - 10:21

sorry again will you please show me how to add some network or neighbor in community to which i am going to assign the local preference.... i got bit confuse....

royalblues Tue, 06/12/2007 - 10:49

Edison has given a very good example for matching the routes based on community

As per his example, the routes which have a community of 63000:3 will be assigned a Local pref of 150 and for routes with community 63000:4, 200

if you want to set the community attribute for the routes you originate, then you can do

ip prefix-list voip_prefixes seq 10 permit le 32

route-map to-GSN permit 10

match ip address prefix-list voip_prefixes

set community 33687:991


route-map to-GSN permit 65535

set community 65484:41605

ip bgp-community new-format

router bgp 100

neighbor remote-as 200

neighbor send-community

the above example will tag all routes with community 33687:991 and the rest with community 65484:41605 while advertising the routes to its neighbor

HTH, rate if it does


Edison Ortiz Tue, 06/12/2007 - 10:52

Let's say you want to assign 63000:3 to network

ip prefix-list networks seq 5 permit le 32

route-map community-networks permit 10

match ip address prefix-list networks

set community 63000:3

route-map community-networks permit 20

dangal.43 Tue, 06/12/2007 - 11:06

so in short here we need to have two route map.... one route map is matching the network and assigning that routes to the communities and other route map which i can use to assigne the local preference or what ever attribute needs to assign to network which match the perticular communities ..... is that correct?

Edison Ortiz Tue, 06/12/2007 - 11:55

Not on the same router.

One router can be use to classify the networks (the set community procedure). This can be the source.

Another router can be use for identifying this values coming from the source (the match community procedure). This can be the destination router.

dangal.43 Tue, 06/12/2007 - 12:49

so here one router will add the tag to Networks with perticular communities and then receiving router will assign the local preference or any other atributes.... right!!!

so you need to have all your neighbor or the destination router should identify the same comunity as in the local one is that correct?

Edison Ortiz Tue, 06/12/2007 - 12:52

Yes, that's the reason you also need to add the neighbor x.x.x.x send-community statement under the BGP process.

dangal.43 Tue, 06/12/2007 - 12:59


so that is all about the configuring the communities or it still need some extra configuration....

1. define the communities

2. attach selected route to the communities

3. send that defined communities list to the selected or required neighbor

4. define the action for the routes are tag with the communities at the destination or neighbor router.

Edison Ortiz Wed, 06/13/2007 - 05:17

That's the idea but the requirements may change depending on the setup.

Based on your reply, you have some basic concept of its use.

srimural Tue, 06/19/2007 - 17:27


BGP Communities are like crayons in simple terms lol. They color router and BGP advertisement. there are certain defined communities which serve a specific purpose.

Others are like you have to decide what has to be done with the colored route.


Consider you have two offices with redundant links and u have a service provider BGP peering for the sites.

you want to make use of a link as a primary for a particular prefix and other one to route the rest of the traffic. you can use a route-map to set the community and advertise the prefixes. At the receiving end you can match the communities using a community-list and set the local prefernce for the required prefixes so that they take the path you say. I think you got an idea of what a BGP community is. Please feel free to reply me and i will try my best to get you clarity on the same.

Thanks and Regards,



This Discussion