NETLEARN
Lesson 01Traffic Analysis

Capturing Packets to a PCAP

A capture is a recording of packets, saved to a file for later study. How you start it matters: the interface you listen on, how much of each packet you keep, and what you filter out decide whether the file answers your question or wastes your time.

Layer
Tooling · where analysis begins
Reference
pcapng / pcap
Steps
5
  1. 01pick a point
  2. 02write to file
  3. 03snaplen
  4. 04capture filter
  5. 05privilege

One tap, one step. Net narrates that step for a moment, then waits for your next tap.

Common misunderstandings

  • A capture filter that is too narrow is the most common reason a file looks empty. Widen it and reproduce the event.

Key notes

pcap / pcapng
Two file formats. pcapng is newer and can hold multiple interfaces and comments.
Snaplen
A short snaplen keeps headers only. -s 0 means keep the whole packet.
Capture vs display filter
Capture filters (BPF) decide what is stored; display filters only hide what is already captured.
Ethics
Only capture networks you own or are permitted to monitor.