WireShark.Com is not affiliated with Ethereal Wireshark

Wireshark DNS Filter Examples (Queries, Responses, Errors)

When DNS is acting weird, you don’t want to scroll through a capture forever. These display filters help you isolate DNS queries, responses, domain lookups, and common failure codes in Wireshark.

What this page covers

Everything here uses display filters (the filter bar in Wireshark). Display filters only change what you see — they don’t change what was captured.

Most used DNS filters: dns, dns.flags.response == 0, dns.flags.response == 1, dns.qry.name contains "example".

Show DNS traffic

Start here. This shows DNS packets (queries and responses):

dns

DNS queries only

Useful when you want to see what a device is asking for (and whether it’s repeating requests).

dns.flags.response == 0

DNS responses only

Helpful when you want to focus on answers coming back from a resolver or DNS server.

dns.flags.response == 1

Filter DNS by domain name

This is the fastest way to confirm whether a specific domain was looked up during the capture:

dns.qry.name contains "example"

Replace example with a real domain fragment (like google, microsoft, or your internal hostname).

Filter common DNS errors

If pages won’t load or apps can’t connect, the response code often tells you why. These are the most common:

NXDOMAIN (name doesn’t exist)

The domain or hostname wasn’t found.

dns.flags.rcode == 3

SERVFAIL (server failure)

The DNS server couldn’t complete the request.

dns.flags.rcode == 2

NOERROR (successful lookup)

The DNS query completed successfully.

dns.flags.rcode == 0

A quick DNS troubleshooting workflow

  1. Filter DNS traffic: dns
  2. Check if queries exist: dns.flags.response == 0
  3. Check if responses exist: dns.flags.response == 1
  4. Search for the hostname: dns.qry.name contains "example"
  5. If responses exist, review the response code: dns.flags.rcode

If you see repeated queries with no matching response, you may be looking at packet loss, a blocked resolver, or upstream timeout issues.

Download note

If you don’t have Wireshark installed, download it directly from Wireshark.org:

Go to Wireshark.org downloads

FAQ

What’s the basic Wireshark DNS filter?

Use dns to display DNS traffic in the packet list.

How do I show DNS queries only?

Use dns.flags.response == 0.

How do I find a specific domain lookup?

Use dns.qry.name contains "example" and replace example with your target domain text.

WireShark.Com

is not affiliated with Ethereal Wireshark

We provide independent educational content about packet sniffers, network traffic analysis, and troubleshooting techniques. Our goal is to help learners and professionals understand packet behavior and diagnose real-world network issues.

Troubleshooting Guides

Common Packet Capture Tools

Copyright 2025 WireShark.Com. All rights reserved. All information on this website is free of charge and is given without warranty.

Scroll to Top