Bird
Raised Fist0
Computer Networksknowledge~20 mins

Three-way handshake in Computer Networks - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
TCP Connection Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Purpose of the Three-way Handshake

What is the main purpose of the three-way handshake in TCP connections?

ATo encrypt data before transmission to ensure security
BTo establish a reliable connection by synchronizing sequence numbers between client and server
CTo check the bandwidth availability between two hosts
DTo immediately transfer data without any delay
Attempts:
2 left
💡 Hint

Think about what needs to happen before data can be sent reliably.

📋 Factual
intermediate
2:00remaining
Sequence of Messages in Three-way Handshake

Which sequence correctly represents the three messages exchanged during the TCP three-way handshake?

AACK, ACK, SYN
BACK, SYN, SYN-ACK
CSYN-ACK, SYN, ACK
DSYN, SYN-ACK, ACK
Attempts:
2 left
💡 Hint

The first message initiates the connection.

🔍 Analysis
advanced
2:00remaining
Impact of Missing Final ACK in Three-way Handshake

What happens if the final ACK message from the client is lost during the three-way handshake?

AThe client will close the connection immediately
BThe connection is immediately established without any issues
CThe server will retransmit SYN-ACK and wait until it receives the ACK to establish the connection
DThe server will send data without waiting for the ACK
Attempts:
2 left
💡 Hint

Consider how TCP ensures reliability in message delivery.

❓ Comparison
advanced
2:00remaining
Difference Between Three-way Handshake and Four-way Handshake

Which statement correctly distinguishes the TCP three-way handshake from the four-way handshake used in connection termination?

AThe three-way handshake establishes a connection, while the four-way handshake gracefully closes it
BThe four-way handshake is faster and replaces the three-way handshake in modern TCP
CBoth handshakes are used to establish connections but differ in encryption methods
DThe three-way handshake is used only for UDP connections
Attempts:
2 left
💡 Hint

Think about connection setup versus connection teardown.

❓ Reasoning
expert
2:00remaining
Why is the Three-way Handshake Considered Reliable?

Why does the TCP three-way handshake provide a reliable way to establish a connection over an unreliable network?

ABecause it uses acknowledgments and sequence numbers to confirm both sides are ready and synchronized
BBecause it encrypts all messages to prevent data loss
CBecause it sends data multiple times regardless of acknowledgments
DBecause it uses UDP packets which are faster and more reliable
Attempts:
2 left
💡 Hint

Consider how TCP handles message loss and ordering.

Practice

(1/5)
1. What is the main purpose of the three-way handshake in computer networks?
easy
A. To disconnect a network session
B. To encrypt data before sending
C. To establish a reliable connection between two computers
D. To assign IP addresses automatically

Solution

  1. Step 1: Understand the role of the three-way handshake

    The three-way handshake is a process used in TCP to start a connection reliably.
  2. Step 2: Identify the correct purpose

    It ensures both computers agree to communicate before data transfer begins.
  3. Final Answer:

    To establish a reliable connection between two computers -> Option C
  4. Quick Check:

    Three-way handshake = establish connection [OK]
Hint: Remember: handshake means starting a connection [OK]
Common Mistakes:
  • Confusing handshake with encryption
  • Thinking it disconnects sessions
  • Mixing it up with IP address assignment
2. Which sequence correctly represents the messages exchanged during the TCP three-way handshake?
easy
A. SYN, SYN-ACK, ACK
B. ACK, SYN, SYN-ACK
C. SYN-ACK, ACK, SYN
D. ACK, ACK, SYN

Solution

  1. Step 1: Recall the message order in TCP handshake

    The client first sends SYN to request connection.
  2. Step 2: Identify the correct sequence

    The server replies with SYN-ACK, then client sends ACK to confirm.
  3. Final Answer:

    SYN, SYN-ACK, ACK -> Option A
  4. Quick Check:

    Order is SYN -> SYN-ACK -> ACK [OK]
Hint: Think: Client SYN, Server SYN-ACK, Client ACK [OK]
Common Mistakes:
  • Mixing up the order of messages
  • Forgetting the SYN-ACK step
  • Assuming ACK comes first
3. If a client sends a SYN message but does not receive a SYN-ACK response, what will happen next?
medium
A. The client immediately sends an ACK message
B. The client will resend the SYN message after a timeout
C. The connection is established without confirmation
D. The client closes the connection instantly

Solution

  1. Step 1: Understand client behavior on no response

    If the client does not get SYN-ACK, it assumes the message was lost or server is unreachable.
  2. Step 2: Identify the retry mechanism

    The client waits for a timeout, then resends the SYN to try again.
  3. Final Answer:

    The client will resend the SYN message after a timeout -> Option B
  4. Quick Check:

    No SYN-ACK -> resend SYN [OK]
Hint: No reply? Client retries SYN after waiting [OK]
Common Mistakes:
  • Assuming connection established without SYN-ACK
  • Thinking client sends ACK first
  • Believing client closes connection immediately
4. A network engineer notices that after sending SYN, the client never receives SYN-ACK. Which of these is the most likely cause?
medium
A. The server is not listening on the target port
B. The client sent an ACK instead of SYN
C. The client skipped sending SYN-ACK
D. The client closed the connection too early

Solution

  1. Step 1: Analyze the missing SYN-ACK response

    If no SYN-ACK arrives, the server likely did not respond to SYN.
  2. Step 2: Identify common reasons for no response

    One common reason is the server not listening on the requested port, so it ignores SYN.
  3. Final Answer:

    The server is not listening on the target port -> Option A
  4. Quick Check:

    No SYN-ACK means server not listening [OK]
Hint: No SYN-ACK? Check if server port is open [OK]
Common Mistakes:
  • Blaming client for sending wrong message
  • Thinking client sends SYN-ACK
  • Assuming client closed connection early
5. During the three-way handshake, what could happen if the final ACK message is lost in transit?
hard
A. The server assumes connection is established without ACK
B. The client will resend SYN immediately
C. The connection will close automatically
D. The server will retransmit SYN-ACK until it receives ACK

Solution

  1. Step 1: Understand the role of the final ACK

    The final ACK confirms the client received the server's SYN-ACK and completes the handshake.
  2. Step 2: Identify server behavior if ACK is lost

    If the server does not get ACK, it will retransmit SYN-ACK to prompt the client again.
  3. Final Answer:

    The server will retransmit SYN-ACK until it receives ACK -> Option D
  4. Quick Check:

    Lost ACK -> server retries SYN-ACK [OK]
Hint: Lost ACK? Server keeps sending SYN-ACK [OK]
Common Mistakes:
  • Thinking client resends SYN instead
  • Assuming connection closes automatically
  • Believing server accepts connection without ACK
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard