For big networks in the internet what we need is a network
path which is shorter and best. OSPF is a routing protocol which enables data
packets to choose the best path. It is widely popular IGP (Interior Gateway
Protocol) which is implemented by most of the major network providers. OSPF
stands for open shortest path first, this protocol determines the best path for
routing the data traffic. OSPF does routing based on cost calculation, the path
with lowest cost always gets the priority. Consider the example below in this
network the lowest cost is 10 hence the packet chooses the path with lowest
cost to reach the destination.