Académique Documents
Professionnel Documents
Culture Documents
B R2
R1
R4
C E
R3 F
How to find the best path from A to F?
How does R1 chooses the best route to R4?
What is routing?
“A part of the network software responsible for deciding which output line an
incoming packet should be transmitted on.” – Tanenbaum
In Internetworking multiple paths exist between two networks. Routing helps
to identifying the path.
1 2
3 4
3. Host-specific routing 4. Default routing
5 6
At router:
If destination network is directly attached then deliver locally (using
ARP)
Otherwise look up destination network in routing table to find next
hop and send to next router.
8
Routing - properties
1. correctness Routing Algorithm Analogy
2. simplicity A person traveling from Madurai to Sivakasi.
3. Robustness If they were using a non-adaptive algorithm, they would make the decision to pass
should cope with changes in the topology and traffic that happen through Thirumangalam and Virudhunagar before they left Madurai.
over days… If they were using an adaptive algorithm, they would possibly travel to
updating possibility to meet the above requirement Thirumangalam first and depending on how busy the routes are, they may travel
to Srivilliputtur instead of Virudhunagar and then onto Sivakasi.
4. Stability
In non-adaptive, the hops or jumps taken is decided before hand.
must converge to equilibrium
In adaptive, the next hop is decided at each stage.
5. fairness
6. optimality
min mean packet delay
max total network throughput
Note: 5 & 6 often contradictory
9 10
Routing algorithms
Critaria used for selection of route Grouped into
Minimum hop Non-adaptive algorithm or Static routing
Least cost Non-adaptive routing algorithms make routing decisions based
on the network topology.
The routes are chosen in advance, off line and downloaded to
the routers when the network is booted.
Adaptive algorithm
Adaptive algorithms change their routing decisions in line with
changes in network traffic or network topology.
This is sometimes known as dynamic routing.
11 12
!
Adaptive Routing
Adaptive algorithms require up to date information about network traffic and network topology at well
defined times so that they can optimize throughput of packets.
Static Routing These algorithms may differ in:
A graph of the layout of all routers in the subnet is composed. Where the routers get their information.
Each node on the graph represents a router and each line represents This could be locally from all adjacent routers or from all routers in the subnet.
a communication line or link (cable or radio link etc.). Routing decisions usually based on knowledge of network (not always)
Distributed routing
A distance is associated with each communication link connecting o Nodes use local knowledge
two routers. o May collect info from adjacent nodes
o May collect info from all nodes on a potential route
To choose a route between a pair of routers, the routing algorithm Central routing
just selects the shortest path between them on the graph. o Collect info from all nodes
Update timing
All shortest paths are calculated in advance. o When is network info held by nodes updated
o Fixed - never updated
o Adaptive - regular updates
When the routers change the routes.
This may be after a well known number of seconds or if the network traffic increases or if new
LANs are added to the network (change in network topology).
What measure is used for optimizing throughput of packets.
Will it depend on shortest distance between routers, the fastest transmission time or the
13 14 number of routers it has to pass through.
15 16
"
Fixed Routing Example Fixed
Routing
Tables
17 18
19 20
Properties of Random Routing Properties of Adaptive Routing
Node selects one outgoing path for retransmission of incoming Used by almost all packet switching networks
packet Routing decisions change as conditions on the network change
Selection can be random or round robin Failure
Can select outgoing path based on probability calculation Congestion
No network info needed Requires info about network
Route is typically not least cost nor minimum hop Decisions more complex
Tradeoff between quality of network info and overhead
Reacting too quickly can cause oscillation
Too slowly to be relevant
21 22
Dynamic Routing Example – Distance Vector Routing Dynamic Routing Example – Distance Vector Routing
Router A computes the delay to its neighbors B and C as follows:
Modern computer networks tend to use dynamic routing
B: 2msec, C: 3msec.
algorithms.
Each of Routers A neighbors, in this case B and C, send delay vectors
Distance vector routing algorithms work by having each router
that show the millisecond delay from each of their machines to all
maintain a table giving the best known distance to each destination
routers, as follows.
and which line to use when they get there.
Router B> A: 3, B:0, C: 7, D: 6, E: 4, F: 10
These tables are updated regularly. Router C> A: 3, B:6, C: 0, D: 3, E: 12, F: 7.
B Nodes
E
A
Communication Link
D
C F
23 24
Dynamic Routing Example – Distance Vector Routing Key issues in this technique :
Routing Table for Router A is then calculated
Knowledge about the whole network
Destination Link Delay
Routing only to neighbors
Router A -- 0
Information sharing at regular intervals
Router B AB 2
Router C AC 3
Router D AC 6
Router E AB 6
Router F AC 10
27 28
#
Routing table distribution in distance vector routing
Updating routing table of router A
30
$
Updating process Adaptive Routing - Advantages
Improved performance
Aid congestion control
(Rule 2.a)
(Rule 1)
(Rule 2.b.i)
(Rule 2.b.ii)
(Rule 2.b.ii)
33 34
35 36