CompTIA Network+ guideNetwork troubleshooting
CompTIA Network+ Command-Line Tools: ping, traceroute, dig, netstat, and show Commands
Objective 5.5 is about picking the tool that answers your question. Match each N10-009 software tool, hardware tool, and device show command to the question it answers, with platform notes and two original sample outputs.
Short answer
Objective 5.5 of CompTIA Network+ N10-009 asks you to choose the right tool for a networking problem. Use ping to test reachability, traceroute or tracert to see where a path stops, nslookup or dig to see what DNS returns, netstat to see what is listening or connected, ip, ifconfig, or ipconfig for interface settings, arp for the MAC behind a local IP, and tcpdump or a protocol analyzer to see what is on the wire. LLDP or CDP identifies the neighbor port, and Nmap finds open ports, only on networks you are authorized to scan. Device show commands answer the same questions from the switch or router side.
Objective 5.5 in one line: pick the tool that answers the question
Network Troubleshooting is the largest domain of CompTIA Network+ N10-009, at 24%, and objective 5.5 closes it with "given a scenario, use the appropriate tool or protocol." It lists three groups:
- Software tools: a protocol analyzer; the command-line tools ping, traceroute/tracert, nslookup, tcpdump, dig, netstat, ip/ifconfig/ipconfig, and arp; Nmap; LLDP and CDP; and a speed tester.
- Hardware tools: toner, cable tester, taps, Wi-Fi analyzer, and visual fault locator.
- Basic device commands: seven show commands.
A scenario item rarely asks what a tool does. It describes what you need to know and asks which tool tells you. So learn each tool by the question it answers. The troubleshooting methodology guide shows where these checks fit in the seven steps.
The question-to-tool table for CompTIA Network+
Several of these commands differ by operating system, so the third column names the platform.
| Question you need answered | Tool | Platform notes |
|---|---|---|
| Can I reach this host at all? | ping | On Windows, Linux, and macOS. No reply can also mean the target or a firewall drops ICMP. |
| Where along the path does traffic stop? | tracert (Windows) or traceroute (Linux, macOS) | Microsoft says tracert sends ICMP echo requests with a TTL that rises by one per hop. The Linux traceroute man page says its default probes are UDP datagrams to high, unlikely ports. |
| What does DNS return for this name? | nslookup or dig | nslookup ships with Windows and has interactive and noninteractive modes. dig comes with BIND's tools, common on Linux and macOS, and BIND's manual calls it a flexible tool for interrogating name servers. |
| What is listening on this machine, and who is connected? | netstat | On Windows, -a shows connections and listening ports, -n shows numbers instead of names, and -o adds the process ID. The Linux man page calls netstat mostly obsolete and names ss as its replacement. |
| What address, mask, and gateway does this interface have? | ipconfig (Windows), ip (Linux), ifconfig (older Unix-like systems and macOS) | Use ip addr for Linux addresses and ip route for its default route; on macOS, use ifconfig plus route -n get default. |
| Which MAC address goes with this local IP? | arp | arp -a displays the cache on Windows. IPv6 uses Neighbor Discovery for this job (RFC 4861), not ARP. |
| What exactly is on the wire? | tcpdump or a protocol analyzer | tcpdump prints a description of matching packets, and -w writes raw packets to a file you can open in a graphical analyzer. |
| Which switch and port is this device plugged into? | LLDP or CDP | Cisco describes CDP as its Layer 2 discovery protocol and supports IEEE 802.1AB LLDP for non-Cisco devices. On Cisco, show lldp neighbors lists them. |
| Which hosts and ports are open on this subnet? | Nmap | Only on networks you own or have written permission to scan. Unauthorized scanning can break policy or law. |
| Is the circuit delivering the bandwidth we pay for? | Speed tester | Test to a known server and compare with the contract, at a quiet time and a busy time. |
Two pairs cause most mix-ups. First, tracert and traceroute answer the same question with different probes, which is why a firewall can let one through and block the other. Second, nslookup and dig both query DNS, but dig's output separates the answer, authority, and additional sections, which makes it easier to see which server answered. For service identification and common ports, see ports and protocols.
Reading two original outputs
Both samples below are written for this page, with documentation and private addresses.
A Windows tracert with a silent hop:
Tracing route to 203.0.113.80 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 10.50.0.1
2 8 ms 7 ms 9 ms 198.51.100.1
3 * * * Request timed out.
4 14 ms 13 ms 15 ms 198.51.100.66
5 15 ms 14 ms 16 ms 203.0.113.80
Trace complete.
Hop 3 shows asterisks, but hops 4 and 5 answer, so traffic does pass hop 3. Microsoft's documentation explains that some routers do not return the "time exceeded" message tracert depends on, and those routers show up as rows of asterisks. If later hops and the destination remain silent, traceroute alone still cannot prove where forwarding failed. Filtering, rate limits, return-path problems, or a destination that ignores probes can all hide replies. Test the destination service and compare other evidence before blaming the last responding router.
A Windows netstat -ano excerpt from a server:
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 1180
TCP 10.50.0.25:3389 10.50.4.17:52114 ESTABLISHED 1180
UDP 0.0.0.0:123 *:* 1532
Read it left to right. The server listens for RDP on TCP 3389 on all addresses, and one session is open from 10.50.4.17, using a high client port. Both lines belong to process 1180. UDP 123, the NTP port, is open under another process. A stem that asks "is the service actually listening?" wants this tool, not ping.
Hardware tools and what each one proves
| Tool | Use it to find out | Typical stem clue |
|---|---|---|
| Toner and probe | Which cable run or wall jack leads to which patch panel port | Unlabeled cables in a closet |
| Cable tester | Whether a copper cable has the right pin-to-pin wiring and no opens or shorts | A new run will not link, or links at low speed |
| Tap | A copy of a link's traffic for a capture, without changing the switch configuration | You need to capture between two devices |
| Wi-Fi analyzer | Which networks, channels, and signal strengths are present | Slow Wi-Fi in one area, or suspected channel overlap |
| Visual fault locator | Where light escapes from a fiber, at a break or tight bend | A fiber link is down and the cable looks fine from outside |
A cable tester can prove a cable is wired correctly and still not explain errors on a busy link. Rising interface counters point you to the cable and interface troubleshooting guide.
The seven show commands as questions
The N10-009 objectives list seven device commands in generic form. Vendors spell some of them differently, so the last column gives a Cisco IOS XE form only where Cisco documentation was checked for this page.
| Command in the objectives | Question it answers | Checked Cisco IOS XE form |
|---|---|---|
| show mac-address-table | Which port, and which VLAN, did this MAC address arrive on? | show mac address-table (Catalyst 9300 command reference) |
| show route | Which route will the device use for this destination? | Check your platform's command reference |
| show interface | Is this port up, at what speed and duplex, and are error counters rising? | show interfaces (Catalyst 9600 voice VLAN guide) |
| show config | What is the device's current configuration? | show running-config (Catalyst 9600 voice VLAN guide) |
| show arp | Which MAC address does the device hold for this IP? | Check your platform's command reference |
| show vlan | Which VLANs exist, and which ports belong to each? | show vlan (Catalyst 9600 voice VLAN guide) |
| show power | How much PoE power is each port drawing, against the budget? | Check your platform's command reference |
On the exam, the generic form is enough. The skill is matching the question to the command. A MAC address learned on a trunk or uplink port means the device is behind another switch, so you follow it there and run the same command again.
The free mixed set of 20 Network+ questions includes one item built on this table: a technician has a MAC address and needs the switch port. When the seven questions above come easily, answer the free set's show-command item and read why the other three commands miss.
Practicing these tools without a lab budget
Every software tool in the table except the show commands runs on an ordinary laptop. Run ping and traceroute to a site you use, read the hops, then run nslookup and dig against the same name and compare the outputs. Run netstat while a video call is open and find the connection. For Windows-only commands that A+ covers, such as ipconfig switches, the A+ Windows command-line guide is the right reference. Keep Nmap and packet captures to your own home network, where you are the one who authorizes them.
Trust the source
Official sources
Exam policies can change. Use these primary sources for the most current details.
- CompTIA Network+ N10-009 Exam Objectives, Version 4.0CompTIA↗
- tracertMicrosoft↗
- netstatMicrosoft↗
- arpMicrosoft↗
- nslookupMicrosoft↗
- traceroute(8), Linux manual pageman7.org↗
- netstat(8), Linux manual pageman7.org↗
- ip(8), Linux manual pageman7.org↗
- tcpdump(1) manual pageThe Tcpdump Group↗
- BIND 9 manual pages: digInternet Systems Consortium↗
- RFC 4861: Neighbor Discovery for IP version 6IETF↗
- Interface and Hardware Configuration Guide, Cisco IOS 15.2(7)Ex (Catalyst 1000): Configuring LLDP, LLDP-MED, and Wired Location ServiceCisco↗
- Command Reference, Cisco IOS XE Bengaluru 17.4.x (Catalyst 9300): System Management CommandsCisco↗
- VLAN Configuration Guide, Cisco IOS XE 17.15.x (Catalyst 9600): Configuring Voice VLANsCisco↗