Guiding a packet in network to its destination.
Routing table at node u stores for each v a neighbor w of u. Packets with destination v that arrive at u re passed to w.
Undirected weighted network with positive weights. Centralised algorithm to compute shortest paths to initiator u₀.
Initially:
u₀ sends message ⟦0⟧ to its neighbors
node v receives ⟦d⟧ from neighbor w. if d + wt(v, w) < dist(v, u₀), then
Termination detection by e.g. Dijkstra-Scholten
Complexity:
…
Centralised algorithm to compute shortest paths to initiator u₀.
Initially, dist(u₀, u₀) = 0, dist(v, u₀) = ∞ for other nodes, and parent(v, u₀) values form sink tree with root u₀.
Each round, u₀ sends ⟦0⟧ to its neighbors.
u₀ starts a new round after receiving a message from all neighbors.
Complexity:
Topology changes:
Initially, S = ∅ (S is explained in the next section).
While S doesn’t contain all nodes, a pivot w ∉ S selected:
When S contains all nodes, d[S] is standard distance function.
Complexity:
Computes for each pair (u,v) a shortest path from u to v
dS(u, v), with S set of nodes, denotes length of shortest path fro u to v with all intermediate nodes in S
When S contains all nodes, d[S] is the standard distance function
Assume each node knows the IDs of all nodes
Initially at each node u:
At w-pivot round, w broadcasts its values dist(w, v) for all nodes v.
If parent(u, w) = ⊥, for a node u ≠ w at the w-pivot round, then dist(u, w) = ∞, so dist(u, w) + dist(w, v) ≥ dist(u, v) for all nodes v.
Hence the sink tree toward w can be used to broadcast dist(w)
If u is in sink tree toward w, it sends ⟦request, w⟧ to parent(u, w), to let it pass on dist(w).
If u isn’t in sink tree towards w, it proceeds to next pivot round, with S(u) = S(u) ∪ {w}
Consider any node u ni sink tree toward w:
Complexity:
Network in which nodes/links may fail or be added. Such a change is eventually detected by its neighbors.
If topology change is detected, a node sends its entire routing table to its neighbors. Each node locally computes shortest paths.
Nodes periodically send link-state packet, with
node’s edges and their weights (based on latency, bandwidth)
sequence number (increases with each broadcast)
Link-state packets are flooded through the network
Nodes store link-state packets to obtain view of the entire network
sequence numbers avoid old info overwriting new info
each node locally computes shortest paths, e.g. with Dijkstra’s
When node recovers from crash, its sequence number starts at 0
RIP protocol uses distance-vector routing
OSPF protocol uses link-state routing
These routing algorithms don’t scale to the internet because of sending whole routing tables, or flooding. So, internet divided into autonomous sytems, where each system uses RIP or OSPF.
Border Gateway Protocol routes between autonomous systems.
You can still get deadlock, if you fill up memory at the nodes.
TCP protocol provides reliable packet delivery.
To avoid congestion, nodes maintainn congestion window for each of their edges. This is the max number of unacknowledged packets on this edge.
Congestion window grows linearly with each received ack, up to some threshold.
With each lost data packet, the congestion window is reset to initial size (TCP Tahoe) or halved (TCP Reno)