2079 2

BIT254 · 2079 · 10 marks

What are the features of link State routing protocols. Explain how Link State routing protocol can be used to find the shortest path with relevant example. What are its disadvantages?

What are the features of link State routing protocols. Explain how Link State routing protocol can be used to find the shortest path with relevant example. What are its disadvantages?[10]

Network and Data CommunicationsChapter 7: Network Layer Protocols and RoutingLink State routing protocol features

Quick answer

Link State routing is a dynamic routing protocol where each router has complete knowledge of the entire network topology. Its key features are: Complete Topology Knowledge; Hello Packets; Link State Advertisements (LSAs).

Link State Routing Protocol

Link State routing is a dynamic routing protocol where each router has complete knowledge of the entire network topology. Its key features are:

  1. Complete Topology Knowledge: Every router maintains a complete map of the entire network (topology database), unlike distance vector where routers only know about neighbors.

  2. Hello Packets: Each router discovers its neighbors by sending "Hello" packets to directly connected routers.

  3. Link State Advertisements (LSAs): Each router broadcasts LSAs (containing its identity, neighbors, and link costs) to all routers in the network using flooding.

  4. Dijkstra's Algorithm: Each router independently runs Dijkstra's Shortest Path First (SPF) algorithm on its topology database to compute the shortest path to every destination.

  5. Fast Convergence: Link state protocols converge much faster than distance vector protocols because topology changes are flooded immediately.

  6. Loop-Free Routes: Since every router has the same topology map and runs SPF independently, routing loops are avoided.

  7. Incremental Updates: Only changes in the network (not the full table) are advertised, reducing bandwidth usage after initial convergence.

  8. Hierarchical Design Support: Supports areas (e.g., OSPF areas) to reduce LSA flooding scope and improve scalability.

  9. Examples: OSPF (Open Shortest Path First), IS-IS (Intermediate System to Intermediate System).


Steps of the Algorithm

Let:

  • N' = set of nodes whose least-cost path is definitively known
  • D(v) = current best estimate of cost from source to node v
  • p(v) = predecessor node of v on the best path

Algorithm:

1. Initialize:
   - N' = {source}
   - For all nodes v:
       If v is a direct neighbor: D(v) = cost(source, v)
       Else: D(v) = infinity

2. Loop until all nodes are in N':
   a. Find node w NOT in N' with minimum D(w)
   b. Add w to N'
   c. Update D(v) for all neighbors v of w NOT in N':
      D(v) = min( D(v),  D(w) + cost(w, v) )

3. The result gives shortest path from source to all nodes.

Worked Example

Consider the following network with 6 nodes: A, B, C, D, E, F

Link costs (bidirectional):

A -- B : 2
A -- C : 5
B -- C : 3
B -- D : 1
C -- E : 4
D -- E : 2
D -- F : 6
E -- F : 1

Network Diagram:

    2       1
A------B-------D
|      \       |\
5    3  \      | 6
|        \     |
C-------- +    F
 \     (B-C=3) |
  4            1
   \           |
    E----------+
         2
    D----E (cost 2)

Let us find the shortest path from Source = A to all other nodes.

Initialization:

NodeD(A)D(B)D(C)D(D)D(E)D(F)
Init025infinfinf

N' = {A}


Iteration 1:

  • Node with minimum D not in N': B (D=2)
  • Add B to N' → N' = {A, B}
  • Update neighbors of B (C, D):
    • D(C) = min(5, 2+3) = min(5, 5) = 5
    • D(D) = min(inf, 2+1) = 3
StepN'D(B)D(C)D(D)D(E)D(F)
1{A,B}253infinf

Iteration 2:

  • Minimum D not in N': D (D=3)
  • Add D to N' → N' = {A, B, D}
  • Update neighbors of D (E, F):
    • D(E) = min(inf, 3+2) = 5
    • D(F) = min(inf, 3+6) = 9
StepN'D(C)D(E)D(F)
2{A,B,D}559

Iteration 3:

  • Minimum D not in N': C or E (both D=5, pick C)
  • Add C to N' → N' = {A, B, D, C}
  • Update neighbors of C (E):
    • D(E) = min(5, 5+4) = min(5, 9) = 5 (no change)

Iteration 4:

  • Minimum D not in N': E (D=5)
  • Add E to N' → N' = {A, B, D, C, E}
  • Update neighbors of E (F):
    • D(F) = min(9, 5+1) = 6

Iteration 5:

  • Minimum D not in N': F (D=6)
  • Add F to N' → N' = {A, B, D, C, E, F}

Final Shortest Path Table (from A)

DestinationShortest CostPath
B2A → B
C5A → B → C
D3A → B → D
E5A → B → D → E
F6A → B → D → E → F

Note that C has two paths of equal cost, the direct link A to C of cost 5 and A to B to C of cost 2 plus 3, so either may be entered in the table.


DisadvantageExplanation
High memory requirementEvery router stores the complete topology of the area, not just the distance to each destination
High processing costDijkstra's algorithm runs in O(n log n) with a heap and must be re-run on every topology change
Flooding overheadLink state packets are flooded to every router in the area, and the traffic grows quickly with the number of routers
Complex configurationAreas, router IDs, authentication and metric tuning make protocols such as OSPF harder to set up than RIP
Instability under flappingA link that repeatedly goes up and down forces repeated flooding and repeated recomputation across the whole area
Scaling limitA single area cannot grow without bound, so a large network must be divided into areas with a backbone, which adds design effort

Conclusion

Link state routing gives each router a complete and identical map of the network, built from the link state advertisements flooded by every router, and each one then runs Dijkstra's algorithm on that map to compute its own shortest path tree. In the example above the router at A learns costs of 2, 5, 3, 5 and 6 to B, C, D, E and F respectively. Because every router works from the same map, convergence is fast and routing loops are avoided, which is the main advantage over distance vector routing. The cost is memory, processing and flooding overhead, which is why protocols such as OSPF and IS-IS divide a large network into areas.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.