Cisco Cisco IOS Software Release 12.2(25)S

Página de 18
 
      BGP Cost Community
Information About the BGP Cost Community Feature
3
Cisco IOS Release 12.0(24)S, 12.0(27)S, 12.3(2)T, 12.2(18)S, 12.3(8)T, and 12.2(25)S
BGP Cost Community Overview 
The cost community is a non-transitive extended community attribute that is passed to iBGP and 
confederation peers but not to eBGP peers. The configuration of the BGP Cost Community feature 
allows you to customize the BGP best path selection process for a local autonomous system or 
confederation. 
The cost community attribute is applied to internal routes by configuring the set extcommunity cost 
command in a route map. The cost community set clause is configured with a cost community ID number 
(0-255) and cost number (0-4294967295). The cost number value determines the preference for the path. 
The path with the lowest cost community number is preferred. Paths that are not specifically configured 
with the cost community attribute are assigned a default cost number value of 2147483647 (The 
midpoint between 0 and 4294967295) and evaluated by the best path selection process accordingly. In 
the case where two paths have been configured with the same cost number value, the path selection 
process will then prefer the path with the lowest cost community ID. The cost extended community 
attribute is propagated to iBGP peers when extended community exchange is enabled with the neighbor 
send-community
 command.
The following commands can be used to apply the route map that is configured with the cost community 
set clause:
aggregate-address
neighbor default-originate route-map {in | out}
neighbor route-map 
network route-map
redistribute route-map
How the BGP Cost Community Influences the Best Path Selection Process 
The cost community attribute influences the BGP best path selection process at the point of insertion 
(POI). By default, the POI follows the IGP metric comparison. When BGP receives multiple paths to the 
same destination, it uses the best path selection process to determine which path is the best path. BGP 
automatically makes the decision and installs the best path into the routing table. The POI allows you to 
assign a preference to o a specific path when multiple equal cost paths are available. If the POI is not 
valid for local best path selection, the cost community attribute is silently ignored. 
Multiple paths can be configured with the cost community attribute for the same POI. The path with the 
lowest cost community ID is considered first. In other words, all of the cost community paths for a 
specific POI are considered, starting with the one with the lowest cost community ID. Paths that do not 
contain the cost community (for the POI and community ID being evaluated) are assigned the default 
community cost value (2147483647). If the cost community values are equal, then cost community 
comparison proceeds to the next lowest community ID for this POI. 
Note
Paths that are not configured with the cost community attribute are considered by the best path selection 
process to have the default cost-value (half of the maximum value [4294967295] or 2147483647).
Applying the cost community attribute at the POI allows you to assign a value to a path originated or 
learned by a peer in any part of the local autonomous system or confederation. The cost community can 
be used as a “tie breaker” during the best path selection process. Multiple instances of the cost 
community can be configured for separate equal cost paths within the same autonomous system or 
confederation. For example, a lower cost community value can be applied to a specific exit path in a