Contents. CIS 632 / EEC 687 Mobile Computing. TCP in Fixed Networks. Prof. Chansu Yu

Similar documents
ICE 1332/0715 Mobile Computing (Summer, 2008)

CS321: Computer Networks Congestion Control in TCP

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

Fall 2012: FCM 708 Bridge Foundation I

Lecture 4: Congestion Control

CIS 632 / EEC 687 Mobile Computing

CMPE 257: Wireless and Mobile Networking

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

image 3.8 KB Figure 1.6: Example Web Page

TCP over Wireless PROF. MICHAEL TSAI 2016/6/3

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

EE122 MIDTERM EXAM: Scott Shenker, Ion Stoica

TCP Congestion Control 65KB W

Lecture 7: Flow Control"

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Congestion Avoidance and Control. Rohan Tabish and Zane Ma

Flow and Congestion Control Marcos Vieira

TCP Congestion Control

TCP Congestion Control

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

TCP based Receiver Assistant Congestion Control

Computer Networking Introduction

Transport Protocols and TCP

Transport Protocols and TCP: Review

cs/ee 143 Communication Networks

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Impact of transmission errors on TCP performance. Outline. Random Errors

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

Networked Systems and Services, Fall 2017 Reliability with TCP

Transport Protocols & TCP TCP

CSE 461. TCP and network congestion

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

TCP Congestion Control

TCP Congestion Control

Outline Computer Networking. Functionality Split. Transport Protocols

Reliable Transport II: TCP and Congestion Control

DualRTT: Enhancing TCP Performance During Delay Spikes

Reliable Transport II: TCP and Congestion Control

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

Networked Systems and Services, Fall 2018 Chapter 3

ADVANCED COMPUTER NETWORKS

ECE 333: Introduction to Communication Networks Fall 2001

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

CE693 Advanced Computer Networks

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

TCP: Flow and Error Control

Lecture 3: The Transport Layer: UDP and TCP

User Datagram Protocol (UDP):

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

CNT 6885 Network Review on Transport Layer

Congestion Collapse in the 1980s

Internet Networking recitation #10 TCP New Reno Vs. Reno

Outline. CS5984 Mobile Computing

CSCD 330 Network Programming

Different Layers Lecture 20

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Performance Analysis of TCP Variants

Chapter 24. Transport-Layer Protocols

CSE/EE 461. TCP congestion control. Last Lecture. This Lecture. Focus How should senders pace themselves to avoid stressing the network?

Intro to LAN/WAN. Transport Layer

Advanced Computer Networks

COMP/ELEC 429/556 Introduction to Computer Networks

CSCI Topics: Internet Programming Fall 2008

Outline. User Datagram Protocol (UDP) Transmission Control Protocol (TCP) Transport layer (cont.) Transport layer. Background UDP.

Congestion Control in Communication Networks

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

TCP congestion control:

Flow and Congestion Control (Hosts)

Advanced Computer Networks

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

A Survey on Quality of Service and Congestion Control

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

TCP: Transmission Control Protocol UDP: User Datagram Protocol TCP - 1

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

CS3600 SYSTEMS AND NETWORKS

Programming Assignment 3: Transmission Control Protocol

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

TCP Congestion Control

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Bandwidth Allocation & TCP

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 30, 2018

Chapter III. congestion situation in Highspeed Networks

UNIT IV -- TRANSPORT LAYER

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

Chapter III: Transport Layer

CSCI-1680 Transport Layer II Data over TCP Rodrigo Fonseca

05 Transmission Control Protocol (TCP)

CS4700/CS5700 Fundamentals of Computer Networks

8. TCP Congestion Control

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

ECS-087: Mobile Computing

TCP over Wireless. Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land 1

Transcription:

CIS 632 / EEC 687 Mobile Computing TCP in Fixed Networks Prof. Chansu Yu Contents Physical layer issues Communication frequency Signal propagation Modulation and Demodulation Channel access issues Multiple access / Random access / Asynchronous 802.11 / Bluetooth Capacity / Energy / Fairness / Directional System issues Embedded processor Low power design Network issues Location management Mobile IP / Cellular IP MANET routing / Clustering Multicast Interoperability Network reliability (TCP) Quality of service (QoS) 2 1

The Internet 1969, ARPANet After WAR WAR II and during Cold war, US government was interested in science and technology research to improve radar signals and communications ARPANet (Advanced Research Projects Agency network) in 1969 They documented the Internet protocols Email was developed Networked 4 computers together Government also funded universities for research 3 1989-1990 Transfer of Internet from Government At the beginning of 1989 over 80,000 host computers were connected to what was now called the Internet The US Government officially transferred the governess of the Internet to the National Science Foundation (NSF) NSF took control of managing the back bone of the internet and was then called the NSFNet In 1995, the NSF turned control of the Internet to a consortium. 4 2

Who Controls the Internet? Not one person, company or government owns the Internet Its truly collaborative, collective enterprise There are organizations that have influence and together form a collective body to guide the Internet and the web: The World Wide Web Consortium (W3C): sets specification for HTML and the web The Internet Engineering Task Force (IETF) focuses on the evolution of the Internet and making sure it runs smooth The Internet Architecture Board (IAB): responsible for defining the backbone of the Internet The Internet Society (ISOC): made up of organizations, governments, non profit, communities, Academics, professionals. The group comments on Internet polices, politics, and oversee other boards such as IETF The Internet Assigned Authority (IANA) and the Internet Network Information Center (InterNIC). This group is responsible for ip and domain name addressing 5 Who Controls the Backbone of the Internet? Regional and long-distance phone companies, backbone ISP s, cable and satellite companies, and U.S government contribute in significant ways to the telecommunication infrastructure that supports the Internet Companies like Sprint, MCI and AT&T make lots of money by leasing access to the Internet 6 3

7 8 4

Internet Protocol (IP) Packets may be delivered out-of-order Packets may be lost Packets may be duplicated 9 Transmission Control Protocol (TCP) Reliable ordered delivery Implements congestion avoidance and control Reliability achieved by positive acknowledgement with retransmissions End-to-end semantics Acknowledgements sent to TCP sender confirm delivery of data received by TCP receiver Ack for data sent only after data has reached receiver 10 5

Reliable, Ordered Delivery: Positive Acknowledgement Send packet 1 Receive packet 1 Send ACK 1 Receive ACK 1 Send packet 2 Receive packet 2 Send ACK 2 Receive ACK 2 11 Reliable, Ordered Delivery: Timeout & Retransmission Send packet 1 Start timer Packet lost Packet should arrive ACK should be sent ACK normally arrive now Timer expires Retransmit packet 1 Start timer Receive packet 1 Send ACK 1 Receive ACK 1 Cancel timer 12 6

Issues in TCP 1. Fast packet loss detection Retransmission timeout (RTO) Duplicated acknowledgements (Dupacks) 2. Efficient delivery Sliding window with cumulative acknowledgement 3. Flow problems End-to-end flow problem Flow problem in intermediate systems (congestion) 13 1. Reliable, Ordered Delivery: Fast Packet Loss Detection Two methods A. Retransmission timeout (RTO) A. Duplicate acknowledgements (Dupacks) 14 7

A. Fast Packet Loss Detection Using Retransmission Timeout (RTO) At any time, TCP sender sets retransmission timer for only one packet If acknowledgement for the timed packet is not received before timer goes off, the packet is assumed to be lost RTO (timeout value) dynamically calculated 15 Retransmission Timeout (RTO) Calculation Q1: Which value will you use? Q2: How to set the value in dynamic Internet? Send packet 1 Start timer Packet lost Q3: If a retransmission occurs, is an ack for the original or for the retransmission (important because RTT is calculated)? A1: RTT (round trip time) A2: adaptive retransmission algorithm (changing RTT and thus, changing time-out values) A3: if ACK arrives, is it for the original packet or for the retransmitted packet (acknowledge ambiguity)? A4: timer backoff strategy ACK normally arrive now 16 Timer expires Retransmit packet 1 Start timer Receive ACK 1 Cancel timer Packet should arrive ACK should be sent Receive packet 1 Send ACK 1 8

Retransmission Timeout (RTO) Calculation Large variations in the RTT necessitates a larger RTO (why???) RTO = mean + 4 mean deviation 2 2 Standard deviation s : s = average of (sample mean) Mean deviation d = average of sample mean Mean deviation easier to calculate than standard deviation Mean deviation is more conservative: d >= s (right???) left=(a+b)/2 right=sqrt(a^2+b^2)/2 Karn s algorithm no ack ambiguity 17 4*left^2=a^2+b^2+2ab 4*right^2=a^2+b^2 thus, left>=right Retransmission: Exponential Backoff Double RTO on each timeout (why???) Packet transmitted T1 T2 = 2 * T1 T2 = 4 * T1 Timeout interval doubled Time-out occurs before ack received, packet retransmitted Time-out again 18 9

History of TCP Fathers Vinton Cerf and Robert Kahn s paper in 1973 introduces TCP. Became standard in 1983. They received Turing Award in 2005. Medal of Freedom in 2005. They are with MCI and NRI now. 19 History of TCP TCP has been improved over the years Original (83), Tahoe (88, Fast retransmit, by Van Jacobson, LBL) More robust estimates of round-trip time Faster recovery from packet loss Congestion avoidance and improvements TCP Reno Developed by Van Jacobsen in 1990 Added fast recovery and fast retransmit TCP Vegas Developed by Brakmo and Peterson (Univ. Arizona) in 1995 New congestion avoidance algorithm 20 10

B. Fast Packet Loss Detection Using Dupacks Timeouts can take too long how to detect packet loss sooner and initiate retransmission sooner? If the receiver receives out-of-order packet What does the receiver do??? do nothing Duplicated acks (dupacks) What are the benefits - Fast Retransmission 21 Dupacks Dupacks may be generated due to packet loss, or out-of-order packet delivery TCP sender assumes that a packet loss has occurred if it receives three dupacks consecutively (why not one/two???) 12 11 10 9 8 7 Packet Loss Detection: Receipt of packets 9, 10 and 11 will each generate a dupack from the receiver. Fast Retransmission: The sender, on getting these dupacks, will retransmit packet 8. 22 11

Issues in TCP 1. Fast packet loss detection Retransmission timeout (RTO) Duplicated acknowledgements (Dupacks) 2. Efficient delivery Sliding window with cumulative acknowledgement 3. Flow problems End-to-end flow problem Flow problem in intermediate systems (congestion) 23 2. Efficient Delivery Send packet 1 Receive packet 1 Send ACK 1 Receive ACK 1 Send packet 2 Receive packet 2 Send ACK 2 Receive ACK 2 24 Sending it one after the other takes too long! 12

Efficient Delivery: Sliding Window A simple positive acknowledgement protocol wastes a substantial amount of network bandwidth Sliding windows protocol allows the sender to transmit multiple packets before waiting for an acknowledgement Some packets are sent and ack ed Packet A Packet B Some packets are sent but not ack ed yet Packet C Packet D Some packets are not sent yet but can be sent without delay because they are within the window 25 Sliding Window Protocol What if the sender receives ACK for packet 3? What does it mean if the window size is 1? What does it mean if the window size is? 26 13

Sliding Window (Example): the maximum range of data sent but not acknowledged An Example: Sliding Window Size = 4 bytes [ 0 1 2 3 ] 4 5 6 7 8 9 0 1 2 3 ACK 0 0 [ 1 2 3 4 ] 5 6 7 8 9 4 Timeout 0 [ 1 2 3 4 ] 5 6 7 8 9 1 2 3 4 27 Sliding Window Basics Cumulative acknowledgements Good: Easy to generate and unambiguous Bad: the sender does not receive information about all successful transmissions, but only about a single position in the stream that has been received An acknowledgement ack s all contiguously received data TCP assigns byte sequence numbers 28 14

Cumulative Acknowledgements A new cumulative acknowledgement is generated only on receipt of a new in-sequence packet data S 40 39 38 37 33 34 35 36 R ack S 41 40 39 38 34 35 36 37 R 29 One More Optimization If the sender receives ACK 36 It means??? Do we need to send acks for all packets? Delayed acks (e.g., ACK2, ACK4, ACK6,...) It means packets 1 to 36 have been received ->Do we need to send acks for all packets? S 40 39 38 37 34 36 R 30 15

Delayed ACKs Sender s window 1 2 3 4 5 6 7 8 9 10 11 12 13 Acks received Not transmitted Ack 5 1 2 3 4 5 6 7 8 9 10 11 12 13 31 Issues in TCP 1. Fast packet loss detection Retransmission timeout (RTO) Duplicated acknowledgements (Dupacks) 2. Efficient delivery Sliding window with cumulative acknowledgement Window size (1 ~ ) if 1, it takes long but perfect control (if a packet is not successful, do not add more traffic) End-to-end flow problem if, no control over traffic Flow problem in intermediate systems (congestion) 3. Flow problems 32 16

3. Flow Problems A. End-to-end flow problem Control a source that sends more traffic than the receiver can tolerate Between source and destination => Easier to solve: The receiver informs its status to the sender ( advertised window size ) B. Flow problem in the intermediate systems Control a source that sends more traffic than the intermediate systems can tolerate Called congestion 33 Window-based Flow Control Congestion simply means increased delay Respond by retransmissions Incurs more congestion Thus, we need to reduce the window size Window size is determined as the minimum of receiver s advertised window - determined by available buffer space at the receiver <= flow control congestion window (cwnd) - determined by the sender, based on feedback from the network <= congestion control On detecting a packet loss, TCP sender assumes that network congestion has occurred drastically reduces the congestion window 34 17

TCP Flow Control TCP inherently supports flow control to prevent buffer overflow at the receiver Useful for fast sender transmitting to slower receiver Receiver advertises a window (wnd) in acknowledgements returned to the sender Sender cannot send more than wnd unacknowledged bytes to the receiver Src Dest 35 Limits amount of data that destination must buffer TCP Congestion Avoidance Congestion avoidance (control) was added to TCP in an attempt to reduce congestion inside the network A much harder problem Requires the cooperation of multiple senders Must rely on indirect measures of congestion Implemented at sender Src Dest 36 Attempts to reduce buffer overflow inside the network 18

TCP Operation Flow control (already discussed) Congestion control Key Assumption: Packet loss is due to congestion Reduces the number of segments sent when detects losses Introduce a congestion window (cwnd), in addition to flow control window (wnd) Need to manage size of congestion window Three stages Multiplicative decrease (when congestion is detected) Slow Start (when congestion ends) Congestion avoidance (when cwnd reaches a reasonable value) 37 Determining Window Size for Congestion Control Congestion control used in TCP (cwnd changes) Multiplicative decrease Slow start Starts with a slow transmission rate at the start of a new connection or after a congestion condition When congestion ends, it can increase the window size multiplicatively. But it may result in oscillation. Additive recovery (increase one for each ACK arrived) But in fact, cwnd grows exponentially up to threshold (half the window size before packet loss) Congestion avoidance cwnd increases linearly with time (increase one if all ACKs arrive) Rate of increase could be lower if sender does not always have data to send 38 19

Congestion window (segments) 25 20 15 10 5 0 0 3 Multiplicative decrease 6 9 12 cwnd = 20 15 20 Slow Start 22 25 Congestion avoidance Slow start threshold = 10 Time (round trips) 39 Format of a TCP Segment TCP address 40 20

41 21