Anda di halaman 1dari 3

Routing Algorithms:

Routing is the process of discovering network paths


Model the network as a graph of nodes and links
Decide what to optimize (e.g., fairness vs efficiency)
Update routes for changes in topology (e.g., failures)

Forwarding is the sending of packets along a path

Routing algorithm part of network layer software responsible for deciding which
output line a packet is to be transmitted on.

Router- handles arriving packet, looks up outgoing line in routing table and forwards
the packet

Also fills in and updates routing tables

Virtual circuits require routing decisions when circuit is set up (called Session Routing
because route remains for entire session.)

Routing Algorithm Properties


Desirable properties
Correctness and simplicity
Robustness- ability to handle changes in topology and traffic, as well as hardware
and software failures
Stability converges quickly, reaches equilibrium and stays there
Fairness and efficiency often conflicting goals; a compromise between global
efficiency and fairness to individual connections is needed. (Minimize packet delay,
maximize throughput, minimize packet travel distance, reduce the number of hops,
etc.)
Adaptive and Non-Adaptive Algorithms:
Non-adaptive algorithms do not base their routing decisions on any measurements
or estimates of current topology and traffic. The route is computed when the router
is booted. This is called static routing. It does not respond to failures and is useful
for situations in which the routing choice is clear.
Adaptive algorithms - change their routing decisions to reflect changes in the
topology and traffic. These are called dynamic routing algorithms.
The Optimality Principle
Optimal routes follow the optimality principle which means that, if a router J is on the
optimal path from I to K then the optimal path from J to K also falls along the same
route.
A consequence is that the set of optimal routes from all sources to a given
destination, form a tree rooted at the destination.
This is called a sink tree, where the distance metric is the number of hops.
Routing algorithms discover and use the sink trees for all routes.
A sink tree is not unique. It has the general structure of a DAG (directed, acyclic,
graph). A tree does not contain loops.
Each portion of a best path is also a best path; the union of them to a router is a
tree called the sink tree
Best means fewest hops in the example

Shortest Path Algorithm

Dijkstras algorithm computes a sink tree on the graph:


Each link is assigned a non-negative weight/distance
Shortest path is the one with lowest total weight
Using weights of 1 gives paths with fewest hops
Algorithm:
Start with sink, set distance at other nodes to infinity
Relax distance to other nodes
Pick the lowest distance node, add it to sink tree
Repeat until all nodes are in the sink tree
A network and first five steps in computing the shortest paths from A to D. Pink arrows
show the sink tree so far.

Anda mungkin juga menyukai