Routing: Outlook Flooding Flooding Goal: To distribute a packet in - - PowerPoint PPT Presentation

routing outlook flooding
SMART_READER_LITE
LIVE PREVIEW

Routing: Outlook Flooding Flooding Goal: To distribute a packet in - - PowerPoint PPT Presentation

Routing: Outlook Flooding Flooding Goal: To distribute a packet in the whole network Link-State: complete, global knowledge (i.e. to realize a network-wide broadcast) Distance-Vector: iterative, distributed calculation Each


slide-1
SLIDE 1

Routing: Outlook

  • Flooding
  • Link-State: complete, global knowledge
  • Distance-Vector: iterative, distributed calculation

Flooding

  • Goal: To distribute a packet in the whole network

(i.e. to realize a network-wide broadcast)

  • Each node should receive the packet at least once.
  • Efficient distribution.
  • The destination addresses are not known.

u z v

w

x y Problems:

  • Copies of data packets
  • Old packets
  • Sequence number overflows

Broadcast: send a message on all links

Flooding Algorithms

  • On message on link i:

u z v

w

x y Uncontrolled flooding:

  • send msg on all links ji

sequence number controlled flooding: list of received, duplicated, forwarded messages

  • if in list: drop msg
  • else send msg on all links ji

u z v

w

x y > cycles, broadcast storm

Spanning Tree

  • Link on with the message was first heard

= reverse path to the source of the message.

  • Efficient distribution of information (broadcast)
  • Routing on reverse path

u z v

w

x y u z v

w

x y

slide-2
SLIDE 2

Routing

  • Distributed algorithm executed among the routers

which builds the routing tables

  • Optimization based on routing metric (cost):

delay, hops, congestion, quality, battery, policy, etc.

  • Design and evaluation criteria:
  • Scalability
  • Speed of convergence
  • Stability

Routing: G=(N,E)

  • Nodes: Routers and

Hosts (u,v,w,...)

  • Edges: Links between

nodes.

  • Each edge has a Cost

associated with it.

  • c(u,v) = 1, c(u,x)=2, etc.

Main Problem - Calculating the path with the lowest cost from source to destination:

D(u,z) = min{path: sum of all edge costs c(.,.) over the path}

5 1 2 2 1 3 3 4 2

u z v w x y

Link-State Routing

  • Assumptions: Each node knows the cost of the link of

each its directly connected neighbours.

  • Basic Idea:
  • Every node knows how to reach it’s neighbours.
  • If this information is spread to every node via flooding,

then every node will have enough information to determine the correct path to any node in the network. In fact, every node will be able to build a complete map of the network.

  • This means that every node will eventually have access to

the same information, as every other node.

Link-State Routing 2

  • Link-State protocols rely on 2 things:
  • Reliable spreading of link-state information

(Reliable Flooding)

  • Calculation of paths from the sum of all the accumulated

link-state knowledge > e.g., Dijkstra-Algorithm

  • Notation Dijkstra-Algorithm
  • D(v): cost of least-cost path from source to v
  • p(v): previous node along the current least-cost path

from source to v

  • N’: subset of nodes;

v is in N’ = least cost from source to v definitively known.

slide-3
SLIDE 3

Dijkstra’s Algorithm

Initialisation: N’ = {u} for all nodes n if n is a neighbour of u then D(n)=c(u,n) else D(n)=inf step D(v), p(v) D(w), p(w) D(x), p(x) D(y), p(y) D(z), p(z) N’

Dijkstra’s Algorithm

Loop: find m not in N’ such that D(m) is a minimum: add m to N’ update D(n) for each neighbour n of m and not in N’: D(n) = min(D(n), D(m)+c(m,n)) if new D(n): p(n) = m until N’=N step D(v), p(v) D(w), p(w) D(x), p(x) D(y), p(y) D(z), p(z) N’ 1,u 5,u 2,u inf inf u

Distance-Vector Routing

  • Each node knows the cost of the link of each its

directly connected neighbours: initial forwarding table.

  • Periodically each node transmits their table to all their

neighbours.

  • When a node receives such a table it calculates the

distance to the nodes on the received table.

  • If the node discovers a shorter path to a destination

node, it’s own table is updated. If the table was updated, the new table is immediately sent to the neighbours, otherwise the node waits for a timeout or a new message.

Bellman-Ford Equaltion dx(y) = min

v {c(x, v) + dv(y)}

v: neighbour of x dx(y): least cost route from x to y as seen from x c(x,v): link cost on link from x to v

slide-4
SLIDE 4

View of a Node

  • A nodes routing table

consists of triples in the form: <destination, cost,

nexthop>

  • The messages sent are

(update)lists containing tuples in the form:

<destination, cost>

dest cost nexthop v 1 v w 3 w x 2 x y 3 x z 6 x Routig table for node u:

Algorithm

Initialisation (at node s): for all dest d in N: Ds(d) = c(s,d) for each neighbour n Dn(d) = inf for all dest d in N send distance vector Ds = [Ds(d): d in N] to n Loop (at node s): wait (until c(s,n) changes for some neighbour n, or until receive Dn from some neighbour n) for each d in N: Ds(d) = min_n{c(s,n} + Dn(d)} if Ds(d) changed for any destination d send distance vector Ds = [Ds(d): d in N] to all neighbours n

Notation: s source d destination n neighbour

Link-Cost Changes

count-to-infinity problem: 1) y: x=6, z=1 LOOP!! 2) z: x=7, y=1 ... 3) y: x=8, z=1 ... ... 45) z: x=50, y=1 1) y: x=1, z=1 > advertise 2) z: x=2, y=1 > advertise 3) convergence Solution: Poisoned Reverse z announces Dz(x)=inf if it routes through y to get to x.

(partial)

Detection of Bad Links

  • Routers periodically send control packets which have

to be acknowledged

  • Router expects periodic routing updates or Hello

messages from its neighbours

  • Routing oscillations are avoided by k of n rule: a

change is only accepted if it persists during at least k

  • f n periods
slide-5
SLIDE 5

Distance-Vector vs. Link-State

  • The difference between the two algorithms can be

summarized:

  • D.V.: Each node only talks to its directly connected

neighbours, but sends its entire forwarding table.

simple to implement, simple to configure, bad convergence, bad scaling.

  • L.S.: Each node talks to all other nodes, but only tells

them what it knows for sure (i.e., the state of its directly connected links)

fast convergence, generates less traffic, fast reaction on topology changes, bad scaling

Different Approaches to Routing

  • Proactive vs. reactive routing
  • proactive: constantly update routing tables for all nodes.
  • reactive: find a route on demand (when needed).
  • Incremental forwarding vs. source routing
  • incremental: routers have a forwarding table specifying the

“next hop”.

  • source routing: the route a packet should take is explicitly

stored in the packet.

  • loose source routing: only a partial route (subset) is specified.

Summary of Routing Algorithms

  • Problem:

Does not scale for large networks like the Internet. 200 million hosts; network of networks neighbours

send to: everyone

“everyone”

send to: neighbours Link-State Distance-Vector Flooding/Spanning Tree $ traceroute www.ethz.ch 1 r1.n.it.uu.se (130.238.8.1) 4.772 ms 2 l-uu2.uu.se (130.238.6.238) 0.457 ms 3 uu2-fe2.sunet.se (130.242.88.17) 1.364 ms 4 uppsala2-srp2.sunet.se (130.242.85.162) 2.686 ms 5 stockholm2-pos0.sunet.se (130.242.82.33) 4.070 ms 6 se-kth.nordu.net (193.10.252.177) 2.591 ms 7 se-ov.nordu.net (193.10.252.42) 2.916 ms 8 dk-gw2.nordu.net (193.10.68.118) 11.817 ms 9 nordunet.rt1.cop.dk.geant2.net (62.40.124.45) 12.385 ms 10 so-7-3-0.rt1.fra.de.geant2.net (62.40.112.49) 24.939 ms 11 so-6-2-0.rt1.gen.ch.geant2.net (62.40.112.21) 33.028 ms 12 swice2-10ge-1-1.switch.ch (62.40.124.22) 33.212 ms 13 swils2-10ge-1-3.switch.ch (130.59.37.2) 34.002 ms 14 swiez2-10ge-1-1.switch.ch (130.59.36.206) 37.455 ms 15 rou-rz-gw-giga-to-switch.ethz.ch (192.33.92.1) 37.761 ms ...

slide-6
SLIDE 6

$ traceroute www.ubs.ch 1 r1.n.it.uu.se (130.238.8.1) 9.989 ms 2 l-uu2.uu.se (130.238.6.238) 0.591 ms 3 uu2-fe2.sunet.se (130.242.88.17) 1.430 ms 4 uppsala2-srp2.sunet.se (130.242.85.162) 1.346 ms 5 stockholm2-pos0.sunet.se (130.242.82.33) 2.607 ms 6 stockholm4-pos0.sunet.se (130.242.82.50) 2.873 ms 7 pos7-7.br1.stk2.alter.net (130.242.94.118) 3.564 ms 8 so-5-0-0.tr2.stk2.alter.net (146.188.6.85) 3.280 ms 9 so-2-0-0.tr2.zur3.alter.net (146.188.3.82) 32.009 ms 10 so-6-0-0.xr2.zur4.alter.net (146.188.5.134) 32.288 ms 11 pos2-0.gw4.zur4.alter.net (146.188.4.194) 31.890 ms 12 ubs-gw.customer.alter.net (146.188.66.170) 33.284 ms ...