09-20-2012 07:15 AM - edited 03-04-2019 05:37 PM
Hi all
can anyone tell me what people generally use bgp communites for ? can you give me an example of influencing routes via sending my community ?
cheers
09-20-2012 12:59 PM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
BGP communities are generally used to treat the prefix, to which they are attached, differently from other prefixes with a different or no community attribute(s).
09-20-2012 01:43 PM
Hello Carl,
I assume you are aware of these documents but just in case, they do a fairly nice job in explaining what the community attributes are and how are they used:
http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_6-2/bgp_communities.html
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801475b2.shtml
Some of the well-known community values are used to define the scope of propagation of a particular route. Other communities are free for you to use in a way you find useful. It is up to you what treatment you perform with routes having a particular set of communities. In this sense, communities are quite similar to route tags defined in route maps using the set tag command and matched with corresponding match tag. The most important differences between communities and route tags are twofold:
I have heard about ISPs using communities to, say, perform AS_PATH prepending. Based on what community did the customer set on its prefix, the ISP prependended a pre-defined number of its own (or customer's) ASN. This allowed the client to perform a sort of traffic engineering to make a prefix advertised through a particular ISP more or less preferred (similar to the MED attribute effect).
As Joseph also noted, the community is simply a number that you can set (in multiple instances) for a particular prefix, match it on some other BGP router and perform a specific action with that prefix. Some communities have already their standard meaning, other communities are open for use and interpretation.
Feel welcome to ask further!
Best regards,
Peter
09-21-2012 12:03 PM
Hello Carl,
the BGP communities are ways to communicate with the upstream service providers.
First of all, you need to agree with the ISP what values are you going to use to mark your routes.
Example:
your AS is 1000 you can agree with your ISP that
BGP community 1000:101 means route the traffic in best possible way
BGP community 1000:666 may mean routes with this community should appear as secondary routes in the internet please perform AS path prepending of your own AS number on them
BGP community 1000:244 preferred return path via our peering in London ---> rise local preference on London router for every prefix with this BGP community.
BGP community 1000:249 preferred return path via our peering in Frankfurt ---> rise local preference on Frankfurt router for every prefix with this BGP community.
The power of BGP communities is that they provide a key level of abstraction :
upstream provider don't need to deal (to match) with specific IP prefixes coming from customer but only with BGP communities values associated to the received routes.
The customer can change the treatment received by a single IP prefix by changing the set of BGP communities associated to it.
The SP routers react to the changes in the BGP communities values automatically without any configuration change.
So BGP communities are the key for scalability in the control plane in writing complex routing policies.
Another important property of BGP communities is that additional BGP community values can be added to a prefix without the need the delete the previous ones. This allows to assign multiple values of BGP communities at each AS hop with each value providing a different meaning to different AS.
QoS, BGP and Communities
BGP communities can be used also to ask for a different QoS treatment of packets belonging to routes with a specific BGP community value.
We tested this feature many years ago as a way to differentiate premium users ( paid internet access) from basic users ( free internet access).
The two type of users obtained IP addresses taken from two different route pools and the BGP routes were advertised to upstream ISP with different BGP community value.
http://www.cisco.com/en/US/docs/routers/10000/10008/configuration/guides/qos/10qqppb.html
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide