ECE/CS 372 introduction to computer networks

Similar documents
Computer Networks. Chapter 5 Transport Protocols

Transport Layer and Data Center TCP

Transport Layer Protocols

TCP in Wireless Mobile Networks

Computer Networks - CS132/EECS148 - Spring

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

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

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

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

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

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

15-441: Computer Networks Homework 2 Solution

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

2 TCP-like Design. Answer

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

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

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

This sequence diagram was generated with EventStudio System Designer (

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

Data Networks Summer 2007 Homework #3

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

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

Mobile Communications Chapter 9: Mobile Transport Layer

Advanced Computer Networks Project 2: File Transfer Application

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

TCP for Wireless Networks

Chapter 5. Transport layer protocols

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

Chapter 6 Congestion Control and Resource Allocation

TCP Adaptation for MPI on Long-and-Fat Networks

Configuring TCP Intercept (Preventing Denial-of-Service Attacks)

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

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

Homework 3 assignment for ECE374 Posted: 03/13/15 Due: 03/27/15

Low-rate TCP-targeted Denial of Service Attack Defense

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

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

Computer Networks. Data Link Layer

Final for ECE374 05/06/13 Solution!!

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

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

TCP over Wireless Networks

Visualizations and Correlations in Troubleshooting

Access Control: Firewalls (1)

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

Sources: Chapter 6 from. Computer Networking: A Top-Down Approach Featuring the Internet, by Kurose and Ross

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

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

Congestions and Control Mechanisms n Wired and Wireless Networks

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

Ina Minei Reuven Cohen. The Technion. Haifa 32000, Israel. Abstract

Mobile Computing/ Mobile Networks

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

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

Computer Networks UDP and TCP

TCP Westwood for Wireless

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

CMPE 150 Winter 2009

A Transport Protocol for Multimedia Wireless Sensor Networks

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

TTC New Reno - Consistent Control of Packet Traffic

A Survey: High Speed TCP Variants in Wireless Networks

Pig Laboratory. Additional documentation for the laboratory. Exercises and Rules. Tstat Data

Stop And Wait. ACK received; transmit frame 2 CS 455 3

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

[Prof. Rupesh G Vaishnav] Page 1

Principles of Network Applications. Dr. Philip Cannata

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

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

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

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

TCP in Wireless Networks

Transport Protocols and Distributed Applications

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

SELECTIVE-TCP FOR WIRED/WIRELESS NETWORKS

Transport layer protocols for ad hoc networks

An enhanced TCP mechanism Fast-TCP in IP networks with wireless links

Secure SCTP against DoS Attacks in Wireless Internet

Research of User Experience Centric Network in MBB Era ---Service Waiting Time

High Speed Internet Access Using Satellite-Based DVB Networks

A Congestion Control Algorithm for Data Center Area Communications

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

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Broadband Networks. Prof. Dr. Abhay Karandikar. Electrical Engineering Department. Indian Institute of Technology, Bombay. Lecture - 29.

Solving complex performance problems in TCP/IP and SNA environments.

APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM

Measuring IP Performance. Geoff Huston Telstra

SJBIT, Bangalore, KARNATAKA

Per-Flow Queuing Allot's Approach to Bandwidth Management

Student, Haryana Engineering College, Haryana, India 2 H.O.D (CSE), Haryana Engineering College, Haryana, India

Servicesin ns-3. Outline SIMULACIÓN DE PROTOCOLOS DE ENRUTAMIENTO PARA REDES MÓVILES AD-HOC MEDIANTE HERRRAMIENTA DE SIMULACIÓN NS-3

GSM. Quectel Cellular Engine. GSM TCPIP Application Notes GSM_TCPIP_AN_V1.1

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

Computer Networks Homework 1

TCP Performance Management for Dummies

TCP/IP Support Enhancements

Expert Reference Series of White Papers. Troubleshooting Slow Networks with Wireshark

point to point and point to multi point calls over IP

Transcription:

ECE/CS 372 introduction to computer networks Lecture 7 Announcements: Assignment 2 and Lab 2 are posted Credit for lecture slides to Professor Bechir Hamdaoui Adapted from Jim Kurose & Keith Ross (original copyright) Chapter 3, slide: 54

Chapter 3 outline Principles of reliable data transfer Principles of congestion control Connection-oriented transport: TCP TCP congestion control Chapter 3, slide: 55

TCP Round Trip Time (RTT) and Timeout Why need to estimate RTT? timeout and retransmit needed to address packet loss need to know when to timeout and retransmit Ideal world: exact RTT is needed Real world: RTTs change over time: packets may take different paths network load changes over time RTTs can only be estimated Some intuition What happens if too short? Premature timeout Unnecessary retransmissions What happens if too long? Slow reaction to segment loss Chapter 3, slide: 56

TCP Round Trip Time (RTT) and Timeout Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT (current) = (1-)*EstimatedRTT (previous) + *SampleRTT (recent) 0 < < 1; typical value: = 0.125 SampleRTT: measured time from segment transmission until ACK receipt current value of RTT Ignore retransmission EstimatedRTT: estimated based on past & present; smoother than SampleRTT to be used to set timeout period Chapter 3, slide: 57

TCP Round Trip Time (RTT) and Timeout Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT (current) = (1-)*EstimatedRTT (previous) + *SampleRTT (recent) 0 < < 1; typical value: = 0.125 Illustration: Assume: we received n RTT samples so far: Let s order them as: n is the most recent one, n-1 is the 2 nd most recent, etc. EstimatedRTT (n) = (1-)*EstimatedRTT (n-1) + *SampleRTT (n) (EstimatedRTT (n) : estimated RTT after receiving ACK of nth Packet.) Example: Supppse 3 ACKs returned with SampleRTT (1), SampleRTT (2), SampleRTT (3) Question: What would be EstimatedRTT after receiving the 3 ACKs? Assume: EstimatedRTT (0) = 2 seconds (initial/default value) Chapter 3, slide: 58

TCP Round Trip Time (RTT) and Timeout Technique: Exponential Weighted Moving Average (EWMA) EstimatedRTT (current) = (1-)*EstimatedRTT (previous) + *SampleRTT (recent) 0 < < 1; typical value: = 0.125 What happens if is too small (say very close 0): A sudden, real change in network load does not get reflected in EstimatedRTT fast enough May lead to under- or overestimation of RTT for a long time What happens if is too large(say very close 1): Transient fluctuations/changes in network load affects EstimatedRTT and makes it unstable when it should not Also leads to under- or overestimation of RTT Chapter 3, slide: 59

Example RTT estimation: RTT: gaia.cs.umass.edu to fantasia.eurecom.fr 350 300 RTT (milliseconds) 250 200 150 100 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconnds) SampleRTT Estimated RTT Chapter 3, slide: 60

TCP Round Trip Time (RTT) and Timeout Setting the timeout timeout = EstimtedRTT, any problem with this??? add a safety margin to EstimtedRTT large variation in EstimatedRTT -> larger safety margin see how much SampleRTT deviates from EstimatedRTT: DevRTT = (1-)*DevRTT + * SampleRTT-EstimatedRTT (typically, = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT Chapter 3, slide: 61

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 socket door point-to-point: one sender, one receiver reliable, in-order byte stream: no message boundaries pipelined: TCP congestion and flow control set window size send & receive buffers application writes data TCP send buffer segment application reads data TCP receive buffer socket door full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver Chapter 3, slide: 62

TCP: a reliable data transfer TCP creates rdt service on top of IP s unreliable service Pipelined segments Cumulative acks TCP uses single retransmission timer Retransmissions are triggered by: timeout events duplicate acks Initially consider simplified TCP sender: ignore duplicate acks ignore flow control, congestion control Chapter 3, slide: 63

TCP sender events: Data received from app: Create segment with Seq # Seq # is byte-stream number of first data byte in segment start timer if not already running (think of timer as for oldest unack ed segment ) expiration interval: TimeOutInterval Timeout: retransmit segment that caused timeout restart timer Ack received: If it acknowledges previously unack ed segments update what is known to be ACK ed start timer if there are outstanding segments Chapter 3, slide: 64

TCP Seq. # s and ACKs Seq. # s: ACKs: byte stream number of first byte in segment s data Seq # of next byte expected from other side cumulative ACK User types C host ACKs receipt of echoed C Host A Host B host ACKs receipt of C, echoes back C simple telnet scenario time Chapter 3, slide: 65

Seq=92 timeout timeout Seq=92 timeout TCP: retransmission scenarios Host A Host B Host A Host B X loss time lost ACK scenario time premature timeout Chapter 3, slide: 66

timeout TCP retransmission scenarios (more) Host A Host B X loss time Cumulative ACK scenario Chapter 3, slide: 67

TCP ACK generation [RFC 1122, RFC 2581] Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already ACKed Arrival of in-order segment with expected seq #. One other segment has ACK pending Arrival of out-of-order segment higher-than-expect seq. #. Gap detected Arrival of segment that partially or completely fills gap TCP Receiver action Delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK Immediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byte Immediate send ACK, provided that segment starts at lower end of gap Chapter 3, slide: 68

Fast Retransmit Suppose: Packet 0 gets lost Q: When will retransmission of Packet 0 happen? Why does it happen at that time? A: typically at t 1 ; we think it is lost when timer expires Can we do better?? Think of what means to receive many duplicate ACKs: it means Packet 0 is lost Why wait until timeout when we know packet 0 is lost? => Fast retransmit => better performance Why several dupl. ACKs, not 1 or 2? Think of what happens when pkt0 arrives after pkt1 (delayed, not lost) Think of what happens when pkt0 arrives after pkt1 & 2, etc. Timer is set at t 0 Timer expires at t 1 client Chapter 3, slide: 69 server

Fast Retransmit: recap Receipt of duplicate ACKs indicate loss of segments Sender often sends many segments back-toback If segment is lost, there will likely be many duplicate ACKs. This is how TCP works: If sender receives 3 ACKs for the same data, it supposes that segment after ACK ed data was lost: Fast Retransmit: resend segment before timer expires better performance Chapter 3, slide: 70

Review questions Problem: TCP connection between A and B B received up to 248 bytes A sends back-to-back 2 segments to B with 40 and 60 bytes B ACKs every packet it receives Host A Host B Q1: What is Seq# in 1 st and 2 nd segments from A to B? Q2: Suppose: 1 st segment gets to B first. What is ACK # in 1 st ACK? Chapter 3, slide: 71

Review questions Problem: TCP connection between A and B B received up to 248 bytes A sends back-to-back 2 segments to B with 40 and 60 bytes B ACKs every packet it receives Host A Host B Q1: What is Seq# in 1 st and 2 nd segments from A to B? Q2: Suppose: 1 st segment gets to B first. What is ACK # in 1 st ACK? Q3: Suppose: 2 nd segment gets to B first. What is ACK # in 1 st ACK? What is ACK # in 2 nd ACK? Chapter 3, slide: 72

Review questions Problem: TCP connection between A and B B received up to 248 bytes A sends back-to-back 2 segments to B with 40 and 60 bytes B ACKs every packet it receives Host A Host B Q1: What is Seq# in 1 st and 2 nd segments from A to B? Q2: Suppose: 1 st segment gets to B first. What is ACK # in 1 st ACK? Q3: Suppose: 2 nd segment gets to B first. What is ACK # in 1 st ACK? What is ACK # in 2 nd ACK? Chapter 3, slide: 73

Review questions Problem: TCP connection between A and B B received up to 248 bytes A sends back-to-back 2 segments to B with 12 and 20 bytes, respectively B ACKs every packet it receives Now suppose: - 2 segments get to B in order. - 1 st ACK is lost - 2 nd ACK arrives after timeout Question: Fill out all packet Seq # s, and ACKs ACK # s in the timing diagram. Chapter 3, slide: 74