Packet Capture & Wireshark Filters
Read this concept as one more decision made about a packet in flight. The widget below lets you change the inputs and watch the consequence instead of memorising the rule.
Why it matters
A capture shows the actual bytes on an interface, including headers and retransmissions an application never sees. Learning to filter that stream is what turns a flood of frames into evidence.
On the wire
A capture library puts the NIC into promiscuous mode and timestamps each frame as it arrives, exposing Ethernet, IP, and transport headers in order. Display filters match fields such as ip.addr, tcp.flags, or frame length, while capture filters use a smaller Berkeley Packet Filter syntax applied before buffering.
When it breaks
A capture taken on the wrong interface or without promiscuous mode misses traffic not addressed to the host. Filtering too aggressively can hide the very retransmission or ARP exchange that explains the fault, and encrypted payloads cannot be interpreted from headers alone.
Capture & filter
Captured frames are timestamped in arrival order. Filter them, capture more, and expand a row to read its fields.
| Time | Protocol | Source → Dest | Info |
|---|---|---|---|
| ARP | 203.0.113.9 → broadcast | Who has 203.0.113.1? Tell 203.0.113.9 | |
| DNS | 203.0.113.9:53122 → 198.51.100.53:53 | Standard query A example.com | |
| DNS | 198.51.100.53:53 → 203.0.113.9:53122 | Response A 93.184.216.34, TTL 300 | |
| TCP | 203.0.113.9:51000 → 93.184.216.34:443 | SYN seq=0 win=64240 | |
| TCP | 93.184.216.34:443 → 203.0.113.9:51000 | SYN, ACK seq=0 ack=1 | |
| TCP | 203.0.113.9:51000 → 93.184.216.34:443 | ACK ack=1 win=64240 | |
| ICMP | 203.0.113.9 → 192.0.2.1 | Echo request id=7 seq=1 |