CS 31204: Computer Networks – The Internet Transport Protocols
INDIAN INSTITUTE OF TECHNOLOGY
KHARAGPUR
Department of Computer Science and Engineering
Abhijnan Chakraborty
Transmission Control Protocol (TCP)
Indian Institute of Technology Kharagpur
TCP Service Model
Indian Institute of Technology Kharagpur
TCP Service Model
Indian Institute of Technology Kharagpur
The TCP Protocol – The Header
Source: Computer Networks (5th Edition) by Tanenbaum, Wetherell
Indian Institute of Technology Kharagpur
TCP Sequence Number and Acknowledgement Number
Indian Institute of Technology Kharagpur
TCP Segments
Indian Institute of Technology Kharagpur
How a TCP Segment is Created
Indian Institute of Technology Kharagpur
Challenges in TCP Design
Indian Institute of Technology Kharagpur
Window Size field in the TCP Segment Header
Indian Institute of Technology Kharagpur
TCP Connection Establishment
Indian Institute of Technology Kharagpur
TCP Connection Release
Indian Institute of Technology Kharagpur
TCP State Transition Diagram – Connection Modeling
Event/Action
Dashed: Server
Solid: Client
Source: Computer Networks (5th Edition) by Tanenbaum, Wetherell
Indian Institute of Technology Kharagpur
TCP State Transition Diagram – Connection Modeling
Event/Action
Dashed: Server
Solid: Client
Source: Computer Networks (5th Edition) by Tanenbaum, Wetherell
Indian Institute of Technology Kharagpur
TCP Sliding Window
Source: Computer Networks (5th Edition) by Tanenbaum, Wetherell
Indian Institute of Technology Kharagpur
Delayed Acknowledgements
Indian Institute of Technology Kharagpur
Nagle’s Algorithm
Indian Institute of Technology Kharagpur
Silly Window Syndrome
Source: Computer Networks (5th Edition) by Tanenbaum, Wetherell
Indian Institute of Technology Kharagpur
Handling Short Segments – Sender and Receiver Together
Indian Institute of Technology Kharagpur
Handling Out of Order in TCP
Indian Institute of Technology Kharagpur
TCP Timer Management
Indian Institute of Technology Kharagpur
RTT at Data Link Layer vs RTT at Transport Layer
Data Link Layer
Transport Layer
Indian Institute of Technology Kharagpur
RTT Estimation at the Transport Layer
Indian Institute of Technology Kharagpur
Problem with EWMA
Indian Institute of Technology Kharagpur
RTO Estimation
Indian Institute of Technology Kharagpur
Karn’s Algorithm
Indian Institute of Technology Kharagpur
Other TCP Timers
Indian Institute of Technology Kharagpur
TCP Congestion Control
Indian Institute of Technology Kharagpur
1986 Congestion Collapse
Indian Institute of Technology Kharagpur
Adjust CWnd based on AIMD
Indian Institute of Technology Kharagpur
Increase Rate Exponentially at the Beginning – The Slow Start
Indian Institute of Technology Kharagpur
TCP Slow Start
Indian Institute of Technology Kharagpur
Slow Start Threshold
Indian Institute of Technology Kharagpur
Additive Increase (Congestion Avoidance)
Indian Institute of Technology Kharagpur
Additive Increase – Packet Wise Approximation
Indian Institute of Technology Kharagpur
Triggering a Congestion
Indian Institute of Technology Kharagpur
Fast Retransmission – TCP Tahoe
Indian Institute of Technology Kharagpur
Fast Recovery – TCP Reno
Indian Institute of Technology Kharagpur
Fast Recovery – TCP Reno
Indian Institute of Technology Kharagpur
Fast Recovery – TCP Reno
Indian Institute of Technology Kharagpur
User Datagram Protocol (UDP)
Indian Institute of Technology Kharagpur
UDP Datagram Format
Indian Institute of Technology Kharagpur
UDP versus TCP
Indian Institute of Technology Kharagpur
UDP versus TCP
Indian Institute of Technology Kharagpur
TCP and UDP Checksum Calculation
Indian Institute of Technology Kharagpur
UDP Checksum
Transmitted: 5 6 11
Goal: Detect errors (i.e., flipped bits) in transmitted segment
Received: 4 6 11
1st number
2nd number
sum
receiver-computed
checksum
sender-computed
checksum (as received)
=
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
UDP Checksum
Sender:
Receiver:
Goal: detect errors (i.e., flipped bits) in transmitted segment
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
Internet Checksum: An Example
example: add two 16-bit integers
sum
checksum
Note: when adding numbers, a carryout from the most significant bit needs to be added to the result
1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
wraparound
1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
Internet Checksum: Not the Best Protection
example: add two 16-bit integers
sum
checksum
1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
wraparound
1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
0 1
1 0
Even though numbers have changed (bit flips), no change in checksum!
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
Middleware Model
Indian Institute of Technology Kharagpur
Quick UDP Internet Connections (QUIC)
Indian Institute of Technology Kharagpur
How Does a Web Page Look Like?
Indian Institute of Technology Kharagpur
HTTP/1.0 -> HTTP/1.1
Indian Institute of Technology Kharagpur
HTTP/1.1 - Head of Line (HoL) Blocking
Indian Institute of Technology Kharagpur
HTTP/1.1: HOL despite Pipelining
HTTP 1.1: client requests 1 large object (e.g., video file) and 3 smaller objects
client
server
GET O1
GET O2
GET O3
GET O4
O1
O2
O3
O4
object data requested
O1
O2
O3
O4
objects delivered in order requested: O2, O3, O4 wait behind O1
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
HTTP/1.1 Parallel Connections
Indian Institute of Technology Kharagpur
HTTP/1.1 -> HTTP/2
Indian Institute of Technology Kharagpur
HTTP/2: Mitigating HOL Blocking
HTTP/2: Objects divided into frames, frame transmission interleaved
client
server
GET O1
GET O2
GET O3
GET O4
O2
O4
object data requested
O1
O2
O3
O4
O2, O3, O4 delivered quickly, O1 slightly delayed
O3
O1
Source: Computer Networking: A Top-Down Approach (8th Ed) by Jim Kurose, Keith Ross
Indian Institute of Technology Kharagpur
Problems with TCP
Indian Institute of Technology Kharagpur
QUIC Streams
Indian Institute of Technology Kharagpur
QUIC Protocol Stack
Indian Institute of Technology Kharagpur
QUIC Handshaking -- Connection Establishment
Indian Institute of Technology Kharagpur
QUIC Connection Establishment
Indian Institute of Technology Kharagpur
QUIC Performance
Indian Institute of Technology Kharagpur
QUIC Standardization
Indian Institute of Technology Kharagpur
This is a broad discussion of the Transport Layer … Next we’ll move to the discussion of Network layer and the IP Protocol
Indian Institute of Technology Kharagpur