No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Similar documents
Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

ECE697AA Lecture 3. Today s lecture

UNIT IV -- TRANSPORT LAYER

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

Chapter 3: Transport Layer Part A

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

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Announcement. Homework 1 due last night, how is that? Will discuss some problems in the lecture next week

Chapter 3: Transport Layer

TDTS06: Computer Networks

Communication Networks

NWEN 243. Networked Applications. Layer 4 TCP and UDP

The Transmission Control Protocol (TCP)

Lecture 5. Transport Layer. Transport Layer 1-1

Computer Communication Networks Midterm Review

The Transport Layer Multiplexing, Error Detection, & UDP

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

ECE 650 Systems Programming & Engineering. Spring 2018

The Transport Layer: TCP & Reliable Data Transfer

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

CSCD 330 Network Programming

Lecture 3: The Transport Layer: UDP and TCP

COSC4377. Useful Linux Tool: screen

Question 1 (6 points) Compare circuit-switching and packet-switching networks based on the following criteria:

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

User Datagram Protocol

TSIN02 - Internetworking

Introduction to Protocols

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

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

CS 640 Introduction to Computer Networks. Role of data link layer. Today s lecture. Lecture16

CS457 Transport Protocols. CS 457 Fall 2014

CS 4390 Computer Networks. Transport Services and Protocols

CSCD 330 Network Programming Winter 2015

TCP : Fundamentals of Computer Networks Bill Nace

Reliable Data Transfer

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

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

Reliable Transport : Fundamentals of Computer Networks Bill Nace

TSIN02 - Internetworking

Lecture 9: Transpor Layer Overview and UDP

Transport Layer Review

Reliable Transport I: Concepts and TCP Protocol

Internet and Intranet Protocols and Applications

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

NT1210 Introduction to Networking. Unit 10

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

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

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

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

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

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

Lecture 10: Transpor Layer Principles of Reliable Data Transfer

Principles of Reliable Data Transfer

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

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

Lecture (11) OSI layer 4 protocols TCP/UDP protocols

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

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

TCP: Flow and Error Control

COMPUTER NETWORK. Homework #2. Due Date: April 12, 2017 in class

TSIN02 - Internetworking

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

TSIN02 - Internetworking

Outline. CS5984 Mobile Computing

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Transport Protocols & TCP TCP

ELEN Network Fundamentals Lecture 15

CSCD 330 Network Programming

Fall 2012: FCM 708 Bridge Foundation I

CSC 401 Data and Computer Communications Networks

UDP, TCP, IP multicast

Reliable Transport I: Concepts and TCP Protocol

Lecture 7: Flow Control"

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

CSCI Topics: Internet Programming Fall 2008

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

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

Chapter 3 Transport Layer

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

Data Link Control Protocols

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Unit 2.

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

Transport Protocols and TCP: Review

User Datagram Protocol (UDP):

CC451 Computer Networks

05 Transmission Control Protocol (TCP)

CS4700/CS5700 Fundamentals of Computer Networks

EE 122: IP Forwarding and Transport Protocols

Chapter 3 Transport Layer

Sirindhorn International Institute of Technology Thammasat University

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

ECE 435 Network Engineering Lecture 10

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

The GBN sender must respond to three types of events:

CS 43: Computer Networks. 16: Reliable Data Transfer October 8, 2018

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Chapter 24. Transport-Layer Protocols

Transcription:

Announcements No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6 Copyright c 2002 2017 UMaine School of Computing and Information S 1 / 33

COS 140: Foundations of C S Transport-Layer Fall 2017 This lecture draws heavily from Kurose & Ross (2008): C Networks: A Top-Down Approach Copyright c 2002 2017 UMaine School of Computing and Information S 2 / 33

Transport layer Ports & sockets Types Recall: Protocol is a description of a pattern of interaction between agents Most common: TCP/IP Copyright c 2002 2017 UMaine School of Computing and Information S 3 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Application: network applications (e.g., Web clients/servers), application protocols (e.g., HTTP) Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Application: network applications (e.g., Web clients/servers), application protocols (e.g., HTTP) Transport: Delivery of application messages between applications: error correction, reliable transport (some protocols), etc. Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Application: network applications (e.g., Web clients/servers), application protocols (e.g., HTTP) Transport: Delivery of application messages between applications: error correction, reliable transport (some protocols), etc. Network: Delivery of transport-layer messages: routing, etc. Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Application: network applications (e.g., Web clients/servers), application protocols (e.g., HTTP) Transport: Delivery of application messages between applications: error correction, reliable transport (some protocols), etc. Network: Delivery of transport-layer messages: routing, etc. Data link: Delivery of network-layer messages e.g., forwarding to next router/host (e.g., Ethernet, WiFi, link layers on routers) Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Review: Layered protocols Transport layer Ports & sockets Types Recall: Layered network stack Application: network applications (e.g., Web clients/servers), application protocols (e.g., HTTP) Transport: Delivery of application messages between applications: error correction, reliable transport (some protocols), etc. Network: Delivery of transport-layer messages: routing, etc. Data link: Delivery of network-layer messages e.g., forwarding to next router/host (e.g., Ethernet, WiFi, link layers on routers) Physical: Moving the bits (Ethernet has variants for different media) Copyright c 2002 2017 UMaine School of Computing and Information S 4 / 33

Layered protocols Transport layer Ports & sockets Types As message goes from top bottom: Broken into pieces Each piece has its own header added at each level Copyright c 2002 2017 UMaine School of Computing and Information S 5 / 33

Transport layer Transport layer Ports & sockets Types Responsible for delivery of application-layer messages between processes Interacts with: application and network layers Divides/encapsulates application messages as segments Possibly: Error correction Reliable delivery Congestion control Connectionless (e.g., UDP) versus connection-oriented (e.g., TCP) Copyright c 2002 2017 UMaine School of Computing and Information S 6 / 33

Ports and sockets Transport layer Ports & sockets Types Network stack manages set of ports on host: Interface of host to outside world Logical, numbered connection points Some are well-known ports (e.g., email (25), Web (80)) Some are usable by processes on the fly Sockets: virtual connections between a process and the transport layer (and thus to a port) Each application process talks to (e.g.) TCP via a socket Can have multiple sockets attached to a port E.g.: Web server Transport layer: multiplexing/demultiplexing of sockets ports Copyright c 2002 2017 UMaine School of Computing and Information S 7 / 33

Ports and sockets Transport layer Ports & sockets Types Copyright c 2002 2017 UMaine School of Computing and Information S 8 / 33

Connection-oriented and connectionless protocols Transport layer Ports & sockets Types Connectionless protocols: E.g., User Datagram Protocol (UDP) Send segments ( datagrams ) between application layers No notion of a continuous connection think US Mail Maybe some error checking embedded No error correcting Not reliable Copyright c 2002 2017 UMaine School of Computing and Information S 9 / 33

Connection-oriented and connectionless protocols Transport layer Ports & sockets Types Connectionless protocols: E.g., User Datagram Protocol (UDP) Send segments ( datagrams ) between application layers No notion of a continuous connection think US Mail Maybe some error checking embedded No error correcting Not reliable Connection-oriented protocols: E.g., Transmission Control Protocol (TCP) Connection: a virtual pipeline between applications Think phone, but no real connection Reliable transport protocols Copyright c 2002 2017 UMaine School of Computing and Information S 9 / 33

Very simple Possibly segment application data Possibly add error-checking code (e.g., CRC) Just pass along to network layer Copyright c 2002 2017 UMaine School of Computing and Information S 10 / 33

Reliable transport protocols Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining More complex Have to deal with: bitwise errors lost segments out-of-order segments Can conceptualize as state machines We ll look at increasingly-complex variants Copyright c 2002 2017 UMaine School of Computing and Information S 11 / 33

Using a reliable channel Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Simplest Sender: Wait Request from application layer Create packet (segment) Send packet Receiver: Wait Receive packet Extract data Deliver to application Copyright c 2002 2017 UMaine School of Computing and Information S 12 / 33

Using a channel with bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Problem: Few channels are reliable Simple problem: errors in some bits Detect this with: parity, cyclic redundancy checks (CRC) The question is: what to do when detected? Copyright c 2002 2017 UMaine School of Computing and Information S 13 / 33

Using a channel with bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining For this, need additional messages: ACK: to acknowledge correct receipt NAK: negative acknowledgment Recipient checks the packet, sends the appropriate message in reply Problem: ACKs and NAKs can be garbled, too! Copyright c 2002 2017 UMaine School of Computing and Information S 14 / 33

A protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Sender: Wait for request "send" request Create segment Send segment Wait for ACK/NAK Receive NAK Send segment again Receive ACK Copyright c 2002 2017 UMaine School of Computing and Information S 15 / 33

A protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Recipient: Corrupt segment Create NAK segment Send segment Wait for message Good segment Extract data Deliver data Create ACK segment Send segment Copyright c 2002 2017 UMaine School of Computing and Information S 16 / 33

A protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Recipient: Corrupt segment Create NAK segment Send segment Wait for message Good segment Extract data Deliver data Create ACK segment Send segment Any problems with this? Copyright c 2002 2017 UMaine School of Computing and Information S 16 / 33

A protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Recipient: Corrupt segment Create NAK segment Send segment Wait for message Good segment Extract data Deliver data Create ACK segment Send segment Any problems with this? Yes! What about errors in ACK/NAK? Copyright c 2002 2017 UMaine School of Computing and Information S 16 / 33

A better protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Have the sender number its segments Receiver can then determine if the packet received is a retransmission ACK/NAK don t need to say what they re ACK ing (or not) since no messages are lost, garbled or okay, the last ACK/NAK was for its last message For this simple protocol, we only need two sequence numbers, 0 and 1 (a bit) only one packet being dealt with at a time. Copyright c 2002 2017 UMaine School of Computing and Information S 17 / 33

A better protocol for handling bit errors Sender: "send" request Create segment, #0 Send segment Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Receive ACK Wait for request (0) Wait for ACK/NAK (1) Wait for ACK/NAK (0) Wait for request (1) Receive NAK or corrupt segment Send segment again Receive ACK Receive NAK or corrupt segment Send segment "send" request Create segment, #1 Send segment Copyright c 2002 2017 UMaine School of Computing and Information S 18 / 33

A better protocol for handling bit errors Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Recipient: Receive corrupt packet Create NAK, send Receive segment, #1 Create ACK, send Wait for segment Receive segment, #0 Extract data, deliver Create ACK, send Wait for segment Receive segment, #1 Extract data, deliver Create ACK, send Receive corrupt packet Create NAK, send Receieve segment, #0 Create ACK, send Copyright c 2002 2017 UMaine School of Computing and Information S 19 / 33

Using a lossy channel Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Even harder: What if the channel can lose some messages? ACKs and NAKs could also be lost or garbled. Need timers, now if haven t received an ACK after some time, retransmit How to choose the time? Copyright c 2002 2017 UMaine School of Computing and Information S 20 / 33

Using a lossy channel Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Even harder: What if the channel can lose some messages? ACKs and NAKs could also be lost or garbled. Need timers, now if haven t received an ACK after some time, retransmit How to choose the time? At least round trip delay + some Copyright c 2002 2017 UMaine School of Computing and Information S 20 / 33

Protocol for lossy channels Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Sender: Receive segment Receive ACK Stop timer Timeout Resend segment Start timer Wait for request (0) Wait for ACK (1) "send" request Create segment, #0 Send segment Start timer Wait for ACK (0) Wait for request (1) Receive corrupt segment or ACK(1) Timeout Resend segment Start timer Receive ACK(0) Stop timer Receive segment Receive corrupt segment or ACK(0) "send" request Create segment, #1 Send segment Start timer Copyright c 2002 2017 UMaine School of Computing and Information S 21 / 33

Pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Problem: reliable, but inefficient Suppose it takes 5 ms for message to propagate from sender to receiver, or vice versa a 1 Gbps channel, and time to actually put the message on the channel is negligible Time to send, say, a 1 KB message: Send message: 5 ms Send ACK: 5 ms Total 10 ms/message Transfer rate = 1 KB/10 ms = only 100 KB/s! Copyright c 2002 2017 UMaine School of Computing and Information S 22 / 33

Pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Better idea: don t wait for ACK before sending other messages Now can havenmessages in the pipe at once. How many, potentially? Copyright c 2002 2017 UMaine School of Computing and Information S 23 / 33

Pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Better idea: don t wait for ACK before sending other messages Now can havenmessages in the pipe at once. How many, potentially? If 1 Gbps channel, 1 KB messages, then a message takes 8Kb 1Gb/s = 213 2 30s = 2 17 s 7.6µs Copyright c 2002 2017 UMaine School of Computing and Information S 23 / 33

Pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining Better idea: don t wait for ACK before sending other messages Now can havenmessages in the pipe at once. How many, potentially? If 1 Gbps channel, 1 KB messages, then a message takes So there can be 5ms 7.6µs In practice, have (far) fewer: 8Kb 1Gb/s = 213 2 30s = 2 17 s 7.6µs 658 messages in the pipe at once Window: what can be sent before an ACK received Receive an ACK: slide window, can transmit more Copyright c 2002 2017 UMaine School of Computing and Information S 23 / 33

Recovery in pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining In send-and-wait protocols, pretty clear what you re ACKing What about pipelined protocols? Have to mark ACK with what is being acknowledged What to do when one is missing/corrupt? Copyright c 2002 2017 UMaine School of Computing and Information S 24 / 33

Recovery in pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining In send-and-wait protocols, pretty clear what you re ACKing What about pipelined protocols? Have to mark ACK with what is being acknowledged What to do when one is missing/corrupt? Go-Back-N: When missing one (corrupt or timeout), repeat it and all others after it Copyright c 2002 2017 UMaine School of Computing and Information S 24 / 33

Recovery in pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining In send-and-wait protocols, pretty clear what you re ACKing What about pipelined protocols? Have to mark ACK with what is being acknowledged What to do when one is missing/corrupt? Go-Back-N: When missing one (corrupt or timeout), repeat it and all others after it Selective repeat: Just repeat the one missing Copyright c 2002 2017 UMaine School of Computing and Information S 24 / 33

Recovery in pipelining Using a reliable channel Bit errors Bit error protocol Lossy channels Lossy protocol Pipelining Recovery in pipelining In send-and-wait protocols, pretty clear what you re ACKing What about pipelined protocols? Have to mark ACK with what is being acknowledged What to do when one is missing/corrupt? Go-Back-N: When missing one (corrupt or timeout), repeat it and all others after it Selective repeat: Just repeat the one missing GBN simpler, not as efficient Copyright c 2002 2017 UMaine School of Computing and Information S 24 / 33

Connection-oriented, reliable data transport protocol Can handle bit errors, lossy channels Full-duplex Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 25 / 33

TCP segment structure Segments Sequence numbers Connection initiation Header + data Source port number, destination port number Sequence number ACK number Checksum Header length field, flags, options, some other stuff Copyright c 2002 2017 UMaine School of Computing and Information S 26 / 33

Sequence numbers Segments Sequence numbers Connection initiation Each half of the conversation is considered an ordered sequence of bytes Sequence number of a segment is the byte number of the first byte in the segment not the segment number! ACK number: The next byte expected from the sender These are cumulative acknowledgments Copyright c 2002 2017 UMaine School of Computing and Information S 27 / 33

Connection initiation: three-way handshake Segments Sequence numbers Connection initiation First: Client sends a special segment ( SYN segment ) to request connection No application data contained SYN bit in header = 1 Random sequence number Second: Server sets up its side of the connection and sends message 2 ( SYNACK segment ) Allocates buffers, variables Response segment: no application data SYN = 1, ACK = client sequence number + 1, random sequence number Copyright c 2002 2017 UMaine School of Computing and Information S 28 / 33

Connection initiation: three-way handshake Segments Sequence numbers Connection initiation Third: Client sets up its side, sends another message Allocates client-side buffers, variables Segment has SYN = 0, server s sequence number +1 as ACK Can carry application data (payload) Copyright c 2002 2017 UMaine School of Computing and Information S 29 / 33

Handling problems Corrupt segment received (bitwise error) Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Corrupt segment received (bitwise error) don t ACK Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Segments Sequence numbers Connection initiation Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Just discard data, re-ack Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Segments Sequence numbers Connection initiation Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Just discard data, re-ack Timeout Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Segments Sequence numbers Connection initiation Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Just discard data, re-ack Timeout Why? Lost segment Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Segments Sequence numbers Connection initiation Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Just discard data, re-ack Timeout Why? Lost segment Single timer for all messages to reduce overhead Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems Segments Sequence numbers Connection initiation Corrupt segment received (bitwise error) don t ACK Receive duplicate segment Why? Lost ACK Just discard data, re-ack Timeout Why? Lost segment Single timer for all messages to reduce overhead Retransmit segment Copyright c 2002 2017 UMaine School of Computing and Information S 30 / 33

Handling problems ACK received for segment after one it s expecting an ACK for Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 31 / 33

Handling problems Segments Sequence numbers Connection initiation ACK received for segment after one it s expecting an ACK for Not really a problem Cumulative acknowledgment, so previous segments received, too Copyright c 2002 2017 UMaine School of Computing and Information S 31 / 33

Handling problems Segment received out of order Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 32 / 33

Handling problems Segment received out of order One reason: a segment was lost Segments Sequence numbers Connection initiation Copyright c 2002 2017 UMaine School of Computing and Information S 32 / 33

Handling problems Segments Sequence numbers Connection initiation Segment received out of order One reason: a segment was lost For this, send ACK, but with next byte expected being the missing segment Copyright c 2002 2017 UMaine School of Computing and Information S 32 / 33

Handling problems Segments Sequence numbers Connection initiation Segment received out of order One reason: a segment was lost For this, send ACK, but with next byte expected being the missing segment Another reason: segment tied up in network Copyright c 2002 2017 UMaine School of Computing and Information S 32 / 33

Handling problems Segments Sequence numbers Connection initiation Segment received out of order One reason: a segment was lost For this, send ACK, but with next byte expected being the missing segment Another reason: segment tied up in network For this, ACK with next real byte expected, necessarily one right after this one Copyright c 2002 2017 UMaine School of Computing and Information S 32 / 33

Other transport layer topics How to choose timeouts Flow control Congestion control When to use UDP vs TCP Copyright c 2002 2017 UMaine School of Computing and Information S 33 / 33