Concepts / Monitoring

Monitoring

Packet capture

Also called capture filter, display filter

A copy of the packets crossing a network card, read live or saved to a file.

A capture sees the card, not the program
A capture sees the card, not the program

tcpdump gets its copy at the card. On the way in, the firewall decides afterwards, so a packet can show up in a capture and still never reach the program.

A packet capture copies what crosses a card, as tcpdump or Wireshark shows it, whatever the programs on the machine believe. A capture filter decides what is saved and a display filter chooses what you see from a saved file. On Linux the copy is taken at the card, before the firewall on the way in and after it on the way out, so a packet in a capture has reached the card and may still never reach the program. A capture only sees what reaches its own card: on a switched network that means capturing on an end machine, a mirror port or a tap.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab