Packet Capture for Beginners
When troubleshooting network issues, logs only tell part of the story. Sometimes you need to see exactly what is happening on the wire. That’s where packet captures come in.
Packet capture allows you to record and inspect network traffic between devices. Whether you’re diagnosing connectivity problems, investigating security incidents, or learning how network protocols work, packet captures provide valuable insight into what is actually being transmitted.
Why Use Packet Captures?
Packet captures can help answer questions such as:
- Is a device communicating with the correct server?
- Is DNS resolving correctly?
- Is the TCP handshake completing?
- Are packets being dropped?
- Is an application sending unexpected traffic?
- Is encrypted or unencrypted traffic being used?
Instead of guessing, you can examine the traffic and verify what is happening.
Common Tools
Several tools can capture network traffic:
- Wireshark
- tcpdump
- tshark
- Zeek (for network monitoring and analysis)
Each tool serves a different purpose, but they all help you understand network communications.
Understanding a Packet Capture
A packet capture records individual network packets as they travel across the network.
Each packet typically contains information such as:
- Source IP address
- Destination IP address
- Source and destination ports
- Protocol
- Packet length
- Timing information
- Protocol-specific details
Together, these details help build a timeline of communication between devices.
Start with the Basics
When opening a packet capture, don’t try to understand everything at once.
Instead, begin by answering simple questions:
- Who is talking?
- Who are they talking to?
- Which protocol is being used?
- Is the communication successful?
- Are there any errors or repeated attempts?
This approach makes even large captures much easier to analyze.
Common Protocols You’ll See
As you review traffic, you’ll frequently encounter:
- DNS
- TCP
- UDP
- HTTP
- HTTPS
- ICMP
- DHCP
- ARP
Learning how these protocols interact provides a strong foundation for troubleshooting and security analysis.
Useful Display Filters
Filtering traffic allows you to focus on the packets that matter.
Some commonly used filters include:
dnstcpudpicmphttphttpsip.addr == 192.168.1.100tcp.port == 80tcp.port == 443
Applying filters reduces noise and makes large captures easier to interpret.
Following a Conversation
One of the most useful techniques is following a conversation between two devices.
This allows you to observe:
- Connection establishment
- Data exchange
- Connection termination
- Errors or unexpected responses
Viewing the entire conversation often makes problems much easier to identify than looking at individual packets.
Practical Uses
Packet captures are useful in many situations, including:
- Troubleshooting slow network performance
- Investigating DNS issues
- Diagnosing application connectivity problems
- Verifying firewall rules
- Confirming successful TCP connections
- Investigating suspicious network activity
They are just as valuable for everyday troubleshooting as they are during incident response.
Final Thoughts
Packet captures can seem overwhelming at first because they contain a large amount of technical information. The key is to approach them methodically by identifying the devices involved, the protocol being used, and whether the communication behaves as expected.
With practice, packet analysis becomes one of the most valuable skills for system administrators, network engineers, and cybersecurity professionals. Understanding what is happening on the network allows you to troubleshoot more effectively, validate your assumptions, and gain deeper insight into how modern networks operate.