1

Assuming 'Network A' is having 2 ISPs which are directly connected to 'Network B', which path will be used to connect to 'Network B'?

Network A --> IP Transit A / IP Transit B --> Network B

  • 1
    Which ever one has the shortest AS Path. – Ricky Beam Jul 3 '16 at 4:05
  • You use the word "connect", the two halves of a connection can use different (sometimes quite different) routes. All of the answers so far only talk about packets from A to B. Packets from B to A can (and often do) take a different path. – MAP Jul 5 '16 at 4:15
3

BGP has a long list of checks to determine which path is "best". The algorithm goes through the list from top to bottom, and stops as soon as a difference is found.

You can find a good description of this list at Cisco and Juniper (and probably on many more locations and books), including advise on how to manipulate the path selection.

In your case, the tie breakers (in order) will probably be:

  • Prefer the path with higher local preference.
  • Prefer the path with the shortest autonomous system (AS) path value.
  • Prefer the path that was received first (the oldest one).
  • Prefer the path that comes from the BGP router with the lowest router ID.
  • I believe local preference is only used within an I-BGP peering so I think in his case, like Ricky mentioned, the first criteria would be AS path. Correct me if I'm wrong please. – Izy- Jul 4 '16 at 4:44
  • Izy: you're half right. Local Pref as a BGP attribute is only passed on to other routers over IBGP, not over EBGP. However, when you apply local pref on a route, it also has effect on the routing table of the router where you apply it. So in this case, "Network A" can choose which ISP to prefer by setting a local preference at the border router. – RobinG Jul 4 '16 at 5:14
  • Oh, thank you. So you're saying that if we set the border router to chose a particular path as best by altering it's local preference, because it's the best path according to the bgp table, the edge router will pass that along to the other side? – Izy- Jul 4 '16 at 5:23
  • Keep in mind that BGP routing decisions are unidirectional. Setting local pref will mean that your router prefers a specific path for outbound traffic, but this will have no impact on inbound traffic (which will probably use AS path to determine the best path). – RobinG Jul 4 '16 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.