Sliding Window Protocols, Connection Management, and TCP Reliability

Similar documents
CSCE 463/612 Networks and Distributed Processing Spring 2018

CSC 401 Data and Computer Communications Networks

Rdt2.0: channel with packet errors (no loss!)

Chapter 3 Transport Layer

Chapter III: Transport Layer

Chapter 3 Transport Layer

CMSC 332 Computer Networks Reliable Data Transfer

CSC 4900 Computer Networks: Reliable Data Transport

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

CS 3516: Advanced Computer Networks

rdt2.0 has a fatal flaw!

Reliable Transport : Fundamentals of Computer Networks Bill Nace

CSE 461: Introduction to Computer Communication Networks. Chunjong Park

Chapter 3: Transport Layer

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

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

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

Chapter 3: Transport Layer Part A

Lecture 11: Transport Layer Reliable Data Transfer and TCP

CSCI Topics: Internet Programming Fall 2008

The Transport Layer Multiplexing, Error Detection, & UDP

Transport layer. Our goals: Understand principles behind transport layer services: Learn about transport layer protocols in the Internet:

Transport layer: Outline

Computer Networking. Reliable Transport. Reliable Transport. Principles of reliable data transfer. Reliable data transfer. Elements of Procedure

Chapter 3 Transport Layer

TDTS06: Computer Networks

Reliable Data Transfer

Chapter 3 Transport Layer

RSC Part III: Transport Layer 3. TCP

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

Lecture 5. Transport Layer. Transport Layer 1-1

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

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

CSCD 330 Network Programming

CSC 4900 Computer Networks: TCP

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

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

Computer Networking Introduction

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

Chapter III: Transport Layer

Chapter 3 Transport Layer

Chapter 3 Transport Layer

NWEN 243. Networked Applications. Layer 4 TCP and UDP

CS 655 System and Network Architectures and Implementation. Module 3 - Transport

Chapter 3 Transport Layer

CSC 8560 Computer Networks: Transport Layer

The Transport Layer: TCP & Reliable Data Transfer

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

Chapter 3 Transport Layer

Transport Layer: outline

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

Transport Layer: Outline

CSC 401 Data and Computer Communications Networks

Lecture 07 The Transport Layer (TCP & UDP) Dr. Anis Koubaa

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

Computer Networking: A Top Down Approach

Computer Networks & Security 2016/2017

Chapter 3 Transport Layer

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

Fall 2012: FCM 708 Bridge Foundation I

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

CNT 6885 Network Review on Transport Layer

TCP : Fundamentals of Computer Networks Bill Nace

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

Distributed Systems. 5. Transport Protocols

Lecture 7: Flow Control"

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Distributed Systems. 5. Transport Protocols. Werner Nutt

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

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

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

CSC358 Week 5. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

CC451 Computer Networks

The GBN sender must respond to three types of events:

Chapter 3 outline. Chapter 3: Transport Layer. Transport vs. network layer. Transport services and protocols. Internet transport-layer protocols

Lecture 12: Transport Layer TCP again

Chapter 3 Transport Layer

Chapter 2: outline. 2.1 principles of network applications app architectures app requirements

Principles of Reliable Data Transfer

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

LECTURE 3 - TRANSPORT LAYER

The Transport Layer Reliability

Chapter 3: Transport Layer

Chapter 3: Transport Layer

10 minutes survey (anonymous)

Chapter 3 Transport Layer

Transport Layer. CMPS 4750/6750: Computer Networks

Lecture 10: Transpor Layer Principles of Reliable Data Transfer

Transport Layer Review

Computer Networks. 3.Transport Layer. Transport Layer - 1

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

CSE 4213: Computer Networks II

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

Computer Communication Networks Midterm Review

COMP211 Chapter 3 Transport Layer

Chapter 3: Transport Layer

Pipelined protocols: overview

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

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

Transcription:

1 Sliding Window Protocols, Connection Management, and TCP Reliability

2 Outline Review Sliding window protocols Go-back-n Selective repeat Connection management for reliability TCP reliability Overview RTT measurement

3 Review: Services Provided by Transport Layer Multiplexing/demultiplexing Reliable data transfer Flow control Congestion control

rdt3.0 Sender 4

Another Look at rdt3.0 sender receiver data 0 waiting for 0 sending 0 data 0 ACK for 0 waiting for 1 sending 1 data 1 waiting for 0 5

6 A Summary of Questions How to improve the performance of rdt3.0? What if there are duplication and reordering? What about duplex reliable data transfer? How to determine the right timeout value?

7 Outline Review Sliding window protocols Go-back-n Selective repeat Connection management TCP reliability Overview RTT measurement

8 Sliding Window Protocols: Pipelining Pipelining: sender allows multiple, in-flight, yet-to-beacknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver Two generic forms of pipelined protocols: go-back-n, selective repeat

9 Go-Back-n Sender: k-bit seq # in pkt header window of up to w, consecutive unack ed pkts allowed w ACK(n): ACKs all pkts up to, including seq # n - cumulative ACK Note: ACK(n) can mean two things: I have received upto and include n, or I am waiting for n timer for each in-flight pkt or the packet at base only timeout(n): retransmit pkt n and all higher seq # pkts in window

GBN Sender: Extended FSM w { block sender if (new packets ACKed) { advance base; if (more packets waiting) send more packets } if (base == nextseqnum) stop_timer else start_timer for the packet at new base 10

11 GBN Receiver: Extended FSM Receiver simple: ACK-only: always send ACK for correctly-received pkt with highest in-order seq # need only remember expectedseqnum out-of-order pkt: discard (don t buffer) -> no receiver buffering! ACK pkt with highest in-order seq #

12 GBN in Action window size = 4

13 Selective Repeat Sender window Window size N: N consecutive unacked seq # s Receiver individually acknowledges all correctly received pkts ACK(n) means received packet with seq# n only Buffer size at receiver: window size Sender only resends pkts for which ACK not received sender timer for each unacked pkt

14 Selective Repeat: Sender, Receiver Windows w w

15 Selective Repeat sender data from above : unacked packets is less than window size w, send; otherwise block app. timeout(n): resend pkt n, restart timer ACK(n) in [sendbase,sendbase+w-1]: mark pkt n as received update sendbase to the first packet unacked receiver pkt n in [rcvbase, rcvbase+w-1] send ACK(n) if (out-of-order) mark and buffer pkt n else /*in-order*/ deliver any in-order packets otherwise: ignore

Selective Repeat: Ambiguity 16 Example: seq # s: 0, 1, 2, 3 window size=3 receiver sees no difference in two scenarios! incorrectly passes duplicate data as new in (a) Q: what relationship between seq # size and window size?

17 A Summary of Questions How to improve the performance of rdt3.0? sliding window protocols What about duplex reliable data transfer? What if there are duplication and reordering? How to determine the right timeout value?

18 Outline Review Sliding window protocols Go-back-n Selective repeat Connection management TCP reliability Overview RTT measurement

19 Connection Management: Setup The previous protocols assume we start with sequence number 0. Is there any problem with this approach? The objectives of connection setup agree on initial sequence numbers agree on other initial parameters

SYN: indicates connection setup 20 Three Way Handshake (TWH) [Tomlinson 1975] Host A Host B SYN(seq=x) ACK(seq =x), SYN(seq =y) ACK(seq=y) DATA(seq =x+1)

21 Scenarios with Duplicate Request Host A Host B no such request SYN(seq=x) ACK(seq =x), SYN(seq =y) REJECT(seq =y) accept? reject

22 Scenarios with Duplicate Request/Reply Host A Host B no such request SYN(seq=x) ACK(seq =x), SYN(seq =y) ACK(seq=z) accept? reject REJECT(seq=y)

23 Connection Management: Close Host A Host B DATA DATA FIN no data is delivered after FIN

The First Attempt: Agreeing on Connection Close client server init. close I am done. Are you done too? close I am done too. Goodbye! close Is this approach right? 24

The two blue armies need to agree on whether or not they will attack the white army. They achieve agreement by sending messengers to the other side. If they both agree, attack. Otherwise, no. Note that a messenger can be captured! Can they achieve agreement? 25 General Case: The Two-Army Problem

26 Four Way Teardown Host A Host B close FIN ACK FIN close timed wait closed ACK