Juniper BGP path selection

  1. Verify that the next hop can be resolved.
  2. Choose the path with the lowest preference value (routing protocol process preference).
  3. Prefer the path with higher local preference. For non-BGP paths, choose the path with the lowest preference2 value.
  4. If the accumulated interior gateway protocol (AIGP) attribute is enabled, prefer the path with the lower AIGP attribute.
  5. Prefer the path with the shortest autonomous system (AS) path value.
  6. Prefer the route with the lower origin code.  Routes learned from an IGP have a lower origin code than those learned from an exterior gateway protocol (EGP), and both have lower origin codes than incomplete routes (routes whose origin is unknown).
  7. Prefer the path with the lowest multiple exit discriminator (MED) metric.
  8. Prefer strictly internal paths, which include IGP routes and locally generated routes (static, direct, local, and so forth).
  9. Prefer strictly external BGP (EBGP) paths over external paths learned through internal BGP (IBGP) sessions.
  10. Prefer the path whose next hop is resolved through the IGP route with the lowest metric.
  11. If both paths are external, prefer the currently active path to minimize route-flapping.
  12. Prefer a primary route over a secondary route. A primary route is one that belongs to the routing table. A secondary route is one that is added to the routing table through an export policy.
  13. Prefer the path from the peer with the lowest router ID. For any path with an originator ID attribute, substitute the originator ID for the router ID during router ID comparison.
  14. Prefer the path with the shortest cluster list length. The length is 0 for no list.
  15. Prefer the path from the peer with the lowest peer IP address.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.