In static routing where the network parameters dont change, we can use Djikstra's or Bellman-Ford's algorithm to find the shortest path to send data from source to destination.However in dynamic routing how do we do that?
1 Answer
$DVR($uses Bellman-Ford algorithm to reach the next hop e.g., $RIPv_1)$ and Link state$($uses Dijkstra algorithm for finding the shortest path to keep the knowledge of entire topology e. g. $OSPF)$ is the example of dynamic routing protocol.
In dynamic routing routers exchanges the routes (routing database) periodically with neighbors (for $DVR$) or with whole entire topology(for $OSPF$) to confirm that "is there any change has made in route"? For example if there is any broken has happen in route then router will find alternative route to reach any other router.