Overview q Routing Algorithms v Link-state From last week v - - PDF document

overview
SMART_READER_LITE
LIVE PREVIEW

Overview q Routing Algorithms v Link-state From last week v - - PDF document

Smith College, CSC 249 March 6, 2018 1 Overview q Routing Algorithms v Link-state From last week v Distance-vector TODAY 2 1 Overview of Routing so far v Routing algorithms v Find the best path through a network v Create


slide-1
SLIDE 1

1

1

Smith College, CSC 249 March 6, 2018

Overview

q Routing Algorithms

v Link-state – From last week v Distance-vector – TODAY

2

slide-2
SLIDE 2

2

Overview of Routing so far

3

v Routing algorithms v Find the ‘best’ path through a network v Create forwarding tables v Routing occurs between routers (not hosts) v Differences between centralized (global) and

decentralized algorithms

v What are examples of each v Amount of information known initially v How information is shared/spread v Synchronous or asynchronous?

4

Algorithm 2: Distance Vector

Rather than using global information, a distance vector algorithm is:

q distributed:

v each node communicates only with directly-

attached neighbors q iterative:

v continues until no nodes exchange info. v self-terminating: no “signal” to stop

q asynchronous:

v nodes need not exchange information or

iterate in lock step!

slide-3
SLIDE 3

3

Distance Vector Algorithm

Bellman-Ford Equation Define dx(y) := cost of least-cost path from x to y Then dx(y) = min {c(x,v) + dv(y) } where min is taken over all neighbors v of x

v

6

Bellman-Ford Equation

u y

x

w v

z

2 2 1 3 1 1 2 5 3 5

Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 The node that achieves the minimum, is the next hop in the shortest path ➜ forwarding table B-F equation says:

slide-4
SLIDE 4

4

7

Distance Vector Routing Algorithm

Distance Table data structure

q each node has

v A row for each possible destination v A column for each directly-attached neighbor

q example: in node X, for destination Y via neighbor Z:

D (Y,Z)

x distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)}

Z

w

= =

8

Distance Table: example with complete information

A E D C B

7 8 1 2 1 2

D () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2

E cost to destination via d e s t i n a t i

  • n

D (C,D)

E c(E,D) + min {D (C,w)}

D w

= = 2+2 = 4

D (A,D)

E c(E,D) + min {D (A,w)}

D w

= = 2+3 = 5

D (A,B)

E c(E,B) + min {D (A,w)}

B w

= = 8+6 = 14

loop! loop!

slide-5
SLIDE 5

5

9

Distance table to forwarding table

D () A B C D A 1 7 6 4 B 14 8 9 11 D 5 5 4 2

E cost to destination via d e s t i n a t i

  • n

A B C D A,1 D,5 D,4 D,2

Outgoing link to use, cost d e s t i n a t i

  • n

Distance table Routing table

Forwarding Table

10

Distance vector algorithm

Asynchronous Iterations:

q Each node begins with Dx(y)

v An estimate of the cost of the least-cost path from

itself to node y, for all nodes in N q Each node periodically sends its own distance

vector estimate to neighbors

v è A vector of least costs from itself to all routers

q When a node x receives new DV estimate from

neighbor, it updates its own DV using B-F equation, and sends any update to its neighbors Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N

q Under normal conditions, the estimate Dx(y)

converges to the actual least cost dx(y)

slide-6
SLIDE 6

6

11

Distance Vector Algorithm: example for

  • btaining complete information

X Z

1 2 7

Y

D (Y,Z)

X

c(X,Z) + min {D (Y,w)}

w

= = 7+1 = 8

Z

D (Z,Y)

X

c(X,Y) + min {D (Z,w)}

w

= = 2+1 = 3

Y

12

Distance Vector Algorithm: obtaining info

X Z

1 2 7

Y

slide-7
SLIDE 7

7

13

Distance Vector Routing Activity

A C D B

14

Distance Vector Routing Activity

A C D B

2 1 3 6 8

  • Review actual graph – does it match activity results?
  • What happens if/when c(A,D) = 4 & c(C,D) = 1?
slide-8
SLIDE 8

8

15

Distance Vector Routing Activity

B E D C A

16

Distance Vector Routing Activity

B E D C A

8 1 2 2 7 1

  • Review actual graph – does it match your results?
  • What happens if/when c(A,B) = 2 and/or if c(C,D) = 5?
slide-9
SLIDE 9

9

17

Comparison of LS and DV algorithms

q Information requirements q Message complexity q Convergence time varies q Robustness: what happens if router

malfunctions?

q Oscillations possible? q Loops possible?

18

Summary

Forwarding:

q Leads to questions of addressing

v Assignment of IP addresses v NAT, IPv6 …

Routing:

q Routing objectives q Routing notation q Routing classification q Link state v. Distance Vector q Hierarchical structure