Learn computer networks, Wi-Fi, routers, IP addressing, network protocols, troubleshooting, and network security through practical guides and step-by-step explanations.
Knowledge Hub
Build networking skills step by step
NETWORKING / PACKET ANALYSIS
Wireshark: Meaning, Commands & Practical Guide
Learn how to capture network packets, filter traffic, inspect protocols, investigate connection problems, and practice network analysis in your own lab.
Wireshark is a free, open-source network protocol analyzer. It captures packets from supported network interfaces and displays their protocol details so you can investigate how devices communicate.
A packet capture is a recorded view of network traffic available to your capture interface. It does not automatically reveal every packet on a Wi-Fi network or decrypt encrypted communication.
2. What is Wireshark used for?
Network troubleshooting
Investigate DNS failures, retransmissions, and connection issues.
Protocol learning
Understand DNS, TCP, UDP, ICMP, HTTP, and TLS.
Security monitoring
Examine suspicious connections and unexpected traffic patterns.
Performance analysis
Inspect packet timing, TCP behavior, and communication flows.
Application debugging
Observe network exchanges when an application behaves unexpectedly.
Training and research
Practice packet analysis using sample captures and lab traffic.
Advertisement
3. Basic setup and capture
Download Wireshark from its official website.
Install it and approve the required packet-capture component when prompted.
Open Wireshark and identify your active Wi-Fi or Ethernet interface.
Double-click the interface to begin capturing packets.
Generate some normal traffic, such as opening a website you use.
Stop the capture and save it as a PCAPNG file if you need it later.
Important: Capture only traffic you own or have explicit permission to analyze. Packet captures may contain private metadata, internal addresses, or sensitive application information. Keep capture files private.
4. Useful Wireshark display filters
Enter these expressions in the display-filter bar. Display filters change which captured packets are shown; they do not limit what was originally captured.
DNS
Find domain name lookup requests and responses.
dns
TCP
Inspect TCP connections and communication.
tcp
HTTP
Find HTTP traffic when it is present and dissected.
http
TLS
Identify encrypted TLS connections and handshake details.
tls
ICMP
Inspect ping requests and replies.
icmp
DNS errors
Find DNS responses containing an error code.
dns.flags.rcode != 0
TCP retransmissions
Identify packets Wireshark marks as TCP retransmissions.
tcp.analysis.retransmission
Specific IP
Replace the sample address with an IP in your own lab.
ip.addr == 192.168.1.10
5. Command-line tools
Wireshark includes command-line utilities. Open PowerShell or a terminal where these programs are installed and available in PATH.
Replace sample.pcapng with your capture filename. Interface names, permissions, and installation paths vary by operating system.
Advertisement
6. Hands-on Wireshark practice
Work through these exercises in order. Each one builds a practical packet-analysis skill.
1. Capture your first packets
Beginner
Open Wireshark and select your active network interface.
Start capturing packets.
Open a website or run a ping in another terminal.
Stop the capture and inspect the Protocol and Info columns.
Goal: Recognize how normal network activity appears in a capture.
2. Explore DNS lookups
Beginner
Start a capture on your active interface.
Generate a DNS lookup for a domain you are allowed to test.
Apply the display filter: dns
Select a packet and expand Domain Name System in the details pane.
Goal: Identify DNS queries, response records, and returned addresses.
3. Understand TCP connections
Intermediate
Apply the filter: tcp
Select a packet and inspect source and destination ports.
Look for SYN, SYN-ACK, and ACK flags.
Use Statistics → Conversations → TCP to explore communication pairs.
Goal: Understand how TCP connections are established and which endpoints communicate.
4. Investigate network delays
Intermediate
Capture traffic while reproducing a connection problem.
Try the filter: tcp.analysis.retransmission
Inspect packet timestamps and the affected TCP stream.
Compare findings with application errors, latency tests, and router logs.
Goal: Collect evidence that may help diagnose loss or connection problems.
7. Explore packets in detail
Packet details pane
Select a packet and expand its protocol layers. Examine the Ethernet, IP, TCP or UDP, and application protocol fields that are available in that packet.
Follow a TCP stream
Right-click a TCP packet and select Follow → TCP Stream. This groups related stream data when Wireshark can reconstruct it. Encrypted TLS application data generally remains encrypted.
Statistics and conversations
Explore Statistics → Protocol Hierarchy, Conversations, and Endpoints to understand which protocols and devices appear in your capture.
Sample capture files
Practice without recording live traffic using the official Wireshark sample captures.
Identify unexpected outbound connections on an authorized device.
Investigate repeated DNS failures and unusual query patterns.
Look for unexplained communication with unfamiliar destinations.
Compare normal traffic with a capture taken during a suspected issue.
Correlate packet evidence with endpoint logs, firewall events, and DNS records.
An unfamiliar IP address, encrypted connection, or unusual packet alone does not prove malware or compromise. Validate findings with additional evidence.
9. Common beginner mistakes
Confusing capture filters with display filters.
Expecting Wireshark to capture all traffic on a switched or Wi-Fi network.
Assuming HTTPS content is readable simply because its packets are visible.
Using a private IP filter without replacing the example address.
Concluding a network is compromised based on a single suspicious-looking packet.
Start with DNS and TCP, learn to read packet details, and then investigate retransmissions and connection failures. Regular practice with known-good captures will build your network troubleshooting skills.
Continue Learning
Explore Related Topics
Continue exploring related guides to build your understanding step by step.