Question: how ospf find shortest path?
Answer: OSPF routers rely on cost to compute the shortest path through the network between themselves and a remote router or network destination. The shortest path computation is done using Djikstra's algorithm.