Display Filters
Display filters control which packets are shown in the Wireshark GUI after capture. Unlike capture filters, they are incredibly flexible — you can filter by protocol fields, byte values, string matches, and even expressions.
Key Difference
Filter Syntax
A display filter expression consists of one or more primitives combined with logical operators.
1[protocol].[field] [operator] [value]
Comparison Operators
| Operator | Meaning |
|---|---|
| == | Equal |
| != | Not equal |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal |
| <= | Less than or equal |
Logical Operators
andBoth conditions must be trueip.src == 192.168.1.1 and tcp.port == 80
orEither condition can be truetcp.port == 80 or tcp.port == 443
notNegate the conditionnot arp
inCheck if value is in a settcp.port in {80 443 8080}
Common Display Filters
ip.addr == 192.168.1.1
Any packet involving IP 192.168.1.1
ip.src == 10.0.0.0/8
Source is in 10.0.0.0/8 subnet
tcp.port == 443
TCP traffic on port 443 (HTTPS)
udp.port == 53
UDP traffic on port 53 (DNS)
dns
All DNS traffic
http.request.method == "GET"
HTTP GET requests
ssl.handshake.type == 1
SSL/TLS Client Hello
frame.len > 1000
Frames larger than 1000 bytes
tcp.analysis.retransmission
TCP retransmissions
icmp.type == 8
ICMP Echo Request (ping)
arp
All ARP packets
ipv6
All IPv6 traffic
String Matching
You can match strings in packet payloads using contains, matches, or ~ (regex).
1# Find HTTP requests containing "password"2http.request.method == "POST" and http contains "password"34# Match a regex in the payload5tcp.payload matches "(?i)login"67# DNS query containing a domain8dns.qry.name contains "google"910# Search any frame data for a string11frame contains "GET /admin"
Protocol Field Reference
Wireshark exposes thousands of protocol fields. Use View > Internals > Supported Protocols or right-click any field in the packet details pane and select Prepare as Filter.
| Protocol | Useful Fields |
|---|---|
| ip | ip.src, ip.dst, ip.addr, ip.proto, ip.len, ip.ttl |
| tcp | tcp.srcport, tcp.dstport, tcp.port, tcp.flags, tcp.seq, tcp.ack |
| udp | udp.srcport, udp.dstport, udp.port, udp.length |
| http | http.request, http.response, http.host, http.uri, http.method |
| dns | dns.qry.name, dns.qry.type, dns.resp.name, dns.flags.response |
| ssl / tls | ssl.handshake.type, tls.handshake.extensions_sni, ssl.record.content_type |
| icmp | icmp.type, icmp.code, icmp.data_time |
| frame | frame.number, frame.time, frame.len, frame.protocols |
Auto-Complete
Coloring Rules with Filters
You can colorize packets in the list using display filters via View > Coloring Rules. For example:
1# Color HTTP errors red2http.response.code >= 40034# Color DNS queries cyan5dns.flags.response == 067# Color TCP retransmissions orange8tcp.analysis.retransmission