Shortest Path Tree

The algorithm is all about finding the cheapest cumulative cost from each individual router to a destination. Consider the network shown. The cost from router to router has been noted, but it is not the same both ways.

When calculating costs between routers, we calculate using the cost to the subnet the other router is connected to. For example, the cost from Router1 to Router2 is 10. But the cost from Router2 to Router1 is 8. The shortest path graph generated from this network diagram will be as shown.

If the cost between two paths is equal, OSPF does have the ability to load balance, although most routing implementations have limitations and it is worth checking the documentation to see what they are.

Last updated