cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1666
Views
5
Helpful
14
Replies

BGP Communities

dangal.43
Level 1
Level 1

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?

14 Replies 14

Edison Ortiz
Hall of Fame
Hall of Fame

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.

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

http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_6-2/bgp_communities.html

http://www.cisco.com/warp/public/459/bgp-community.html

HTH, rate if it does

Narayan

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?

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

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....

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 10.0.0.0/8 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 2.2.2.2 remote-as 200

neighbor 2.2.2.2 send-community

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

HTH, rate if it does

Narayan

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

ip prefix-list networks seq 5 permit 192.168.1.0/24 le 32

route-map community-networks permit 10

match ip address prefix-list networks

set community 63000:3

route-map community-networks permit 20

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?

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.

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?

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

hi,

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.

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
Level 1
Level 1

Hi,

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.

Eg:

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,

Srinath.M

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: