cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2099
Views
5
Helpful
18
Replies

The purpose of BGP cost community

Sam-CCNP
Level 1
Level 1

Hi,

I'm confused as to the reason for the existence of the BGP Cost community.

Surely what it does can be achieved by using path attributes. E.g. weight, if you only want to influence a single router, or local preference if you want to affect the entire AS.

I just do not understand in what scenarios you would want to use it when other options are available.

Thanks in advance for the help.

Sam

18 Replies 18

kailandrew60
Level 1
Level 1

The BGP Cost community is used for simplifying routing policy by assigning a cost to routes that can be evaluated across multiple routers consistently, especially in large-scale networks. Unlike weight (local) or local-pref (intra-AS), Cost communities allow centralized control and flexibility without rewriting policies on every router. Milwin

@Sam-CCNP I will run lab and show you the effect of this community.

MHM

@Sam-CCNP are you still interest to see lab ?

please asnwer within two days 

MHM

rkthapa9
Level 1
Level 1
The BGP Extended Community Cost Attribute is used to influence best path selection within BGP. It's especially useful when you want to override the default path chosen by BGP for a specific prefix or network.
BGP Cost Community may seem to function similarly to the weight attribute, since both can influence path selection.
However, the purpose of the Cost Community is to provide a more flexible and scalable method for path preference — especially in cases where EIGRP is used as the PE-CE routing protocol. In such scenarios, weight can't be easily overridden or manipulated across devices or domains, but the Cost Community can be, making it a more suitable option for consistent and centralized control.
 
This attribute includes three main values:
1. Point of Insertion (POI)
This defines where in the BGP best path selection process the cost community is evaluated.
o By default, it's inserted after the IGP metric and before the next-hop evaluation (i.e., at step 8 of the best path decision process).
o We can change this to:
  • IGP — inserts the cost community evaluation in place of the IGP metric step.
  • Pre-bestpath — evaluates the cost community before any best path comparison step, making it the first factor in the decision process.
2. Community ID
This sets the path group preference.
  • A lower Community ID is preferred.
  • If multiple paths have the same Community ID, BGP moves on to evaluate the Community Cost.
3. Community Cost
This acts as a tie-breaker within the same Community ID group.
  • A lower cost is preferred.
  • If the cost is not specified, it defaults to the maximum value: 2,147,483,647.

Thanks