Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,

Similar presentations


Presentation on theme: "1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,"— Presentation transcript:

1 1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats http://inst.eecs.berkeley.edu/~ee122/fa09 (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at UC Berkeley)

2 Announcements Project 2 due Friday, Dec 11, 11:59pm Final exam: Dec 17, 8-11am, 10 Evans Hall My office hours next week My office hours: MW 10-11:30am The office hours of everyone else unchanged

3 Final Exam Open book, open notes! Crib sheets ok if you like Comprehensive, but greater focus on material since midterm Questions similar in format to the first midterm Problem set-up descriptions + multipart fill-ins All answers on the exam sheets we hand out Bring PENCIL, ERASER, no calculators needed

4 Outline  Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in Chord

5 5 Routing: Persistent Oscillations Assume link cost = amount of carried traffic A D C B 0 0 0 0 0 0 No traffic A D C B 1 1 0 0 0 0 B to A: 1 unit of traffic D to A: 1 unit of traffic 11 A D C B 1 1+e e 1 0 0 C  A: e units of traffic 1 1 e

6 6 Routing: Persistent Oscillations Assume link cost = amount of carried traffic A D C B 1 1+e e 0 e 1 1 0 0 A D C B 2+e 0 0 0 1+e 1 B to A: cost(B  C  D  A) = 1 lower than cost(B  A) = 1+e C to A: cost(C  D  A) = 1 lower than cost(C  B  A) = 1+2*e 11 e B to A: switches to B  C  D  A C to A: switches to C  D  A

7 7 Routing: Persistent Oscillations Assume link cost = amount of carried traffic A D C B 2+e 0 0 0 e 1 1 1+e1 B to A: cost(B  A) = 0 lower than cost(B  C  D  A) = 4+2*e C to A: cost(C  B  A) = 0 lower than cost(C  D  A) = 3+2*e D to A: cost(D  C  B  A) = 0 lower than cost(D  A) = 2+e B to A: switches to B  A C to A: switches to C  B  A D to A: switches to D  C  B  A A D C B 0 2+e 1+e 1 0 0 1 1 e

8 8 Routing: Persistent Oscillations Assume link cost = amount of carried traffic B to A: cost(B  C  D  A) = 0 lower than cost(B  C  D  A) = 4+2*e C to A: cost(C  B  A) = 0 lower than cost(C  D  A) = 3+2*e D to A: cost(D  C  B  A) = 0 lower than cost(D  A) = 2+e B to A: switches to B  C  D  A C to A: switches to C  D  A D to A: switches to D  A A D C B 0 2+e 1+e 1 0 0 1 1 e A D C B 2+e 0 e 0 1+e 1 11 e

9 Outline Persistent Oscillations  TCP Wireless MAC Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in CAN & Chord

10 TCP Congestion Control Flow control keeps one fast sender from overwhelming a slow receiver Congestion control keeps a set of senders from overloading the network Three congestion control problems: Adjusting to bottleneck bandwidth Without any a priori knowledge Could be a Gbps link; could be a modem Adjusting to variations in bandwidth Sharing bandwidth between flows

11 11 The big picture (with timeouts) Time cwnd Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1;

12 12 The big picture (with timeouts) Time cwnd Slow Start Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1;

13 13 The big picture (with timeouts) Time cwnd Timeout Slow Start Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1; 1/2 cwnd ssthresh

14 14 The big picture (with timeouts) Time cwnd Timeout Slow Start 1/2 cwnd ssthresh Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1; Slow Start

15 15 The big picture (with timeouts) Time cwnd Timeout Slow Start AIMD ssthresh Slow Start 1/2 cwnd Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1;

16 16 The big picture (with timeouts) Time cwnd Timeout Slow Start AIMD Timeout ssthresh Slow Start 1/2 cwnd Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1;

17 17 The big picture (with timeouts) Time cwnd Timeout Slow Start AIMD Timeout ssthresh Slow Start AIMD 1/2 cwnd Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1;

18 18 The big picture (with timeouts) Time cwnd AIMD Timeout Slow Start AIMD Initially: cwnd = 1; ssthresh = infinite; New ack received: if (cwnd < ssthresh) /* Slow Start*/ cwnd = cwnd + 1; else /* Congestion Avoidance */ cwnd = cwnd + 1/cwnd; Timeout: /* Multiplicative decrease */ ssthresh = cwnd/2; cwnd = 1; AIMD Slow Start sstresh

19 19 Congestion Detection Revisited Wait for Retransmission Time Out (RTO) RTO kills throughput In BSD TCP implementations, RTO is usually more than 500ms The granularity of RTT estimate is 500 ms Retransmission timeout is RTT + 4 * mean_deviation Solution: Don’t wait for RTO to expire

20 20 Fast Retransmits Resend a segment after 3 duplicate ACKs Duplicate ACK means that an out-of sequence segment was received Notes: ACKs are for next expected packet Packet reordering can cause duplicate ACKs Window may be too small to get enough duplicate ACKs ACK 2 segment 1 cwnd = 1 cwnd = 2 segment 2 segment 3 ACK 4 cwnd = 4 segment 4 segment 5 segment 6 segment 7 ACK 3 3 duplicate ACKs ACK 4

21 21 Fast Retransmit and Fast Recovery Retransmit after 3 duplicated acks Prevent expensive timeouts Reduce slow starts At steady state, cwnd oscillates around the optimal window size Time cwnd Slow Start AIMD Fast retransmit

22 22 Fast Recovery: After a Fast Retransmit ssthresh = cwnd / 2 cwnd = ssthresh Instead of setting cwnd to 1, cut cwnd in half (multiplicative decrease) For each dup ack arrival dupack++ Indicates packet left network, so we may be able to send more MaxWindow = min(cwnd + dupack, AdvWin) Receive ack for new data (beyond initial dup ack) dupack = 0 Exit fast recovery But when RTO expires still do cwnd = 1

23 Outline Persistent Oscillations TCP  Multicast: DVRMP Token Bucket Integrated & Differentiated Services Routing in CAN & Chord

24 Distance Vector Multicast Routing Protocol (DVRMP) An elegant extension to DV routing Use shortest path DV routes to determine if link is on the source-rooted spanning tree Three steps in developing DVRMP Reverse Path Flooding Reverse Path Broadcasting Truncated Reverse Path Broadcasting

25 Reverse Path Flooding What: node Y forwards packet from node X to all its neighbors (except X), iff X is the next hop of Y to source (A) How: just use unicast routing tables Why: eliminate the loops of simple flooding protocol 4 4 2 2 10 3 3 6 6 8 8 9 9 1 1 5 5 7 7 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets Packets not forwarded

26 Reverse Path Flooding What: node Y forwards packet from node X to all its neighbors (except X), iff X is the next hop of Y to source (A) How: just use unicast routing tables Why: eliminate the loops of simple flooding protocol 4 4 2 2 10 3 3 6 6 8 8 9 9 1 1 5 5 7 7 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets Packets not forwarded Duplicate packet

27 Reverse Path Broadcasting What: node X forwards packet to node Y iff X is next hop of Y to source (A) How: X infers this info from routing messages (see multicast lecture) Why: Avoid a router receiving duplicate packets 4 4 2 2 10 3 3 6 6 8 8 9 9 1 1 5 5 7 7 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets

28 Truncated Reverse Broadcasting What: don’t forward packets to non-members How: use prune messages Why: eliminate un-needed forwarding 4 4 2 2 10 3 3 6 6 8 8 9 9 1 1 5 5 7 7 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets Non-membership report Subscription message

29 Truncated Reverse Broadcasting What: don’t forward packets to non-members How: use prune messages Why: eliminate un-needed forwarding 4 4 2 2 10 3 3 6 6 8 8 9 9 1 1 5 5 7 7 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets Non-membership report Subscription message

30 Pruning Details Prune (Source,Group) at leaf if no members Send Non-Membership Report (NMR) up tree If all children of router R send NRM, prune (S,G) Propagate prune for (S,G) to parent R On timeout: Prune dropped Flow is reinstated Down stream routers re-prune Note: a soft-state approach

31 Outline Persistent Oscillations TCP Multicast: DVRMP  Token Bucket Integrated & Differentiated Services Routing in Chord

32 Token Bucket and Arrival Curve Parameters r – average rate, i.e., rate at which tokens fill the bucket b – bucket depth R – maximum link capacity or peak rate (optional parameter) A bit is transmitted only when there is an available token Arrival curve – maximum number of bits transmitted within an interval of time of size t r bps b bits <= R bps regulator time bits b*R/(R-r) slope R slope r Arrival curve

33 Traffic Enforcement: Example r = 100 Kbps; b = 3 Kb; R = 500 Kbps 3Kb T = 0 : 1Kb packet arrives (a) 2.2Kb T = 2ms : packet transmitted b = 3Kb – 1Kb + 2ms*100Kbps = 2.2Kb (b) 2.4Kb T = 4ms : 3Kb packet arrives (c) 3Kb T = 10ms : packet needs to wait until enough tokens are in the bucket! (d) 0.6Kb T = 16ms : packet transmitted (e)

34 Source Traffic Characterization: Arrival Curve Arrival curve – maximum amount of bits transmitted during any interval of time Δt Use token bucket to bound arrival curve ΔtΔt bits Arrival curve time bps

35 Arrival Curve: Example Arrival curve – maximum amount of bits transmitted during any interval of time Δt Use token bucket to bound arrival curve bits Arrival curve time bps 0 12345 1 2 12345 1 2 3 4 (R=2,b=1,r=1) ΔtΔt

36 Per-hop Reservation End-host: specify the arrival rate characterized by token-bucket with parameters (b,r,R) the maximum maximum admissible delay D Router: allocate bandwidth r a and buffer space B a such that no packet is dropped no packet experiences a delay larger than D bits b*R/(R-r) slope r Arrival curve D BaBa slope r a

37 Outline Persistent Oscillations TCP Multicast: DVRMP Token Bucket  Integrated and Differentiated Services Routing in CAN & Chord

38 Integrated Services Provide service guarantees at a per-flow granularity Reservation Protocol How service request gets from host to network Admission control algorithm How network decides if it can accept flow Packet scheduling algorithms How routers deliver service

39 Control Plane: Resource Reservation Sender Receiver

40 Control Plane: Resource Reservation Sender Receiver Sender sends specification of traffic profile

41 Control Plane: Resource Reservation Sender Receiver Path established (or perhaps admission control denies path)

42 Control Plane: Resource Reservation Sender Receiver The receiver accepts reservation request

43 Control Plane: Admission Control Sender Receiver Per-flow state (soft state)

44 Sender Receiver Control Plane: Admission Control Per-flow state on all routers in path

45 Data Plane Sender Receiver Per-flow classification on each router

46 Data Plane Sender Receiver Per-flow classification on each router

47 Data Plane Sender Receiver Per-flow scheduling on each router

48 Differentiated Services (DiffServ) Give some traffic better treatment than other App. requirements: interactive vs. bulk transfer Economic arrangements: first-class versus coach What kind of better service could you give? Fewer drops Lower delay Lower delay variation (jitter) How to know which packets get better service? Bits in packet header Deals with traffic in aggregate Provides weaker services But much more scalable

49 Diffserv Architecture Ingress routers - entrance to a DiffServ domain Police or shape traffic Set Differentiated Service Code Point (DSCP) in IP header Core routers Implement Per Hop Behavior (PHB) for each DSCP Process packets based on DSCP Ingress Egress Ingress Egress DS-1 DS-2 Edge router Core router

50 Differentiated Services Expedite Forwarding (EF) Give packet minimal delay and loss service P-bit denotes premium traffic Assured Forwarding (AS) Packets are all serviced in order Makes TCP implementations perform well But some packets can be marked as low-drop Think of it as priority levels for dropping A-bit denotes assured traffic

51 Comparison to Best-Effort & Intserv Best-EffortDiffservIntserv ServiceConnectivity No isolation No guarantees Per aggregate isolation Per aggregate guarantee Per flow isolation Per flow guarantee Service scope End-to-endDomainEnd-to-end ComplexityNo setupLong term setupPer flow steup ScalabilityHighly scalable (nodes maintain only routing state) Scalable (edge routers maintain per aggregate state; core routers per class state) Not scalable (each router maintains per flow state)

52 Outline Persistent Oscillations TCP Multicast: DVRMP Token Bucket Integrated & Differentiated Services  Routing in CAN & Chord

53 Routing in CAN O(d*N 1/d ) d: dimensions N: number of nodes Example: route from S to D on a 2- dimensional grid d = 2 N = m x m Path length: 2*m = 2*N 1/2 S D m m

54 Routing in Chord using Fingers Finger i at node n : 80 + 2 0 80 + 2 1 80 + 2 2 80 + 2 3 80 + 2 4 80 + 2 5 (80 + 2 6 ) mod 2 7 = 16 0 32 45 80 20 112 96 i ft[i] 0 96 1 96 2 96 3 96 4 96 5 112 6 20 5 70

55 Routing in Chord using Fingers Route length: O(log N) N: number of nodes Justification: every hop reduces the distance to destination by at least half 0 32 45 80 20 112 96 5 70 S D

56 Recursive vs. Iterative Routing 0 32 45 80 20 112 96 5 70 S D 0 32 45 80 20 112 96 5 70 S D RecursiveIterative

57 Final Exam Open book, open notes! Crib sheets ok if you like Comprehensive, but greater focus on material since midterm Questions similar in format to the first midterm Problem set-up descriptions + multipart fill-ins All answers on the exam sheets we hand out Bring PENCIL, ERASER, no calculators needed


Download ppt "1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,"

Similar presentations


Ads by Google