Home > Blog > CompTIA CompTIA A+ Certification Exam Core 1 > TCP Three-Way Handshake Explained for CompTIA A+

TCP Three-Way Handshake Explained for CompTIA A+

Deep Dive Cert Sensei Team 2037-11-06 8 min read

The TCP three-way handshake is the process used by Transmission Control Protocol to establish a reliable connection between a client and server. It involves three steps: the client sends a SYN packet, the server responds with a SYN-ACK, and the client sends a final ACK, ensuring both parties are ready to exchange data.

#CompTIA A+ #TCP/IP #Networking #Study Guide #TCP Handshake

What exactly is the TCP three-way handshake?

When you're studying for the CompTIA A+ Core 1 (220-1101) exam, you'll encounter the concept of 'connection-oriented' protocols. TCP (Transmission Control Protocol) is the gold standard here. Unlike protocols that just throw data at a destination and hope for the best, TCP insists on a formal introduction before any actual data—like a webpage or an email—is transmitted. This process is the three-way handshake.

Think of it as a digital contract. The handshake ensures that both the sender and the receiver are online, capable of communicating, and have agreed upon the parameters of the session. Without this initial agreement, data packets could be sent into a void, leading to massive efficiency losses and corrupted files. In the real world, this is why your browser doesn't just start receiving HTML randomly; it first establishes a stable session with the web server to ensure a seamless experience.

How does the SYN, SYN-ACK, ACK sequence work?

The handshake happens in three distinct steps. First, the client sends a SYN (Synchronize) packet to the server. This is essentially the client saying, 'I want to start a conversation with you, and here is my starting sequence number.' The SYN packet doesn't contain data; it's purely a request to open a connection.

Next, the server responds with a SYN-ACK (Synchronize-Acknowledge) packet. The server is effectively saying, 'I received your request, I'm available, and I also have a starting sequence number for you to track.' Finally, the client sends an ACK (Acknowledge) packet back to the server. This is the final 'Got it! Let's start talking.' Once the server receives this ACK, the connection is officially 'Established.'

For the A+ exam, remember the order: SYN $ ightarrow$ SYN-ACK $ ightarrow$ ACK. If any of these steps fail, the connection never opens, and you'll likely see a timeout error in your application.

Why are sequence numbers critical for reliable delivery?

You might wonder why TCP bothers with 'sequence numbers' during the handshake. In a complex network, packets don't always arrive in the order they were sent. They can take different physical paths through various routers, meaning packet #3 might arrive before packet #1.

Sequence numbers act like page numbers in a book. During the handshake, both devices agree on a starting number. As data is sent, each byte is numbered. If the receiving device notices a gap—say it gets packet 100 and then 102—it knows immediately that packet 101 is missing. It then sends a request to the sender to retransmit that specific piece of data.

This reliability is what makes TCP essential for things like file transfers (FTP) or web browsing (HTTP/S). You can't afford to lose a few bytes of a .exe installer or a banking transaction. This 'guaranteed delivery' mechanism is the primary reason TCP is categorized as a reliable, connection-oriented protocol.

How does TCP differ from the UDP approach?

A common A+ exam trap is confusing TCP with UDP (User Datagram Protocol). While TCP is the 'perfectionist' that insists on a handshake and sequence numbers, UDP is the 'sprinter.' UDP is connectionless, meaning it skips the three-way handshake entirely. It just starts blasting data to the destination without checking if the receiver is ready or if the data actually arrived.

Why would we ever use UDP? Speed. The handshake adds latency (the time it takes for those three packets to travel). In scenarios like VoIP calls, online gaming, or live video streaming, a tiny bit of data loss (a glitch in the audio) is better than a delay caused by waiting for a retransmission.

When deciding between the two for a test question, ask yourself: 'Is it more important that every single bit is correct (TCP), or that the data arrives as fast as possible (UDP)?' If it's the former, you're looking at a TCP connection and its accompanying handshake.

How do you troubleshoot a failed handshake in the real world?

In a technical support role, you'll often see the results of a failed handshake. If a client sends a SYN but never gets a SYN-ACK back, the result is usually a 'Connection Timed Out' error. This often points to a network layer issue, such as a crashed server or a firewall that is silently dropping packets on that specific port.

Conversely, if the server responds with a RST (Reset) packet instead of a SYN-ACK, you'll see 'Connection Refused.' This usually means the server is online, but the specific service you're trying to reach (like a web server on port 80) isn't actually running.

Understanding these nuances allows you to narrow down the problem quickly. Is it a routing issue? A firewall rule? Or a crashed service? By identifying where the handshake broke, you stop guessing and start fixing, which is exactly the kind of troubleshooting mindset CompTIA wants to see from A+ candidates.

How can practice exams help you master networking domains?

Reading about the TCP handshake is one thing; identifying it in a complex troubleshooting scenario on an exam is another. The networking domain of the A+ Core 1 exam can be tricky because the questions often blend multiple concepts together.

This is where we come in. At Cert Sensei, we provide 1,000 expert-curated practice questions specifically for the CompTIA A+ Core 1 (220-1101). We don't just tell you if you're wrong; we provide detailed expert reasoning for every answer so you understand the 'why' behind the 'what.'

Plus, our platform includes domain-level analytics. If you're nailing the hardware questions but struggling with TCP/IP and networking, our performance tracking will highlight that gap. Instead of studying everything blindly, you can use our custom quiz builder to filter for networking domains and drill down until the three-way handshake becomes second nature.

❓ Frequently Asked Questions

What happens if the final ACK packet is lost during the handshake?

The server will have sent the SYN-ACK and is waiting for the final ACK. Since it never arrives, the server assumes the packet was lost and will retransmit the SYN-ACK multiple times before eventually timing out and closing the 'half-open' connection.


Does the three-way handshake happen for every single packet sent in a session?

No. The handshake only happens once at the very beginning to establish the session. Once the connection is 'Established,' data flows freely. The handshake only repeats if the connection is dropped or timed out and needs to be restarted.


Can a firewall block a TCP handshake without the user knowing?

Yes. A firewall can be configured to 'drop' packets rather than 'reject' them. If a firewall drops the initial SYN packet, the client will simply wait for a response that never comes, resulting in a 'Request Timed Out' error.

More from CompTIA CompTIA A+ Certification Exam Core 1

🧠

Test Your Knowledge

Ready to practice CompTIA A+ Certification Exam Core 1? Put what you've learned to the test.

Try 10 Free Questions

⭐ 1,000 expert-curated questions available with Premium

Upgrade Premium
📖 Browse the Glossary

Join thousands of certification students

Sign Up Free