Transport Layer

Transport-layer services

TCP

Multiplexing and demultiplexing

Multiplexing - handle data from multiple sockets, add transport header

Demultiplexing - User header info to deliver received segment to correct socket

Hackers can scan port to find vulnerabilities

Connectionless transport: UDP

Advantages:

Use Cases:

HTTP/3 added congestion control and needed reliability at application layer, to improve reliability for UDP

! 200

Checksums

Principles of reliable data transfer

Pipelining
CleanShot 2025-03-29 at 18.18.20 1.png|3

Go-Back-N (GBN)

Selective repeat

Connection-oriented transport: TCP

Segment structure

! 300

Reliable data transfer

TCP round trip time, timeout

CleanShot 2025-03-29 at 17.06.38.png|200

TCP flow control

Connection management

Closing a connection

CleanShot 2025-03-29 at 17.23.57.png|300

Principles of congestion control

TCP congestion control

Detecting congestion

TCP slow start (bandwidth discovery)

Additive increase multiplicative decrease (AIMD)

Slow start threshold (ssthreash)

cwnd = MIN_INT
ssthresh = MAX_INT 

if cwnd < ssthresh:
	cwnd += 1
else:
	cwnd = cwnd + 1 / cwnd (after one RTT, cwnd += 1)

dupACKcount++ 

if dupACKcount = 3:
	ssthresh = cwnd / 2
	cwnd = cwnd / 2

On timeout: 
	ssthresh = cwnd / 2 
	cwnd = 1

CleanShot 2025-03-29 at 17.24.51.png
TCP flavours

Evolution of transport-layer functionality