In the previous episodes, we talk about how does the OSPF work, such as establish adjacency relationship, exchange LSAs. As we know, OSPF is an abbreviation of Open Shortest Path First, it run Dijkstra algorithm after established full adjacency. In this episode, we will introduce how does the Dijkstra algorithm work.
Topology shows as below, the number on the link means the cost of the link.
At first, all the devices are in a Set G. Let's start with device A, first of all, exclude A from Set G, now, Set G contains B to F. There is three links on A, link to B, D and E, for each link, the cost is 2, 1 and 3, choose the minimum cost which is 1. and we move to device D, repeat the process of A, until Set G is empty.
Picture this process as below.
when all the device are involved in the shortest path tree, the algorithm stops, and we get the shortest path tree with root A.
By the end of this episode, we introduce the OSPF from every aspect. In the next episode, we will make a summary of OSPF, introduce something overlooked easily by using OSPF.
More about OSPF, please refer to
[Series of OSPF] Episode 1 OSPF summary and concept
[Series of OSPF] Episode 2 How the OSPF routers establish adjacency relationship and exchange LSAs.