# [Series of OSPF] Episode 6 Introduce to the algorithm used by OSPF -- Dijkstra's algorithm

Latest reply: Dec 15, 2018 23:27:22 378 2 2 2

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.

• x
• convention：

Favorite(2) Share
 jomana Created Dec 12, 2018 21:00:15 Helpful(0) Helpful(0) .pcb{margin-right:0} .pcb table{table-layout:auto;} div#jdc_suspicious_threads{ background: #fcf5d8; text-align: center; font-size: 12px; } Its hard x convention：
 jomos Created Dec 15, 2018 23:27:22 Helpful(0) Helpful(0) .pcb table{table-layout:auto;} div#jdc_suspicious_threads{ background: #fcf5d8; text-align: center; font-size: 12px; } Its hard x convention：