Skip to content

Routing Algorithm

  • Algorithm Used: Bellman-Ford Algorithm
  • Why?:
    • Nodes share only distance vectors (not the entire topology).
    • Suitable for distributed, iterative updates over time.
    • Example Protocols: RIP (Routing Information Protocol).
  • Algorithm Used: Dijkstra’s Algorithm
  • Why?:
    • Each node has complete knowledge of the network topology (link states).
    • Computes the shortest path tree from the source to all destinations.
    • Example Protocols: OSPF (Open Shortest Path First), IS-IS.
FeatureBellman-Ford (Distance Vector)Dijkstra (Link State)
Information SharedDistance vectors (next-hop, cost).Complete topology (link states).
Convergence SpeedSlower, due to iterative updates.Faster, once link states are known.
ComplexityO(V * E)O(V^2) (or better with priority queues).
Loop AvoidanceProne to loops (count-to-infinity).Less prone to loops.
  • Both algorithms are used in shortest path calculations, but they are applied in different routing protocols.
  • Dijkstra’s Algorithm is often incorrectly associated with distance-vector protocols because both deal with shortest path routing, but the key distinction lies in the information exchanged and network model.

Lec-58: Distance vector routing algorithm in hindi | Computer Networks

Lec-59: Count to Infinity Problem in Distance Vector Routing

Lec-60: Link state routing in computer networks in Hindi