Linux Network Pro Analyzing Traffic with tcpdump Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 12 | Questions: 20 | Updated: Aug 14, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. How do you capture traffic between two specific hosts?

Explanation

The `host` filter matches packets involving a specified IP address. Combining two `host` filters with `and` captures only traffic where both 192.168.1.1 and 192.168.1.2 are involved, in either direction. The other options use invalid or unsupported tcpdump filter syntax.

Submit
Please wait...
About This Quiz
Linux Network Pro Analyzing Traffic With Tcpdump Quiz - Quiz

This quiz evaluates your ability to use tcpdump for network traffic analysis on Linux systems. You will demonstrate knowledge of packet capture syntax, filtering options, output interpretation, and practical troubleshooting scenarios. Essential for network professionals managing and diagnosing network issues.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which option writes output to a file in pcap format for later analysis?

Explanation

The `-w` option saves captured packets to a file. Using `-w output.pcap` writes them in pcap format, allowing the capture to be opened and analyzed later with packet-analysis tools.

Submit

3. Which command captures traffic from source IP 10.0.0.5 to port 22?

Explanation

The filter `src 10.0.0.5` matches packets originating from that IP, while `dst port 22` limits the capture to packets addressed to port 22. Combined with `and`, both conditions must be true for a packet to be captured.

Submit

4. How do you capture ICMP traffic (ping requests and replies)?

Explanation

The `icmp` filter limits tcpdump to Internet Control Message Protocol packets, including ping echo requests and replies. Therefore, `tcpdump icmp` captures ping traffic without displaying unrelated packets.

Submit

5. What does the 'not' operator do in a tcpdump filter?

Explanation

The `not` operator reverses the result of a filter condition. It selects packets that do not match the specified criteria, allowing you to exclude particular traffic from tcpdump’s output.

Submit

6. Which option displays the payload in hexadecimal and ASCII?

Explanation

In `tcpdump`, `-X` displays each packet’s payload in both hexadecimal and ASCII, making the raw bytes and readable text visible together. By contrast, `-A` shows ASCII only, while `-x` shows hexadecimal only.

Submit

7. What does 'tcpdump -c 100' do?

Explanation

The `-c` option sets a packet-count limit. With `tcpdump -c 100`, packet capture stops automatically after 100 packets have been captured.

Submit

8. What is the primary purpose of tcpdump?

Explanation

tcpdump is a command-line packet analyzer that captures network traffic and displays packet details as they arrive. It helps troubleshoot connectivity issues, inspect protocols, and observe communication between hosts. It does not configure interfaces, monitor system resources, or manage firewall rules.

Submit

9. What does the -n flag in tcpdump prevent?

Explanation

The `-n` flag tells tcpdump to display IP addresses numerically rather than translating them into hostnames. This avoids DNS lookups during packet capture and makes output faster and more direct.

Submit

10. How do you capture traffic on port 443 only?

Explanation

`tcpdump port 443` captures packets whose source or destination port is 443, commonly used for HTTPS traffic. The other options do not use valid `tcpdump` filter syntax.

Submit

11. What does the expression 'host 192.168.1.100' do in tcpdump?

Explanation

In tcpdump, `host 192.168.1.100` is a filter that matches packets where that IP address is either the source or destination, showing traffic to or from the specified host.

Submit

12. How would you read a previously captured tcpdump file?

Explanation

The `-r` option tells tcpdump to read and display packets from an existing capture file. By contrast, `-w` writes packets to a file, while `-i` specifies a network interface for live capture.

Submit

13. What does the -w flag in tcpdump do?

Explanation

The `-w` flag saves captured packets to a file in tcpdump’s packet capture format, rather than displaying them in the terminal. The file can later be read and analyzed with tcpdump or other packet-analysis tools.

Submit

14. Which flag is used to capture packets on a specific network interface with tcpdump?

Explanation

The `-i` flag specifies the network interface tcpdump should listen on, allowing you to capture packets from a particular interface, such as `eth0` or `wlan0`. Use `tcpdump -i eth0` to capture traffic on `eth0`. The other flags control name resolution, verbosity, or writing captured packets to a file.

Submit

15. What is the correct syntax to capture DNS traffic (port 53)?

Submit

16. Which tcpdump filter expression captures only TCP traffic?

Explanation

In tcpdump’s filter syntax, `tcp` is a protocol qualifier that matches packets carrying TCP traffic. The other choices are not valid expressions for selecting TCP packets in this context.

Submit

17. What is the default snapshot length (-s flag) in tcpdump?

Explanation

The `-s` option sets the snapshot length—the maximum number of bytes tcpdump captures from each packet. Its default is 65,535 bytes, allowing it to capture nearly the full contents of standard network packets rather than only their headers.

Submit

18. How do you filter for packets with the TCP SYN flag set?

Explanation

The `tcp[tcpflags]` expression accesses the TCP flags field, and `& tcp-syn` applies a bitmask to check whether the SYN bit is set. Comparing the result with `!= 0` selects packets where that flag is present, including packets that may have other TCP flags set as well.

Submit

19. Which flag increases the verbosity level of tcpdump output?

Explanation

tcpdump supports multiple verbosity levels: `-v` enables additional packet details, while `-vv` and `-vvv` provide progressively more information. Each flag increases verbosity, so all three options qualify.

Submit

20. What does the -S flag in tcpdump do?

Explanation

The `-S` flag makes tcpdump display absolute TCP sequence numbers rather than relative numbers. This can help when analyzing TCP connections, comparing sequence values across packets, or troubleshooting retransmissions and other connection issues.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
How do you capture traffic between two specific hosts?
Which option writes output to a file in pcap format for later...
Which command captures traffic from source IP 10.0.0.5 to port 22?
How do you capture ICMP traffic (ping requests and replies)?
What does the 'not' operator do in a tcpdump filter?
Which option displays the payload in hexadecimal and ASCII?
What does 'tcpdump -c 100' do?
What is the primary purpose of tcpdump?
What does the -n flag in tcpdump prevent?
How do you capture traffic on port 443 only?
What does the expression 'host 192.168.1.100' do in tcpdump?
How would you read a previously captured tcpdump file?
What does the -w flag in tcpdump do?
Which flag is used to capture packets on a specific network interface...
What is the correct syntax to capture DNS traffic (port 53)?
Which tcpdump filter expression captures only TCP traffic?
What is the default snapshot length (-s flag) in tcpdump?
How do you filter for packets with the TCP SYN flag set?
Which flag increases the verbosity level of tcpdump output?
What does the -S flag in tcpdump do?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!