CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

Similar documents
Transport Layer and Data Center TCP

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Transport Layer Protocols

First Midterm for ECE374 03/09/12 Solution!!

TCP in Wireless Mobile Networks

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

TCP over Wireless Networks

Chapter 6 Congestion Control and Resource Allocation

Data Networks Summer 2007 Homework #3

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

TCP/IP Over Lossy Links - TCP SACK without Congestion Control

Final for ECE374 05/06/13 Solution!!

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

First Midterm for ECE374 03/24/11 Solution!!

2 TCP-like Design. Answer

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Congestions and Control Mechanisms n Wired and Wireless Networks

Computer Networks. Chapter 5 Transport Protocols

This sequence diagram was generated with EventStudio System Designer (

Visualizations and Correlations in Troubleshooting

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Computer Networks UDP and TCP

La couche transport dans l'internet (la suite TCP/IP)

Chapter 5. Transport layer protocols

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Transport layer protocols for ad hoc networks

Parallel TCP Data Transfers: A Practical Model and its Application

Analytic Models for the Latency and Steady-State Throughput of TCP Tahoe, Reno and SACK

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

TCP Adaptation for MPI on Long-and-Fat Networks

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

High Speed Internet Access Using Satellite-Based DVB Networks

Optimization of Communication Systems Lecture 6: Internet TCP Congestion Control

Low-rate TCP-targeted Denial of Service Attack Defense

TCP Westwood for Wireless

15-441: Computer Networks Homework 2 Solution

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Active Queue Management (AQM) based Internet Congestion Control

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

SJBIT, Bangalore, KARNATAKA

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

La couche transport dans l'internet (la suite TCP/IP)

Advanced Computer Networks Project 2: File Transfer Application

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

[Prof. Rupesh G Vaishnav] Page 1

CS268 Exam Solutions. 1) End-to-End (20 pts)

Transport layer issues in ad hoc wireless networks Dmitrij Lagutin,

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Higher Layer Protocols: UDP, TCP, ATM, MPLS

International Journal of Scientific & Engineering Research, Volume 6, Issue 7, July ISSN

Computer Networks - CS132/EECS148 - Spring

Mobile Communications Chapter 9: Mobile Transport Layer

The Effect of Packet Reordering in a Backbone Link on Application Throughput Michael Laor and Lior Gendel, Cisco Systems, Inc.

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Protagonist International Journal of Management And Technology (PIJMT) Online ISSN Vol 2 No 3 (May-2015) Active Queue Management

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

A Survey: High Speed TCP Variants in Wireless Networks

Linux TCP Implementation Issues in High-Speed Networks

A Study on TCP Performance over Mobile Ad Hoc Networks

17: Queue Management. Queuing. Mark Handley

Transport Layer. Chapter 3.4. Think about

An Improved TCP Congestion Control Algorithm for Wireless Networks

Packet Queueing Delay

TCP in Wireless Networks

Linux 2.4 Implementation of Westwood+ TCP with rate-halving: A Performance Evaluation over the Internet

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

A packet-reordering solution to wireless losses in transmission control protocol

Digital Audio and Video Data

Network Friendliness of Mobility Management Protocols

Networks: IP and TCP. Internet Protocol

PART III. OPS-based wide area networks

TCP for Wireless Networks

TCP, Active Queue Management and QoS

CS551 End-to-End Internet Packet Dynamics [Paxson99b]

Per-Flow Queuing Allot's Approach to Bandwidth Management

Networking part 3: the transport layer

Applications. Network Application Performance Analysis. Laboratory. Objective. Overview

Research of TCP ssthresh Dynamical Adjustment Algorithm Based on Available Bandwidth in Mixed Networks

TCP Over Wireless Network. Jinhua Zhu Jie Xu

Access Control: Firewalls (1)

TCP based Denial-of-Service Attacks to Edge Network: Analysis and Detection

TCP Performance Management for Dummies

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

SCTP over Satellite Networks

First Midterm for ECE374 02/25/15 Solution!!

Transcription:

CMPE 150/L : Introduction to Computer Networks Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10 1

Midterm exam Midterm next Thursday Close book but one-side 8.5"x11" note is allowed (must use hand-writing!) Let me know by next Monday if you have any problem Sample midterm and sample question of Chapter 2&3 2

Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control 3

TCP fast retransmit time-out period often relatively long: long delay before resending lost packet detect lost segments via duplicate ACKs. sender often sends many segments backto-back if segment is lost, there will likely be many duplicate ACKs. TCP fast retransmit if sender receives 3 ACKs for same data ( triple duplicate ACKs ), resend unacked segment with smallest seq # likely that unacked segment lost, so don t wait for timeout Transport Layer 4

timeout TCP fast retransmit Host A Host B Seq=92, 8 bytes of data Seq=100, 20 bytes of data X ACK=100 ACK=100 ACK=100 ACK=100 Seq=100, 20 bytes of data fast retransmit after sender receipt of triple duplicate ACK Transport Layer 5

Agreeing to establish a connection 2-way handshake: Let s talk ESTAB OK choose x req_conn(x) ESTAB acc_conn(x) ESTAB ESTAB Q: will 2-way handshake always work in network? variable delays retransmitted messages (e.g. req_conn(x)) due to message loss message reordering can t see other side Transport Layer 6

Agreeing to establish a connection 2-way handshake failure scenarios: choose x retransmit req_conn(x) req_conn(x) acc_conn(x) ESTAB choose x retransmit req_conn(x) req_conn(x) acc_conn(x) ESTAB ESTAB client terminates req_conn(x) connection x completes server forgets x ESTAB retransmit data(x+1) client terminates data(x+1) connection x completes req_conn(x) accept data(x+1) server forgets x half open connection! (no client!) ESTAB data(x+1) ESTAB accept data(x+1) Transport Layer 7

TCP 3-way handshake client state LISTEN SYNSENT ESTAB choose init seq num, x send TCP SYN msg received SYNACK(x) indicates server is live; send ACK for SYNACK; this segment may contain client-to-server data SYNbit=1, Seq=x SYNbit=1, Seq=y ACKbit=1; ACKnum=x+1 ACKbit=1, ACKnum=y+1 choose init seq num, y send TCP SYNACK msg, acking SYN received ACK(y) indicates client is live server state LISTEN SYN RCVD ESTAB Transport Layer 8

Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer 9

Principles of congestion control congestion: informally: too many sources sending too much data too fast for network to handle different from flow control! manifestations: lost packets (buffer overflow at routers) long delays (queueing in router buffers) a top-10 problem! Transport Layer 10

Causes/costs of congestion: scenario 1 two senders, two receivers one router, infinite buffers output link capacity: R no retransmission original data: l in Host A unlimited shared output link buffers throughput: l out Host B R/2 l out delay l in R/2 l in R/2 maximum per-connection throughput: R/2 large delays as arrival rate, l in, approaches capacity Transport Layer 11

Causes/costs of congestion: scenario 2 one router, finite buffers sender retransmission of timed-out packet application-layer input = application-layer output: l in = l out transport-layer input includes retransmissions : l in l in l in : original data l' in : original data, plus retransmitted data l out Host A Host B finite shared output link buffers Transport Layer 12

Causes/costs of congestion: scenario 2 idealization: perfect knowledge sender sends only when router buffers available R/2 l out l in R/2 copy l in : original data l' in : original data, plus retransmitted data l out A free buffer space! Host B finite shared output link buffers Transport Layer 13

Causes/costs of congestion: scenario 2 Idealization: known loss packets can be lost, dropped at router due to full buffers sender only resends if packet known to be lost copy l in : original data l' in : original data, plus retransmitted data l out A no buffer space! Host B Transport Layer 14

Causes/costs of congestion: scenario 2 Idealization: known loss packets can be lost, dropped at router due to full buffers sender only resends if packet known to be lost R/2 l out l in R/2 when sending at R/2, some packets are retransmissions but asymptotic goodput is still R/2 (why?) l in : original data l' in : original data, plus retransmitted data l out A free buffer space! Host B Transport Layer 15

Causes/costs of congestion: scenario 2 Realistic: duplicates packets can be lost, dropped at router due to full buffers sender times out prematurely, sending two copies, both of which are delivered R/2 l out l in R/2 when sending at R/2, some packets are retransmissions including duplicated that are delivered! copy timeout l in l' in l out A free buffer space! Host B Transport Layer 16

Throughput: Data rate at the receiver Goodput: Rate at the receiver for data without duplicate! Transport Layer 17

Causes/costs of congestion: scenario 2 Realistic: duplicates packets can be lost, dropped at router due to full buffers sender times out prematurely, sending two copies, both of which are delivered l out R/2 l in R/2 when sending at R/2, some packets are retransmissions including duplicated that are delivered! costs of congestion: more work (retrans) for given goodput unneeded retransmissions: link carries multiple copies of pkt decreasing goodput Transport Layer 18

Causes/costs of congestion: scenario 3 four senders multihop paths timeout/retransmit Host A Q: what happens as l in and l in increase? A: as red l in increases, all arriving blue pkts at upper queue are dropped, blue throughput g 0 l in : original data l' in : original data, plus retransmitted data finite shared output link buffers l out Host B Host D Host C Transport Layer 19

Causes/costs of congestion: scenario 3 C/2 l out l in C/2 another cost of congestion: when packet dropped, any upstream transmission capacity used for that packet was wasted! Transport Layer 20

Approaches towards congestion control two broad approaches towards congestion control: end-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP network-assisted congestion control: routers provide feedback to end systems single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) explicit rate for sender to send at Transport Layer 21

Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 principles of congestion control 3.7 TCP congestion control Transport Layer 22

TCP Congestion Control: details sender sequence number space cwnd last byte ACKed sent, notyet ACKed ( inflight ) last byte sent sender limits transmission: LastByteSent- LastByteAcked < cwnd TCP sending rate: roughly: send cwnd bytes, wait RTT for ACKS, then send more bytes rate ~ cwnd RTT bytes/sec cwnd is dynamic, function of perceived network congestion Transport Layer 23

RTT TCP Slow Start when connection begins, increase rate exponentially until first loss event: initially cwnd = 1 MSS double cwnd every RTT done by incrementing cwnd for every ACK received summary: initial rate is slow but ramps up exponentially fast Host A Host B time Transport Layer 24

TCP: detecting, reacting to loss loss indicated by timeout: set a threshold ssthresh to half of the cwnd; cwnd set to 1 MSS (by both TCP Tahoe and Reno); window then grows exponentially (as in slow start) to threshold, then grows linearly TCP Tahoe always sets cwnd to 1 (timeout or 3 duplicate acks) TCP RENO: loss indicated by 3 duplicate ACKs dup ACKs indicate network capable of delivering some segments cwnd is cut in half window then grows linearly Transport Layer 25

After cwnd reaching the threshold Congestion avoidance algorithm: Additive increase multiplicative decrease (AIMD) Transport Layer 3-26

cwnd: TCP sender congestion window size TCP congestion control: AIMD approach: sender increases transmission rate (window size), probing for usable bandwidth, until loss occurs additive increase: increase cwnd by 1 MSS every RTT until loss detected multiplicative decrease: cut cwnd in half after loss additively increase window size. until loss occurs (then cut window in half) AIMD saw tooth behavior: probing for bandwidth time Transport Layer 27

TCP: switching from slow start to CA Q: when should the exponential increase switch to linear? A: when cwnd gets to 1/2 of its value before timeout. Implementation: variable ssthresh on loss event, ssthresh is set to 1/2 of cwnd just before loss event Transport Layer 28

Summary: TCP Congestion Control L cwnd = 1 MSS ssthresh = 64 KB dupackcount = 0 timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment duplicate ACK dupackcount++ slow start New ACK! new ACK cwnd = cwnd+mss dupackcount = 0 transmit new segment(s), as allowed cwnd > ssthresh L timeout ssthresh = cwnd/2 cwnd = 1 MSS dupackcount = 0 retransmit missing segment timeout ssthresh = cwnd/2 cwnd = 1 dupackcount = 0 retransmit missing segment fast recovery duplicate ACK new ACK cwnd = cwnd + MSS (MSS/cwnd) dupackcount = 0 transmit new segment(s), as allowed cwnd = ssthresh dupackcount = 0 congestion avoidance New ACK! New ACK cwnd = cwnd + MSS transmit new segment(s), as allowed. New ACK! duplicate ACK dupackcount++ dupackcount == 3 ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment Transport Layer 29

TCP throughput avg. TCP thruput as function of window size, RTT? ignore slow start, assume always data to send W: window size (measured in bytes) where loss occurs avg. window size (# in-flight bytes) is ¾ W avg. thruput is 3/4W per RTT avg TCP thruput = 3 4 W RTT bytes/sec W W/2 Transport Layer 30

TCP Futures: TCP over long, fat pipes example: 1500 byte segments, 100ms RTT, want 10 Gbps throughput requires W = 83,333 in-flight segments throughput in terms of segment loss probability, L [Mathis 1997]: TCP throughput = 1.22. MSS RTT L to achieve 10 Gbps throughput, need a loss rate of L = 2 10-10 a very small loss rate! new versions of TCP for high-speed Transport Layer 31

TCP Fairness fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 TCP connection 2 bottleneck router capacity R Transport Layer 32

Why is TCP fair? two competing sessions: additive increase gives slope of 1, as throughout increases multiplicative decrease decreases throughput proportionally R equal bandwidth share loss: decrease window by factor of 2 congestion avoidance: additive increase loss: decrease window by factor of 2 congestion avoidance: additive increase Connection 1 throughput R Transport Layer 33

Van Jacobson One of the key designers of TCP congestion control https://www.youtube.com/watch?v=qp4a6l7ceqa 1:40-9:20 34

Fairness (more) Fairness and UDP multimedia apps often do not use TCP do not want rate throttled by congestion control instead use UDP: send audio/video at constant rate, tolerate packet loss Fairness, parallel TCP connections application can open multiple parallel connections between two hosts web browsers do this e.g., link of rate R with 9 existing connections: new app asks for 1 TCP, gets rate R/10 new app asks for 11 TCPs, gets R/2 Transport Layer 35

Chapter 3: summary principles behind transport layer services: multiplexing, demultiplexing reliable data transfer flow control congestion control instantiation, implementation in the Internet UDP TCP next: leaving the network edge (application, transport layers) into the network core Transport Layer 36

Next class Midterm covers every slide until here. Please read Chapter 4.1-4.2 of your textbook BEFORE Class 37