You applied a filter in Wireshark and the DNS packets vanished. Clear the display filter first. If the packets return, the filter had only hidden them. If they were excluded during capture, they were never written to that file.
A capture filter decides which packets the capture records. A display filter chooses which of the recorded packets Wireshark shows you. The filters also use different syntax.
Download the five-packet practice capture.
This practice capture contains five fictional packets. You can open it offline and compare the two outcomes without capturing any live traffic.
Five Packets, One Question
The practice client asks its resolver for the address of training.example. A DNS response gives it an address. The client then starts a TCP connection to port 443 at that address.
Frames 1 and 2 show the DNS query and response. Frames 3, 4, and 5 show the TCP handshake. The sample contains no TLS handshake or application data.
The question you ask changes what you want to keep. If you are checking whether a connection started, the TCP frames may be enough. If you need to explain how the client got the address, keep the DNS exchange too.
A Display Filter Hides the DNS Packets
Open wireshark-filter-practice.pcap. In the display-filter bar above the packet list, enter tcp.port == 443 and apply it.
In this capture, the visible list starts at frame 3, followed by 4 and 5. The gap in frame numbers is a clue that the first two frames are still in the file.
Clear the display filter. All five frames return. Apply dns to see only the first two. Changing the view hasn't changed the saved capture.
We checked the same display filter in TShark 4.6.10. It returned frames 3, 4, and 5 from the original five-frame file.
Scroll horizontally if needed to see the full table.
For a broader tour of packet lists, packet details, and other filters, see the Wireshark network analysis walkthrough.
A Capture Filter Leaves the DNS Packets Out
Before a new live capture, tcp port 443 is the equivalent capture expression for this small sample. If the same five packets passed the capture point, only the three TCP packets would be retained.
For our offline test, we applied that expression with tcpdump 4.99.1 and wrote the matches to a separate file. This shows what the retained packet set looks like without starting a live capture.
When we opened the retained file, its three TCP frames were numbered 1 through 3. Clearing a display filter did not bring back DNS. The subset did not contain those two earlier packets.
Frame numbers are local to a capture file. Frame 1 in that subset corresponds to frame 3 in the original. When you compare notes, include the filename with the frame number.
Same Visible Rows, Different Files
Compare the second and third illustrations. Both show the same three TCP packets. The status counts tell you what happened to the two DNS packets.
In the original file, three of five packets are displayed. The first visible frame is 3. When you clear the display filter, the count rises to five again.
In the separate file, three of three packets are displayed. Clearing the bar leaves the count at three. There is no DNS exchange to show.
If a colleague sends you only a screenshot, ask for the capture. A screenshot of three rows cannot tell you what else is stored in the underlying file.
If you are handing over the screenshot, keep the status bar in the crop and include the capture filename. The packet counts and filename help someone reproduce the view.
Why Port 443 Does Not Tell You the Whole Story
A TCP port filter checks a field in the transport header. In this sample it finds the connection setup, because the client uses destination port 443 and the server replies from source port 443.
That alone doesn’t tell you which application used the connection. A port is a clue. In this file, you can see the TCP handshake and no application traffic to classify.
The capture expression tcp port 443 also excludes UDP. If you are investigating a service that could use UDP or another port, find out what the capture retained before concluding that its traffic never happened.
DNS is a similar case. A dns display filter finds packets Wireshark has decoded as DNS. An empty result in a given file describes that file and that filter. It does not prove a client never resolved any names.
If the Packets Still Don't Show Up
Scroll horizontally if needed to see the full table.
A capture can miss a packet for more than one reason. A filter, the wrong network interface, and a recording that starts after the event can leave similar-looking gaps.
Ask for the original file or capture notes when the distinction matters. If you have only the subset, explain that limit in your report.
Decide What Evidence the Filter Needs to Preserve
If you are collecting on an authorized practice interface, decide what information you need before choosing a capture filter. A narrow filter helps manage the recording size, but it also narrows the evidence.
In our exercise, an analyst who only has the three TCP frames can establish that those frames are present. They cannot connect the destination to the name in the earlier DNS response using that file alone.
If the capture contains the DNS exchange, compare the address in the response with the destination of the later TCP connection. That link is visible in the packet sequence in this example.
Real traffic may include several responses, cached answers, redirects, or background connections. Record the timestamps and endpoints that make the connection plausible before attributing traffic to one name.
Keep the Original and Label the Subset
If you want to share just the three TCP frames from this exercise, export them to a fresh file. Give the copy a distinct name and record how you selected those packets.
A display filter applied in Wireshark is a view. An exported subset is another file with fewer packets. When another examiner receives that subset, the hidden DNS frames are unavailable in it.
Capture format is a separate choice. Saving the same subset as PCAPNG can preserve metadata that PCAP cannot carry, but it cannot add the excluded packets. See what changes when a capture is converted between PCAP and PCAPNG.
Try the five-frame file one more time. Apply the display filter, clear it, then compare those results with the packet counts above. If you can explain where the DNS frames are in each case, you can tell a filtered view from an incomplete capture.