1.5 Given a scenario, use the appropriate Microsoft command-line tools.
📘CompTIA A+ Core 2 (220-1202)
Network command-line tools are essential for troubleshooting, configuring, and testing connections in Windows. They are accessed using the Command Prompt (cmd.exe). These tools help IT technicians check IP configurations, connectivity, and network paths.
Here’s a detailed guide:
1. ipconfig
Purpose:
Displays the computer’s IP configuration and network settings.
Common Uses:
- Check your computer’s IP address, subnet mask, and default gateway.
- Renew or release DHCP-assigned addresses.
Key Commands:
ipconfig→ Shows the IP address of each network adapter.ipconfig /all→ Shows detailed info, including DNS servers, MAC address, and DHCP info.ipconfig /release→ Releases the current IP address (for DHCP clients).ipconfig /renew→ Requests a new IP address from DHCP server.ipconfig /flushdns→ Clears the DNS resolver cache (useful if a website isn’t resolving properly).
Example Scenario:
If a computer cannot access the network, you can use ipconfig to verify the IP address and see if it’s valid.
2. ping
Purpose:
Tests connectivity between your computer and another device on the network or internet.
How it Works:ping sends small packets of data (ICMP Echo Requests) to the target IP or hostname and waits for a response.
Common Uses:
- Check if a server, website, or another computer is reachable.
- Measure response time (latency) in milliseconds.
Key Commands:
ping 8.8.8.8→ Pings Google’s public DNS by IP.ping www.google.com→ Pings Google by hostname.ping -t 192.168.1.1→ Continuously pings a device until manually stopped.
Example Scenario:
If users report slow internet, ping can test whether the local router or internet connection is reachable.
3. netstat
Purpose:
Displays current network connections, listening ports, and network statistics.
Common Uses:
- Identify active connections to the computer.
- Detect which applications are using network ports.
- Check for suspicious network activity (useful in security troubleshooting).
Key Commands:
netstat→ Shows all active TCP connections.netstat -a→ Lists all active connections and listening ports.netstat -n→ Shows addresses and ports in numeric form.netstat -b→ Shows the application using each connection (requires admin rights).
Example Scenario:
If a server is slow, netstat can help identify which services or apps are using network resources.
4. nslookup
Purpose:
Queries DNS servers to translate domain names into IP addresses and troubleshoot DNS issues.
Common Uses:
- Verify if DNS can resolve a hostname.
- Find IP addresses associated with a domain.
Key Commands:
nslookup www.example.com→ Returns the IP address of the domain.nslookup→ Starts interactive mode for multiple queries.nslookup 8.8.8.8→ Finds the domain name associated with an IP (reverse lookup).
Example Scenario:
If a user cannot access a website, nslookup can check if the problem is DNS-related.
5. net use
Purpose:
Manages shared network resources like drives and printers.
Common Uses:
- Map network drives.
- Connect to shared folders.
- Disconnect from network shares.
Key Commands:
net use→ Shows existing network connections.net use Z: \\Server\Share→ Maps a shared folder to drive Z:.net use Z: /delete→ Disconnects the mapped drive.
Example Scenario:
If a user cannot access a shared folder, net use can check whether the network drive is connected correctly.
6. tracert (Trace Route)
Purpose:
Shows the path network packets take from your computer to a destination.
How it Works:tracert lists every hop (router or device) between your PC and the target.
Common Uses:
- Identify where network delays or failures occur.
- Diagnose routing issues in the network.
Key Commands:
tracert www.example.com→ Shows the path and latency of each hop.
Example Scenario:
If a website is slow, tracert can reveal whether the delay is in your ISP or beyond.
7. pathping
Purpose:
Combines ping and tracert to provide detailed statistics about packet loss along the route to a destination.
Common Uses:
- Check for intermittent network issues.
- Identify routers or network segments causing packet loss.
Key Commands:
pathping www.example.com→ Displays each hop and % packet loss.
Example Scenario:
If a video conference keeps dropping, pathping can help pinpoint where packets are being lost in the network path.
Summary Table for Exam
| Command | Purpose | Key Use Case |
|---|---|---|
| ipconfig | Shows IP, subnet, gateway, and DNS info | Verify network config |
| ping | Tests connectivity to a device or server | Check if device is reachable |
| netstat | Displays active connections and ports | Monitor network connections |
| nslookup | Queries DNS to resolve names/IPs | Troubleshoot DNS issues |
| net use | Connects/disconnects shared drives and printers | Map network drives |
| tracert | Shows the path packets take | Diagnose routing issues |
| pathping | Combines ping + tracert for packet loss | Find network hops causing packet loss |
✅ Exam Tip:
- Know what each command does.
- Know when to use it in troubleshooting.
- Focus on flags like
/allforipconfigand/tforping. - Remember
tracertshows path hops,pathpingshows packet loss.
