This wiki has been migrated to and is now deprecated. Please use that site instead.


Wireshark uses display filters for general packet filtering while viewing and for its ColoringRules.

The basics and the syntax of the display filters are described in the User's Guide.

The master list of display filter protocol fields can be found in the display filter reference.

If you need a display filter for a specific protocol, have a look for it at the ProtocolReference.

Display filter is not a capture filter

Capture filters (like tcp port 80) are not to be confused with display filters (like tcp.port == 80). See also CaptureFilters#Capture_filter_is_not_a_display_filter.


Show only SMTP (port 25) and ICMP traffic:

Show only traffic in the LAN (192.168.x.x), between workstations and servers -- no Internet:

TCP buffer full -- Source is instructing Destination to stop sending data

Filter on Windows -- Filter out noise, while watching Windows Client - DC exchanges

Sasser worm: --What sasser really did--

Match packets containing the (arbitrary) 3-byte sequence 0x81, 0x60, 0x03 at the beginning of the UDP payload, skipping the 8-byte UDP header. Note that the values for the byte sequence implicitly are in hexadecimal only. (Useful for matching homegrown packet protocols.)

The "slice" feature is also useful to filter on the vendor identifier part (OUI) of the MAC address, see the Ethernet page for details. Thus you may restrict the display to only packets from a specific device manufacturer. E.g. for DELL machines only:

It is also possible to search for characters appearing anywhere in a field or protocol by using the contains operator.

Match packets that contains the 3-byte sequence 0x81, 0x60, 0x03 anywhere in the UDP header or payload:

Match packets where SIP To-header contains the string "a1762" anywhere in the header:

The matches, or ~, operator makes it possible to search for text in string fields and byte sequences using a regular expression, using Perl regular expression syntax. Note: Wireshark needs to be built with libpcre in order to be able to use the matches operator.

Match HTTP requests where the last characters in the uri are the characters "gl=se":

Note: The $ character is a PCRE punctuation character that matches the end of a string, in this case the end of http.request.uri field.

Filter by a protocol ( e.g. SIP ) and filter out unwanted IPs:

  ip.src != && ip.dst != && sip

[ Feel free to contribute more ]


Some filter fields match against multiple protocol fields. For example, "ip.addr" matches against both the IP source and destination addresses in the IP header. The same is true for "tcp.port", "udp.port", "eth.addr", and others. It's important to note that

This can be counterintuitive in some cases. Suppose we want to filter out any traffic to or from We might try the following:

This translates to "pass all traffic except for traffic with a source IPv4 address of and a destination IPv4 address of", which isn't what we wanted.

Instead we need to negate the expression, like so:

This translates to "pass any traffic except with a source IPv4 address of or a destination IPv4 address of", which is what we wanted.

This can also happen if, for example, you have tunneled protocols, so that you might have two separate IPv4 or IPv6 layers and two separate IPv4 or IPv6 headers, or if you have multiple instances of a field for other reasons, such as multiple IPv6 "next header" fields.

If you have a filter expression of the form name op value, where name is the name of a field, op is a comparison operator such as == or != or < or..., and value is a value against which you're comparing, it should be thought of as meaning "match a packet if there is at least one instance of the field named name whose value is (equal to, not equal to, less than, ...) value". The negation of that is "match a packet if there are no instances of the field named name whose value is (equal to, not equal to, less than, ...) value"; simply negating op, e.g. replacing == with != or < with >=, give you another "if there is at least one" check, which is not the negation of the original check.

See Also


DisplayFilters (last edited 2017-01-23 15:27:54 by ChristopherMaynard)