NETLEARN
Lesson 01Traffic Analysis

Linux Networking and tcpdump

Most machines you analyse traffic on are headless. The command line gives you the same power as a capture GUI once you know a handful of tools: ip for interfaces and routes, tcpdump for capture, ss for connections, and dig for names.

Layer
Tooling · the headless workflow
Reference
iproute2 / libpcap
Steps
5
  1. 01interfaces
  2. 02capture
  3. 03expressions
  4. 04connections
  5. 05names

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

Common misunderstandings

  • Without -n, tcpdump does a DNS lookup for every packet. On a busy link that loss of speed makes the capture unreliable.

Key notes

iproute2
ip, ss, and friends replace the older ifconfig, netstat, and route tools.
Flags that matter
-n, -nn, -i any, -s 0, -w file, -c count: most tcpdump work uses just these.
Sockets
ss joins kernel socket state with process IDs, which a pcap alone cannot show.