Master complex filtering to pinpoint network issues with precision
Wireshark's true power lies in its ability to filter packets with incredible precision. Advanced filtering techniques allow you to isolate specific traffic patterns, protocols, or anomalies, making your network analysis more efficient and effective.
| Operator | Description | Example |
|---|---|---|
| == | Equal | ip.addr == 192.168.1.1 |
| != | Not equal | ip.addr != 10.0.0.1 |
| > | Greater than | frame.len > 1000 |
| < | Less than | tcp.window_size < 5000 |
| >= | Greater than or equal | tcp.port >= 1024 |
| <= | Less than or equal | udp.length <= 100 |
and or &&: Both conditions must be trueor or ||: Either condition can be truenot or !: Negates the condition
(ip.src == 192.168.1.100 and tcp.port == 80) or (ip.dst == 10.0.0.1 and udp.port == 53)
This filter shows HTTP traffic from 192.168.1.100 or DNS traffic to 10.0.0.1.
http.host contains "example": Matches any HTTP host containing "example"ip.addr matches "192.168.1.[1-5]": Matches IP addresses from 192.168.1.1 to 192.168.1.5frame contains "password": Finds packets containing the word "password"data.data contains 00:ff:aa: Locates packets with specific byte sequencesframe.time >= "Jun 02, 2023 15:00:00": Shows packets after a specific timeframe.time_relative < 60: Displays packets within the first minute of capturetcp.analysis.retransmission: Identifies TCP retransmissionshttp.response.code == 404: Finds HTTP 404 responsesdns.qry.name contains "google": Shows DNS queries for Google domainsUse capture filters to reduce the amount of data captured, then apply display filters for detailed analysis:
host 192.168.1.100http or dns
tcp.analysis.flags && !tcp.analysis.window_update
This filter helps identify potential TCP performance issues by showing packets with TCP analysis flags, excluding window updates.
(http.request.method == "POST" or http.request.method == "GET") and http.host contains "login"
Use this to monitor login attempts, which could be useful for detecting brute force attacks.
ip.addr == 192.168.1.100 and tcp.port == 8080 and frame contains "error"
This filter could help debug an application running on a specific host and port, looking for error messages.
rtp.ssrc == 0x12345678 and (rtp.timestamp < 54321 or rtp.timestamp > 98765)
Analyze RTP streams for a specific session, focusing on packets with timestamps outside an expected range.
# This filter shows HTTP POST requests to login pageshttp.request.method == "POST" and http.host contains "login"