Courseiva
Troubleshooting →hardMultiple Choice

XK0-006 Troubleshooting Practice Question

An administrator needs to capture network traffic on interface eth0, filter for packets to/from host 10.0.0.1, and save the output to a file for later analysis. Which command should be used?

⚠ Common exam trap

Test-takers frequently confuse `src` and `dst` filters as sufficient for capturing all traffic to/from a host, forgetting that `host` is the correct primitive for bidirectional capture.

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

The `tcpdump` command with the `host` filter captures all traffic (both source and destination) to or from the specified IP address, which matches the requirement to filter for packets to/from host 10.0.0.1. The `-i eth0` specifies the interface, and `-w capture.pcap` writes the output to a file for later analysis.

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 src 10.0.0.1 -w capture.pcap

    Why it's wrong here

    The src filter captures only packets originating from 10.0.0.1, omitting replies and traffic sent to it, so the capture is incomplete. Specifying a single direction is correct when you deliberately want one-way traffic, such as observing outbound requests from a specific client only.

  • ✗

    tcpdump -i eth0 dst 10.0.0.1 -w capture.pcap

    Why it's wrong here

    The dst filter captures only packets addressed to 10.0.0.1, discarding traffic originating from it, so the capture misses half the conversation. A one-directional filter is right when you specifically need inbound packets to a host, for example diagnosing whether requests reach a server.

  • ✓

    tcpdump -i eth0 host 10.0.0.1 -w capture.pcap

    Why this is correct

    tcpdump -i eth0 host 10.0.0.1 -w capture.pcap binds capture to eth0, applies a host filter matching traffic in either direction to or from 10.0.0.1, and writes raw packets to capture.pcap for later analysis, satisfying all three requirements.

  • ✗

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

    Why it's wrong here

    -n disables name resolution but still works; however the question does not require -n.

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 781 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.