Missing pieces of the puzzle
This presentation is the property of its rightful owner.
Sponsored Links
1 / 63

Missing Pieces of the Puzzle PowerPoint PPT Presentation


  • 80 Views
  • Uploaded on
  • Presentation posted in: General

Missing Pieces of the Puzzle. EE122 Fall 2011 Scott Shenker http:// inst.eecs.berkeley.edu /~ee122/ Materials with thanks to Jennifer Rexford, Ion Stoica , Vern Paxson and other colleagues at Princeton and UC Berkeley. Announcements. Everyone should be signed up and have account

Download Presentation

Missing Pieces of the Puzzle

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Missing pieces of the puzzle

Missing Pieces of the Puzzle

EE122 Fall 2011

Scott Shenker

http://inst.eecs.berkeley.edu/~ee122/

Materials with thanks to Jennifer Rexford, Ion Stoica, Vern Paxsonand other colleagues at Princeton and UC Berkeley


Announcements

Announcements

  • Everyone should be signed up and have account

    • If you aren’t see me at end of class

  • We lost our grader, so delaying HW#2

    • Gives us a chance to cover more material…

  • Beanbags. Really?


Agenda for today

Agenda for Today

  • Finish up routing: not as simple as you might think

  • Discuss missing pieces: preview of rest of class


Last time

Last Time

  • Link-State Routing

  • Spread state everywhere

  • Nodes do local computation over entire graph

  • Local computation, global state

  • Doesn’t scale well, involves broadcasts


This time

This Time

  • Global computation, local state

  • We want to limit the distribution of state

  • So computation must be distributed

  • The most common example is distance-vector


Distance vector

Distance-Vector

Details in Section


Distributed computation of routes

Distributed Computation of Routes

  • More scalable than Link-State

    • No global flooding

  • Each node computing the outgoing port based on:

    • Local information (who it is connected to)

    • Paths advertised by neighbors

  • Algorithms differ in what these exchanges contain

    • Distance-vector: just the distance to each destination

    • Path-vector: the entire path to each destination

  • We will focus on distance-vector for now


Example of distributed computation

Example of Distributed Computation

  • I am three hops away

  • I am two hops away

  • I am one hop away

  • I am two hops away

  • I am two hops away

  • I am three hops away

  • I am one hop away

  • Destination

  • I am one hop away

  • I am three hops away

  • I am two hops away


Very similar to monday s class

Very similar to Monday’s Class

  • Destination stands up

  • Announces neighbors

    • They stand up

  • They announce their neighbors

    • They stand up

  • …..and so on, until source stands

  • On Monday you started with the source, but paths are reversible so it doesn’t matter….

  • Key point: don’t stand up twice!


Step 1

Step 1

  • Destination stands up


Step 11

Step 1


Step 2

Step 2

  • Destination stands up

  • Announces neighbors

    • They stand up


Step 21

Step 2

  • I am one hop away

  • I am one hop away

  • I am one hop away


Step 3

Step 3

  • Destination stands up

  • Announces neighbors

    • They stand up

  • They announce their neighbors

    • They stand up


Step 31

Step 3

  • I am two hops away

I am two hops away

  • I am two hops away

  • I am two hops away


Why not stand up twice

Why Not Stand Up Twice?

  • Being called a second time means that there is a second (and longer) path to you

    • You already contacted your neighbors the first time

    • Your distance to destination is based on shorter path


Basics of distributed routing

Basics of Distributed Routing

  • Nodes advertise their best paths to neighbors

  • Nodes select among paths offered by neighbors

    • Ignore all but the best path

  • Iterative process eventually leads to convergence

  • If “cost” is hopcounts, then nodes find out about shortest paths first (ignore later ones)

    • If costs are general, later paths might be better

  • Remember: nodes “select” among offered paths

    • But what selection criteria are allowed?


No agreement on metrics

No agreement on metrics?

  • If the nodes choose their paths according to different criteria, then bad things might happen

  • Example

    • Node A is minimizing latency

    • Node B is minimizing loss rate

    • Node C is minimizing price

  • Any of those goals are fine, if globally adopted

    • Only a problem when nodes use different criteria


What happens here

What Happens Here?

Cares about price,

then loss

Cares about delay,

then price

Low price link

Low loss link

Low delay link

Cares about loss,

then delay

Low delay link

Low loss link

Low price link


Can you use any metric

Can You Use Any Metric?

  • Are there any metrics that won’t work, even if everyone agrees on it?

  • What about maximizing capacity?


What happens here1

What Happens Here?

A high capacity link gets reduced to low capacity

All nodes want to maximize capacity


Must agree on loop avoiding metric

Mustagree on loop-avoiding metric

  • When all nodes minimize same metric

  • And that metric increases around loops

  • Then process is guaranteed to converge

  • On to the details of the algorithm….

    • Nothing interesting, but will be on test.


Distance vector routing

Distance Vector Routing

  • Each router knows the links to its neighbors

    • Does not flood this information to the whole network

  • Each router has provisional “shortest path”

    • E.g.: Router A: “I can get to router B with cost 11 via next hop router D”

  • Routers exchange this Distance-Vectorinformation with their neighboring routers

    • Vector because one entry per destination

  • Routers update their idea of the best path using info from neighbors

  • Iterative process converges to set of shortest paths


Information flow in distance vector

Host C

Host D

Host A

N2

N1

N3

N5

Host B

Host E

N4

N6

N7

Information Flow in Distance Vector


Information flow in distance vector1

Host C

Host D

Host A

N2

N1

N3

N5

Host B

Host E

N4

N6

N7

Information Flow in Distance Vector


Information flow in distance vector2

Host C

Host D

Host A

N2

N1

N3

N5

Host B

Host E

N4

N6

N7

Information Flow in Distance Vector

Why is this different from flooding?


Bellman ford algorithm

Bellman-Ford Algorithm

  • INPUT:

    • Link costs to each neighbor

    • Not full topology

  • OUTPUT:

    • Next hop to each destination and the corresponding cost

    • Does not give the complete path to the destination

  • My neighbors tell me how far they are from dest’n

    • Compute: (cost to nhbr) plus (nhbr’s cost to destination)

    • Pick minimum as my choice

    • Advertise that cost to my neighbors

  • Next few slides show the corrosive power of ppt


Bellman ford overview

wait for (change in local link cost or msg from neighbor)

recompute distance table

if least cost path to any dest has changed, notify neighbors

Each node:

Bellman-Ford - Overview

  • Each router maintains a table

    • Best known distance from X to Y,

      via Z as next hop = DZ(X,Y)

  • Each local iteration caused by:

    • Local link cost change

    • Message from neighbor

  • Notify neighbors only if least cost path to any destination changes

    • Neighbors then notify their neighbors if necessary


Bellman ford overview1

C

D

B

A

Bellman-Ford - Overview

  • Each router maintains a table

    • Row for each possible destination

    • Column for each directly-attached neighbor to node

    • Entry in row Y and column Z of node X  best known distance from X to Y, via Z as next hop = DZ(X,Y)

Neighbor

(next-hop)

Node A

3

2

1

1

7

Destinations

DC(A, D)


Bellman ford overview2

C

D

B

A

Bellman-Ford - Overview

  • Each router maintains a table

    • Row for each possible destination

    • Column for each directly-attached neighbor to node

    • Entry in row Y and column Z of node X  best known distance from X to Y, via Z as next hop = DZ(X,Y)

Node A

3

2

1

1

7

Smallest distance in row Y = shortest

Distance of A to Y, D(A, Y)


Distance vector algorithm cont d

Distance Vector Algorithm (cont’d)

1 Initialization:

2 for all neighbors V do

3 ifV adjacent to A

4 D(A, V) = c(A,V);

else

D(A, V) = ∞;

send D(A, Y) to all neighbors

loop:

8 wait (until A sees a link cost change to neighbor V /* case 1 */

9 or until A receives update from neighbor V) /* case 2 */

10 if (c(A,V) changes by ±d) /*  case 1 */

11 for all destinations Y that go through Vdo

12 DV(A,Y) = DV(A,Y) ± d

13 else if (update D(V, Y) received from V) /*  case 2 */

/* shortest path from V to some Y has changed */

14 DV(A,Y) = DV(A,V) + D(V, Y); /* may also change D(A,Y) */

15 if (there is a new minimum for destination Y)

16 send D(A, Y) to all neighbors

17 forever

  • c(i,j): link cost from node i to j

  • DZ(A,V): cost from A to V via Z

  • D(A,V): cost of A’s best path to V


Example 1 st iteration c a

C

D

B

A

Example:1st Iteration (C  A)

Node A

Node B

3

2

1

1

7

DC(A, B) = DC(A,C) + D(C, B) = 7 + 1 = 8

DC(A, D) = DC(A,C) + D(C, D) = 7 + 1 = 8

Node C

Node D

  • loop:

  • 13 else if (update D(A, Y) from C)

  • 14 DC(A,Y) = DC(A,C) + D(C, Y);

  • 15 if (new min. for destination Y)

  • 16 send D(A, Y) to all neighbors

  • 17 forever


Example 1 st iteration b a

C

D

B

A

Example: 1st Iteration (B  A)

Node A

Node B

3

2

1

1

7

DB(A, C) = DB(A,B) + D(B, C) = 2 + 1 = 3

DB(A, D) = DB(A,B) + D(B, D) = 2 + 3 = 5

Node C

Node D

  • loop:

  • 13 else if (update D(A, Y) from B)

  • 14 DB(A,Y) = DB(A,B) + D(B, Y);

  • 15 if (new min. for destination Y)

  • 16 send D(A, Y) to all neighbors

  • 17 forever


Example end of 1 st iteration

C

D

B

A

Example: End of 1st Iteration

Node A

Node B

3

2

1

1

7

Node C

Node D

End of 1st Iteration All nodes knows the best two-hop paths


Example 2 nd iteration a b

C

D

B

A

How could we fix this?

Where does this 7 come from?

Where does this 5 come from?

What harm does this cause?

Example: 2nd Iteration (A  B)

Node A

Node B

3

2

1

1

7

DA(B, C) = DA(B,A) + D(A, C) = 2 + 3 = 5

DA(B, D) = DA(B,A) + D(A, D) = 2 + 5 = 7

Node C

Node D

  • loop:

  • 13 else if (update D(B, Y) from A)

  • 14 DA(B,Y) = DA(B,A) + D(A, Y);

  • 15 if (new min. for destination Y)

  • 16 send D(B, Y) to all neighbors

  • 17 forever


Example end of 2 nd iteration

C

D

B

A

Example: End of 2nd Iteration

Node A

Node B

3

2

1

1

7

Node C

Node D

End of 2nd Iteration All nodes knows the best three-hop paths


Example end of 3rd iteration

C

D

B

A

Example: End of 3rd Iteration

Node A

Node B

3

2

1

1

7

Node C

Node D

End of 2nd Iteration: Algorithm Converges!


Intuition

Intuition

  • Initial state: best one-hop paths

  • One round: best two-hop paths

  • Two rounds: best three-hop paths

  • Kth round: best (k+1) hop paths

  • This must eventually converge….but how does it respond to changes in cost?


Distance vector link cost changes

C

A

B

Link cost changes here

Algorithm terminates

Distance Vector: Link Cost Changes

loop:

8 wait (until A sees a link cost change to neighbor V

9 or until A receives update from neighbor V) /

10 if (c(A,V) changes by ±d) /*  case 1 */

11 for all destinations Y that go through Vdo

12 DV(A,Y) = DV(A,Y) ± d

13 else if (update D(V, Y) received from V) /*  case 2 */

14 DV(A,Y) = DV(A,V) + D(V, Y);

15 if (there is a new minimum for destination Y)

16 send D(A, Y) to all neighbors

17 forever

1

4

1

50

Node B

“good

news

travels

fast”

Node C

time


Dv count to infinity problem

C

A

B

DV: Count to Infinity Problem

loop:

8 wait (until A sees a link cost change to neighbor V

9 or until A receives update from neighbor V) /

10 if (c(A,V) changes by ±d) /*  case 1 */

11 for all destinations Y that go through Vdo

12 DV(A,Y) = DV(A,Y) ± d

13 else if (update D(V, Y) received from V) /*  case 2 */

14 DV(A,Y) = DV(A,V) + D(V, Y);

15 if (there is a new minimum for destination Y)

16 send D(A, Y) to all neighbors

17 forever

60

4

1

50

Node B

“bad

news

travels

slowly”

Node C

More like avoidance: believe

anything if it hides the bad news

time

Link cost changes here


Distance vector poisoned reverse

60

4

1

50

C

A

B

Distance Vector: Poisoned Reverse

  • If B routes through C to get to A:

    • B tells C its (B’s) distance to A is infinite (so C won’t route to A via B)

Node B

Node C

time

Link cost changes here; C updates D(C, A) = 60 as

B has advertised D(B, A) = ∞

Algorithm terminates


Will pr solve c2i problem completely

Will PR Solve C2I Problem Completely?

D

1

100

4

B

4

100

1

100

1

1

1

6

3

2

2

5

A

C

1


Another distributed loop avoidance

Another Distributed Loop Avoidance

  • Exchange entire paths, not just cost of paths

    • My path to the destination is <n1, n2, n3, …>

    • Path-vector routing (PV)

  • Nodes can use arbitrary metrics to choose paths

    • No need to agree on single metric

    • Each node can evaluate the path independently

  • No loops, but algorithm might not converge

  • Previous example of multiple criteria showed this


Scary thought

Scary Thought

  • The Internet’s interdomain routing is based on PV

  • Domains can use arbitrary criteria to choose paths

  • There is no guarantee that the entire Internet routing system won’t oscillate

  • We’ve just been “lucky” so far….


Another scary thought

Another Scary Thought

  • In both DV and PV, what happens when node lies

    • UCB’s router says: “Sure, I’m one hop away from MIT”

    • What happens to traffic destined for MIT?

  • This has happened, major outages

  • Could this happen with Link-State?


Routing just the beginning

Routing: Just the Beginning

  • Link state and distance-vector (and path vector) are the deployed routing paradigms

  • But we know how to do much, much better…

  • Stay tuned for a later lecture where we:

    • Reduce convergence time to zero

    • Respond to failures instantly!


Missing pieces

Missing Pieces


Where are we

Where are we?

  • We have covered the “fundamentals”

    • How to deliver packets (routing)

    • How to build reliable delivery on an unreliable network

  • With this, we could build a decent network

  • But couldn’t actually do anything with the network

    • Too many missing pieces

  • Today: identify those pieces

    • Will guide what we cover rest of semester


Scenario jane wants her music

Scenario: Jane Wants Her Music

  • Jane is sitting in her dorm room, with a laptop

  • Hasoverwhelming urge to listen to John Cage

  • What needs to happen to make this possible?

  • Go one step at a time


What are the steps involved

What Are The Steps Involved?

  • Accessing the network from laptop

    • Wireless or ethernet

    • Network management (someone needs to make it work)

  • Mapping “real world name” to “network name”

  • Mapping network name to location

  • Download content from location

    • Finding nearby content

  • Addressing general security concerns

    • Verifying that this is the right content

    • And that no one can tell what she’s downloading


Access networks

Access Networks

  • If access network is “switched”, we understand it

    • Just like any other packet-switched network

  • If the access network is shared medium, then we need to figure out how to share the medium

    • Wireless

    • Classical ethernet


Media access control mac

Media Access Control (MAC)

  • Carrier sense: (CSMA)

    • Don’t send if someone else is sending

  • Collision detection: (CD)

    • Stop if you detect someone else was also sending

  • Collision avoidance: (CA)

    • How to arrange transmissions so that they don’t collide


Network management

Network Management

  • Control how network interconnects to Internet

    • Interdomain routing

  • Keep unwanted traffic off network

    • Firewalls and access control

  • Share limited number of public addresses

    • NAT

  • Keep links from overloading

    • Traffic engineering

      Most undeveloped part of the Internet architecture


Current network management

Current Network Management

  • No abstractions, no layers

  • Just complicated distributed algorithms

    • Such as routing algorithms

  • Or manual configuration

    • Such as Access Control Lists and Firewalls


Future network management

Future Network Management

  • Clean abstractions

  • No complicated distributed algorithms

  • Treat networks like systems…

    Last lecture of class….


Real world name to network name

“Real World Name” to “Network Name”

  • Jane knows what music she wants

  • Doesn’t know how to tell network what she wants

  • Need to map “real world name” to network name

  • Search engine!

    • Maps keywords to URL

  • How can we do this?


Map network name to location

Map Network Name to Location

  • “Name resolution” converts name to location

  • We would like location to be nearby copy

    • Speeds up download

    • Reduce load on backbone and access networks


How is this done today

How is this done today?

  • Name resolution: Domain Name System (DNS)

    • Hand in a domain, get back an IP address

  • Nearby copy of the data?

    • CDNs: content distribution networks (like Akamai)

  • P2P systems can also point you to nearby content


Download data from location

Download Data from Location

  • Need a reliable transfer protocol: TCP

    • Must share network with others: congestion control

  • But must be able to use URL to retreive content

    • Need higher-level protocol like HTTP to coordinate


Ensuring security

Ensuring Security

  • Privacy: prevent sniffers from knowing what she downloaded (“it was for EE122, I promise!”)

  • Integrity: ensure data wasn’t tampered with during its trip through network

  • Provenance: ensure that music actually came from the music company (and not some imposter)


How do we do this today

How do we do this today?

  • Cryptographic measures enable us to do all three

  • Public Key cryptography is crucial

    • No need to share secrets beforehand


Scenario requires

Scenario Requires

  • Media Access Control

  • Network management

  • Naming and name resolution

  • Content distribution networks

  • And perhaps P2P

  • Congestion control

  • HTTP

  • Cryptographic measures to secure content


Rest of course

Rest of Course

  • Details of IP and TCP

    • Bringing reality to general concepts

  • Filling in pieces of name resolution and HTTP

  • Congestion control

  • Advanced routing

  • Security

  • Ethernet and Wireless

  • Network Management


  • Login