Recap: Finding best paths No one notion of best Finesse the issue - - PowerPoint PPT Presentation

recap finding best paths
SMART_READER_LITE
LIVE PREVIEW

Recap: Finding best paths No one notion of best Finesse the issue - - PowerPoint PPT Presentation

Recap: Finding best paths No one notion of best Finesse the issue using link costs Goal becomes finding least cost or shortest path Distance vector is one way to do it Exchange a vector of known destinations and cost Suffers count


slide-1
SLIDE 1

Recap: Finding best paths

No one notion of “best” Finesse the issue using link costs Goal becomes finding least cost or shortest path Distance vector is one way to do it

  • Exchange a vector of known destinations and cost
  • Suffers count to infinity–heuristics help but are not

foolproof

CSE 461 University of Washington 1

slide-2
SLIDE 2

Link-State Routing

slide-3
SLIDE 3

Link-State Routing

  • Second broad class of routing algorithms
  • More computation than DV but better dynamics
  • Widely used in practice
  • Used in Internet/ARPANET from 1979
  • Modern networks use OSPF (L3) and IS-IS (L2)

CSE 461 University of Washington 3

slide-4
SLIDE 4

Link-State Setting

Same distributed setting as for distance vector:

1. Nodes know only the cost to their neighbors; not topology 2. Nodes can talk only to their neighbors using messages 3. All nodes run the same algorithm concurrently 4. Nodes/links may fail, messages may be lost

CSE 461 University of Washington 4

slide-5
SLIDE 5

Link-State Algorithm

Proceeds in two phases:

  • 1. Nodes flood topology with link state packets
  • Each node learns full topology
  • 2. Each node computes its own forwarding table
  • By running Dijkstra (or equivalent)

CSE 461 University of Washington 5

slide-6
SLIDE 6

Part 1: Flooding

slide-7
SLIDE 7

Flooding

  • Rule used at each node:
  • Sends an incoming message on to all other neighbors
  • Remember the message so that it is only flood once

CSE 461 University of Washington 7

slide-8
SLIDE 8

Flooding (2)

  • Consider a flood from A; first reaches B via AB, E via

AE

CSE 461 University of Washington 8

A B C D E F G H

slide-9
SLIDE 9

Flooding (3)

  • Next B floods BC, BE, BF, BG, and E floods EB, EC, ED,

EF

CSE 461 University of Washington 9

A B C D E F G H

E and B send to each other

slide-10
SLIDE 10

Flooding (4)

  • C floods CD, CH; D floods DC; F floods FG; G floods

GF

10

A B C D E F G H

F gets another copy

slide-11
SLIDE 11

Flooding (5)

  • H has no-one to flood … and we’re done

CSE 461 University of Washington 11

A B C D E F G H

Each link carries the message, and in at least one direction

slide-12
SLIDE 12

Flooding Details

  • Remember message (to stop flood) using source

and sequence number

  • So next message (with higher sequence) will go through
  • To make flooding reliable, use ARQ
  • So receiver acknowledges, and sender resends if needed

CSE 461 University of Washington 12

Problem?

slide-13
SLIDE 13

Flooding Problem

  • F receives the same message multiple times

CSE 461 University of Washington 13

A B C D E F G H

E and B send to each other too

slide-14
SLIDE 14

Part 2: Dijkstra’s Algorithm

slide-15
SLIDE 15

CSE 461 University of Washington 15

Edsger W. Dijkstra (1930-2002)

  • Famous computer scientist
  • Programming languages
  • Distributed algorithms
  • Program verification
  • Dijkstra’s algorithm, 1969
  • Single-source shortest paths, given

network with non-negative link costs

By Hamilton Richards, CC-BY-SA-3.0, via Wikimedia Commons

slide-16
SLIDE 16

Dijkstra’s Algorithm Algorithm:

  • Mark all nodes tentative, set distances from source to 0

(zero) for source, and ∞ (infinity) for all other nodes

  • While tentative nodes remain:
  • Extract N, a node with lowest distance
  • Add link to N to the shortest path tree
  • Relax the distances of neighbors of N by lowering any better

distance estimates

CSE 461 University of Washington 16

slide-17
SLIDE 17

Dijkstra’s Algorithm (2)

  • Initialization

CSE 461 University of Washington 17

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

∞ ∞ ∞ ∞ ∞ ∞

We’ll compute shortest paths from A

slide-18
SLIDE 18

Dijkstra’s Algorithm (3)

  • Relax around A

CSE 461 University of Washington 18

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

∞ ∞

10 4

∞ ∞ ∞

slide-19
SLIDE 19

Dijkstra’s Algorithm (4)

  • Relax around B

CSE 461 University of Washington 19

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

8 4

Distance fell!

6 7 7

slide-20
SLIDE 20

Dijkstra’s Algorithm (5)

  • Relax around C

CSE 461 University of Washington 20

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4

Distance fell again!

6 7 7 8 9

slide-21
SLIDE 21

Dijkstra’s Algorithm (6)

  • Relax around G (say)

CSE 461 University of Washington 21

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4

Didn’t fall …

6 7 7 8 9

slide-22
SLIDE 22

Dijkstra’s Algorithm (7)

  • Relax around F (say)

CSE 461 University of Washington 22

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4

Relax has no effect

6 7 7 8 9

slide-23
SLIDE 23

Dijkstra’s Algorithm (8)

  • Relax around E

CSE 461 University of Washington 23

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4 6 7 7 8 9

slide-24
SLIDE 24

Dijkstra’s Algorithm (9)

  • Relax around D

CSE 461 University of Washington 24

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4 6 7 7 8 9

slide-25
SLIDE 25

Dijkstra’s Algorithm (10)

  • Finally, H … done

CSE 461 University of Washington 25

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

7 4 6 7 7 8 9

slide-26
SLIDE 26

Dijkstra Comments

  • Finds shortest paths in order of increasing distance

from source

  • Leverages optimality property
  • Runtime depends on cost of extracting min-cost node
  • Superlinear in network size (grows fast)
  • Using Fibonacci Heaps the complexity is O(|E|+|V|log| V|)
  • Gives complete source/sink tree
  • More than needed for forwarding!
  • But requires complete topology

CSE 461 University of Washington 26

slide-27
SLIDE 27

Bringing it all together…

slide-28
SLIDE 28

CSE 461 University of Washington 28

Phase 1: Topology Dissemination

  • Each node floods link state packet

(LSP) that describes their portion of the topology

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

  • Seq. #

A 10 B 4 C 1 D 2 F 2

Node E’s LSP flooded to A, B, C, D, and F

slide-29
SLIDE 29

Phase 2: Route Computation

  • Each node has full topology
  • By combining all LSPs
  • Each node simply runs Dijkstra
  • Replicated computation, but finds required routes directly
  • Compile forwarding table from sink/source tree
  • That’s it folks!

CSE 461 University of Washington 29

slide-30
SLIDE 30

Forwarding Table

CSE 461 University of Washington 30

To Next A C B C C C D D E

  • F

F G F H C

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

Source Tree for E (from Dijkstra) E’s Forwarding Table

slide-31
SLIDE 31

Handling Changes

  • On change, flood updated LSPs, re-compute routes
  • E.g., nodes adjacent to failed link or node initiate

CSE 461 University of Washington 31

A B C D E F G H

2 1 10 2 2 4 2 4 4 3 3 3

XXXX

  • Seq. #

A 4 C 2 E 4 F 3 G

B’s LSP

  • Seq. #

B 3 E 2 G

F’s LSP Failure!

slide-32
SLIDE 32

Handling Changes (2)

  • Link failure
  • Both nodes notice, send updated LSPs
  • Link is removed from topology
  • Node failure
  • All neighbors notice a link has failed
  • Failed node can’t update its own LSP
  • But it is OK: all links to node removed

CSE 461 University of Washington 32

slide-33
SLIDE 33

Handling Changes (3)

  • Addition of a link or node
  • Add LSP of new node to topology
  • Old LSPs are updated with new link
  • Additions are the easy case …

CSE 461 University of Washington 33

slide-34
SLIDE 34

Link-State Complications

  • Things that can go wrong:
  • Seq. number reaches max, or is corrupted
  • Node crashes and loses seq. number
  • Network partitions then heals
  • Strategy:
  • Include age on LSPs and forget old information that is not

refreshed

  • Much of the complexity is due to handling corner cases

CSE 461 University of Washington 34

slide-35
SLIDE 35

DV/LS Comparison

CSE 461 University of Washington 35

Goal Distance Vector Link-State Correctness Distributed Bellman-Ford Replicated Dijkstra Efficient paths

  • Approx. with shortest paths
  • Approx. with shortest paths

Fair paths

  • Approx. with shortest paths
  • Approx. with shortest paths

Fast convergence Slow – many exchanges Fast – flood and compute Scalability Excellent – storage/compute Moderate – storage/compute

slide-36
SLIDE 36

IS-IS and OSPF Protocols

  • Widely used in large enterprise and ISP networks
  • IS-IS = Intermediate System to Intermediate System
  • OSPF = Open Shortest Path First
  • Link-state protocol with many added features
  • E.g., “Areas” for scalability

CSE 461 University of Washington 36

slide-37
SLIDE 37

Equal-Cost Multi-Path Routing

slide-38
SLIDE 38

Multipath Routing

  • Allow multiple routing paths from node to

destination be used at once

  • Topology has them for redundancy
  • Using them can improve performance
  • Questions:
  • How do we find multiple paths?
  • How do we send traffic along them?

CSE 461 University of Washington 38

slide-39
SLIDE 39

CSE 461 University of Washington 39

Equal-Cost Multipath Routes

  • One form of multipath routing
  • Extends shortest path model by

keeping set if there are ties

  • Consider AàE
  • ABE = 4 + 4 = 8
  • ABCE = 4 + 2 + 2 = 8
  • ABCDE = 4 + 2 + 1 + 1 = 8
  • Use them all!

A B C D E F G H

2 2 10 1 1 4 2 4 4 3 3 3

slide-40
SLIDE 40

Source “Trees”

  • With ECMP, source/sink “tree” is a directed acyclic

graph (DAG)

  • Each node has set of next hops
  • Still a compact representation

CSE 461 University of Washington 40

Tree DAG

slide-41
SLIDE 41

CSE 461 University of Washington 41

Source “Trees” (2)

  • Find the source “tree” for E
  • Procedure is Dijkstra, simply

remember set of next hops

  • Compile forwarding table similarly,

may have set of next hops

  • Straightforward to extend DV too
  • Just remember set of neighbors

A B C D E F G H

2 2 10 1 1 4 2 4 4 3 3 3

slide-42
SLIDE 42

Source “Trees” (3)

CSE 461 University of Washington 42

Source Tree for E E’s Forwarding Table

A B C D E F G H

2 2 10 1 1 4 2 4 4 3 3 3

Node Next hops A B, C, D B B, C, D C C, D D D E

  • F

F G F H C, D

New for ECMP

slide-43
SLIDE 43

Forwarding with ECMP

  • Could randomly pick a next hop for each packet

based on destination

  • Balances load, but adds jitter
  • Try sending packets from a flow on the same path
  • Flow identified using 5-tuple
  • Map flow identifier to single next hop
  • No jitter within flow, but less balanced

CSE 461 University of Washington 43

slide-44
SLIDE 44

Forwarding with ECMP (2)

CSE 461 University of Washington 44

A B C D E F G H

2 2 10 1 1 4 2 4 4 3 3 3

Multipath routes from F/E to C/H E’s Forwarding Choices

Flow Possible next hops Example choice F à H C, D D F à C C, D D E à H C, D C E à C C, D C

Use both paths to get to one destination