AP Networking • CLI evidence & troubleshooting

Network Command-Line Tools: Choose the Command That Answers the Next Question

Use ipconfig, ping, tracert/traceroute, nslookup, ARP, and netstat as bounded evidence—not a memorized checklist. Learn what each result proves, what it cannot prove, and how one output determines the next test.

Independent AP Networking resource • Updated 2026-10-06 • Built for students and teachers
Free CLI deck: 24 interactive flashcards on tool selection, output interpretation, evidence boundaries, and next-test reasoning.
Start Flashcards
Tool selection

Start with the unresolved question, not your favorite command

A command-line tool is valuable when its output separates competing explanations. Running six commands in a fixed order can produce lots of text without producing much diagnosis.

If you need to know what IPv4 address, gateway, DNS server, and DHCP state a Windows host currently has, ipconfig /all is direct. If numeric IP connectivity works but names fail, a DNS query is higher value than another gateway ping. If a server is reachable but a TCP service may not be running locally, socket/listener evidence is more relevant than traceroute.

For every command, write two statements: what question am I asking? and what will each possible result allow me to conclude? That turns CLI output into evidence rather than decoration.

Evidence ladder

Move from host configuration to local reachability, path, naming, and service state

1. Host state

Address, mask/prefix, gateway, DNS, DHCP, adapter. Use configuration output before blaming the path.

2. Local next hop

Test the intended gateway and inspect local neighbor resolution when that question matters.

3. Remote IP path

Use controlled numeric-IP tests and path visibility to ask whether traffic progresses beyond the local network.

4. Name resolution

Query DNS directly and distinguish timeout, NXDOMAIN, wrong data, and resolver differences.

5. Local service state

On the host you control, inspect whether the expected service is actually listening.

6. Verification

Repeat the original failed requirement and keep a known-good control after the repair.

ipconfig

Read configuration before using reachability tests to explain it

ipconfig /all can expose Windows adapter details including IPv4 addressing, subnet mask, default gateway, DHCP information, DNS servers, and lease-related fields. Start by identifying the active adapter; a laptop may show Ethernet, Wi-Fi, VPN, Bluetooth, and virtual interfaces at once.

Interpret combinations, not isolated fields. A 169.254/16 address supports a failed normal IPv4 configuration branch. A valid address from the wrong subnet can support a VLAN/DHCP placement problem. A correct address and gateway with an unexpected DNS server points somewhere different.

IPv4 Address . . . . . . : 10.40.18.27 Subnet Mask . . . . . . : 255.255.255.0 Default Gateway . . . . : 10.40.18.1 DHCP Enabled . . . . . . : Yes DNS Servers . . . . . . : 10.40.2.53

This output describes host configuration. It does not prove the gateway replies, DNS is healthy, or a remote application is available. Use the IPConfig Command Guide for deeper field interpretation.

ping

Choose the target so the ICMP result answers a specific reachability question

A successful ping means the tested ICMP Echo exchange received replies under those conditions. The destination determines the diagnostic value. A gateway reply supports local IP reachability to that gateway; a remote numeric-IP reply extends evidence beyond the local segment; a hostname ping also introduces name resolution before ICMP can target the resolved address.

Failure is less conclusive. ICMP can be filtered or rate-limited, a path can be broken, the host can be misconfigured, or the destination can simply decline Echo Replies. Therefore “ping failed, server is down” is usually too broad.

A useful sequence is comparative rather than ritualistic: test the nearest dependency relevant to the symptom, then a farther dependency, preserving what each success establishes. See the Ping Command Guide for the full evidence model.

tracert / traceroute

Interpret responding hops and missing replies without declaring the first asterisk guilty

tracert on Windows and traceroute on Unix-like systems use TTL/Hop Limit behavior and probe responses to reveal responding Layer 3 hops toward a destination. They are useful when you need path visibility, especially when comparing a working destination, a failing destination, or behavior before and after a routing change.

1 1 ms 1 ms 1 ms 10.40.18.1 2 4 ms 4 ms 5 ms 172.16.0.1 3 * * * 4 17 ms 16 ms 17 ms 198.51.100.9

Hop 3's asterisks do not prove forwarding stopped there because hop 4 responded. The router at hop 3, or policy around diagnostic responses, may suppress or rate-limit the relevant reply while forwarding probes onward. The evidence boundary is “no diagnostic reply was shown for that probe/hop,” not “this router is broken.”

Path asymmetry also matters: the visible forward probe/reply behavior is not necessarily a complete representation of every packet's route. Use Traceroute Explained for deeper path analysis.

nslookup

Separate DNS transport, resolver behavior, and returned data

nslookup lets you query a resolver without depending on the browser. That is especially valuable when a remote numeric IP is reachable but a hostname-dependent task fails. Do not collapse all abnormal DNS results into one category.

Timeout

No timely response was received. Investigate resolver reachability, DNS transport/policy, server availability, or the path.

NXDOMAIN

The resolver returned a DNS response indicating that the queried name does not exist in that context.

Wrong address

Resolution completed, but record data/context may be wrong, stale, split, or coming from an unexpected resolver/view.

Querying a specified second resolver can be a controlled comparison because it changes the resolver dependency. But a successful DNS answer still does not prove the returned service accepts connections. Continue with the NSLookup Command Guide and DNS Troubleshooting Guide.

arp

Use the neighbor cache for local IPv4 mapping questions—not remote-host inventory

arp -a can display cached IPv4-to-MAC neighbor mappings. This is useful when asking what MAC address the host currently associates with a local IPv4 neighbor such as its default gateway, or when investigating local duplicate-address behavior.

For a remote server beyond a router, the client normally sends the Ethernet frame toward a local next hop. The remote server's MAC address is not carried end-to-end through routed networks, so expecting arp -a to list every remote destination reflects the wrong Layer 2 model.

Cache state also has time context. An absent entry may simply mean the host has not recently resolved that neighbor; an old entry may not represent current state. Generate relevant traffic and interpret the cache alongside the test timeline.

netstat

Distinguish local listener state from end-to-end port reachability

netstat can expose local sockets, listening ports, and active connections. On a server you control, that makes it useful for the question “is a local process actually listening where the application design says it should?”

Proto Local Address State TCP 0.0.0.0:443 LISTENING

A local listener is necessary for many server applications, but it does not prove a remote client can reach it. Routing, ACL/firewall policy, NAT where relevant, return path, and application behavior can still prevent successful use. Conversely, if no expected listener exists, repeatedly changing remote firewall rules cannot make an absent local service accept a connection.

See the Netstat Command Guide for common fields and evidence boundaries.

Command selection matrix

Match the unresolved question to the most direct artifact

Unresolved questionHigh-value tool/artifactUseful resultDo not overclaim
What configuration did this Windows adapter receive?ipconfig /allAddress, mask, gateway, DHCP/DNS fieldsDoes not prove remote reachability
Does this specific IP return ICMP Echo Replies?pingSuccess/failure for that tested ICMP exchangeFailure ≠ destination definitely down
Which routers visibly respond along the probe path?tracert/tracerouteResponding hops and visible path behaviorAsterisk ≠ failed router automatically
What DNS response comes from this resolver?nslookupAnswer, NXDOMAIN, timeout, server/contextAnswer ≠ application works
What MAC is cached for this local IPv4 neighbor?arp -aLocal neighbor mappingNot a remote network inventory
Is a local service listening on this host/port?netstatLocal socket/listener stateListener ≠ remote firewall/path proven

Swipe horizontally to see the full table.

Worked evidence chain

A browser cannot open a site: use each result to decide the next test

ipconfig: Address 10.20.30.44/24 Gateway 10.20.30.1 DNS 10.20.1.53 ping 10.20.30.1: Reply received ping 198.51.100.25: Reply received nslookup app.example.test: DNS request timed out

The configuration is plausible, the gateway ICMP exchange succeeds, and a remote numeric IP responds. Those successes make “no local link” and “no IP path beyond the gateway” poor leading explanations for this exact test set. The DNS timeout creates a narrower branch: can the client reach the configured resolver for DNS, is DNS traffic permitted, and is the resolver responding?

The next test should investigate that branch rather than restart at the cable. This is the core skill: successful checkpoints remain evidence until new information contradicts them.

Same symptom, different tool

“The website does not work” can require completely different first commands

Client has 169.254.18.7

Configuration already exposes a DHCP/addressing problem. Traceroute to the website is low-value until normal host configuration exists.

Numeric IP works; name fails

Direct DNS evidence becomes high value. Another local gateway test adds little if that checkpoint is already established.

Name resolves; TCP service absent locally

On the server, listener/socket evidence can explain why the application cannot accept the expected connection.

One route path behaves differently

Traceroute comparison or routing-table evidence may be more useful than DNS when the failure is destination/path-specific.

Free digital flashcards

24 command-line troubleshooting flashcards

These cards test tool selection and evidence boundaries across ipconfig, ping, traceroute, nslookup, ARP, netstat, and mixed troubleshooting. Try to state what the result proves before revealing the answer.

All CLI topics
Click or press Enter/Space to reveal.
Ask what the command proves—and what it leaves unresolved.
0 seen•24 cards
False conclusions

Six command results students commonly stretch too far

“Gateway ping works, so the Internet works.”

No. The test establishes only the tested gateway ICMP exchange.

“One traceroute hop is *, so it failed.”

Later responding hops can prove probes continued beyond it.

“nslookup returned an IP, so the site works.”

DNS success does not prove transport or application availability.

“ARP has no remote server MAC.”

Expected across a router: the local frame targets a local next hop.

“netstat shows LISTENING, so the firewall allows it.”

Listener state is local; remote policy/path remains separate.

“ipconfig looks valid, so the VLAN is correct.”

A valid lease can belong to the wrong subnet/logical network.

Controls and deltas

Compare outputs so the difference becomes evidence

A single command snapshot can be ambiguous. Comparisons are often more powerful: affected client versus working client, failing destination versus working destination, configured resolver versus a specified resolver, before-change versus after-change, or idle performance versus the condition that reproduces the symptom.

★ Routing Practice • Network Command-Line Tools: Choose the Command That Answers the Next Question

A five-minute warm-up for Network Command-Line Tools: Choose the Command That Answers the Next Question

Tomorrow’s opening question can pick up where this page leaves off: ask students to explain the idea in their own words and apply it to a real network. The 300 Bell Ringers give you short questions and teacher answers you can use without preparing a new starter each morning.

300 AP Networking Bell Ringers
$74.99
BUY TEACHER PACK → See what is included in the 300 Bell Ringers →
Instant Access • Full-Year Teacher Resource

Keep the comparison controlled. If two clients differ in VLAN, DNS, wireless location, operating system, and security policy simultaneously, the contrast does not isolate much. The best control shares nearly all relevant dependencies except the one you are testing.

Record exact values and timestamps. “Ping got better” is weaker than a repeatable change in loss/latency under comparable conditions. “DNS works now” is weaker than the expected resolver returning the expected record followed by successful application verification.

Platform differences

Know the diagnostic concept even when command names and options change

AP Networking reasoning should survive platform differences. Windows commonly uses ipconfig and tracert; Unix-like systems use different interface/address commands and commonly traceroute. Neighbor and socket tooling also varies across modern systems.

CLI & Artifact Lab • 120 Missions

Let students try Network Command-Line Tools: Choose the Command That Answers the Next Question for themselves

Reading the explanation is a start. In the browser simulator, students work through a broken network, choose what to test and see whether their fix worked. It gives them another chance to use what they learned about Network Command-Line Tools: Choose the Command That Answers the Next Question.

AP Networking Browser Troubleshooting Simulator
$29.99
120 Missions • 60 Failure Patterns • Offline Copy
GET THE SIMULATOR → See all 120 missions & features

The durable skill is selecting the artifact: host configuration, ICMP reachability, path visibility, DNS query result, local neighbor mapping, or local socket state. If a prompt provides output, read what the fields mean rather than assuming every operating system formats them identically.

Verification

Do not end the investigation when one command changes from failure to success

Verification must return to the original requirement. If the repair changed DNS, confirm the expected DNS response and then test the hostname-dependent application. If the repair changed a gateway, verify the corrected host configuration, gateway reachability, and the remote requirement. If a service was restarted, verify the local listener and then the authorized remote connection.

Routing Exam Practice • Network Command Line Tools

Check whether Network Command-Line Tools: Choose the Command That Answers the Next Question has really stuck

Once students have worked through this topic, give them questions mixed in with the rest of the course. The Exam Prep Vault includes practice exams, multiple-choice questions and artifact labs so they cannot rely on a chapter heading to tell them what to do.

AP Networking Complete Exam Prep Vault
$39.99
GET THE EXAM PREP VAULT → See the Exam Prep Vault contents →
4 Practice Exams • 320 MCQs • 60 Artifact Labs

Also keep a control and test for side effects. A firewall change that makes one port work by allowing everything is not a strong repair. A VLAN change that restores a printer by moving it into a server VLAN may violate segmentation. CLI evidence should prove both restoration and preservation of the intended design.

Exam reasoning

Use command output as observation → boundary → next question

A strong response does not merely name the command. Write: “The client has a 169.254/16 address, so normal IPv4 configuration did not complete. I would investigate DHCP/client-VLAN/relay evidence next.” Or: “A remote numeric IP responds while the DNS query times out, so basic IP reachability to that remote test target exists; I would next test the configured resolver and DNS path.”

This phrasing respects what the artifact supports. It also helps eliminate distractors that propose a repair outside the demonstrated failure boundary.

Practice workflow

Build CLI skill by predicting output before you run the command

For each practice scenario, write the symptom, current evidence, two plausible hypotheses, and the command whose possible outcomes separate them. Predict what each outcome would mean. Only then inspect the provided output. This prevents command memorization from replacing diagnosis.

Premium Exam-Reasoning Feedback

Spend less time marking explanations about Network Command-Line Tools: Choose the Command That Answers the Next Question

When students explain their answer, it takes more than a right-or-wrong check to see what they understand. The Grading Copilot helps you review how they used the clues, where their explanation falls short and what feedback to give next. You make the final grading decision.

AP Networking Artifact Analysis Grading Copilot
$49.99
8 Criteria • 5 Task Modes • Offline Premium Copy
GET THE GRADING COPILOT → See the free Copilot preview

For more artifact-heavy work, use Network CLI Output Practice and AP Networking Artifact Analysis. For the course-framework connection, review AP Networking Topic 4.3: Network CLI Tools.

Route-table companion evidence

CLI troubleshooting often needs forwarding-table evidence in addition to endpoint commands

The six core tools on this page answer important endpoint and path questions, but a routed failure may require a routing-table artifact from a host or router. If a destination-specific problem remains after local configuration is validated, inspect whether the forwarding device has a matching route, which prefix is most specific, which next hop or exit interface is selected, and whether that next hop is itself usable.

NEW • COMPLETE 180-DAY TEACHER CURRICULUM

Teach Network Command-Line Tools: Choose the Command That Answers the Next Question as part of a planned school year

This page gives you one topic. The 180-Day Teacher Curriculum puts it into a full course plan, with daily teaching notes, student activities and checks for understanding. Use it when you need to know what comes before this lesson and what to teach next.

AP Networking Complete 180-Day Teacher Curriculum
$199.99
180 Lessons • 180 Daily Simulators • 36 Teaching Weeks
GET THE 180-DAY CURRICULUM → See 3 free curriculum examples

This is a different question from traceroute. Traceroute shows responding behavior from probes sent toward a destination; a routing table shows the forwarding information available on the device being inspected. One is not a substitute for the other. A route entry can exist even when downstream forwarding fails, and a traceroute can expose hops without telling you the complete routing policy that selected them.

When a prompt includes both artifacts, combine them carefully: use the route table to predict the forwarding decision and the path output to compare that prediction with observed probe behavior. Practice this separately in Routing Table Analysis Practice.

Capture before reset

Preserve volatile command evidence before flushing caches or renewing configuration

Many troubleshooting actions change the evidence you are trying to understand. Releasing a DHCP lease can remove useful lease state. Flushing DNS can erase the distinction between stale cached data and a fresh resolver response. Clearing a neighbor cache can destroy a suspicious mapping. Restarting a service can replace the listener state that existed during the failure.

When time and policy permit, capture the relevant output first. Record the active adapter, address/gateway/DNS state, resolver result, neighbor mapping, listener state, and timestamps needed for the hypothesis. Then make the controlled change and collect the same artifact again. The before/after delta is often more informative than the post-reset state alone.

This habit also improves verification. Instead of saying “I reset networking and it worked,” you can identify which observable state changed and whether that change matches the proposed mechanism.

Related command guides

Go deeper on individual evidence sources