Sunteți pe pagina 1din 14

Routing Algorithms

Presentation by Routing Team


Martin and Fahim

 Routeing: British
 Routing: American

Since Oxford English Dictionary is much heavier than


any other dictionary of American English, British
English generally prevalis in the documents produced
by ISO and CCITT; wherefore, most of the
international standards for routing standards use the
routeing spelling.

Mohammad Fahim
Routing Algorithm Definition

 Routing is the decision which path to take

 A routing algorithm decides which output


link an incoming packet should be transmitted on

 A routing “table” contains the mappings from the networks and


host addresses to output ports on the router

 The routing algorithm builds this “table”

Mohammad Fahim
The Optimality Principle
 Optimal routes without regard to network, topology and traffic

 Optimal routes form a tree rooted at the destination

 The tree is called the sink tree

 The goal of all routing algorithms is to discover and use the sink
trees for all routers.

Mohammad Fahim
Types of Routing Algorithms

 Two types of routing algorithms:

 Non-Adaptive Routing Algorithms

 Adaptive Routing Algorithms

 Hierarchical Routing is used to make these algorithms scale to large


networks

Mohammad Fahim
Non Adaptive Routing Algorithm

 Non-adaptive routing algorithms do not


base their routing decisions on the current state of the
network

 This Procedure is sometimes called static routing

 Examples:

 Flooding
 Shortest Path Routing
Mohammad Fahim
Flooding Algorithm

 Every incoming packet is sent out on


every outgoing line except the one it
arrived on

 No routing table, no lookup!

 Problem: Vast number of duplicated


packets

Mohammad Fahim
Reducing Flooding Algorithm’s Duplicate Packets

 Solution 1: Hop counter

 Have a hop counter in the packet header

 Routers decrement each arriving packet’s hop


Counter

 Routers discard a packet with hop count=0

 Ideally, the hop counter should be initialized to the


length of the path from the source to the
destination

 Hop count defines the “Horizon” of the packet,


which is how far a node can “see”.
Mohammad Fahim
Reducing Flooding Algorithm’s Duplicate Packets(Cont.)

 Solution 2: Sequence Numbers

 Require the first router hop to put a sequence


number in each packet it receives from its hosts

 Each router maintains a table listing the sequence


numbers it has seen from each first-hop router.The router can then
discard packets it has already
seen.

Mohammad Fahim
Flooding Uses

 Used in small networks or limited horizon


order 100’s of nodes

 Military Applications

Large number of routers is desirable

If one router is taken out (by a bomb?) flooding will


still get packets to their destinations

 Distributed Databases

Simultaneous updates of multiple databases can


be done with a single packet transmission

Gnutella search is an example, uses horizon

Mohammad Fahim
Computing the Shortest Path

 Dijkstra’s Shortest Path Algorithm:

 Step 1: Draw nodes as circles. Fill in a circle to mark it as a


“permanent node.”

 Step 2: Set the current node equal to the source node

 Step 3: For the current node:


– Mark the cumulative distance from the current node to
each non-permanent adjacent node. Also mark the name
of the current node. Erase this marking if the adjacent
node already has a shorter cumulative distance marked

– Mark the non-permanent node with the shortest listed


cumulative distance as permanent and set the current
node equal to it. Repeat step Fahim
Mohammad 3 until all nodes are marked
permanent.
Dijskstra’s Shortest Path Algorithm

What is the shortest path between A and G?

Mohammad Fahim
Dijskstra’s Shortest Path Algorithm

Mohammad Fahim
Problems non-adative Algorithms

 Problems with non-adaptive algorithms

 If traffic levels in different parts of the subnet


change dramatically and often, non-adaptive
routing algorithms are unable to cope with these
changes

 Lots of computer traffic is bursty, but non-adaptive


routing algorithms are usually based on average
traffic conditions

 Adaptive routing algorithms can deal with


these situations

Mohammad Fahim
Sources and Links
 Computer Networks by Andrew S. Tanenbaum

 Portal.acm.org


www.ics.uci.edu

Mohammad Fahim

S-ar putea să vă placă și