Question: how bgp finds the best path?
Answer: The best path selection algorithm uses a pre-defined set of criteria to come up with the most efficient route through a network. In the event that no criteria is in place, BGP will always route Internet traffic over the shortest path, with the lowest number of intervening autonomous systems (AS) hops.