Essential CMD Commands for Network Troubleshooting

Learn the most useful CMD commands for network troubleshooting to diagnose and fix connectivity issues. From ping and tracert to ipconfig and netstat, this guide covers essential Windows command-line tools every IT professional and beginner should know to solve network problems quickly and effectively.

9/6/20252 min read

IPCONFIG

The ipconfig command displays the current network configuration of your system, including IP address, subnet mask, and default gateway. It is also useful for troubleshooting network and DNS issues.

Display Information:

ipconfig

ipconfig /all // Displays detailed info including MAC address and DNS servers

Use case: Check your IP configuration to identify connectivity issues.

Fix Network and DNS issues:

ipconfig /release // Releases the current IP address

ipconfig /renew // Renews the IP address

ipconfig /flushdns // Clears the DNS cache

Use Case: Troubleshoot network connectivity and DNS-related problems.

PING

The ping command checks connectivity between your computer and a remote device or server.

Usage:

ping google.com

ping 192.168.1.1

Use case: Verify if a device or website is reachable. High latency or packet loss indicates network problems.

TRACERT

tracert (Trace Route) identifies the path packets take to reach a destination and where delays occur.

Usage:

tracert google.com

Use case: Detect which network segment is causing slowdowns or connection failures.

NSLOOKUP

nslookup is used for troubleshooting DNS issues by resolving domain names to IP addresses.

Usage:

nslookup google.com

Use case: Check if DNS servers are correctly resolving domain names, helpful when websites aren’t loading.

NETSTAT

netstat provides information about active network connections, listening ports, and protocol statistics.

Usage:

netstat -a // Shows all active connections and listening ports

netstat -n // Displays addresses and ports numerically

netstat -b // Shows which executable is using a connection

Use case: Identify open ports, monitor network connections, or detect unauthorized activity.

PATHPING

pathping combines the functionality of ping and tracert to provide detailed analysis over time.

Usage:

pathping google.com

Use case: Detect packet loss over specific network hops, useful for deeper troubleshooting.

ARP

arp displays and manages the ARP (Address Resolution Protocol) table, mapping IP addresses to MAC addresses.

Usage:

arp -a // Displays current ARP table

Use case: Detect IP conflicts or verify that devices are communicating properly on the local network.

NETSH

netsh is a versatile command for network configuration and troubleshooting.

Usage:

netsh interface ip show config

netsh winsock reset // Resets TCP/IP stack and fixes network issues

Use case: Resetting network settings can resolve persistent connectivity issues.

PSPING

psping is a powerful command-line utility from Microsoft Sysinternals that allows you to measure network latency, bandwidth, and TCP connection testing.

How to Install:

  1. Download PsPing from the official Microsoft Sysinternals website:
    Download PsPing

  2. Extract the ZIP file to a folder (e.g., C:\Tools\PsPing)

  3. Open CMD and navigate to the folder or add the folder to your system PATH for global access.

Usage:

psping google.com // Tests latency to the target

psping -n 10 google.com // Sends 10 pings

psping -4 google.com:80 // Tests TCP connection on port 80

Use case: Measure precise network latency, bandwidth, and TCP port connectivity, especially useful for server or service monitoring.