Question

What is the rule for BGP path selection when there is no AS path comparison due to the reception of same route with same preference from SDWAN and EBGP?


Solution

Versa does not compare AS-path when same route with same preference is received from SDWAN and EBGP, in 16.1R1.


This is the Versa BGP Path selection algorithm:

  1. Compare local preference.
    • Prefer path with highest local preference.
  2. Compare locally originated routes
    • Prefer locally originated routes.
  3. Compare the AS path length.
    • Prefer lowest AS path, if there is no configuration to ignore the AS path length.
  4. Compare the origin code number, if origin code is different.
    • Prefer the lower number. 
    • IGP is preferred to EGP, and EGP is preferred to INCOMPLETE.
  5. Compare the MED.
    • Prefer routes with lower MED.
  1. Compare remote AS number.
    • Prefer routes received from EBGP. This is checked by comparing the remote AS number for the neighbor with the local AS number.
  2. Compare IGP cost for BGP nexthop.
    • Prefer lower IGP cost. IGP cost is compared only if both routes have a valid IGP cost.
  3. Compare the BGP identifier of the neighbor.
    • Prefer lower BGP identifier. If the routes have an ORIGINATOR_ID, this is used as the BGP identifier (in accordance with draft-ietf-idr-rfc2796bis-01).
  4. Compare the CLUSTER_LIST lengths of the routes.
    • Prefer a route with shorter CLUSTER-LIST length. A route with no CLUSTER_LIST is considered to have a zero length.
  5. Compare the peer addresses.
    1. First compare the address type - IPv6 is preferred to IPv4.
    2. If both peer addresses are same address type, lower peer IP is preferred.
    3. Compare remote ports – Lower port is preferred.
  6. Compare path IDs.
    • Prefer lower path ID.  This ensures deterministic results when a peer re-advertises the same route with a different path ID, and advertises the new route before withdrawing the old one.