Routing Algorithms

Distance VectorLink State
AlgorithmBellman-FordDijkstra
KnowledgeEach router knows only its neighbours' tablesEach router knows the full topology
UpdatesPeriodic, whole table to neighboursLink-state packets flooded to all routers when a link changes
ProblemCount-to-infinity (fixed by split horizon, poison reverse)More memory and CPU
ProtocolRIP (max 15 hops)OSPF

Distance Vector Update

Text
D_x(y) = min over neighbours v { c(x, v) + D_v(y) }

Router A, neighbours B (cost 2) and C (cost 5)
B says: dist to D = 4      C says: dist to D = 1
D_A(D) = min(2 + 4, 5 + 1) = 6   (tie; either next hop works)

Inter-domain Routing

BGP (Border Gateway Protocol) is a path-vector protocol used between autonomous systems on the Internet.

Track your progress through the Computer Networks course