0
0
Computer Networksknowledge~20 mins

TCP connection termination (four-way handshake) in Computer Networks - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
TCP Termination Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the TCP four-way handshake steps

Which sequence correctly describes the four steps in the TCP connection termination process?

AFIN from server, ACK from client, SYN from client, ACK from server
BFIN from client, ACK from server, FIN from server, ACK from client
CACK from client, FIN from server, ACK from server, FIN from client
DSYN from client, SYN-ACK from server, ACK from client, FIN from server
Attempts:
2 left
💡 Hint

Remember the termination starts with a FIN to signal closing.

📋 Factual
intermediate
1:30remaining
Role of ACK in TCP connection termination

What is the role of the ACK packet in the TCP four-way handshake termination?

AIt carries data to keep the connection alive
BIt initiates the connection termination
CIt resets the connection immediately
DIt acknowledges receipt of the FIN packet from the other side
Attempts:
2 left
💡 Hint

Think about what happens after a FIN is sent.

🔍 Analysis
advanced
2:30remaining
Why does TCP use a four-way handshake instead of a three-way handshake for termination?

Which explanation best describes why TCP uses a four-step process to terminate a connection?

ABecause each side must independently close its sending channel, requiring separate FIN and ACK packets
BBecause the connection must be reset twice to ensure no data loss
CBecause the server always closes the connection first, then the client follows
DBecause the handshake includes an extra SYN packet to confirm termination
Attempts:
2 left
💡 Hint

Consider the full-duplex nature of TCP connections.

Comparison
advanced
2:30remaining
Difference between TCP connection termination and reset

Which statement correctly contrasts TCP connection termination with a TCP reset (RST)?

ABoth termination and reset use the same four-way handshake process
BTermination resets the connection immediately; reset uses a four-way handshake
CTermination uses a four-way handshake to close gracefully; reset immediately aborts the connection without handshake
DReset is used only to establish connections; termination is for closing
Attempts:
2 left
💡 Hint

Think about graceful vs abrupt connection closing.

Reasoning
expert
3:00remaining
State of TCP connection after first FIN and ACK exchange

After the first FIN is sent by one side and the other side replies with an ACK, what is the state of the connection on the side that sent the FIN?

AIt is in FIN-WAIT-2 state, waiting for the other side's FIN
BIt is in FIN-WAIT-1 state, waiting for the other side's FIN
CIt is CLOSED because it finished termination
DIt is ESTABLISHED because connection is still open
Attempts:
2 left
💡 Hint

Recall the TCP state transitions during termination.