Essential Concepts in Computer Networking and TCP/IP
Network Delay and Performance Metrics
Understanding the components of network delay is essential for optimizing data transmission:
- d-proc (Processing Delay): Checks for bit errors and determines the output link; typically less than a microsecond.
- d-queue (Queuing Delay): Time spent waiting at the output link for transmission, heavily dependent on network congestion.
- d-prop (Propagation Delay): Calculated as Link Length / (2 x 108).
Key Variables: a = average packet arrival rate, L = packet length, R = link bandwidth.
DNS Record Types
The Domain Name System (DNS) uses Resource Records (RR) in the format: (name, value, type, ttl).
- Type A: Name is the hostname; value is the IP address.
- Type CNAME: Name is an alias for a canonical name; value is the actual name.
- Type NS: Name is the domain; value is the host of the authoritative name server.
- Type MX: Value is the name of the SMTP mail server.
HTTP Connection Strategies
Non-Persistent HTTP
A TCP connection is opened, at most one object is sent, and the connection is closed. Downloading multiple files requires multiple connections.
- Response Time: 2RTT + all RTT times.
- For n additional objects: Response + n(2RTT).
- Parallel TCP: Response + (objects / parallel TCP) * (2RTT).
Persistent HTTP and HTTP/2
Persistent connections (introduced in HTTP 1.1) allow multiple objects to be sent over a single connection. HTTP/2 improves performance by:
- Decreasing multi-object HTTP requests.
- Prioritizing transmission based on client needs.
- Dividing objects into frames to avoid Head-of-Line (HOL) blocking.
- Response with parallel/multiple objects: All RTT + (objects / parallel TCP) * (2RTT).
Internet Transport Protocols
The two principal transport protocols are:
- TCP: Reliable, in-order delivery, congestion control, flow control, and connection setup.
- UDP: Unreliable, unordered delivery, and connectionless.
Reliable Data Transfer (rdt)
- rdt 2.2: Uses ACKs; the receiver sends an ACK for the last packet received correctly. Duplicate ACKs trigger retransmission.
- rdt 3.0: Handles packet loss by using a timer. If no ACK is received, the sender retransmits. Sequence numbers handle duplicate packets.
- Utilization (rdt 3.0): (L/R) / (RTT + L/R).
- Utilization (Pipelining): n(L/R) / (RTT + L/R).
TCP Mechanics and Congestion Control
TCP provides a point-to-point, reliable, in-order byte stream with full-duplex data. It uses cumulative ACKs and pipelining for flow and congestion control.
TCP Sender Behavior
- Data Receipt: Creates a segment with a sequence number and starts a timer.
- Timeout: Retransmits the segment and restarts the timer.
- ACK Receipt: Updates acknowledged data and restarts the timer if unacknowledged segments remain.
- Fast Retransmit: If the sender receives 3 duplicate ACKs, it immediately resends the unacknowledged segment with the smallest sequence number.
Congestion Control Approaches
- End-to-End: Congestion is inferred from observed loss and delay (standard TCP approach).
- Explicit Congestion Notification (ECN): Network-assisted control using two bits in the IP header (ToS field) to signal congestion to the destination, which then notifies the sender.
TCP Throughput: Approximately 3/4 of the window size over RTT. Under idealized conditions (same RTT, fixed sessions), TCP is considered fair, with each session receiving R/K bandwidth.
English with a size of 3.97 MB