When your internet stops working, websites refuse to load, or your network connection becomes unstable, Windows Command Prompt provides some of the most powerful diagnostic tools available.
While many users rely entirely on graphical troubleshooting tools, network administrators and IT professionals often turn to Command Prompt first because it provides detailed information and direct control over Windows networking.
In this guide, we’ll cover the most useful network CMD commands, from basic tools every Windows user should know to advanced diagnostics used by professionals.
Opening Command Prompt
Before getting started:
- Click the Windows Search box
- Type: cmd
- Open Command Prompt
Some commands require administrator privileges, so you may occasionally need to select: Run as administrator
ipconfig: View and Manage Network Configuration
The most fundamental Windows networking command is:
ipconfigThis displays your network configuration, including:
- IP address
- Subnet mask
- Default gateway
- Network adapter information
The most important values are:
IPv4 Address
Your device’s local network address.
Examples:
192.168.1.100
10.0.0.25Default Gateway
Usually your router’s IP address.
This is often the address used to access your router’s web interface.
Subnet Mask
Defines your local network range.
Most home networks use:
255.255.255.0Useful ipconfig Variations
View Complete Information
ipconfig /allDisplays:
- MAC addresses
- DNS servers
- DHCP information
- Lease expiration times
Release Current IP Address
ipconfig /releaseDisconnects your device from the network by releasing its DHCP-assigned IP address.
Request a New IP Address
ipconfig /renewRequests a fresh IP assignment from your router.
Running Release followed by Renew often fixes network connectivity issues.
Clear DNS Cache
ipconfig /flushdnsRemoves cached DNS entries.
This is often the first fix to try when websites stop loading correctly.
ping : Test Connectivity and Latency
Ping is one of the most widely used network troubleshooting tools.
Example:
ping tips4it.comPing sends small packets to a destination and measures how long they take to return.
Understanding Ping Results
Successful Response
Reply from x.x.x.xThe destination is reachable.
Timeout
Request timed outThe destination failed to respond.
Latency Guidelines
- Under 20ms = Excellent
- Under 50ms = Good
- 50–100ms = Acceptable
- Above 100ms = May indicate a problem
Useful Ping Tests
Test Internet Connectivity
ping 8.8.8.8This tests connectivity using Google’s public DNS server.
Test DNS Resolution
ping google.comIf pinging 8.8.8.8 works but pinging google.com fails, the issue is usually DNS-related.
Continuous Monitoring
ping -t google.comRuns continuously until you press: Ctrl + C
Useful for monitoring unstable connections.
nslookup: Diagnose DNS Problems
The Name Server Lookup command allows you to query DNS servers directly.
Example:
nslookup google.comThis returns the IP addresses associated with the domain.
Check a Different DNS Server
nslookup google.com 8.8.8.8Uses Google’s DNS server instead of your default provider.
If this works while your normal lookup fails, your ISP’s DNS servers may be experiencing issues.
Interactive Mode
Simply run:
nslookupYou can then enter multiple domain names one after another.
Type:
exitto leave interactive mode.
tracert: Trace the Route to a Destination
Trace Route shows every router hop between your PC and the destination.
Example:
tracert google.comWhat tracert Reveals
- Routing path
- Network bottlenecks
- ISP issues
- Latency spikes
Each numbered line represents one router hop.
Faster Trace Route
tracert /d google.comSkips DNS lookups and displays only IP addresses, making the command faster.
netstat: View Active Network Connections
Netstat displays active connections and listening ports.
Example:
netstat -anThis shows:
- Local addresses
- Remote addresses
- Port numbers
- Connection states
Display Application Names
netstat -bShows which applications own each network connection.
Useful for identifying unknown processes making outbound connections.
Ethernet Statistics
netstat -eDisplays:
- Packets sent
- Packets received
- Errors
- Discards
View Routing Table
netstat -rDisplays routing information.
arp: View Devices on Your Local Network
ARP manages IP-to-MAC address mappings.
View the ARP cache:
arp -aThis shows devices recently seen on your local network.
Clear the ARP Cache
arp -dRemoves all ARP entries.
Useful when troubleshooting IP conflicts or device communication issues.
netsh: Advanced Network Configuration
Netsh is one of the most powerful networking tools built into Windows.
Reset Winsock
netsh winsock resetRepairs the Windows socket catalog.
One of the best fixes for mysterious network failures.
Reset TCP/IP
netsh int ip resetRestores the TCP/IP stack to default settings.
Reset TCP Settings
netsh int tcp resetResets transport-layer settings.
Reset Windows Firewall
netsh advfirewall resetRestores the firewall to factory defaults.
View Saved Wi-Fi Networks
List saved wireless profiles:
netsh wlan show profilesDisplay a Saved Wi-Fi Password
netsh wlan show profile name="YourNetworkName" key=clearReplace: YourNetworkName
with the exact network name.
The Wi-Fi password appears under: Key Content
route: Manage the Routing Table
Display routing information:
route printThis shows how Windows decides where network traffic should go.
Add a Static Route
route addUsed to direct traffic through a specific gateway.
Create a Persistent Route
route -p addRoutes created with the -p flag survive reboots.
Delete a Route
route deleteRemoves a route from the table.
pathping: Advanced Network Analysis
Pathping combines Ping and Tracert into a single tool.
Example:
pathping google.comUnlike Tracert, Pathping also measures packet loss at every hop.
This makes it extremely useful for diagnosing intermittent connectivity issues.
The downside is that it can take several minutes to complete.
Complete Windows Network Reset Sequence
When facing stubborn network issues, run these commands as Administrator:
ipconfig /flushdns
ipconfig /release
ipconfig /renew
netsh winsock reset
netsh int ip reset
netsh int tcp reset
netsh advfirewall resetAfter running all commands, restart your PC.
See also: Run these 7 commands when your Internet connection stops working
This sequence resets:
- DNS cache
- IP configuration
- Winsock catalog
- TCP/IP stack
- TCP settings
- Firewall rules
If problems persist after the restart, the issue is likely hardware-related or originates with your ISP.
Final Thoughts
Windows Command Prompt contains some of the most powerful networking tools available. Whether you’re checking your IP address, troubleshooting DNS issues, identifying routing problems, monitoring active connections, or performing a complete network reset, these commands provide information and control that graphical tools often cannot.
Keeping these commands in your troubleshooting toolkit can save hours of frustration the next time your network starts acting up.

Pingback: Run These 7 Commands When Your Internet Stops Working (Complete Windows Network Reset) - Tips 4 IT