Keep the Host in Scope: Grouped Wireshark Filters
Compare grouped and ungrouped filters, check an exact DNS name, and restore context in a small capture with two clients.
Capture file
- Format
- pcapng
- Packets
- 40
- Duration
- 121 seconds
- File size
- 4544 bytes
- Protocols
- Ethernet, IPv4, TCP, UDP, DNS, HTTP, ARP
What you’ll practise
- Predict which clients a grouped display filter retains.
- Explain why an ungrouped OR condition includes another client's HTTP traffic.
- Use an exact DNS name match and widen the view to compare adjacent exchanges.
- Recognise that a negated IPv4 condition also retains ARP.
Keep one workstation in scope
An analyst wants DNS and HTTP for workstation 192.0.2.17. Another workstation is active on the same client-facing sensor. This synthetic recording contains selected exchanges shortly after 10:00 UTC on 6 December 2026.
Your task is to compare two expressions, find the records that changed, and explain why. Keep a note of each expression, its displayed packet count and one supporting frame. Allow about fifteen minutes. The capture has its own frame numbers.
Predict before applying the filter
Open the PCAPNG in Wireshark and clear the display filter. Apply ip.addr == 192.0.2.17 && (dns || http). Record the displayed count and inspect a retained query, reply and HTTP request.
Now apply ip.addr == 192.0.2.17 && dns || http. Predict what can appear, then compare the count. Find an HTTP request that the grouped expression excluded. Record its client and request path.
Restore the grouped expression and confirm that the extra client disappears. The bare http filter shows application records, so TCP handshakes are outside that protocol-filter result.
Check the name, then widen the view
Apply dns.qry.name == "status.example.test". Count the queries and replies separately before recording the total. Then widen the expression to ip.addr == 192.0.2.17 && dns and inspect the DNS exchange between the first two queries for the original name.
Finally apply !(ip.addr == 192.0.2.17) and inspect the protocol of the first remaining record. Does every row have an IPv4 header? Clear the filter to recover the full view.
Answer the five questions after comparing the records. Feedback supplies exact frame references. The DNS evidence reference supports the distinction between question names, replies and conclusions.