TCP Concepts Overview
- 26Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the primary purpose of the SYN flag in the TCP three-way handshake?
What is the primary purpose of the SYN flag in the TCP three-way handshake?
26 questions
- 1
What is the primary purpose of the SYN flag in the TCP three-way handshake?
- A
To acknowledge receipt of data from the other host
- B
To indicate that the sender has finished transmitting data
- C
To reset the connection when an error occurs
- D
To synchronize sequence numbers between the two communicating hosts
Correct answer
DTo synchronize sequence numbers between the two communicating hosts
Explanation
The SYN flag is used to synchronize sequence numbers. The client sends its initial sequence number (ISN) in the SYN, and the server responds with its own SYN plus an acknowledgment of the client's ISN.
- A
- 2
In the TCP three-way handshake, what is the sequence of flags exchanged?
- A
SYN, SYN-ACK, ACK
- B
ACK, SYN, SYN-ACK
- C
SYN, ACK, SYN-ACK
- D
SYN-ACK, SYN, ACK
Correct answer
ASYN, SYN-ACK, ACK
Explanation
The standard three-way handshake starts with the client sending a SYN, the server responds with SYN-ACK, and the client finalizes with an ACK.
- A
- 3
What is an Initial Sequence Number (ISN)?
- A
The number of bytes sent in the first data segment
- B
The acknowledgment number from the server
- C
A randomly generated number used as the starting point for sequence numbering in a TCP connection
- D
The port number assigned to the client
Correct answer
CA randomly generated number used as the starting point for sequence numbering in a TCP connection
Explanation
The ISN is a random number chosen by each side to begin counting bytes in its direction. It is exchanged during the SYN and SYN-ACK to synchronize sequence numbers.
- A
- 4
Why does Wireshark display relative sequence numbers by default?
- A
To hide the initial sequence numbers for security reasons
- B
To show the actual raw sequence numbers without modification
- C
To align sequence numbers with the TCP header fields
- D
To make it easier for humans to work with smaller numbers by starting at zero
Correct answer
DTo make it easier for humans to work with smaller numbers by starting at zero
Explanation
Wireshark subtracts the initial sequence number from each packet in the conversation, so the first sequence number appears as 0. This simplifies analysis.
- A
- 5
In the TCP handshake, what is meant by a 'ghost byte'?
- A
An optional byte used for window scaling
- B
The one-byte increment in sequence number caused by the SYN flag itself
- C
The acknowledgment number that is not actually sent
- D
A byte of payload that is silently discarded
Correct answer
BThe one-byte increment in sequence number caused by the SYN flag itself
Explanation
The SYN flag consumes one sequence number even though no data is sent. This 'ghost byte' allows the receiver to acknowledge the SYN by incrementing its own acknowledgment number by one.
- A
- 6
How does the acknowledgment number in a SYN-ACK relate to the client's initial sequence number?
- A
It equals the client's initial sequence number minus one
- B
It is a completely independent random number
- C
It is the same as the client's initial sequence number
- D
It equals the client's initial sequence number plus one
Correct answer
DIt equals the client's initial sequence number plus one
Explanation
When the server sends a SYN-ACK, it sets the acknowledgment number to the client's sequence number plus one, confirming receipt of the client's SYN.
- A
- 7
A client uses source port 54846 to connect to a server on port 80. What type of port is 54846?
- A
A registered port for a specific application
- B
A reserved port below 1024
- C
An ephemeral port, typically above 1023
- D
A well-known port assigned to HTTP
Correct answer
CAn ephemeral port, typically above 1023
Explanation
The source port is randomly chosen from the ephemeral range (usually 1024-65535) for the client side. Port 80 is the well-known destination port for HTTP.
- A
- 8
What constitutes a four-tuple that uniquely identifies a TCP conversation?
- A
Sequence number, acknowledgment number, window size, checksum
- B
Source MAC, destination MAC, source IP, destination IP
- C
Source IP, source port, destination IP, destination port
- D
SYN flag, ACK flag, FIN flag, RST flag
Correct answer
CSource IP, source port, destination IP, destination port
Explanation
The combination of source and destination IP addresses and source and destination port numbers defines a unique TCP stream, often called a four-tuple.
- A
- 9
After the initial SYN, which flag is set in every subsequent packet of a TCP connection (except in rare cases like some resets)?
- A
The SYN flag
- B
The ACK flag
- C
The FIN flag
- D
The PSH flag
Correct answer
BThe ACK flag
Explanation
Once the handshake begins, the ACK flag is set on all packets except the first SYN. This indicates that the acknowledgment number field is valid.
- A
- 10
Which TCP flags are most commonly encountered during normal TCP analysis?
- A
ACK, PUSH, RST, SYN, FIN
- B
URG, ACK, RST, SYN, FIN
- C
SYN, FIN, RST, URG, PSH
- D
ECE, CWR, URG, ACK, PSH
Correct answer
AACK, PUSH, RST, SYN, FIN
Explanation
The frequently seen flags are SYN (synchronize), ACK (acknowledgment), PUSH (push data to application), RST (reset), and FIN (finish). Others like URG and ECN are rare.
- A
- 11
How can you filter for all SYN packets in Wireshark?
- A
Using the filter
tcp.flags == 0x002 - B
Using the filter
tcp.syn == 1 - C
Using the filter
tcp.flags.syn == 1 - D
Using the filter
tcp.header.syn == 1
Correct answer
CUsing the filter
tcp.flags.syn == 1Explanation
The correct display filter is
tcp.flags.syn == 1. Wireshark provides the syntax for each flag in the packet details pane. - A
- 12
What is the maximum window size that can be advertised without using the window scale option?
- A
1,048,576 bytes
- B
256 bytes
- C
1,460 bytes
- D
65,535 bytes
Correct answer
D65,535 bytes
Explanation
The window size field is 2 bytes, so the maximum value is 65535. To advertise larger windows, the window scale option must be used.
- A
- 13
During the TCP handshake, the client advertises a window scale shift count of 6. What does this mean?
- A
The receiver should multiply the window size field by 26=64 to get the actual window
- B
The window scale option length is 6 bytes
- C
The window size field should be divided by 64
- D
The sender will use a window size of 6 segments
Correct answer
AThe receiver should multiply the window size field by 26=64 to get the actual window
Explanation
The shift count indicates a multiplier of 2shift. A shift of 6 means multiply the window field by 64 to obtain the true receive window.
- A
- 14
What happens if one side does not include a window scale option in the SYN?
- A
Window scaling is still used but only by the side that advertised it
- B
The connection is rejected with a reset
- C
Window scaling cannot be used for that connection; both sides must agree
- D
The window scale is assumed to be 1
Correct answer
CWindow scaling cannot be used for that connection; both sides must agree
Explanation
Window scaling is a negotiated option. If one side does not include it in its SYN, then the other side cannot use it. The handshake determines which optional features will be used.
- A
- 15
A TCP receiver's calculated window size drops to zero. What condition does this indicate?
- A
The receiver has closed the connection
- B
The sender has finished transmitting
- C
The receiver's buffer is full and it cannot accept more data
- D
A network congestion event has occurred
Correct answer
CThe receiver's buffer is full and it cannot accept more data
Explanation
A zero window means the receive buffer is full. The sender must stop sending until the receiver advertises a non-zero window, known as the 'zero window' condition.
- A
- 16
What is the purpose of the Maximum Segment Size (MSS) option in the TCP handshake?
- A
To define the maximum transmission unit for the network layer
- B
To limit the size of the TCP header
- C
To advertise the largest TCP segment payload the sender can receive
- D
To set the maximum number of segments allowed in a window
Correct answer
CTo advertise the largest TCP segment payload the sender can receive
Explanation
MSS is an advertisement of the maximum payload size in a single TCP segment. It is not negotiated but simply announced; both sides may have different MSS values.
- A
- 17
Why is it important to capture the TCP handshake when analyzing a TCP flow?
- A
Because TCP options like window scale and SACK are only exchanged in the handshake
- B
Because the handshake contains all the data payload
- C
Because the handshake sets the maximum number of packets
- D
Because the handshake determines the IP addresses used
Correct answer
ABecause TCP options like window scale and SACK are only exchanged in the handshake
Explanation
Key options such as window scale, MSS, and selective acknowledgment (SACK) are announced only in the SYN and SYN-ACK packets. Without the handshake, these options are unknown, leading to misinterpretation of window sizes and other parameters.
- A
- 18
The TCP header length field is 4 bits. What is the maximum header length it can represent?
- A
44 bytes (as seen in many handshakes)
- B
48 bytes
- C
60 bytes (15 32-bit words)
- D
40 bytes
Correct answer
C60 bytes (15 32-bit words)
Explanation
The header length field counts 32-bit words. A value of 15 (max) corresponds to 60 bytes. The header length must be sufficient to include options, which is why handshake packets often have a header length of 44 bytes (11 words).
- A
- 19
What does the SACK (Selective Acknowledgment) option allow a TCP receiver to do?
- A
Increase the maximum segment size during the connection
- B
Acknowledge all bytes up to the sequence number, even if some are missing
- C
Acknowledge only the missing bytes, allowing the sender to retransmit exactly what was lost
- D
Reduce the window size when congestion is detected
Correct answer
CAcknowledge only the missing bytes, allowing the sender to retransmit exactly what was lost
Explanation
SACK allows the receiver to inform the sender about exactly which segments are missing, avoiding unnecessary retransmissions of already-received data.
- A
- 20
In the transcript, the delta time between SYN and SYN-ACK is about 20 milliseconds. What does this value represent?
- A
The retransmission timeout value
- B
The round-trip time (RTT) between the client and server
- C
The time between packets on the network interface
- D
The time it takes for the server to process the SYN
Correct answer
BThe round-trip time (RTT) between the client and server
Explanation
The delta time from SYN to SYN-ACK is one half of the RTT (the client-to-server delay). Multiplying by 2 gives the full RTT. This helps estimate network latency.
- A
- 21
A packet has a TTL of 238. If the typical starting TTL for the operating system is 255, approximately how many hops away is the source?
- A
255 hops
- B
17 hops
- C
238 hops
- D
Cannot be determined
Correct answer
B17 hops
Explanation
TTL decreases by one per hop. Starting TTL 255 minus current TTL 238 equals 17 hops. Common starting TTL values are 64, 128, and 255.
- A
- 22
In Wireshark, a check mark next to a packet indicates what?
- A
That the packet acknowledges data in the previous packet
- B
That the packet has been decrypted
- C
That the packet is part of a duplicate ACK
- D
That the packet is a retransmission
Correct answer
AThat the packet acknowledges data in the previous packet
Explanation
Wireshark places a check mark on a packet that is ACKing the data from the preceding packet, visually confirming that the data was received.
- A
- 23
Sequence numbers in a TCP connection are direction-dependent. This means:
- A
Sequence numbers are shared between both directions for efficiency
- B
Both directions use the same sequence number but different acknowledgment numbers
- C
The client and server each maintain their own independent sequence number space
- D
Sequence numbers are only used for data from client to server
Correct answer
CThe client and server each maintain their own independent sequence number space
Explanation
Each side tracks its own sequence number for bytes it sends. The client's sequence numbers never interact with the server's; they are separate counters.
- A
- 24
What is the purpose of the TCP segment length column in Wireshark?
- A
To show the total frame size including Ethernet and IP headers
- B
To show the number of segments in the stream
- C
To show the remaining window size
- D
To show only the payload size of the TCP segment, excluding headers
Correct answer
DTo show only the payload size of the TCP segment, excluding headers
Explanation
TCP segment length displays the number of bytes of payload in the TCP segment. This helps distinguish data packets from empty ACKs.
- A
- 25
Which of the following statements about the MSS (Maximum Segment Size) is correct?
- A
The MSS cannot exceed the window size
- B
The MSS is advertised in the SYN and is not negotiated; it is an announcement
- C
The MSS is automatically set to the same value on both sides after negotiation
- D
The MSS is calculated from the IP packet size
Correct answer
BThe MSS is advertised in the SYN and is not negotiated; it is an announcement
Explanation
Each side announces the maximum segment size it can receive. They do not have to match, and no negotiation occurs; each side simply respects the other's announced limit.
- A
- 26
When troubleshooting a slow file transfer, which TCP metric should you monitor to detect buffer issues?
- A
The checksum – errors cause retransmissions
- B
The initial sequence number – a high value indicates congestion
- C
The SYN flag – repeated SYNs show a handshake problem
- D
The calculated window size – a value dropping to zero indicates a stuck buffer
Correct answer
DThe calculated window size – a value dropping to zero indicates a stuck buffer
Explanation
A window size that decreases repeatedly and reaches zero signals that the receiver's buffer is full, preventing the sender from transmitting more data. This can cause throughput issues.
- A

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