Courseiva
TroubleshootinghardMultiple ChoiceObjective-mapped

XK0-006 Troubleshooting Practice Question

A system administrator needs to capture network traffic on interface eth0, filtering for packets to or from host 10.0.0.1, and save the output to a file for later analysis. Which command accomplishes this?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

tcpdump -i eth0 host 10.0.0.1 -w capture.pcap

Both tcpdump -i eth0 host 10.0.0.1 -w capture.pcap (A) and tcpdump -i eth0 -w capture.pcap host 10.0.0.1 (D) are valid commands to capture packets to/from host 10.0.0.1 on interface eth0 and write them to a file. In tcpdump, the -w option can be placed before or after the filter expression, as long as -w is followed by the filename. Options B and C are incorrect because they use wrong syntax or options.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • tcpdump -i eth0 host 10.0.0.1 -w capture.pcap

    Why this is correct

    Correct. The syntax '-i eth0 host 10.0.0.1 -w capture.pcap' captures packets to/from host 10.0.0.1 on interface eth0 and writes to file.

  • tcpdump -n port 10.0.0.1 -w capture.pcap

    Why it's wrong here

    Incorrect. The -n flag disables name resolution, and 'port' is for filtering by port number, not host IP. The syntax is wrong for host filtering.

  • tcpdump -i eth0 -host 10.0.0.1 > capture.pcap

    Why it's wrong here

    Incorrect. The '-host' flag is invalid; the correct flag is 'host' without a hyphen. Also, using output redirection (>) saves text output, not packet capture data; the -w flag is needed for binary capture.

  • tcpdump -i eth0 -w capture.pcap host 10.0.0.1

    Why this is correct

    Correct. In tcpdump, the -w option can appear before the filter expression. This command is equivalent to A; tcpdump parses the arguments correctly.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

About these practice questions

One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.