Goal: Understand the principles behind transport layer services and Internet transport layer protocols.
Services: Multiplexing, demultiplexing, reliable data transfer, flow control, and congestion control.
Protocols: UDP (connectionless) and TCP (connection-oriented reliable transport with congestion control).
Transport Layer Roadmap
Topics include transport-layer services, multiplexing/demultiplexing, UDP, reliable data transfer principles, TCP, congestion control principles, TCP congestion control, and the evolution of transport-layer functionality.
Transport Services and Protocols
Logical Communication: Transport layer provides logical communication between application processes on different hosts.
End System Actions:
Sender: Breaks application messages into segments and passes them to the network layer.
Receiver: Reassembles segments into messages and passes them to the application layer.
Protocols: TCP and UDP are the two main transport protocols available to Internet applications.
Transport vs. Network Layer
Network Layer: Focuses on communication between hosts.
Transport Layer: Focuses on communication between processes, enhancing network layer services.
Analogy:
Hosts are like houses.
Processes are like kids.
App messages are like letters in envelopes.
The transport protocol is like Ann and Bill demultiplexing to in-house siblings.
The network-layer protocol is like the postal service.
Transport Layer Actions
Sender: Receives application-layer message, determines segment header fields, creates segment, and passes segment to IP.
Receiver: Receives segment from IP, checks header values, extracts application-layer message, and demultiplexes message up to application via socket.
Internet Transport Protocols
TCP (Transmission Control Protocol):
Reliable, in-order delivery.
Congestion control.
Flow control.
Connection setup.
UDP (User Datagram Protocol):
Unreliable, unordered delivery.
No-frills extension of best-effort IP.
Unavailable Services: Delay and bandwidth guarantees.
Multiplexing/Demultiplexing
Multiplexing at the sender involves handling data from multiple sockets and adding transport headers.
Demultiplexing at the receiver uses header information to deliver received segments to the correct socket.
Demultiplexing Details
The host uses IP addresses and port numbers to direct each segment to the appropriate socket.
Segment Format: Includes source port number, destination port number, and application data.
Connectionless Demultiplexing (UDP)
When creating a socket, a host-local port number must be specified.
When a receiving host receives a UDP segment, it checks the destination port number and directs the segment to the socket with that port number.
To send a datagram into a UDP socket, the destination IP address and port number must be specified.
Connection-Oriented Demultiplexing (TCP)
TCP socket is identified by a 4-tuple: source IP address, source port number, destination IP address, and destination port number.
A server may support many simultaneous TCP sockets, each identified by its own 4-tuple.
Demultiplexing uses all four values to direct the segment to the appropriate socket.
Summary of Multiplexing and Demultiplexing
Based on segment/datagram header field values.
UDP uses only the destination port number.
TCP uses the 4-tuple.
Multiplexing/demultiplexing occur at all layers.
UDP: User Datagram Protocol
Characteristics: No frills, bare bones, connectionless.
Service: Best effort; segments may be lost or delivered out-of-order.
Simplicity: No connection establishment or state at sender/receiver, small header size, no congestion control.
Senders increase sending rate until packet loss occurs, then decrease sending rate upon loss.
On loss detected by triple duplicate ACK (TCP Reno) the sending rate is cut in half
on loss detected by timeout (TCP Tahoe) the sending rate is set to 1 MSS
Shown to optimize congested flow rates and have desirable stability properties.
TCP Congestion Control: Slow Start
When the connection begins, the sending rate is increased exponentially until the first loss event occurs.
cwnd = 1MSS
cwnd is doubled every RTT.
TCP: Slow Start to Congestion Avoidance
The exponential increase switches to linear when cwnd gets to 1/2 of its value before timeout.
Variable ssthresh: on a loss event, ssthresh is set to 1/2 of cwnd before the loss event.
Summary: TCP Congestion Control
Involves slow start, congestion avoidance, and fast recovery mechanisms to adjust the sending rate.
TCP Cubic
Cubic increases throughput in the following way:
Wmax: sending rate at which congestion loss was detected
congestion state of bottleneck link probably (?) hasn’t changed much
after cutting rate/window in half on loss, initially ramp to to Wmax faster, but then approach Wmax more slowly
Explicit congestion notification (ECN)
Involves bits in the IP header (ToS field) marked by a network router to indicate congestion
congestion indication carried to destination
destination sets ECE bit on ACK segment to notify sender of congestion
TCP fairness
If K TCP sessions share the same bottleneck link of bandwidth R, each should have an average rate of R/K
Evolving Transport-Layer Functionality
HTTP/3 with QUIC
QUIC (Quick UDP Internet Connections) Summary
Multiplexes multiple application-level "streams" over a single QUIC connection with separate reliable data transfer and security. QUIC also has common congestion control.
Has connection establishment, error control, congestion control.
Improves upon connection setup, as TCP requires 2 serial handshakes. Quic combines into one.
Chapter 3 Summary
Discussed the principles behind transport layer services and instantiation, implementation in the Internet with UDP and TCP.