cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3611
Views
17
Helpful
6
Replies

BGP Cost Community and Point of Insertion

walter1972
Level 1
Level 1

Hi

Looking at the BGP Cost Community, I keep reading about how this influences the BGP best path selection process at the point of insertion (POI). Does this mean that the decision is taken immediately after step 8 in the Best Path Algorithm - ie Prefer the path with the lowest IGP metric to the BGP next hop?

For some reason I cannot get my head round this POI stuff.

Thanks

6 Replies 6

Harold Ritter
Level 12
Level 12

Walter,

The POI indicates when, in the BGP best path selection process, the cost community is taken in consideration. There is only two choices for the value of the POI:

Router(config-route-map)#set extcommunity cost ?

<0-255> Community ID

igp Compare following IGP cost comparison

pre-bestpath Compare before all other steps in bestpath calculation

Router(config-route-map)#set extcommunity cost

So as you can see it can be either compared before everything else (pre-bestpath) or right after the IGP cost comparison (igp).

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Great answer - Thanks very much!

When I look at the options for this command it appears to me that there are actually 3 different scenarios: I can select IGP, pre-bestpath or I can not specify the POI at all.

The question is, if I don't specify, which is chosen? The documentation leads me to believe that it would be IGP by default but the fact that there is a specific keyword for IGP makes me doubt myself.

Any thoughts?


Edit:

Nevermind, I figured this out the easy way, just try it. If you don't specify either option it does just default IGP and actually adds that keyword into the config.

IR0(config)#route-map test-cost-comm

IR0(config-route-map)#set extcommunity cost 1 100


IR0#show run | sec route-map test-cost-comm

route-map test-cost-comm permit 10

set extcommunity cost igp 1 100


IR0#show route-map test-cost-comm

route-map test-cost-comm, permit, sequence 10

  Match clauses:

  Set clauses:

    extended community Cost:igp:1:100

  Policy routing matches: 0 packets, 0 bytes

Message was edited by: Robin Martinez

flezure
Level 1
Level 1

By default POI value is129, so POI of coat community in BGP path selection criteria comes right after IGP metric. 

But we can change POI value with below command. With POI as 131, cost community  is considered after the BGP path attribute -Router ID assessment. With POI as, cost community is after 'Oldest path'. With POI as 128, cost community is considered well before 'Weight' ie after 'valid next hop'. This proves BGP is so flexible only one should know how to handle it. 

Command is 

set extcommunity cost <cost>:<POI>:<cost comm ID 0to255>:<cost value 0 to 2^32-1>

Hello


@walter1972 wrote:
Does this mean that the decision is taken immediately after step 8 in the Best Path Algorithm - ie Prefer the path with the lowest IGP metric to the BGP next hop?

Yes POI is evaluated after ibgp cost to nexthop.
Here the cost comm will become the tie breaker evaluated on its assigned ID and cost (default 2.1 billion if not assigned)
lastly POI defaults to IGP


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card