Are Cost Communities A Real Thing?

I was just reading about cost communities specified in https://tools.ietf.org/html/draft-retana-bgp-custom-decision-00

Where it states that if you set the community to have a point of insertion of 128, it is preferred over local pref? The specific section is this:

               128
ABSOLUTE_VALUE - Indicates that the Cost Community
MUST be considered as the first step in determining
the Degree of Preference of a path.

129
IGP_COST - Indicates that the Cost Community MUST be
considered after the interior (IGP) distance to the
next-hop has been compared.

130
EXTERNAL_INTERNAL - Indicates that the Cost Commun-
ity MUST be considered after the paths advertised by
BGP speakers in a neighbouring autonomous system (if
any) have been selected.

131
BGP_ID - Indicates that the Cost Community MUST be
considered after the BGP Identifier (or
ORIGINATOR_ID [RFC2796]) has been compared.


I want to know if this is implemented by Cisco as I've never heard of this before in my life?

Comments

  • Hi SG and All,

    Had to do a local recollection.  Cost community is used with PE-CE for EIGRP.  This is done behind the scenes; user needn't know a whole lot to implement (like for me), and is useful when two sites running PE-CE EIGRP and also across an EIGRP backdoor link.  PE router compares EIGRP metric between a backdoor route and a vpnv4 route before running BGP BestPath.  Without cost community, BestPath says to prefer locally generated routes over any BGP learnt routes, and will never select the vpnv4 route. (need to verify, been a while since labbing it)

    Cisco also has a route map tool for setting cost community:

    Here from IOS 12.4 code:

    R1(config)#route-map bgp_COST_COMMUNITY

    R1(config-route-map)#set ext

    R1(config-route-map)#set extcommunity ?

      cost  Cost extended community

      rt    Route Target extended community

      soo   Site-of-Origin extended community

    R1(config)#route-map bgp_COST_COMMUNITY

    R1(config-route-map)#set ext

    R1(config-route-map)#set extcommunity ?

      cost  Cost extended community

      rt    Route Target extended community

      soo   Site-of-Origin extended community

     

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

      <0-255>       Community ID

      igp           Compare following IGP cost comparison    <<< POI IGP_COST ?

      pre-bestpath  Compare before all other steps in bestpath calculation < POI ABSOLUTE_VALUE ?

     

  • real thing for exam purpose [:D]

    hahaha

  • I've done some more reading on this topic, but it doesn't appear that this is used in real life (hence why the rfc is still in draft). It was stating that those specific pre-set communities did certain functions (as opposed to controlling a specific community to do our own function)

  • Real life usage is hard for me to say, as I only did mpls vpns using Juniper.  When using Cisco routers with EIGRP on PE-CE links, look at the VPNV4 routes with "show bgp vpnv4 unicast all <prefix>.  It's in the code.

    I think that they will have that "128" value for "pre-BestPath" within the extended communities.

    It's cnfigured automatically without user doing any route map configuration.

     So, why even know about it if it is automatic?  Good question.  For the written exam.

     Lab exam, if there is some sort of complex IBGP network, maybe route map would be useful.

    A Global Knowledge course had a section on Cost Community, and showed an example of its route map useage.

    Busy here working on OSPF path selection process.

    Here is a link to a cisco OSPF doc that I ran across last night.

    It is about external path selection, and contrasts IOS 15.1 code with NXOS.  IOS follows rfc1583 while NXOS follows rfc2383 (ipv4).  (What about IOS 15.3?)   "rfc2328 section 16.4.1" is skipped with IOS 15.1, from what I gather.

    http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/117824-config-ospf-00.html

     

  • The cost-community is not specific to EIGRP only, as it is an extended BGP community; only EIGRP makes use of it by default. Cost-community allows you to inject new steps in the BGP best-path selection algorithm, depending on the requirements. With a type of 128, the one used by default when PE-CE routing is EIGRP, BGP injects a step 0 in the best-path selection process, before weight comparison basically, and it can compare two entries for the same VPNv4 routes based to begin with on the cost-community value; which it is gonna be basically the same value as in MED, which is basically the IGP router metric as seen by the PE.

    And it is used in production networks.

Sign In or Register to comment.