The core network troubleshooting commands are ping (is the host reachable), ipconfig /all or ip a (your IP address, gateway and DNS), tracert or traceroute (the path), nslookup or dig (DNS), netstat -ano or ss -tulnp (connections and listening ports), arp -a (the IP-to-MAC cache) and pathping or mtr (packet loss per hop). Run them in order: check your IP configuration, ping loopback, ping the gateway, ping a public IP, test DNS, then trace the path. This free PDF covers 14 Windows commands. The Linux equivalents are on this page, not in the PDF.
Network Troubleshooting Commands: What Each One Tests
Windows, macOS and Linux ship with their own network troubleshooting tools, so you don’t need extra software for first-line diagnosis.
| Category | What it tests | Windows | Linux |
|---|---|---|---|
| Connectivity | Is the host reachable, and how fast? | ping, pathping | ping, mtr |
| Host configuration | My IP, MAC and hostname | ipconfig, getmac, hostname | ip a, hostname |
| Name resolution | Is DNS working? | nslookup | dig, nslookup |
| Path and routing | Which hops does traffic take? | tracert, route | traceroute, ip route |
| Connections | What’s open, listening or cached? | netstat, arp | ss, ip neigh |
| Security posture | Firewall and Wi-Fi settings | netsh advfirewall, netsh wlan | ufw, nmcli |
Windows Network Troubleshooting Commands in CMD and PowerShell
These 14 commands run in both Command Prompt and PowerShell. Releasing a DHCP lease and editing firewall rules need an elevated prompt.
| Command | Syntax | What it does |
|---|---|---|
| ping | ping [-t] [-n count] target | Sends ICMP echo requests, reports round-trip time and loss |
| ipconfig | ipconfig /all | Every adapter’s IP, mask, gateway, DHCP and DNS servers |
| getmac | getmac /v | MAC address and transport name of each adapter |
| hostname | hostname | The computer’s configured name |
| nslookup | nslookup -type=MX domain.com | Queries a DNS server directly, including MX, NS and TXT |
| tracert | tracert -d target | Each router hop to a destination, with round-trip times |
| netstat | netstat -ano | Connections, listening ports and the owning process ID |
| arp | arp -a | The local IP-to-MAC cache |
| pathping | pathping target | Path plus packet loss for each hop |
| systeminfo | systeminfo | OS version, boot time, memory, hotfixes |
| route | route print | The routing table and default gateway |
| whoami | whoami | The logged-on account |
| netsh advfirewall | netsh advfirewall show allprofiles | Whether each firewall profile is on |
| netsh wlan | netsh wlan show interfaces | SSID, signal and security of the Wi-Fi link |
ipconfig /flushdns clears the local DNS cache and fixes many “the site still shows old content” cases. Syntax details are in Microsoft’s ipconfig reference.

Linux and Ubuntu Network Troubleshooting Commands
| Windows | Linux | Notes |
|---|---|---|
| ipconfig /all | ip a | ifconfig is deprecated in favour of ip |
| ping | ping -c 4 target | Linux ping runs until stopped, so -c sets the count |
| tracert | traceroute target or mtr target | mtr joins trace and continuous ping |
| nslookup | dig domain.com | More detail on the DNS response |
| netstat | ss -tulnp | The modern replacement for netstat |
| arp -a | ip neigh | Same IP-to-MAC cache |
| route print | ip route | Routing table and default gateway |
| netsh wlan | nmcli device wifi list | Visible networks and signal |
| netsh advfirewall | ufw status verbose | Ubuntu’s firewall front end |
The commands that change settings are ip addr add and ip link set. Everything in the table only reads them. Red Hat’s Linux network troubleshooting commands covers the Linux side in more depth, and our Linux Commands Cheat Sheet covers file, process and permission commands.
How to Troubleshoot Network Issues: A 10-Step Command Workflow
- Check the physical connection. Cable seated, Wi-Fi showing a signal.
- Check IP configuration with
ipconfig /allorip a. An address starting 169.254 (APIPA) means the host couldn’t reach a DHCP server. - Ping loopback,
ping 127.0.0.1, to confirm your own TCP/IP stack works. - Ping the default gateway to separate a local fault from one beyond your router.
- Ping a public IP such as
ping 8.8.8.8, which skips DNS. - Test DNS with
nslookup. - Trace the route if the connection is slow or only partly working.
- Inspect connections with
netstat -anoorss -tulnp. - Check ARP with
arp -ato spot an IP or MAC conflict. - Review firewall and Wi-Fi settings last.

Per Microsoft’s ping reference, if pinging the IP address works but pinging the name doesn’t, you might have a name resolution problem. For VPN tunnels see IPsec VPN troubleshooting commands.

Go deeper
ping finds one fault. A network takes practice.
The CCNA Lab Workbook: 75 labs where you build it, break it and trace the fault.
Open the CCNA Workbook →Network Troubleshooting Commands for Wi-Fi, Latency and Packet Loss
Wi-Fi: run netsh wlan show interfaces (Windows) or nmcli device wifi list (Linux). Signal below about 50% often goes with slow or unstable Wi-Fi. netsh wlan show drivers helps rule out an outdated driver.
Latency and packet loss: ping gives the baseline. pathping (Windows) or mtr (Linux) shows loss for each hop. Per Microsoft’s pathping reference, loss on a router row affects only traffic addressed to that router. Loss on a link row, shown as |, indicates congestion on traffic being forwarded.

pathping takes about 90 seconds or more to gather statistics, depending on the number of hops. Use -n to skip name lookups.
Switches: these host commands can’t configure a switch. ipconfig /all and arp -a show whether the host is on the subnet you expect. For switch CLI, see the Cisco Commands Cheat Sheet. For firewalls, see FortiGate CLI Commands. For routers, see MikroTik CLI Commands.
What’s Inside the Network Troubleshooting Commands PDF
The PDF is a 46-page Windows lab handbook. Each of the 14 Windows commands has the same sections: purpose, syntax, options, example commands, how to read the output, troubleshooting use, a security note, common mistakes and a practical exercise.
- The 14 Windows commands above, and a 10-step troubleshooting workflow in text
- A quick-reference table, a scenario table and 28 viva-style questions
- Not in the PDF: the Linux and Ubuntu commands. They’re on this page.
Who It’s For
- Help desk and sysadmins who want a fixed order for first-line diagnosis
- SOC analysts, who lean on
netstatandarpfor unexpected ports and duplicate MAC-to-IP mappings - Students building habits for the CCNA 200-301 and the CCNA Workbook
No questions yet. Ask the first one.