Network Command-Line Tools Basics
Theory matters, but real troubleshooting gets sharper when you can check settings, test reachability, look up name resolution, and inspect active connections. This lesson introduces the most common beginner network command-line tools and the kind of questions each one helps answer.
- Understand what
ipconfig/ifconfigare for - Understand when to use
ping - Understand what
tracert/traceroutecan show - Understand what
nslookupchecks - Understand what
netstatis useful for
Why Command-Line Tools Matter
Good tools help you ask better questions. Instead of guessing that “the internet is broken,” you can check the local IP settings, test whether a host responds, see whether name resolution works, and get clues about where the path might be failing.
These tools help you turn vague symptoms into specific evidence.
- One tool rarely proves everything by itself.
- The real skill is knowing what question each tool answers.
- Strong beginners use tools to narrow the problem, not show off commands.
Do Not Worship One Tool
Beginners often over-trust one result. That is a mistake. One successful or failed test does not tell the entire story.
- A failed ping does not automatically mean the system is dead
- A good IP config does not guarantee internet access
- A working DNS lookup does not prove the whole service path is healthy
- Use multiple clues together
ipconfig / ifconfig
These commands help you view local network interface information. At the beginner level, they help answer: “What IP settings does this device currently have?”
- Check IP address
- Check subnet mask
- Check default gateway
- Spot obvious misconfiguration or missing addressing
Windows:
ipconfig
Linux/macOS (classic example):
ifconfig
ping
Ping checks whether a target responds over the network. It helps answer: “Can I reach this host at all?”
- Test basic reachability
- Check local gateway or remote host response
- Useful in early path isolation
ping 192.168.1.1
ping example.com
tracert / traceroute
These tools show hop-by-hop path information toward a destination. They help answer: “How far does traffic get before the route appears to fail or slow down?”
- See the route path outward
- Look for delays or breakpoints
- Useful when the destination is far away or upstream issues are suspected
Windows:
tracert example.com
Linux/macOS:
traceroute example.com
nslookup
Nslookup checks DNS name resolution. It helps answer: “Can this device resolve a name to an IP address?”
- Test DNS response
- Compare name-based vs IP-based behavior
- Great for separating DNS issues from general connectivity issues
nslookup example.com
netstat
Netstat helps show active connections, listening ports, and related network state. At the beginner level, it helps answer: “Is this system talking to anything, or listening for traffic?”
- View active sessions
- View listening ports
- Useful when a service-level issue is suspected
netstat
Best Beginner Flow
- Check local config first
- Test reachability next
- Test name resolution separately
- Use path tools if the issue seems upstream
- Look at ports/connections if the issue is service-specific
Do not jump to traceroute before you even know whether the device has valid local settings.
Which Tool Helps Answer Which Question?
| Tool | Main beginner question | Strong use case | Common mistake |
|---|---|---|---|
ipconfig / ifconfig |
What settings does this device have? | Missing IP, wrong gateway, obvious local config issue | Assuming config alone proves full connectivity |
ping |
Can I reach this target? | Testing local gateway or another host | Assuming no ping reply always means total failure |
tracert / traceroute |
How far does the path get? | Upstream path visibility | Using it before basic local checks |
nslookup |
Does name resolution work? | DNS suspicion | Confusing DNS success with full app success |
netstat |
What connections or listening services exist? | Service/port troubleshooting | Using it without knowing what service you are checking |
Check local config → test reachability → test DNS → inspect route if needed → inspect service/port behavior if needed.
No IP Address
Start with ipconfig or ifconfig. If the device lacks proper settings, do not waste time jumping into far-upstream tools first.
Can’t Reach Website by Name
Compare ping or direct reachability tests with nslookup to decide whether this looks more like a DNS issue.
Remote Service Seems Down
Use route visibility and connection-focused thinking. A service issue is not always the same thing as total path failure.
Example Beginner Sequence
- Use
ipconfig/ifconfigto verify local settings - Use
pingto test the local gateway - Use
pingor another test toward a broader target - Use
nslookupif name resolution is questionable - Use
tracert/tracerouteif the issue looks farther upstream - Use
netstatif the question becomes service- or port-specific
Common Beginner Mistakes
- Running random commands without a question in mind
- Using traceroute before checking local IP settings
- Confusing DNS problems with total connectivity problems
- Assuming a failed ping proves the whole device is down
- Looking at netstat without understanding what service should exist
Quick Command-Line Tool Drills
Focus on matching the tool to the question instead of memorizing commands in isolation.
Drill 1
You want to see whether the device has an IP address, subnet mask, and default gateway. Which tool fits best?
ipconfig or ifconfig are the right starting point for local addressing questions.
Drill 2
You want to test whether a host responds over the network at all. Which tool fits best?
Drill 3
You suspect a DNS problem and want to see whether a name resolves to an IP. Which tool fits best?
nslookup directly checks name resolution behavior, which is the right test when DNS is in question.
Drill 4
You want to see hop-by-hop path clues toward a remote destination. Which tool fits best?
tracert or traceroute help you see how far the path appears to get.
Foundational Tool Questions
- What local settings does this device currently have?
- Can the target be reached at all?
- Does name resolution work?
- How far does the route seem to get?
- Is a service listening or actively connected?
What Strong Beginners Start Doing
- Choose the tool based on the question
- Check local configuration before deeper path tools
- Separate DNS checks from general reachability checks
- Use more than one clue before drawing conclusions
- Treat commands as evidence tools, not magic fixes
Network+ Lesson 10 Quiz
Score at least 75% to unlock the next lesson CTA.
1) Which tool is best for checking a device’s local IP configuration at a beginner level?
ipconfig and ifconfig are used to inspect local interface configuration. They are the right starting tools when you need to see IP address, subnet mask, gateway, and related local settings.
2) Which tool is most directly associated with a basic reachability test?
3) Which tool is most useful when you want to check whether a hostname resolves to an IP address?
nslookup is directly tied to DNS name resolution. It helps answer whether a name can be resolved into an IP address.
4) Which tool is most associated with hop-by-hop route visibility to a remote destination?
tracert and traceroute help reveal path behavior hop by hop, which is useful when a problem looks upstream or remote rather than purely local.
5) Which tool is most useful for seeing active connections or listening ports?
netstat is useful for viewing active connections and listening services. That makes it especially relevant in service- and port-related troubleshooting.