Fall 2012: FCM 708 Bridge Foundation I

Similar documents
Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

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

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

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

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

Chapter 3- parte B outline

Transport Layer: outline

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

CSCD 330 Network Programming

Chapter 3 Transport Layer

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

Lecture 8. TCP/IP Transport Layer (2)

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

CSE 4213: Computer Networks II

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Transport Layer: Outline

10 minutes survey (anonymous)

Computer Communication Networks Midterm Review

CS450 Introduc0on to Networking Lecture 14 TCP. Phu Phung Feb 13, 2015

CS Lecture 1 Review of Basic Protocols

Chapter 3 Transport Layer

CSC 4900 Computer Networks: TCP

Lecture 5. Transport Layer. Transport Layer 1-1

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

TCP (Part 2) Session 10 INST 346 Technologies, Infrastructure and Architecture

CC451 Computer Networks

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSC 8560 Computer Networks: TCP

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

CNT 6885 Network Review on Transport Layer

Computer Networking Introduction

Chapter III: Transport Layer

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

Transport Protocols and TCP

CSC 401 Data and Computer Communications Networks

Chapter III: Transport Layer

Chapter 3 Transport Layer

Flow and Congestion Control (Hosts)

Chapter 3 Transport Layer

Master Course Computer Networks IN2097

Computer Networking: A Top Down Approach

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

Go-Back-N. Pipelining: increased utilization. Pipelined protocols. GBN: sender extended FSM

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Foundations of Telematics

Chapter 3 outline. TDTS06 Computer networks. Principles of Reliable data transfer. Reliable data transfer: getting started

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

The Transport Layer: TCP & Reliable Data Transfer

Chapter 3 Transport Layer

Course on Computer Communication and Networks. Lecture 5 Chapter 3; Transport Layer, Part B

Chapter 3 Transport Layer

Computer Communication Networks Midterm Review

Distributed Systems. 5. Transport Protocols

LECTURE 3 - TRANSPORT LAYER

Distributed Systems. 5. Transport Protocols. Werner Nutt

Chapter 3 Transport Layer

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

Chapter 6 Transport Layer

RSC Part III: Transport Layer 3. TCP

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Master Course Computer Networks IN2097

TCP : Fundamentals of Computer Networks Bill Nace

Chapter 3 Transport Layer

Transmission Control Protocol

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CSCI Topics: Internet Programming Fall 2008

Chapter 3: Transport Layer

Pipelined protocols: overview

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Lecture 12: Transport Layer TCP again

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Chapter 3 Transport Layer

CS321: Computer Networks Congestion Control in TCP

Transport protocols. Transport Layer 3-1

Flow and Congestion Control Marcos Vieira

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

CS321: Computer Networks Error and Flow Control in TCP

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

rdt3.0: channels with errors and loss

Computer Networking Introduction

UNIT IV -- TRANSPORT LAYER

CS457 Transport Protocols. CS 457 Fall 2014

Lecture 3: The Transport Layer: UDP and TCP

Chapter 3: Transport Layer Part A

Chapter 3 Transport Layer

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Chapter 3 Review Questions

Our goals: understand d principles. behind transport layer protocols in the. Internet: layer services:

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

Chapter 3: Transport Layer

Transmission Control Protocol (TCP)

CSCD 330 Network Programming Winter 2015

Transcription:

Fall 2012: FCM 708 Bridge Foundation I Prof. Shamik Sengupta Instructor s Website: http://jjcweb.jjay.cuny.edu/ssengupta/ Blackboard Website: https://bbhosted.cuny.edu/

Intro to Computer Networking

Transport Layer

Transport services and protocols provide logical communication between app processes running on different hosts transport protocols run in end systems transport vs network layer services: network layer: data transfer between end systems transport layer: data transfer between processes application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical relies on network layer services

Transport-layer protocols Internet transport services: reliable, in-order unicast delivery (TCP) congestion flow control connection setup application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical unreliable ( best-effort ), unordered unicast or multicast delivery (UDP) application transport network data link physical

Principles of Reliable data transfer Sender needs to know whether receiver has received the packets Simplest implementation: stop and wait Sender sends one packet, then waits for receiver response

Stop & Wait protocol

World is not ideal Practical scenario: underlying channel can lose packets (data or ACKs) because of many reasons What if data packet gets lost? What if Ack packet gets lost?

World is not ideal Practical scenario: underlying channel can lose packets (data or ACKs) because of many reasons What if data packet gets lost? What if Ack packet gets lost? Approach: sender waits reasonable amount of time for ACK retransmits if no ACK received in this time

Stop & wait protocol with loss

New constraint: Stop & wait protocol with delay Practical scenario: What if Ack packet lost or just delayed (not lost) Approach: sender waits reasonable amount of time for ACK retransmits if no ACK received in this time if pkt (or ACK) just delayed (not lost): retransmission will be duplicate Sender, receiver need to specify seq # of pkt being handled

Stop & wait protocol with delay

Performance of stop-and-wait first packet bit transmitted, t = 0 last packet bit transmitted, t = L / R sender receiver Packet size = 8 Kb Transmission rate = 1 Mbps RTT = 30 sec. first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R U sender = L / R RTT + L / R =.008 30+.008 = 0.00027

Pipelined protocols Pipelining: sender allows multiple, in-flight, yet-to-beacknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver

Pipelining: increased utilization first packet bit transmitted, t = 0 last bit transmitted, t = L / R sender receiver RTT ACK arrives, send next packet, t = RTT + L / R first packet bit arrives last packet bit arrives, send ACK last bit of 2 nd packet arrives, send ACK last bit of 3 rd packet arrives, send ACK U sender = 3 * L / R RTT + L / R =.024 30.008 Increase utilization by a factor of 3! = 0.0008 Two generic forms of pipelined protocols: go-back-n, selective repeat

Go-Back-N Sender: k-bit seq # in pkt header window of up to N, consecutive unack ed pkts allowed ACK(n): ACKs all pkts up to, including seq # n - cumulative ACK timer for each in-flight pkt timeout(n): retransmit pkt n and all higher seq # pkts in window

GBN in action

Selective Repeat receiver individually acknowledges all correctly received pkts buffers pkts, as needed, for eventual in-order delivery to upper layer sender only resends pkts for which ACK not received sender timer for each unacked pkt sender window N consecutive seq # s again limits seq #s of sent, unacked pkts

Selective repeat in action

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 point-to-point: one sender, one receiver reliable, in-order byte steam: no message boundaries pipelined 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 20

TCP seq. # s and ACKs Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side User types C Host A Host B host ACKs receipt of C, echoes back C host ACKs receipt of echoed C time 21

TCP: retransmission scenarios Host A Host B Host A Host B timeout X loss Seq=100 timeout Seq=92 timeout time lost ACK scenario time premature timeout, cumulative ACKs 22

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 23

TCP Round Trip Time and Timeout EstimatedRTT = (1- α)*estimatedrtt + α*samplertt Exponential weighted moving average influence of past sample decreases exponentially fast typical value: α = 0.125 24

TCP Round Trip Time and Timeout Setting the timeout EstimtedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT: DevRTT = (1-β)*DevRTT + β* SampleRTT-EstimatedRTT (typically, β = 0.25) Then set timeout interval: TimeoutInterval = EstimatedRTT + 4*DevRTT 25

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 back-to-back if segment is lost, there will likely be many duplicate ACKs for that segment If sender receives 3 ACKs for same data, it assumes that segment after ACKed data was lost: fast retransmit: resend segment before timer expires 26

Host A Host B triple duplicate ACKs seq # x1 seq # x2 seq # x3 seq # x4 seq # x5 X ACK x1 ACK x1 ACK x1 ACK x1 timeout time 27

TCP segment structure 32 bits source port # dest port # head len sequence number acknowledgement number not used checksum U A P R S F Receive window Urg data pointer Min 20bytes Options (variable length) application data (variable length)

TCP Connection Management Three way handshake: Recall: TCP sender, receiver establish connection before exchanging data segments initialize TCP variables: seq. #s buffers, flow control info (e.g. RcvWindow) Step 1: client host sends TCP SYN segment to server specifies initial seq # no data Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server initial seq. # Step 3: client receives SYNACK, replies with ACK segment, which may contain data

TCP Connection Establishment aida.poly.edu mng.poly.edu SYN (SeqNo = x) SYN (SeqNo = y, AckNo = x + 1 ) (SeqNo = x+1, AckNo = y + 1 )

TCP Connection Management (cont.) Closing a connection: client server Step 1: client end system sends TCP FIN control segment to server Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN. close timed wait closed close

TCP Connection Management (cont.) Step 3: client receives FIN, replies with ACK. closing client server Step 4: server, receives ACK. Connection closed. Note: with small modification, can handle simultaneous FINs. closing timed wait closed closed

Principles of Congestion Control Congestion: informally: too many sources sending too much data too fast for network to handle results: lost packets (buffer overflow at routers) long delays (queuing in router buffers)

Approaches towards congestion control two broad approaches towards congestion control: end-end congestion control: no explicit feedback from network congestion inferred from endsystem observed loss, delay approach taken by TCP network-assisted congestion control: routers provide feedback to end systems explicit rate sender should send at Network-layer mechanism for congestion control Traffic shaping / traffic policing

TCP congestion control: goal: TCP sender should transmit as fast as possible, but without congesting network Q: how to find rate just below congestion level decentralized: each TCP sender sets its own rate, based on implicit feedback: ACK: segment received (a good thing!), network not congested, so increase sending rate lost segment: assume loss due to congested network, so decrease sending rate

TCP congestion control: bandwidth probing probing for bandwidth : increase transmission rate on receipt of ACK, until eventually loss occurs, then decrease transmission rate continue to increase on ACK, decrease on loss (since available bandwidth is changing, depending on other connections in network) ACKs being received, so increase rate X loss, so decrease rate sending rate X X X X TCP s sawtooth behavior time Q: how fast to increase/decrease? details to follow

TCP congestion control: two phases slow start congestion avoidance important variables: Congestion window (cwnd) threshold: defines threshold between two slow start phase, congestion control phase

TCP Slow Start Host A Host B RTT time

TCP: congestion avoidance Increasing sending rate: How far would the doubling of cwnd go? What if a loss happens? Decrease sending rate Set the threshold value to half of current cwnd Till, it reaches a threshold After that it increases linearly loss: decrease cwnd to 1 and start the slow-start again

TCP Congestion Control: more details segment loss event: reducing cwnd timeout: no response from receiver cut cwnd to 1 TCP Tahoe principle 3 duplicate ACKs: at least some segments getting through (recall fast retransmit) cut cwnd in half, less aggressively than on timeout TCP Reno greedy heuristic

Popular flavors of TCP cwnd window size (in segments) ssthresh TCP Tahoe TCP Reno ssthresh Transmission round

Summary: TCP Congestion Control when cwnd < ssthresh, sender in slow-start phase, window grows exponentially. when cwnd >= ssthresh, sender is in congestionavoidance phase, window grows linearly. when triple duplicate ACK occurs, ssthresh set to cwnd/2, cwnd set to ~ ssthresh when timeout occurs, ssthresh set to cwnd/2, cwnd set to 1 MSS.

TCP Congestion Control Numerical example: Assume TCP Tahoe Initial ssthreshold = 14 First loss occurrence after 9 transmissions. What would be the current congestion window and ssthreshold?