Fundamentals 10 min read

Master Network Packet Analysis with Wireshark: From Basics to TCP Handshake

This guide introduces Wireshark, a powerful open‑source packet capture tool, explains what it can and cannot do, compares it with Fiddler, details its interface, filtering options, OSI layer mapping, and walks through a practical TCP three‑way handshake analysis, helping network engineers and testers master protocol inspection.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Network Packet Analysis with Wireshark: From Basics to TCP Handshake

Introduction

This article introduces Wireshark, a popular open‑source network packet analysis tool that can capture HTTP, TCP, UDP and other protocol packets, helping users visualize each field and deepen their understanding of network protocols.

Wireshark Overview

Official website: http://www.wireshark.org/

Wireshark runs on Windows and macOS, is free to use, and requires users to understand network protocols to interpret captured data.

What Wireshark Cannot Do

For security reasons, Wireshark can only view packets; it cannot modify or send packets.

Wireshark vs. Fiddler

Fiddler is a Windows program that captures HTTP/HTTPS traffic. Wireshark can capture HTTP and HTTPS but cannot decrypt HTTPS content. Use Fiddler for HTTP/HTTPS analysis and Wireshark for other protocols such as TCP and UDP.

Similar Tools

Microsoft Network Monitor

Sniffer

Typical Users

Network administrators for troubleshooting

Software test engineers for analyzing test traffic

Socket programmers for debugging

Engineers at companies like Huawei and ZTE

Starting a Capture

Wireshark captures traffic on a selected network interface. Open Capture → Interfaces… , choose the appropriate NIC, and click Start .

Capture Interfaces Dialog
Capture Interfaces Dialog

Wireshark Window Overview

The main panes are:

Display Filter – filters captured packets.

Packet List Pane – shows captured packets with source, destination, protocol, length, etc.

Packet Details Pane – displays fields of the selected packet.

Dissector Pane – shows raw hexadecimal data.

Miscellaneous – address bar and other controls.

Wireshark Main Window
Wireshark Main Window

Display Filtering

Filters are essential to reduce noise. There are two types:

Display filters – applied to the captured view to locate specific packets.

Capture filters – set in Capture → Capture Filters to limit what is recorded.

Saving Filters

Enter a filter expression, click Save , give it a name (e.g., "Filter 102"), and it appears as a button for quick reuse.

Save Filter Dialog
Save Filter Dialog

Filter Expression Rules

Protocol filter: tcp – shows only TCP packets.

IP filter: ip.src == 192.168.1.102 or ip.dst == 192.168.1.102.

Port filter: tcp.port == 80 or tcp.srcport == 80.

HTTP method filter: http.request.method == "GET".

Logical operators: and, or.

Packet List Pane Details

Shows packet number, timestamp, source, destination, protocol, length, and brief info. Colors can be customized via View → Coloring Rules .

Packet List Example
Packet List Example

Packet Details Pane

This pane reveals each protocol layer’s fields, such as:

Frame – physical layer overview.

Ethernet II – data link layer header.

Internet Protocol Version 4 – IP header.

Transmission Control Protocol – TCP segment header.

Hypertext Transfer Protocol – HTTP information.

Wireshark and the OSI Model

OSI Model Mapping
OSI Model Mapping

TCP Packet Details

TCP Packet Fields
TCP Packet Fields

Example: TCP Three‑Way Handshake

The following images illustrate the three packets of the handshake captured by Wireshark.

SYN Packet
SYN Packet

First packet: client sends SYN with sequence number 0.

SYN‑ACK Packet
SYN‑ACK Packet

Second packet: server replies with SYN‑ACK, acknowledging the client’s ISN + 1.

ACK Packet
ACK Packet

Third packet: client sends ACK with ACK flag set, completing the handshake.

After the three packets, the HTTP request follows, confirming that HTTP operates over a TCP‑established connection.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

network analysisPacket CaptureWiresharkTCP handshakeprotocol filtering
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.