6.1.7 Lab: Explore Three-Way Handshake In Wireshark: Exact Answer & Steps

9 min read

That moment when you filter for TCP in Wireshark and suddenly three packets light up on your screen. Worth adding: sYN-ACK. I've been there. ACK. SYN. And yet most people walk past it without really understanding what just happened. Now, it looks almost too clean. In practice, it looks clean. I remember staring at those three frames thinking, "Okay, but what am I actually looking at?

Turns out, that's the whole game. And the three-way handshake is the foundation of almost every TCP connection you've ever used. And once you see it in Wireshark, you can't unsee it. Let's break it down And that's really what it comes down to. Less friction, more output..

What Is the Three-Way Handshake

The three-way handshake is how two devices agree to talk to each other using TCP. Here's the thing — that's the short version. But the short version doesn't capture how elegant it actually is.

Imagine you're trying to call someone. Worth adding: you dial (SYN). That's why they pick up and say "hello, I hear you" (SYN-ACK). Then you say "cool, let's talk" (ACK). That's why that's it. Three steps. No wasted words. TCP uses this exact sequence to establish a reliable, ordered connection before any real data flows.

Here's the technical breakdown of what each packet contains:

  • SYN — The client sends a synchronization packet. It picks a random sequence number and says, essentially, "Hey, I want to connect."
  • SYN-ACK — The server responds with both a SYN and an ACK. It acknowledges the client's sequence number and sends its own, saying, "Got it, and I want to connect too."
  • ACK — The client acknowledges the server's sequence number. The connection is open. Data can now flow.

That sequence number part is where it gets interesting. Each side picks a random starting number. This randomness is a security feature, not just a quirk. It helps prevent certain types of attacks Simple, but easy to overlook. And it works..

Why the Lab Matters

This lab — 6.1.Which means 7, explore three-way handshake in Wireshark — is usually where people either get hooked on packet analysis or check out entirely. Think about it: i've seen both. The difference is usually whether someone slows down enough to actually look at the packet details.

We're talking about where a lot of people lose the thread.

Most networking courses throw you into Wireshark and say "capture some traffic.Which means " But if you don't know what to filter for or what fields to inspect, you're just watching scrolling data. The three-way handshake gives you a perfect, self-contained event to study. Three packets. You can follow every bit Simple, but easy to overlook..

Why It Matters / Why People Care

Why does anyone care about a handshake that happens in milliseconds? Because it explains why connections fail, why they time out, and why some networks feel slower than others That alone is useful..

Here's a real scenario. You type a URL into your browser. Nothing happens. You wait. That said, then it loads. In practice, what went wrong? Maybe the SYN never got through. Maybe the SYN-ACK came back but the ACK didn't. Still, maybe the server sent a RST (reset) instead. You wouldn't know any of that unless you could see the packets Surprisingly effective..

In practice, understanding the three-way handshake helps you:

  • Diagnose connection issues faster
  • Understand TCP window sizing and flow control
  • Read Wireshark output without guessing
  • Explain network behavior in interviews or exams

And honestly, this is the part most guides get wrong. Because of that, they tell you what the handshake is but don't walk you through actually seeing it in Wireshark with your own eyes. That's what makes this lab different.

How It Works (or How to Do It)

Let's get into the lab. I'll walk through the steps, but I'll also explain what's happening under the hood so you're not just clicking buttons.

Step 1: Open Wireshark and Start a Capture

Fire up Wireshark. Pick your interface — usually Wi-Fi or Ethernet. Hit the blue shark fin. You're now listening to everything on the wire. That can be a lot. Which is exactly why we need to filter.

Step 2: Generate Some TCP Traffic

Open a browser and go to a website. Or run a traceroute. In practice, the key is that you need to be the one starting the connection. Anything that initiates a TCP connection will trigger the handshake. In practice, or ping a server. If you just sit there passively, you'll miss the initiation phase.

Most guides skip this. Don't.

Real talk — I usually just open http://www.example.com in a browser tab. It's fast, it's reliable, and it generates a clean three-way handshake followed by HTTP traffic Not complicated — just consistent..

Step 3: Apply the Filter

In the filter bar at the top, type:

tcp.flags.syn == 1 && tcp.flags.ack == 0

This isolates the SYN packet — the first step. Look at the packet details pane below. You should see it pop up right away. You'll see the source IP, destination IP, source port, destination port, and most importantly, the sequence number Turns out it matters..

Now change the filter to:

tcp.flags.syn == 1 && tcp.flags.ack == 1

This catches the SYN-ACK. Now, you'll see the server's response. Notice the acknowledgment number — it should be the client's sequence number plus one.

Finally, filter for:

tcp.flags.ack == 1

This pulls up the ACK packet and all the follow-up traffic. But scroll up. You'll find the third packet in the handshake right there.

Step 4: Inspect the Packet Details

Here's what most people skip, and it's worth knowing. On the flip side, click on the SYN packet. In the middle pane, expand the TCP section.

  • Source port — a random ephemeral port (something like 52341)
  • Destination port — usually 80 for HTTP, 443 for HTTPS
  • Sequence number — random, chosen by the client
  • Flags — SYN flag is set

Now look at the SYN-ACK. Still, same idea, but the server's sequence number is different. And the acknowledgment number equals the client's sequence number plus one. That's how TCP confirms it received the SYN And that's really what it comes down to..

The ACK packet should acknowledge the server's sequence number the same way Worth keeping that in mind..

Step 5: Follow the TCP Stream

Right-click any packet in the handshake and select "Follow" > "TCP Stream." This gives you a view of the entire conversation in order. It's a neat way to see the handshake in context with the actual data that follows Simple, but easy to overlook..

Common Mistakes / What Most People Get Wrong

I know it sounds simple — but it's easy to miss a few things here.

Capturing on the wrong interface. If you're on a laptop with both Wi-Fi and Ethernet, make sure you're capturing on the interface that's actually carrying the traffic. Wireshark will let you pick, but if you grab the wrong one, you'll see nothing Less friction, more output..

Confusing SYN-ACK with regular ACK. The SYN-ACK has both flags set. A plain ACK only has the ACK flag. If you filter wrong, you'll mix them up and wonder why your handshake looks broken.

Not seeing the handshake at all. This usually means the connection was already established before you started the capture. The handshake happens once. If you open the browser first and then start Wireshark, you missed it. Always start the capture before you generate the traffic Worth keeping that in mind..

Ignoring the sequence numbers. They look random, but they're not random in the sense that they don't matter. Each side increments them as data is sent

Step 6: Troubleshooting with the Handshake

Understanding the handshake isn’t just for learning—it’s a critical tool for troubleshooting. If a connection fails or behaves oddly, revisiting the handshake packets can reveal the root cause. For example:

  • Missing SYN or SYN-ACK: If the SYN-ACK isn’t seen, the server might not be listening on the correct port, or there could be a firewall blocking the response.
  • Incorrect ACK: An ACK with an acknowledgment number that doesn’t match the expected sequence (client’s SYN sequence +1) suggests a misconfiguration or packet corruption.
  • Retransmissions: Look for repeated SYN or ACK packets. This could indicate network latency, packet loss, or even a malicious attempt to disrupt the connection.

By cross-referencing sequence numbers and flags, you can pinpoint where the handshake broke down. This is especially useful in environments with high traffic or intermittent connectivity issues Turns out it matters..


Step 7: Leveraging Sequence Numbers for Data Analysis

Once the handshake is confirmed, sequence numbers become even more valuable. Every subsequent packet in the TCP stream carries a sequence number that tracks the flow of data. For instance:

  • Data packets: The sequence number increments by the number of bytes sent. If a packet is lost, the receiver will send a duplicate ACK, and the sender will retransmit.
  • Retransmission detection: Repeated sequence numbers in the stream (or gaps) signal lost or duplicated packets.
  • Window scaling: Modern TCP implementations use window scaling to handle large data transfers. Inspecting the Window field in TCP options can reveal how much data the receiver is willing to accept.

This level of detail helps diagnose performance bottlenecks, such as delayed acknowledgments or excessive retransmissions.


Step 8: Real-World Applications

The TCP handshake isn’t just academic—it’s foundational for network security and optimization. For example:

  • Security analysis: Detecting unexpected SYN packets could indicate a scan or attack.
  • Performance tuning: Monitoring handshake times helps identify latency in network paths.
  • Firewall/IDS rules: Understanding handshake patterns allows for better rule crafting to block malicious traffic.

Even in modern protocols like TLS/SSL, the TCP handshake remains the bedrock. Without a proper handshake, encrypted data transfers can’t begin.


Conclusion

Mastering the TCP three-way handshake in Wireshark is more than just a technical exercise—it’s a gateway to deeper network

Beyond the basic handshake,analysts can combine Wireshark’s capture filters with Lua scripts to automate detection of anomalous handshakes across large trace sets. Beyond that, understanding how NAT devices rewrite the three‑way exchange sheds light on why certain connections stall in cloud environments, and how to adjust TCP parameters such as the initial congestion window or timestamps for optimal performance. Even so, integrating with SIEM platforms enables real‑time alerts when suspicious SYN floods or incomplete handshakes appear, allowing rapid incident response. As networks evolve toward HTTP/3 and QUIC, the principles learned from TCP remain relevant, informing the design of new transport mechanisms and ensuring that troubleshooting skills stay transferable The details matter here. Which is the point..

In sum, a solid grasp of the TCP three‑way handshake equips network engineers with a foundational lens through which to view, diagnose, and optimize every subsequent layer of communication. Mastering the TCP three‑way handshake in Wireshark is more than just a technical exercise—it’s a gateway to deeper network insight, enabling proactive troubleshooting, enhanced security, and smarter performance tuning across today’s complex infrastructures.

Fresh from the Desk

Fresh from the Writer

You Might Like

See More Like This

Thank you for reading about 6.1.7 Lab: Explore Three-Way Handshake In Wireshark: Exact Answer & Steps. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home