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

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

1 EE 122:TCP Congestion Control Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
TAs: Junda Liu, DK Moon, David Zats
Differentiated Services. Service Differentiation in the Internet Different applications have varying bandwidth, delay, and reliability requirements How.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Congestion Control Computer Science Division Department of Electrical Engineering and Computer.
Integrated Services and Differentiated Services. Limitations of IP Architecture in Supporting Resource Management IP provides only best effort service.
ACN: IntServ and DiffServ1 Integrated Service (IntServ) versus Differentiated Service (Diffserv) Information taken from Kurose and Ross textbook “ Computer.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Packet Scheduling and QoS Computer Science Division Department of Electrical Engineering and.
CS 268: Differentiated Services Ion Stoica February 25, 2003.
1 EE 122: Multicast Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
1 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
15-744: Computer Networking
1 CS 268: Lecture 13 QoS: DiffServ and IntServ Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences University.
CMPE 257 Spring CMPE 257: Wireless and Mobile Networking Spring 2005 E2E Protocols (point-to-point)
CS 268: Lecture 10 (Integrated Services) Ion Stoica March 4, 2002.
CS 268: Lecture 11 (Differentiated Services) Ion Stoica March 6, 2001.
Spring 2002CS 4611 Quality of Service Outline Realtime Applications Integrated Services Differentiated Services.
CS 268: Integrated Services Ion Stoica February 23, 2004.
1 CS 194: Distributed Systems Resource Allocation Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Spanning Tree and Multicast. The Story So Far Switched ethernet is good – Besides switching needed to join even multiple classical ethernet networks Routing.
1 EE 122: Advanced TCP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
Integrated Services (RFC 1633) r Architecture for providing QoS guarantees to individual application sessions r Call setup: a session requiring QoS guarantees.
1 Quality of Service (QoS) - DiffServ EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew.
QOS مظفر بگ محمدی دانشگاه ایلام. 2 Why a New Service Model? Best effort clearly insufficient –Some applications need more assurances from the network.
CS 268: Integrated Services Lakshminarayanan Subramanian Feb 20, 2003.
TCP CS 168 Discussion Week 6 Many thanks to past EE 122 GSIs.
1 Lecture 14 High-speed TCP connections Wraparound Keeping the pipeline full Estimating RTT Fairness of TCP congestion control Internet resource allocation.
Multicast, Packet Scheduling, QoS EE 122: Intro to Communication Networks Fall 2010 (MW 4-5:30 in 101 Barker) Scott Shenker TAs: Sameer Agarwal, Sara Alspaugh,
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
1 Mao W07 Midterm Review EECS 489 Computer Networks Z. Morley Mao Monday Feb 19, 2007 Acknowledgement: Some.
CS244A Midterm Review Ben Nham Some slides derived from: David Erickson (2007) Paul Tarjan (2007)
Lecture 9 – More TCP & Congestion Control
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
CS640: Introduction to Computer Networks Aditya Akella Lecture 21 – QoS.
Computer Networking Lecture 18 – More TCP & Congestion Control.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Congestion Control Computer Science Division Department of Electrical Engineering and Computer.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
EE 122: Lecture 15 (Quality of Service) Ion Stoica October 25, 2001.
1 Lecture, November 27, 2002 TCP Other Internet Protocols; Internet Traffic Scalability of Virtual Circuit Networks QoS.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
ECE 4110 – Internetwork Programming
Random Early Detection (RED) Router notifies source before congestion happens - just drop the packet (TCP will timeout and adjust its window) - could make.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Midterm II Review Computer Science Division Department of Electrical Engineering and Computer.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
An End-to-End Service Architecture r Provide assured service, premium service, and best effort service (RFC 2638) Assured service: provide reliable service.
CS 268: Lecture 5 (TCP Congestion Control) Ion Stoica February 4, 2004.
Quality of Service Frameworks Hamed Khanmirza Principles of Network University of Tehran.
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
TCP over Wireless PROF. MICHAEL TSAI 2016/6/3. TCP Congestion Control (TCP Tahoe) Only ACK correctly received packets Congestion Window Size: Maximum.
Advanced Computer Networks
CS450 – Introduction to Networking Lecture 19 – Congestion Control (2)
Chapter 3 outline 3.1 transport-layer services
EECS 122: Introduction to Computer Networks Congestion Control
EE 122: Quality of Service and Resource Allocation
CS 268: Lecture 4 (TCP Congestion Control)
EE 122: Lecture 18 (Differentiated Services)
Computer Science Division
EECS 122: Introduction to Computer Networks Midterm II Review
EE 122: Differentiated Services
EE 122: Lecture 10 (Congestion Control)
CIS679: Two Planes and Int-Serv Model
Transport Layer: Congestion Control
TCP flow and congestion control
Presentation transcript:

1 EE 122: Final Review Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at UC Berkeley)

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

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

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

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

6 Routing: Persistent Oscillations Assume link cost = amount of carried traffic A D C B 1 1+e e 0 e A D C B 2+e 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 Routing: Persistent Oscillations Assume link cost = amount of carried traffic A D C B 2+e e 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 e

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 e A D C B 2+e 0 e 0 1+e 1 11 e

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

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 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 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 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 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 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 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 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 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 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 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 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 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

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

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

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 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

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 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

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 A A D D B B C C E E F F G G H H Unicast shortest path Multicast data packets

Truncated Reverse Broadcasting What: don’t forward packets to non-members How: use prune messages Why: eliminate un-needed forwarding 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

Truncated Reverse Broadcasting What: don’t forward packets to non-members How: use prune messages Why: eliminate un-needed forwarding 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

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

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

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

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)

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

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 (R=2,b=1,r=1) ΔtΔt

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

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

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

Control Plane: Resource Reservation Sender Receiver

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

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

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

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

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

Data Plane Sender Receiver Per-flow classification on each router

Data Plane Sender Receiver Per-flow classification on each router

Data Plane Sender Receiver Per-flow scheduling on each router

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

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

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

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)

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

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

Routing in Chord using Fingers Finger i at node n : ( ) mod 2 7 = i ft[i]

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 S D

Recursive vs. Iterative Routing S D S D RecursiveIterative

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