Fixed Routing, Adaptive Routing and Flooding
-
Upload
selva-kumar -
Category
Documents
-
view
234 -
download
0
Transcript of Fixed Routing, Adaptive Routing and Flooding
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
1/23
CMPE 150- Introduction to Computer Networks1
CMPE 150
Fall 2005
Lectu re 21
Introduction to Computer
Networks
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
2/23
CMPE 150- Introduction to Computer Networks2
Announcements
Homework 4 up.
Due on 11.23.05.
Lab this week:
The Internet Behind the Web video.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
3/23
CMPE 150- Introduction to Computer Networks3
Today
Finish DLL!
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
4/23
CMPE 150- Introduction to Computer Networks4
Last Class
Network Layer. Focus on packet switching networks.
Main functions.
Different network layer implementations. Datagrams versus virtual circuits.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
5/23
CMPE 150- Introduction to Computer Networks5
Virtual-Circu i t versu s Datagram Subnets
5-4
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
6/23
CMPE 150- Introduction to Computer Networks6
Rout ing
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
7/23CMPE 150- Introduction to Computer Networks7
Rout ing
One of the main functions of network layer.
Routing versus forwarding?
Datagram versus VC networks?
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
8/23CMPE 150- Introduction to Computer Networks8
Rou t ing A lgor ithm
Computes routing tables.
Properties:
Correctness.
Robustness. Stability.
Optimality.
Try to optimize a certain metric.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
9/23CMPE 150- Introduction to Computer Networks9
Optimal i ty Princ iple
General statement about optimal routes(topology, routing algorithm independent).
If router J is on optimal path between I
and K, then the optimal path from J to Kalso falls along the same route.
Proof by contradiction.
Corollary: Set of optimal routes from all sources to
destination form a tree rooted at destination.
Sink tree.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
10/23CMPE 150- Introduction to Computer Networks10
Types o f Rou t ing A lgo r ithms
Non-adaptive versus adaptive.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
11/23CMPE 150- Introduction to Computer Networks11
Adapt ive and Non -adap t ive Rou t ing
Non-adaptive routing:
Fixed routing, static routing.
Do not take current state of the network (e.g.,
load, topology).
Routes are computed in advance, off-line, anddownloaded to routers when booted.
Adaptive routing:
Routes change dynamically as function of current
state of network.
Algorithms vary on how they get routing
information, metrics used, and when they change
routes.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
12/23CMPE 150- Introduction to Computer Networks12
Stat ic A lgor i thm s
(Non-Adaptive)
1.Shortest-path routing.
2.Flooding.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
13/23CMPE 150- Introduction to Computer Networks13
Shortest-Path Rou t ing
Problem: Given a graph, where nodesrepresent routers and edges, links, find
shortest pathbetween a given pair of nodes.
What is shortestin shortest path?
Depends on the routing metricin use.
Example: number of hops (static), geographic
distance (static), delay, bandwidth (raw versus
available), combination of a subset of these. Dijkstras shortest-path algorithm (19590.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
14/23CMPE 150- Introduction to Computer Networks14
Dijkstras Shortest-Path A lgor i thm
Initially, links are assigned costs.
As the algorithm executes, nodes are labeledwith its distance to source along best known
path.
Initially, no routes known, so all nodes arelabeled with infinity.
Labels change as the algorithm proceeds.
Labels can be temporary or permanent.
Initially all labels are tentative.A label becomes permanent if it represents the
shortest path from the source to the node.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
15/23CMPE 150- Introduction to Computer Networks15
Sho rtest Path Rout ingFind shortest-path from A to D:
Start
Label each adjacent node
with distance to
A.
B is made
permanent.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
16/23CMPE 150- Introduction to Computer Networks16
Flooding
Every incoming packet forwarded on every
outgoing link except the one it arrived on.
Problem: duplicates.
Constraining the flood: Hop count.
Keep track of packets that have been flooded.
Robust, shortest delay (picks shortest path asone of the paths).
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
17/23CMPE 150- Introduction to Computer Networks
17
Flood ing: Example
Stallings Figure 12.4
(hop-count=3)
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
18/23CMPE 150- Introduction to Computer Networks
18
Dynam ic Rout ing A lgor ithms
(Adaptive Routing)
Distance vector routing.
Link state routing.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
19/23CMPE 150- Introduction to Computer Networks
19
Dis tance Vecto r Rou t ing
Aka, Bellman-Ford (1957), Ford-Fulkerson(1962).
Original ARPANET routing; also used by
Internets RIP. Each router keeps routing table (or routing
vector) with best known distance to each
destination and corresponding outgoing
interface.
Routing tables are updated by exchanging
routing information with neighbors.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
20/23CMPE 150- Introduction to Computer Networks
20
Distance Vector (Contd)
Routing table at each router: One entry per participating router.
Each entry contains outgoing interface and distance to
corresponding destination.
Metric: number of hops, delay, queue length.
Each router knows distance to its neighbors.
Old ARPANET algorithm: DV where cost metric
is outgoing link queue length.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
21/23CMPE 150- Introduction to Computer Networks
21
Dis tance Vecto r Rou t ing
(a)A subnet. (b)Input from A, I, H, K, and thenew routing table for J.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
22/23CMPE 150- Introduction to Computer Networks
22
Rout ing Updates
Every T interval, routers exchangerouting updates.
Routing update from router X consists ofa vector with all dest inat ionsand the
corresponding distance from X to them. When router Y receives an update from
X, it can estimate its distance to router Z
through X as Dyz = Dyx+ Dxz. Router Y receives update from all its
ne ighborsand builds a new RT.
-
8/13/2019 Fixed Routing, Adaptive Routing and Flooding
23/23
23
Distance Vecto r: Example
1
4
6
23
5
1Node Distance Next2
3
3
2
1
9
9
5
1
2 1 0 -
2 2 2
3 5 3
4 1 4
5 6 3
6 8 3
T=T0 T=T1
3 7 5
2 3 4
0 4 2
3 0 2
2 2 0
3 1 1
5 3 3
Node Distance Next
1 0 -
2 2 2
3 3 4
4 1 4
5 2 4
6 4 4
T=T2
7