1/54
CSIS 350 Fall 2026
TCP service
Transportation Control Protocol
reliable transport: between sending and receiving process
flow control: sender won’t overwhelm receiver
congestion control: throttle sender when network overload
connection oriented:
does not provide: timing, minimum throughput guarantee, security
Vanilla TCP & UDP Sockets
No encryption,
Cleartext passwords sent into socket traverse internet in cleartext (!)
Because people often reuse passwords
Store-and-Forward Transmission
A packet-switching mechanism in which a switch or router must receive the entire packet before it can begin transmitting the first bit onto the outbound link.
Transmission Delay (dtrans)
The time required to push all of a packet's bits into the transmission link, calculated as dtrans=RL, where L is the packet length in bits and R is the link transmission rate in bits per second.
Propagation Delay (dprop)
The time required for a bit to physically travel from the beginning of a link to the destination, computed as dprop=sd, where d is the link distance and s is the propagation speed (≈2×108m/s).
Bottleneck Link
The link along an end-to-end transmission path that has the smallest transmission rate and thereby constrains the overall end-to-end throughput.
Internet Protocol Stack Layers
The 5-layer architecture organized as:
Application
Transport
Network
Link
Physical
Socket
The software interface on a host that acts as a door between an application process and the network transport layer protocol.
TCP Service Model
A connection-oriented transport service that provides reliable byte-stream transfer, flow control, and congestion control, but does not provide delay guarantees or minimum throughput guarantees.
UDP Service Model
A lightweight, connectionless transport protocol providing 'best-effort', unreliable, unordered datagram delivery with no flow control, congestion control, or connection setup overhead.
Persistent HTTP (HTTP 1.1)
A technique where the server keeps a single TCP connection open after sending a response, enabling subsequent requests and referenced objects to be sent over the same connection without repeating TCP handshakes.
HTTP Cookies
A state-tracking mechanism comprising server response headers, a client-stored file managed by the browser, and subsequent client request headers used for authorization, session management, and shopping carts.
Domain Name System (DNS)
A distributed, hierarchical database implemented in name servers that maps human-friendly hostnames to 32-bit IP addresses, and provides host aliasing, mail server aliasing, and load distribution.
Iterated DNS Query
A name resolution method where a contacted server that does not know the mapping responds with the IP address of the next name server in the hierarchy for the client or local DNS server to query next.
Recursive DNS Query
A name resolution method that places the burden of resolving the name on the contacted name server, which queries successive servers on behalf of the requester and returns the final mapping.
Transport-Layer Demultiplexing
The process at the receiving host of examining incoming segment header fields (destination port for UDP; 4-tuple of source IP, source port, destination IP, destination port for TCP) to direct payload data to the appropriate socket.
Go-Back-N (GBN)
A sliding-window reliable transfer protocol using cumulative acknowledgments where the sender may have up to N unacknowledged packets in flight, but retransmits the oldest unacknowledged packet and all subsequent sent packets upon a timer expiration.
Selective Repeat (SR)
A sliding-window reliable transfer protocol where the receiver individually acknowledges and buffers all correctly received out-of-order packets, and the sender maintains an individual timer for each packet, retransmitting only unACKed packets.
TCP Flow Control
A speed-matching service that prevents a sender from overflowing the receiver's buffer by dynamically advertising the remaining available buffer space in the receive window (rwnd) field of TCP segment headers.
TCP Three-Way Handshake
The connection setup process consisting of:
Client sends SYN (specifying initial sequence number x)
Server replies with SYNACK (acknowledging x+1 and choosing sequence number y)
Client sends ACK (acknowledging y+1, which may contain application data)
TCP Fast Retransmit
A loss-recovery feature where a sender retransmits the missing segment with the smallest sequence number immediately upon receiving three duplicate ACKs (triple duplicate ACKs), prior to timer expiration.
AIMD (Additive Increase Multiplicative Decrease)
A distributed congestion control algorithm where the sender increases its congestion window (cwnd) by 1 MSS every RTT when probing for bandwidth, and cuts cwnd in half upon detecting packet loss.
QUIC (Quick UDP Internet Connections)
An application-layer transport protocol designed on top of UDP that combines transport and cryptographic handshakes into a single RTT, while providing multiplexed streams that prevent head-of-line blocking.
Store-and-Forward Transmission
A packet-switching mechanism where a switch or router must receive the entire packet before transmitting the first bit onto the outbound link.
Four Sources of Packet Delay
The nodal delay components given by: dnodal=dproc+dqueue+dtrans+dprop
dproc: Nodal processing (error checking, output link determination)
dqueue: Waiting time at output link for transmission
dtrans: Transmission delay (RL, pushing bits onto link)
dprop: Propagation delay (sd, travel time across physical medium)
Traffic Intensity
The dimensionless ratio calculated as RL⋅a, where L is packet length in bits, a is average packet arrival rate, and R is link bandwidth in bits/second.
≈0: Average queueing delay is negligible.
→1: Queueing delay increases non-linearly.
>1: Arriving work exceeds link capacity; average delay approaches infinity.
Frequency-Division Multiplexing (FDM) vs. Time-Division Multiplexing (TDM)
FDM: The link spectrum is divided into distinct, narrow frequency bands, each allocated dedicatedly to an individual call for continuous transmission.
TDM: Time is divided into discrete slots; each call is periodically allocated specific time slots and transmits across the entire frequency band during those slots.
Bottleneck Link
The link along an end-to-end path with the lowest transmission rate (min(R1,R2,…,Rn)) that constrains the maximum achievable throughput.
Internet Protocol Stack vs. OSI Reference Model Layers
Internet Stack (5 Layers):
Application
Transport
Network
Link
Physical
OSI Model (7 Layers) includes two extra layers between Application and Transport:
Presentation: Interprets data syntax/semantics (encryption, compression).
Session: Synchronizes checkpoints and recovery in data exchanges.
Protocol Data Units (PDUs) Across Layers
Application: Message (M)
Transport: Segment (encapsulates message with transport header Ht)
Network: Datagram (encapsulates segment with network header Hn)
Link: Frame (encapsulates datagram with link header Hl)
Physical: Raw bits propagating across transmission media
Socket Addressing and Multiplexing Demarcation
UDP Socket Identification: Identified solely by a 2-tuple of (Destination IP Address, Destination Port Number).
TCP Socket Identification: Identified uniquely by a 4-tuple of (Source IP Address, Source Port Number, Destination IP Address, Destination Port Number).
Non-Persistent HTTP Total Response Time
The response time for fetching an individual referenced object, calculated as: Response Time=2⋅RTT+RL
First RTT: Establishes the TCP connection.
Second RTT: Sends the HTTP request and receives the first bytes of the response.
RL: Transmission time of the requested object.
HTTP Conditional GET
A caching mechanism where the client sends an HTTP request with the header If-modified-since: <date>. If the resource has not changed, the server responds with status code 304 Not Modified and omits the entity body, saving bandwidth.
HTTP/2 Frame Interleaving
A mechanism that breaks application-layer messages into independent binary frames and interleaves them over a single TCP connection, eliminating head-of-line (HOL) blocking caused by large objects in HTTP 1.1 first-come-first-served pipelining.
SMTP vs. HTTP Communication Model
Directionality: HTTP is primarily a pull protocol (client pulls data from server); SMTP is a push protocol (sending server pushes mail to receiving server).
Encoding: SMTP requires messages and envelope bodies to be in 7-bit ASCII format; HTTP places no restrictions on binary payload data.
Object Handling: HTTP encapsulates each requested object in its own response; SMTP encapsulates multiple objects within a single multipart message.
DNS Resource Record (RR) Types
Resource records stored with the format (Name, Value, Type, TTL):
Type A: Name is a hostname; Value is the corresponding IP address.
Type NS: Name is a domain; Value is the hostname of the authoritative name server.
Type CNAME: Name is an alias; Value is the canonical (real) hostname.
Type MX: Name is a domain; Value is the hostname of the mail server.
Iterated vs. Recursive DNS Queries
Iterated: The contacted name server replies with the address of the next server down the hierarchy for the client or local resolver to contact directly.
Recursive: The contacted name server takes on the full burden of resolution, querying downstream servers on behalf of the requester until returning the final answer.
BitTorrent Tit-for-Tat and Optimistic Unchoking
Tit-for-Tat: A peer uploads chunks only to the top 4 peers that provide data to it at the highest bitrates, recalculating every 10 seconds.
Optimistic Unchoking: Every 30 seconds, a peer randomly selects an additional peer to send chunks to, allowing new peers to join the top 4 and discover higher upload capacity.
DASH (Dynamic, Adaptive Streaming over HTTP)
A video delivery technique where a video file is divided into multiple chunks encoded at different bitrates, described in a manifest file. The client measures network throughput and dynamically requests chunk URLs matching the best sustainable bitrate.
CDN Server Placement: Enter Deep vs. Bring Home
Enter Deep: Deploying server clusters deep inside access networks close to end users (e.g., Akamai), reducing delay and hop count at the cost of managing many locations.
Bring Home: Deploying fewer, larger server clusters at Points of Presence (POPs) near IXPs and access network boundaries (e.g., Limelight).
Internet Checksum Calculation
An error-detection mechanism where the sender treats segment data as a series of 16-bit integers, calculates their one's complement sum (adding end-around carry bits back into the lowest-order bit), and inverts all bits. The receiver adds all words including the checksum; a valid transmission produces all 1s.
rdt 2.1 vs. rdt 2.2
rdt 2.1: Uses alternating 1-bit sequence numbers (0 and 1) for packets and sends explicit positive acknowledgments (ACKs) and negative acknowledgments (NAKs).
rdt 2.2: Eliminates NAKs completely. The receiver sends an ACK that explicitly includes the sequence number of the last correctly received packet; a duplicate ACK received by the sender acts as a NAK.
rdt 3.0 Stop-and-Wait Sender Utilization Formula
The fraction of time the sender actively pushes bits onto the channel, expressed as: Usender=RTT+RLRL
When RTT≫RL, protocol performance is poor, motivating pipelined sliding windows.
Go-Back-N (GBN) vs. Selective Repeat (SR)
GBN: Uses cumulative ACKs and maintains a single timer for the oldest unacknowledged packet. On timeout, the sender retransmits the entire window starting from the lost packet; the receiver discards out-of-order packets.
SR: Acknowledges each packet individually and maintains a distinct timer for each unacknowledged packet. On timeout, the sender retransmits only the specific missing packet; the receiver buffers out-of-order packets.
TCP Sequence and Acknowledgment Number Semantics
Sequence Number: The byte-stream index of the first byte of data in the segment's payload (not the segment count).
Acknowledgment Number: The byte-stream index of the next byte expected from the other side (cumulative acknowledgment indicating all prior bytes were received).
TCP Round-Trip Time Estimation (EWMA)
Formulas used to estimate smoothed RTT and variance: EstimatedRTT=(1−α)⋅EstimatedRTT+α⋅SampleRTTDevRTT=(1−β)⋅DevRTT+β⋅∣SampleRTT−EstimatedRTT∣
Typical constant values are α=0.125 and β=0.25.
TCP Retransmission Timeout Calculation
The interval after which an unacknowledged segment is considered lost: TimeoutInterval=EstimatedRTT+4⋅DevRTT
This provides a safety margin that expands during periods of high RTT variance.
TCP Three-Way Handshake Connection Establishment
Client → Server: Sends segment with SYN = 1, ACK = 0, and initial client sequence number Seq = x.
Server → Client: Allocates buffers and replies with SYN = 1, ACK = 1, Seq = y, and Ack = x + 1.
Client → Server: Sends segment with SYN = 0, ACK = 1, and Ack = y + 1 (may include initial application data payload).
TCP Connection Teardown Sequence
Client sends a segment with FIN = 1 and enters FIN_WAIT_1.
Server replies with ACK and enters CLOSE_WAIT; client moves to FIN_WAIT_2.
Server finishes sending remaining data and transmits a segment with FIN = 1, entering LAST_ACK.
Client replies with ACK and enters TIME_WAIT for 2×MSL (Maximum Segment Lifetime) before transitioning to CLOSED to ensure the final ACK arrives.
TCP Flow Control vs. Congestion Control
Flow Control: Prevents a fast sender from overflowing a single receiver's application buffer. Enforced by dynamic updates to the receive window (rwnd) in TCP headers.
Congestion Control: Prevents too many simultaneous senders from overwhelming intermediate router queues across the network core. Enforced by dynamic adjustment of the congestion window (cwnd).
TCP Slow Start
The connection initialization phase where cwnd starts at 1 MSS and increments by 1 MSS for every received acknowledgment, doubling cwnd every RTT (exponential growth) until reaching ssthresh.
TCP Tahoe vs. TCP Reno Loss Reaction
TCP Tahoe: On loss detection by either timeout or triple duplicate ACKs, sets ssthresh = cwnd / 2, resets cwnd = 1 MSS, and re-enters Slow Start.
TCP Reno: On triple duplicate ACKs, cuts cwnd in half (cwnd = cwnd / 2), sets ssthresh = cwnd, skips Slow Start, and enters Fast Recovery; on timeout, drops cwnd = 1 MSS like Tahoe.
TCP CUBIC Congestion Control
A window-growth algorithm that models cwnd as a cubic function of time relative to the window size Wmax at the previous loss event. It ramps up aggressively when far below Wmax, flattens growth near Wmax, and then accelerates when probing for new bandwidth.
Explicit Congestion Notification (ECN)
A network-assisted congestion control scheme where congested intermediate routers mark two bits in the IP header (Type of Service/Traffic Class field). The destination receiver then sets the ECE (ECN-Echo) bit in TCP ACK headers to notify the sender to reduce cwnd without dropping packets.
QUIC (Quick UDP Internet Connections) Handshake Advantage
A protocol running over UDP that combines transport handshaking (reliability and flow state) and cryptographic handshaking (TLS 1.3) into a single RTT exchange, whereas standard TCP with TLS requires two serial handshakes (2 RTTs) before application data can flow.