Non-Adaptive Routing - Universitetet i...

37
10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing Shortest Path Routing

Transcript of Non-Adaptive Routing - Universitetet i...

Page 1: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 1 INF-3190: Switching and Routing

Non-Adaptive Routing

Shortest Path Routing

Page 2: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 2 INF-3190: Switching and Routing

Non-Adaptive Shortest Path RoutingStatic Procedure

Network operator generates tablesTables

Are loaded when IS operation is initiated andWill not be changed any more

CharacteristicsSimpleGood results with relatively consistent topology and traffic

ButPoor performance if traffic volume or topologies change over time

Page 3: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 3 INF-3190: Switching and Routing

Non-Adaptive Shortest Path RoutingSpanning Tree and Optimized Route

Information about the entire network has to be available i. e. application actually as a benchmark comparison

ExampleLink is labeled with distance / weightNode is labeled with distance from source node along best known path (in parentheses)Find the shortest path from A to D

A

B C

DE

F

G H

2

2

7

2

2

61 2

4

33

2

A

B (●,-) C (●,-)

D (●,-)E (●,-)

F (●,-)

G (●,-) H (●,-)

Page 4: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 4 INF-3190: Switching and Routing

Non-Adaptive Shortest Path RoutingProcedure: e. g. according to Dijkstra

Find the shortest path from A to DLabels may be permanent or tentativeInitially, no paths are known

All nodes are labeled with infinity (tentative)Discover the labels that represent shortest possible path from source to any nodeMake those labels permanent

1. Node A labeled as permanent (filled-in circle)2. Relabel all directly adjacent nodes with the distance to A

(path length, nodes adjacent to source)3. Examine all tentatively labeled nodes, make the node with the

smallest label permanent4. This node will be the new working node for the iterative

procedure(i.e., continue with step 2.)

Page 5: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 5 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing

Procedure: e. g. according to DijkstraFind the shortest path from A to D:1. A flagged as permanent (filled-in circle)2. Relabel all directly adjacent nodes with the distance to A

(path length, IS adjacent to the source):

2

7

2

2

61 2

4

33

2

A

B (●,-) C (●,-)

D (●,-)E (●,-)

F (●,-)

G (●,-) H (●,-)

B (2,A)

G (6,A)

Page 6: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 6 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing

Procedure: e. g. according DijkstraFind the shortest path from A to D:

...3. Compare all recent, not firmly flagged IS;

flag the one with the lowest number as fixed4. This IS is the origin of the iterative procedure

(i. e. continue with item 2.)

2

7

2

2

61 2

4

33

2

A

C (●,-)

D (●,-)E (●,-)

F (●,-)

H (●,-)

B (2,A)

G (6,A)

Page 7: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 7 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing

Procedure: e.g., according to DijkstraFind the shortest path from A to D:1. Node B has been labeled as permanent (filled-in circle)2. relabel all directly adjacent nodes with the distance to B

(path length, nodes adjacent to source): A (does not apply, because it is the origin),

2

7

2

2

61 2

4

33

2

A

C (●,-)

D (●,-)F (●,-)

H (●,-)

B (2,A)

E (4,B)

G (6,A)

C (9,B)

E (●,-)

Page 8: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 8 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing

Procedure: e.g., according to Dijkstrafind the shortest path from A to D:1. …2. …3. examine all tentatively labeled nodes;

make the node with the smallest label permanent4. this node will be the new working node for the iterative

procedure ...

2

7

2

2

61 2

4

33

2

A D (●,-)F (●,-)

H (●,-)

B (2,A) C (9,B)

E (4,B)

F (6,E)

G (6,A) H (9,G)G (5,E)

D (10,H)

H (8,F)

Page 9: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 9 INF-3190: Switching and Routing

Non-Adaptive Routing

Flooding

Page 10: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 10 INF-3190: Switching and Routing

FloodingPrinciple

IS transmits the received packet to all adjacent ISBut generates "an infinite amount" of packets

Flood limitationsHop counter in the packet header

Initialize to destination’s distance, or subnet diameter is unknownDecrement per hop, discard packet at 0

Keeping history of transferred packets in ISs, delete copies

Source router inserts sequence number into each packetISs keeps per-router history of sequence numbersOld packets are dropped

Page 11: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 11 INF-3190: Switching and Routing

Selective FloodingApproach

Do not send out on every lineIS transmits received packet to adjacent stations,located in the Direction of the DestinationWith ’regular’ topologies this makes sense and is an optimizationBut some topologies do not fit well to this approach

CommentGeographically-oriented routing got recent interest for mobile scenarios

Page 12: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 12 INF-3190: Switching and Routing

FloodingEvaluation and use

In most scenarios impractical because of overheadExtremely robustReaches all ISsDoes not need topology information, no bootstrapAlways finds the shortest path

Page 13: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 13 INF-3190: Switching and Routing

Adaptive Routing

Page 14: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 14 INF-3190: Switching and Routing

Adaptive RoutingClass Adaptive Algorithms

Decisions are based on current network state

Measurements / estimates of the topology and the traffic volume

Further sub-classification intoCentralized algorithmsIsolated algorithmsDistributed algorithms

Page 15: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 15 INF-3190: Switching and Routing

Adaptive Routing

Centralized Routing

Page 16: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 16 INF-3190: Switching and Routing

Adaptive Centralized RoutingPrinciple

One routing control center (RCC) exists in the networkEach IS sends periodically status updates to the RCC

Available neighborsCurrent queue lengthLine utilization…

RCCCollects informationComputes the optimal path each IS pairForms routing tablesDistributes tables to ISs

Page 17: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 17 INF-3190: Switching and Routing

Adaptive Centralized RoutingCharacteristics

RCC has complete informationIS is free of routing calculations

ButRe-calculations quite often necessary (approx. once/min or more often)Low robustnessNo correct decisions if network is partitionedISs receive tables at different timesTraffic concentration in RCC proximity

RCC

Page 18: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 18 INF-3190: Switching and Routing

Adaptive Routing

Isolated Routing

Page 19: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 19 INF-3190: Switching and Routing

Adaptive Isolated Routingthrough Backward Learning

Isolated routingEvery IS makes decision based on locally gathered information only

No exchange of routing information among nodesOnly limited adaptation possibility to changed traffic or topology

IS ‘learns’ from received packetsSource ISDistance estimate by hop count

Page 20: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 20 INF-3190: Switching and Routing

Adaptive Isolated Routingthrough Backward Learning

PacketFrom source Sreceived on line Lafter C hops⇒ S is reachable on L within C hops

Routing table in ISL - table (destination - IS, outgoing line, Cmin)Update of the routing table

IS receives packet ( ..., S, C, ... ) on Lif not (S in L-Table)then Add(S,L,C)else if C < Cminthen Update(S,L,C)

Page 21: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 21 INF-3190: Switching and Routing

Adaptive Isolated Routingthrough Backward Learning

Example: D learns about Apacket ( ..., source - IS, section counter, ...)

P1 ( ..., A, 4, ... ) → Add ( A, l1, 4 )P2 ( ..., A, 3, ... ) → Update ( A, l2, 3 )

A D

I1

I2? ?

? ?

Page 22: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 22 INF-3190: Switching and Routing

Adaptive Isolated Routingthrough Backward Learning

ProblemPackets use a different route, e. g. because of failures, high loadAlgorithm retains only the old value (because it was "better"),

i. e. algorithm does not react to deteriorations

SolutionPeriodic deletion of routing tables(new learning period)Table deletion

Too often: mainly during the learning phaseNot often enough: reaction to deteriorations too slow

Page 23: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 23 INF-3190: Switching and Routing

Adaptive Routing

Distributed RoutingDistance Vector

Page 24: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 24 INF-3190: Switching and Routing

Distance Vector RoutingDistance-Vector Routing

Group of Distance Vector Routing AlgorithmsAlso known as

Distributed Bellman-Ford algorithm, Ford-Fulkerson algorithmUse

Was the original ARPANET routing algorithmHas been used in the Internet as RIP (Routing Information Protocol)

Basic principleIS maintains table (i.e., vector) stating

Best known distance to destinationsAnd line to be used

ISs update tables By exchanging routing information with their neighbors

Page 25: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 25 INF-3190: Switching and Routing

Distance Vector RoutingEach IS

maintains routing table with one entry per router in the subnetis assumed to know the ‘distances’ to each neighbor

IS sends list with estimated distances to each destination periodically to its neighbors

X receives list E(Z) from neighbor YDistance X to Y: eDistance Y to Z: E(Z)Distance X to Z via Y: E(Z)+e

IS computes new routing table from the received listscontaining

Destination ISPreferred outgoing pathDistance

Page 26: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 26 INF-3190: Switching and Routing

Distance Vector Routing

Previous routing table will not be taken into accountReaction to deteriorations

A B C D

EF

GH

I J K L

A 0B 12C 25D 40E 14F 23G 18H 17I 21J 9K 24L 29

A2436182772031200112233

I2031198301960147229

H2128362422403119221009

K

2820173018

0

15

8 A20 A

IHIIH

12 H10 I

-6 K

K

line

JA8

delay JI10

JH12

JK6

Page 27: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 27 INF-3190: Switching and Routing

Distance Vector RoutingFast route improvement

Fast distribution of information about new short paths (with few hops)

Exampleinitially A unknownlater: A connected with distance 1 to B, this will be announcedDistribution proportional to topological spread

Synchronous (stepwise) update is a simplification

A B C D E

∞ ∞ ∞ ∞

1 ∞ ∞ ∞

1 2 ∞ ∞

1 2 3 ∞

1 2 3 4

Page 28: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 28 INF-3190: Switching and Routing

Distance Vector RoutingSlow distribution of information about new long paths (with many hops)“Count to Infinity” problem of DVR

Example: deteriorationHere: connection destroyedA previously known, but now detachedThe values are derived from (incorrect) connections of distant IS

CommentLimit "infinite" to a finite value, depending on the metrics, e.g.

‘infinite’ = maximum path length+1

A B C D E

∞ ∞ ∞ ∞

1 2 3 4

3 2 3 4

3 4 3 4

5 4 5 6

5 6 5 6

7 6 7 6

7 8 7 8

Page 29: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 29 INF-3190: Switching and Routing

Distance Vector RoutingVariant: ‘Split Horizon Algorithm’Objective: improve the "count to infinity" problemPrinciple

In general, to publicize the "distance" to each neighbourIf neighbor Y exists on the reported route, X reports the response "false" to Y

distance X (via Y) according to arbitrary i: ∞

Example: deterioration (connection destroyed)

B to C: A = ∞ (real),C to B: A = ∞ (because A is on path), ...

But: still poor, depending on topology, example

Connection CD is removedA receives "false information" via BB receives "false information" via A

Slow distribution (just as before)

A B C D E

1 2 3 4

∞ 2 3 4

∞ ∞ 3 4

∞ ∞ ∞ 4

∞ ∞ ∞ ∞

A

B

C D

Page 30: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 30 INF-3190: Switching and Routing

Adaptive Routing

Distributed RoutingLink State Routing

Page 31: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 31 INF-3190: Switching and Routing

Link State RoutingBasic principle

IS measures the "distance" to the directly adjacent ISDistributes informationCalculates the ideal route

Procedure1. Determine the address of adjacent IS2. Measure the "distance" (delay, ...) to neighbouring IS 3. Organize the local link state information in a packet4. Distribute the information to all IS5. Calculate the route based on the information of all IS

UseIntroduced into the ARPANET in 1979, nowadays most prevalentIS-IS (Intermediate System-Intermediate System)

developed by DECNETalso used as ISO CLNP in NSFNETNovell Netware developed its own variation from this (NLSP)

OSPF (Open Shortest Path First)since 1990 Internet RFC 1247

Page 32: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 32 INF-3190: Switching and Routing

Link State Routing1. Phase: gather information about the adjacent

intermediate systems

A F

B

C

LAN

D E G

H

I

A

F

B

C

D E G

H

I

Page 33: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 33 INF-3190: Switching and Routing

Link State Routing1. Phase: gather information about the adjacent

intermediate systems

A F

B

C

LAN

D E G

H

I

N

A F

B

C

D E G

H

I

Initialization procedureNew IS

Sends a HELLO message over each L2 channelAdjacent IS

Responds with its own address, unique within the network

Page 34: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 34 INF-3190: Switching and Routing

Link State Routing2. Phase: measure the "distance"

Definition of distance neededUsually delayWhere to measure?

Uses & Looks up

Data packets

Incominglines

Outgoinglines

ForwardingProcess

RoutingProcess

Topology, link utilization, etc.information

Fills & Updates

desti-nation link

A 0

B 3

C 1

D 4

Routingtable

Router

HELLOECHOQueues

When to start timer?

Page 35: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 35 INF-3190: Switching and Routing

Link State Routing

West East

B

A

D

E

C F

G

H

J

I

2. Phase: measure the "distance“Queuing delay

Measuring without does not take load into accountMeasuring with does ⇒ usually better

ButPossibility for oscillations (route flapping)Once per routing table update

Page 36: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 36 INF-3190: Switching and Routing

Link State Routing3. Phase: organizing the information as link state packet

Including own address, sequence number, age, "distance"Timing problems: validity and time of sending

PeriodicallyIn case of major changes

B C

E F

A D61

2

8

5 7

4 3A

Seq.Age

B C D E F

B 4E 5

Seq.AgeA 4C 2

Seq.AgeB 2D 3

Seq.AgeC 3F 7

Seq.AgeA 5C 1

Seq.AgeB 6D 7

F 6 E 1 F 8 E 8

Link State Packets:

Page 37: Non-Adaptive Routing - Universitetet i osloheim.ifi.uio.no/~inf3190/Forelesninger05/2005mar10-switch-and... · 10. Mar. 2005 1 INF-3190: Switching and Routing Non-Adaptive Routing

10. Mar. 2005 37 INF-3190: Switching and Routing

Link State Routing4. Distributing the local information to all IS

By applying the flooding procedure (very robust)Therefore sequence number in packets

Problem: inconsistencyVarying states simultaneously available in the networkIndicate and limit the age of packet,i. e. IS removes packets that are too old

5. Computing new routesEach IS for itself Possibly larger amount of data available