Three Offices with 2 ISPs each - utilizing static routing to the ISP. Each office has a VPN and leased point-to-point circuits connecting the offices in a ring. A VPN is also connecting the offices together as well. All of which are using OSPF, and all of our firewall's connections to the ISP are advertising a default gateway into OSPF.


Is there any existing application/script/method to actively and dynamically determine the "best" path to a specific IP address?

*My theory** Build a script based on Internet ping results from something like SmokePing or PRTG to generate which 'provider' would be the best to take.

This is somewhat of a thought experiment; not sure anyone would truly see an improvement.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Feb 19, 2018 at 4:01

2 Answers 2


Both OSPF and BGP are dynamic routing protocols.

OSPF, by design, uses the single, simple, arbitrary value called cost to determine the best path to a destination. Cost is usually, by default, based on the bandwidth of a link, but it can be manually configured to any arbitrary value for any link, and it is cumulative.

BGP has a much richer and more complex set of attributes to determine the best path to a destination.

Neither BGP nor OSPF generate routes, and neither takes into account latency. Also, the latency returned by ping is strictly for ICMP, which has nothing to do with OSPF or BGP.

If you have Cisco equipment, you can run EIGRP, which can use bandwidth, delay, reliability, load, and MTU to determine the best path, By default, EIGRP only uses bandwidth and delay, but it can be configured to use any combination of those metrics.


Cisco routers have a feature called Performance-based routing (PfR) that does exactly what you're looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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