Need to find a specific packet in Wireshark? These display filters help narrow your capture by protocol, IP address, port, or network issue. Find the filter you need, copy it, and paste it into Wireshark's display-filter bar.
How to Use a Display Filter
Open a capture in Wireshark, find the
display-filter bar above the packet list,
enter a filter such as dns,
and press Enter.
The filter bar turns green when the expression is valid. Wireshark then displays only packets that match the filter. The other captured packets are still in the file.
The example above uses
dns && dns.qry.name == "example.com"
to show the DNS request and response for
one domain.
Filter by Protocol
Start with these filters when you want to see traffic belonging to a particular protocol.
| Display filter | What it shows | Copy |
|---|---|---|
dns |
DNS queries and responses. | |
tcp |
Packets containing TCP. | |
udp |
Packets containing UDP. | |
icmp |
ICMPv4 messages, including common ping traffic. | |
tls |
Traffic Wireshark identifies as TLS. | |
http.request |
Decoded HTTP requests. |
Tip: Encrypted HTTPS traffic normally won't appear as readable HTTP requests unless it has been decrypted and dissected.
Filter by IP Address or Port
Replace the sample IP address with the address of the device you're investigating.
| Display filter | What it shows | Copy |
|---|---|---|
ip.addr == 192.168.1.10 |
IPv4 packets to or from that address. | |
ip.src == 192.168.1.10 |
IPv4 packets sent by that address. | |
ip.dst == 192.168.1.10 |
IPv4 packets sent to that address. | |
tcp.port == 443 |
TCP packets using port 443. | |
udp.port == 53 |
UDP packets using port 53, commonly DNS. | |
tcp.dstport == 80 |
TCP packets sent to port 80. |
Remember: Filtering by port does not prove which application protocol is being used. For example, TCP port 443 is common for HTTPS, while HTTP/3 often uses QUIC over UDP port 443.
Combine Display Filters
You can combine conditions to narrow a capture.
Use && for AND,
|| for OR, and
! for NOT.
| Display filter | What it shows | Copy |
|---|---|---|
tcp && ip.addr == 192.168.1.10 |
TCP traffic involving one IPv4 address. | |
dns && dns.qry.name == "example.com" |
DNS packets associated with the specified query name. | |
tcp || udp |
Packets containing TCP or UDP. | |
tcp && !(tcp.port == 443) |
TCP packets that do not use port 443. |
Filters for Network Troubleshooting
These examples help narrow down common network problems. A matching packet is a clue, not always proof of the underlying cause.
| Display filter | What it helps find | Copy |
|---|---|---|
tcp.analysis.retransmission |
Packets flagged as suspected TCP retransmissions. | |
tcp.analysis.duplicate_ack |
Duplicate TCP acknowledgments. | |
tcp.flags.reset == 1 |
TCP packets with the RST flag set. | |
tcp.analysis.zero_window |
TCP zero-window conditions. | |
dns.flags.rcode != 0 |
DNS messages with a nonzero response code, including certain errors. |
Important: Wireshark's TCP analysis depends on what was captured. Retransmission and other analysis indicators should be interpreted in context.
Display Filters vs. Capture Filters
Display filters decide which captured packets appear in the packet list. Capture filters decide which packets are collected in the first place.
For example, tcp.port == 80
is a display filter, while
tcp port 80 is capture-filter
syntax. They are not interchangeable.
Why does my filter show no packets?
Check that the capture contains the traffic you're looking for, verify the filter syntax, and confirm you're using the display-filter field rather than the capture-filter field. An empty result doesn't necessarily mean your network has a problem.