Home > Blog > CompTIA A+ Certification Exam Core 2 > Network CLI Tools: Mastering ping, tracert, and nslookup

Network CLI Tools: Mastering ping, tracert, and nslookup

Study Guide Cert Sensei Team 2031-08-03 7 min read

Network troubleshooting commands like ping, tracert, and nslookup are essential CLI tools for diagnosing connectivity. Ping tests basic reachability and latency, tracert maps the hop-by-hop path to a destination, and nslookup diagnoses DNS resolution issues. Mastering these tools is critical for passing the CompTIA A+ Core 2 (220-1102) exam.

#CompTIA A+ #Network Troubleshooting #CLI Tools #220-1102

Why are CLI tools essential for the CompTIA A+ exam?

When you're staring down the CompTIA A+ Core 2 (220-1102) exam, it's easy to rely on GUI-based tools. But in the real world—and on the test—the Command Line Interface (CLI) is where the real diagnostic power lives. These tools allow you to strip away the fluff and see exactly how data is moving across the wire.

Understanding these commands isn't just about memorizing syntax; it's about developing a systematic approach to troubleshooting. You'll need to know which tool to reach for based on the symptoms. Are you dealing with a complete outage, a slow connection, or a name resolution failure? Choosing the wrong tool wastes time, and on the exam, time is your most precious resource.

How do you use ping to test basic connectivity?

Ping is your first line of defense. It uses the Internet Control Message Protocol (ICMP) to send an 'echo request' to a target IP or hostname and waits for an 'echo reply.' If you get a reply, you know the target is alive and the network path is open. Pay close attention to the latency, measured in milliseconds (ms); high latency often points to congestion or routing loops.

Pro tip: use 'ping -t' on Windows for a continuous ping. This is invaluable when you're swapping out a cable or restarting a router and want to see the exact moment connectivity returns. If you can ping an IP address (like 8.8.8.8) but not a domain name (like google.com), you've just narrowed your problem down to a DNS issue.

What is the difference between Request Timed Out and Destination Unreachable?

This is a classic A+ exam trap. A 'Request Timed Out' means your packet was sent, but no response came back within the time limit. This usually happens because the destination device is powered off, or more commonly, a firewall is silently dropping ICMP packets for security reasons.

Conversely, 'Destination Host Unreachable' is a different beast. This means a router in the path explicitly told you it doesn't know how to get to the target address. This typically points to a routing table error or a local gateway configuration issue. Recognizing this distinction allows you to stop guessing and start fixing the specific layer of the OSI model that's failing.

When should you use tracert to find network bottlenecks?

If ping tells you that a connection is broken, tracert (traceroute on Linux/macOS) tells you exactly where it broke. It maps every 'hop' (router) the packet passes through to reach its destination. Each hop is listed with its response time, allowing you to spot exactly which router is introducing latency or dropping packets.

Imagine a scenario where a user can't reach a cloud server. You run a tracert and see the packets leave the local gateway and hit the ISP's first three routers, but then they die at hop 4. You now have empirical evidence that the problem is with the provider, not the local network. This level of detail is what separates a junior tech from a seasoned pro.

How does nslookup help you diagnose DNS failures?

When a user says 'the internet is down,' but you find that they can still ping an IP address, you're looking at a DNS failure. This is where nslookup comes in. This tool allows you to query the Domain Name System (DNS) to see if a hostname is correctly resolving to an IP address.

Use nslookup to verify if the local DNS server is providing the correct record or if the issue lies with the authoritative name server. You can even specify a different DNS server to test against—for example, 'nslookup google.com 8.8.8.8'—to see if your internal DNS server is the culprit. If the external server works but your internal one doesn't, you've found your smoking gun.

How can practice exams help you master these commands?

Reading about these tools is one thing; applying them to complex troubleshooting scenarios is another. The CompTIA A+ exam loves to give you a scenario and ask which command you should run first. To build that intuition, you need high-volume, high-quality practice.

At Cert Sensei, we provide 1,000 expert-curated practice questions specifically for the A+ Core 2 (220-1102) exam. We don't just tell you the right answer; we provide detailed expert reasoning for every single response. With our domain-level analytics, you can see exactly where you're struggling—whether it's network tools or security protocols—so you can stop wasting time on what you already know and focus on your weak points.

❓ Frequently Asked Questions

Why does ping fail even when I know the server is online?

Many modern servers and firewalls are configured to block ICMP traffic to prevent DDoS attacks and network reconnaissance. In these cases, the server is active, but it is intentionally ignoring your ping requests.


Which command is best for identifying a failing router in a long path?

Tracert (or traceroute) is the best tool for this. It lists every router the packet touches, allowing you to see exactly which hop is experiencing high latency or where the connection is being dropped.


Can nslookup be used to find the IP address of a mail server?

Yes. By using the -type=mx command within nslookup, you can specifically query for Mail Exchanger records to identify which servers are responsible for receiving email for a given domain.

More from CompTIA A+ Certification Exam Core 2

🧠

Test Your Knowledge

Ready to practice A+ Certification Exam Core 2? Put what you've learned to the test.

Try 10 Free Questions

⭐ 1,000 expert-curated questions available with Premium

Upgrade Premium
📖 Browse the Glossary

Join thousands of certification students

Sign Up Free