Upload
yesmurali
View
217
Download
0
Embed Size (px)
Citation preview
8/2/2019 Lecture 10 - Routing Part II
1/6
Routing StrategiesRouting StrategiesRouting StrategiesRouting Strategies
Fixed
Flooding
Random
Adaptive
15
Properties of Fixed RoutingProperties of Fixed RoutingProperties of Fixed RoutingProperties of Fixed Routing
Single permanent route for each source to destination pair
Determine routes using a least cost algorithm
Route fixed, at least until a change in network topology
16
Fixed Routing ExampleFixed Routing ExampleFixed Routing ExampleFixed Routing Example
17
FixedFixedFixedFixed
RoutingRoutingRoutingRouting
TablesTablesTablesTables
18
8/2/2019 Lecture 10 - Routing Part II
2/6
Properties of FloodingProperties of FloodingProperties of FloodingProperties of Flooding
No network info required
Packet sent by node to every neighbor
Incoming packets retransmitted on every link except incoming link
Eventually a number of copies will arrive at destination
Each packet is uniquely numbered so duplicates can be discarded
Nodes can remember packets already forwarded to keep network load in bounds
Can include a hop count in packets
All possible routes are tried
Very robust
At least one packet will have taken minimum hop count route Can be used to set up vir tual circuit
All nodes are visited
Useful to distribute information (e.g. routing)
19
FloodingFloodingFloodingFlooding
ExampleExampleExampleExample
20
Properties of Random RoutingProperties of Random RoutingProperties of Random RoutingProperties of Random Routing
Node selects one outgoing path for retransmission of incoming
packet
Selection can be random or round robin
Can select outgoing path based on probability calculation
No network info needed
Route is typically not least cost nor minimum hop
21
Properties of Adaptive RoutingProperties of Adaptive RoutingProperties of Adaptive RoutingProperties of Adaptive Routing
Used by almost all packet switching networks
Routing decisions change as conditions on the network change
Failure
Congestion
Requires info about network
Decisions more complexTradeoff between quality of network info and overhead
Reacting too quickly can cause oscillation
Too slowly to be relevant
22
8/2/2019 Lecture 10 - Routing Part II
3/6
!
Dynamic Routing Example Distance Vector RoutingModern computer networks tend to use dynamic routing
algorithms.
Distance vector routing algorithms work by having each routermaintain a table giving the best known distance to each destinationand which line to use when they get there.
These tables are updated regularly.
23
Dynamic Routing Example Distance Vector RoutingRouter A computes the delay to its neighbors B and C as follows:
B: 2msec, C: 3msec.
Each of Routers A neighbors, in this case B and C, send delay vectorsthat show the millisecond delay from each of their machines to allrouters, as follows.Router B> A: 3, B:0, C: 7, D: 6, E: 4, F: 10
Router C> A: 3, B:6, C: 0, D: 3, E: 12, F: 7.
24
A
B
C
D
F
E
Nodes
Communication Link
Dynamic Routing Example Distance Vector Routing Routing Table for Router A is then calculated
Router A sends updates to all its neighbours.
The measure could be anything. In this case it is delay time in milliseconds.
Updates ripple through the network as each router does this calculation.
Destination Link Delay
Router A -- 0
Router B AB 2
Router C AC 3
Router D AC 6
Router E AB 6
Router F AC 10
25
Key issues in this technique :
Knowledge about the whole network
Routing only to neighbors
Information sharing at regular intervals
26
8/2/2019 Lecture 10 - Routing Part II
4/6
"
Example Distance Vector Routing
At start up a routers knowledge of the internetwork is sparse.Prepare a routing table with following fields:
Network id
Cost
Next hop
27 28
Sharing of information in distance vector routing
Routing table distribution in distance vector routing
Updating routing table of router A
30
8/2/2019 Lecture 10 - Routing Part II
5/6
Final routing tablesRouter applies the following rules for updating
process1. If the advertised station is not in the routing table, the
router should add the advertised information to the
table.
2. If the advertised destination is in the routing table.
a) If the next hop field is the same, the router should replace
the entry in the table with the advertised one. Note that even
if the advertised hop count is larger the advertised entry
should replace the entry in the table because the new
information invalidates the old.
b) If the next hop field is not the same.i. If the advertised hop count is smaller than the one in the
table, the router should replace the entry in the table
with the new one.
ii. If the advertised hop count is not smaller(same or
larger), the router should do nothing.32
33
Updating process
(Rule 2.a)(Rule 2.a)
(Rule 1)(Rule 1)
(Rule 2.b.i)(Rule 2.b.i)
(Rule 2.b.ii)(Rule 2.b.ii)
(Rule 2.b.ii)(Rule 2.b.ii)
Adaptive RoutingAdaptive RoutingAdaptive RoutingAdaptive Routing ---- AdvantagesAdvantagesAdvantagesAdvantages
Improved performance
Aid congestion control
34
8/2/2019 Lecture 10 - Routing Part II
6/6
Two-node instability
35
Both A and B know
where X is.
Link between A and Xfails. A updates its
table immediately.
But before A can tell B,
B sends its info to A!
A, using Bs info, up-dates its table (wrongly!).
Then A send its tableto B and B updates its
table (again wrongly).
Both routers keep up-dating tables, event-
ually hitting infinity. Inthe meantime, chaos!
Solutions to two-node instability Possible Solutions to two-node instability:
Define infinity to be a much smaller value, such as 100. Then itdoesnt take too long to become stable. But now you cant usedistance vector routing in large networks.
Split Horizon instead of flooding entire table to each node,only part of its table is sent. More precisely, if node B thinksthat the optimum router to reach X is via A, then B does notneed to advertise this piece of info to A the info has alreadycome from A.
Split Horizon and Poison Reverse Normally, the distance
vector protocol uses a timer. If there is no news about a route,the node deletes the route from its table. So when A neverhears from B about the route to X, it deletes it. Instead, Node Bstill advertises the value for X, but if the source of info is A, itreplaces the distance with infinity, saying Do not use thisvalue; what I know about this route comes from you.
36
Three-node instability - no solution here!?
37