TCP Concepts Overview
- 33Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the TCP three-way handshake?
SYN, SYN-ACK, ACK.
Or swipe the card
33 cards
What is the TCP three-way handshake?
SYN, SYN-ACK, ACK.
Why is the first packet of a TCP handshake called SYN?
SYN stands for synchronize; it synchronizes the initial sequence numbers between the two endpoints.
What is an Initial Sequence Number (ISN)?
A randomly generated number that marks the starting point for counting data bytes in a TCP connection.
What does the SYN-ACK packet acknowledge?
It acknowledges the SYN by incrementing the received sequence number by 1 (the 'ghost byte') and sends back its own SYN with its ISN.
What is a 'ghost byte' in TCP?
The SYN flag itself consumes one sequence number, even though no real data is sent; this is called a ghost byte.
After a successful handshake, what does 'sequence 1, ACK 1' indicate?
Both sides have synchronized: the client's sequence number is 1 (relative) and the server's is 1 (relative), meaning the handshake is complete.
Why does a TCP connection begin with a three-way handshake before sending data?
To establish a reliable connection by exchanging initial sequence numbers and verifying that both sides are reachable and ready.
What is the round-trip time (RTT) in the context of TCP?
The time between sending a SYN and receiving the SYN-ACK; it measures latency and affects throughput.
How can you tell which side of a connection you captured in Wireshark?
The SYN goes out, then the SYN-ACK returns; the time difference (delta) for SYN-ACK is the RTT, while the final ACK occurs almost immediately (microseconds).
What is the purpose of the final ACK in the three-way handshake?
It acknowledges the server's SYN-ACK, confirming the client received the server's SYN and is ready to exchange data.
What is a relative sequence number in Wireshark?
Wireshark subtracts the ISN from the raw sequence number so that the first data byte appears as sequence number 0 or 1.
How does a TCP sequence number change when data is sent?
The sequence number increases by the number of bytes in the TCP payload.
What does an acknowledgment number indicate?
The next sequence number the receiver expects to receive, confirming all bytes up to (ACK number - 1) have been received.
What is an empty ACK?
A TCP packet with a segment length of zero, sent only to acknowledge received data without carrying new payload.
How does Wireshark indicate that a packet acknowledges a specific previous packet?
With a checkmark icon next to the acknowledged packet, along with an '[ACKed]' comment in the Packet Details pane.
Sequence numbers are direction-dependent. What does that mean?
Each direction has its own independent sequence number space; numbers from client to server and server to client never mix or interact mathematically.
How does TCP ensure reliable transmission using sequence numbers?
It keeps a copy of sent data in a send buffer until the receiver acknowledges receipt via the ACK number; if no ACK arrives, the data is retransmitted after a timeout.
What is the TCP send buffer?
A temporary storage area on the sender that holds transmitted data until an ACK confirms receipt, allowing retransmission if necessary.
Why might a network engineer manually trace sequence numbers on paper?
To keep track of separate sequence number streams, especially in multi-point captures where packets traverse NAT or multiple capture points.
How can you use sequence numbers to match a packet before and after NAT?
The raw sequence number (not the relative one) often remains unchanged across a NAT, allowing you to correlate the two sides of the translation.
What does the PSH flag in TCP do?
It tells the receiver to push the data to the application immediately without waiting for the buffer to fill.
What are the most commonly used TCP flags for analysis?
SYN, ACK, PSH, RST, and FIN.
When is the ACK bit set in a TCP connection?
The ACK bit is set in every packet after the very first SYN, meaning it is almost always 1 for the lifetime of the connection.
How do you filter for SYN packets in Wireshark?
Use the display filter
tcp.flags.syn == 1.What does the RST flag indicate?
A reset – it abruptly terminates a connection, often due to an error or unexpected packet.
Which TCP flags are rarely seen in normal traffic?
URG (urgent), ECN (explicit congestion notification), CWR (congestion window reduced), and NS (nonce sum).
What is the TCP receive window?
The amount of data (in bytes) the receiver is willing to accept at one time, advertised in each segment.
Why is the original TCP window size limited to 65535 bytes?
The window size field in the TCP header is only 2 bytes (16 bits), so the maximum value is 216−1=65535 bytes.
How does TCP window scaling solve the 65535-byte window limit?
The window scale option multiplies the advertised window by a shift factor (2shift), allowing windows up to 1 gigabyte or more.
What is the 'calculated window size' in Wireshark?
The actual receive window after multiplying the raw window value by the scaling factor agreed in the handshake.
Why can't a window scale multiplier be used if the handshake is not captured?
The scaling factor is exchanged only in the SYN/SYN-ACK segments; without it, the raw window size may be misinterpreted.
What does a zero window indicate?
The receiver's buffer is full; the sender must stop sending until the receiver advertises a non-zero window (via a window update).
How does the receive window typically behave during a connection?
It fluctuates: decreases as data fills the buffer and increases as the application consumes data.

Ask anything
We've read this whole study set, so questions about it get the best answers.