Gordon Glas and Randy Appleton
CS 228
ROUTING
-------------
Definition:
The selection of paths through which a network sends packets.
For an overview, see http://www.freesoft.org/CIE/Topics/87.htm
The network must know the location of a destination before selecting
a path which leads to it. Networks learn that certain paths are conjested
or disabled and uses that information to improve the path selection.
A user normally specifies a destination by name (ogimaa.nmu.edu), rather
than by giving the location of that destination on the network. Since the
name doesn't tell you exactly where the computer is, the network translates
the name into the location. This translation can be done by computing
the network portion of the IP address.
Routing is physically taken care of in the Network Layer of the OSI
model.
Who routes?
-
Source Puts the work on the source and not the routers (bad
for your Commodore 64). Requires every source to be informed of topology
changes. Only works with virtual circuits. On the internet,
happens only if the packet has either loose source route or strict
source route option set.
-
Routers Requires more work by routers. Can use either virtual
circuits or datagrams. How the internet works.
Transport Methods:
-
Session Routing
Path through which all packets of the same conversation are sent. Therefore,
there's one routing decision per conversation. This is less computation,
but requires the routers to maintain state and does not react to changes
in the network during a conversation. This is sometimes called session
routing, static routing, or non-adaptive routing.
-
Datagram Routing
Makes routing decisions for each packet.
More work for each router, but no need to maintain any state, and reacts
quickly to changes.
Sometimes called adaptive routing.
Routing Algorithm Properties:
-
Correctness The algorithm NEVER screws up, even for years of service
and even during hardware, software, and human failures.
-
Robustness The algorithm must adjust the routing decisions when
equipment fails and when traffic conditions change. A robust algorithm
monitors the network constantly and updates the routing decisions either
frequently or soon after a change is detected. Basically, it monitors the
network, makes routing decisions, and implements these decisions. Routing
decisions should be modified before congestion levels increase significantly.
-
Stablity A routing algorithm is stable if the routing decisions
adapt smoothly to changes in operating conditions. For example, a small
change in operating conditions should result in a comparatively small change
in routing decisions. Instability could result from the effect of routing
decisions on the operating conditions.
-
Fairness A routing algorithm is fair if it results in similar delays
for the packets of different sources and destinations. For example, routing
is fair if the average delay per packet is the same for two separate streams
of packets being transmitted.
-
Optimality A routing algorithm is optimal if it maximizes the network
designer's objecting function while satisfying design contraints.
But what should you maximize. Throughput? Latency? Number
of hops traversed?
Note: Optimality and Fairness aren't always compatible. Such incompatibility
may be caused by an objective function that doesn't properly reflect the
operating cost of the network.
Examples of widely used routing algorithms:
-
Flooding Every node in the network transmits a copy of each packet
it receives on every one of its transmission links, except on the link
through which it received the packet. Basically, it tries EVERY route
for EVERY packet. Very costly, but if a route exists it will
be found.
-
Spanning Tree Routing The transmission of packets along a tree of
paths that leads to a specific destination. If everyone uses Shortest
Path, you will get a Spanning Tree.
-
Routing Table Each node transmits a packet along a link selected
according to some probabilities that depend on the destination. The
sysadmin writes the table, using his best judgement. Works only for
small networks.
-
Bellman-Ford, or Distance Vector Determines the fastest path between
nodes from the travel times along individual links. But it suffers
from Counting to infinity, which HAS NO POSSIBLE SOLLUTION.
In practice there are many ad-hoc ways to solve this, including split horizon.
See http://www.freesoft.org/CIE/RFC/1058/6.htm
-
Hierarchical Routing Sizes of the routing tables are significantly
reduced by using this algorithm. The nodes are grouped into domains, and
each node keeps a list of the next node for each other domain and for each
other node in its own domain.
-
Shortest Path Routing Route every packet along the shortest
path, where path length is defined by (latency, # of hops, cost, etc.)
Use Dijkstra's algorithm! Much more can be found at http://renaud.waldura.com/doc/java/dijkstra/.
An animation can be found at animated demo.