Fixed Routing, Adaptive Routing and Flooding
Fixed Routing, Adaptive Routing and Flooding
CMPE 150
Fall 2005 Lecture 21
Announcements
Homework 4 up. Due on 11.23.05. Lab this week:
The Internet Behind the Web video.
Today
Finish DLL!
Last Class
Network Layer.
Focus on packet switching networks. Main functions. Different network layer implementations.
Datagrams versus virtual circuits.
5-4
Routing
Routing
One of the main functions of network layer. Routing versus forwarding? Datagram versus VC networks?
Routing Algorithm
Computes routing tables. Properties:
Correctness. Robustness. Stability. Optimality.
Try to optimize a certain metric.
Optimality Principle
General statement about optimal routes (topology, routing algorithm independent). If router J is on optimal path between I and K, then the optimal path from J to K also falls along the same route.
Proof by contradiction.
Corollary:
Set of optimal routes from all sources to destination form a tree rooted at destination. Sink tree.
CMPE 150- Introduction to Computer Networks
10
Adaptive routing:
Routes change dynamically as function of current state of network. Algorithms vary on how they get routing information, metrics used, and when they change routes.
CMPE 150- Introduction to Computer Networks
11
Static Algorithms
(Non-Adaptive)
12
Shortest-Path Routing
Problem: Given a graph, where nodes represent routers and edges, links, find shortest path between a given pair of nodes. What is shortest in shortest path?
Depends on the routing metric in use. Example: number of hops (static), geographic distance (static), delay, bandwidth (raw versus available), combination of a subset of these.
13
14
Start
B is made permanent.
15
Flooding
Every incoming packet forwarded on every outgoing link except the one it arrived on. Problem: duplicates. Constraining the flood:
Hop count. Keep track of packets that have been flooded.
16
Flooding: Example
18
19
Old ARPANET algorithm: DV where cost metric is outgoing link queue length.
20
(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
21
Routing Updates
Every T interval, routers exchange routing updates. Routing update from router X consists of a vector with all destinations and the corresponding distance from X to them. When router Y receives an update from X, it can estimate its distance to router Z through X as Dyz = Dyx + Dxz. Router Y receives update from all its neighbors and builds a new RT.
22
3
6
1
2 3 4 5 6
0
2 5 1 6 8 T=T0
2 3 4 3 3
2 3 0 3 2 3 5
3 7 4 0 2 1 3
4 5 2 2 0 1 3
0 2 3 1 2 4
T=T1
23