Wireshark Guide: Network Protocol Analysis
Master Wireshark for network traffic capture, protocol analysis, filtering, and troubleshooting with practical examples.
Why You Need Wireshark
You need to inspect network traffic at the packet level — Wireshark captures and decodes hundreds of protocols in real time. Whether you are troubleshooting a slow connection, analyzing a malware beacon, or learning how TCP handshakes work, Wireshark shows you exactly what is on the wire.
Prerequisites
Installation
# Debian/Ubuntu
sudo apt install wireshark
# macOS
brew install --cask wireshark
# Windows: Download from wireshark.org
Capturing Traffic
sudo tshark -i eth0
sudo tshark -i eth0 -w capture.pcapng
sudo tshark -i eth0 -f "port 80" -w http-traffic.pcapng
Understanding the Interface
Packet List Pane: Summary of all packets with time, source, destination, protocol, info.
Packet Details Pane: Protocol layers in expandable tree structure.
Packet Bytes Pane: Raw packet data in hex and ASCII.
Capture Filters (BPF Syntax)
port 80
host 192.168.1.100
port 53
net 192.168.1.0/24
not arp and not icmp
Display Filters
http
dns
tcp.port == 80
ip.addr == 192.168.1.1
http.request.method == "POST"
tcp.flags.syn == 1 and tcp.flags.ack == 0
dns.qry.name contains "google"
Following Streams
Right-click a packet and select Follow > TCP Stream to see the full conversation.
{@visual wireshark-tcp-handshake}
Statistics and Analysis
Protocol Hierarchy, Conversations, Endpoints, IO Graph, Flow Graph, Expert Info.
Common Mistakes
Capturing without filters on busy networks. Forgetting promiscuous mode. Wrong interface selected.
Best Practices
Use capture filters for large networks. Save with descriptive names. Master keyboard shortcuts.
Related Tools
Related Articles
Summary
Wireshark is the premier network protocol analyzer. Effective use requires understanding capture and display filters, following protocol streams, and leveraging statistics tools.
Knowledge Check
References
{@ref wireshark-docs}
{@ref rfc793}
{@ref kali-tools}