A Windows PC can show Connected and still fail to load websites, apps, or sign-in pages. The fastest way to stop guessing is to use the run command for network settings and a short set of Command Prompt checks that tell you whether the problem is the device, the router, DNS, or the wider internet.
CompTIA A+ Certification 220-1201 & 220-1202 Training
Master essential IT skills and prepare for entry-level roles with our comprehensive training designed for aspiring IT support specialists and technology professionals.
Get this course on Udemy at the lowest price →Quick Answer
The best run command for network settings troubleshooting on Windows is ipconfig, usually paired with ping, nslookup, and tracert. Together, these commands show your IP address, default gateway, DNS servers, local reachability, and route to a remote host, which is exactly what you need to isolate basic network problems fast.
Quick Procedure
- Run ipconfig /all to check the device’s IP, gateway, and DNS settings.
- Ping 127.0.0.1 and then your local IP address to confirm the network stack is working.
- Ping the default gateway to verify local network access.
- Ping a public IP address such as 8.8.8.8 to test internet reachability without DNS.
- Run nslookup to confirm DNS resolution for a website or service.
- Run tracert if the issue is outside the LAN or only affects one destination.
- Use ipconfig /flushdns and ipconfig /renew only after you have gathered diagnostic output.
| Best First Command | ipconfig /all as of November 2026 |
|---|---|
| Local Connectivity Test | ping 127.0.0.1 as of November 2026 |
| DNS Test Command | nslookup as of November 2026 |
| Route Trace Command | tracert as of November 2026 |
| Reset Commands | ipconfig /flushdns, ipconfig /release, ipconfig /renew as of November 2026 |
| Primary Use Case | Basic Windows network diagnostics as of November 2026 |
| Best For | Help desk triage, home troubleshooting, and CompTIA A+ style network checks as of November 2026 |
Understanding the Command Prompt Troubleshooting Mindset
Command Prompt troubleshooting is the habit of testing the network from the inside out instead of restarting everything and hoping the issue disappears. Start with the device, then the local network, then DNS, then the internet, and only after that look at the remote destination.
This approach matters because one failed test does not prove the root cause. A website can fail because the PC has a bad IP address, because the gateway is unreachable, because DNS is misconfigured, or because the server itself is down.
A network problem is usually not “the internet.” It is often one broken layer in a chain that starts with the adapter and ends with the destination server.
The goal is to separate symptoms from causes. Diagnostics work best when each command answers a specific question: Can the PC talk to itself? Can it reach the router? Can it resolve names? Can it reach the target host?
That is why this method is useful for help desk work and entry-level support. It reduces guesswork, saves time, and produces output you can document clearly in a ticket. It also maps well to the CompTIA A+ troubleshooting style used in basic desktop support.
For official reference on Windows networking tools, Microsoft documents commands such as ipconfig, ping, and nslookup in its command-line reference.
Prerequisites
You do not need admin-level tools to begin, but a few basics make the process cleaner.
- A Windows PC with Command Prompt or Windows Terminal access.
- Basic permission to view network settings and run standard network commands.
- A working keyboard and a way to copy or screenshot output for documentation.
- The name of one website, server, or internal resource that is failing.
- Access to the local router, switch, or access point if you need to verify physical connectivity.
- A second known-good device on the same network for comparison, if available.
If you are supporting a home user or a small office, the most useful comparison is usually another laptop or phone on the same Wi-Fi network. If that second device works and the first one does not, the problem is probably local to the affected machine.
How Do You Check Basic IP Settings with ipconfig?
ipconfig is the first run command for network settings because it tells you whether Windows has a valid address, gateway, and DNS configuration. If the device cannot get those values correctly, browsing often fails even though the Wi-Fi icon says connected.
Run ipconfig /all to get the full picture. Focus on the IPv4 address, subnet mask, default gateway, and DNS servers. If the address starts with 169.254, Windows likely failed to get a DHCP lease and assigned itself an APIPA address.
Warning
A 169.254.x.x address usually means the computer did not receive a valid DHCP response. That is a local configuration or network access problem, not a DNS problem.
Compare a healthy output to a broken one. A healthy desktop on a home router might show an IP like 192.168.1.25, a gateway like 192.168.1.1, and one or two DNS servers from the router or ISP. A broken one might show no gateway, an autoconfigured address, or DNS entries that do not match the network.
This is also where you answer the common support question: a technician suspects a person’s dns settings are incorrect on a device. what command should the technician run to get the current ip address and dns information on the device? The best answer is ipconfig /all. It shows both the address and the DNS server list in one place.
For standards-based context, the Cisco® documentation ecosystem and Microsoft’s own command references are the best places to verify how Windows handles addressing and name resolution at the host level.
How Do You Test Local Connectivity with ping?
ping is a simple reachability test that confirms whether a target responds to ICMP echo requests and how long the response takes. It is one of the quickest ways to tell whether the problem is on the PC, the local network, or somewhere farther away.
Use a step-by-step sequence instead of jumping straight to a website. Start with ping 127.0.0.1, then ping your own IP address, then ping the default gateway, then ping a public IP such as 8.8.8.8, and finally ping a domain name like www.microsoft.com.
- Ping the loopback address. This checks that TCP/IP is functioning locally. If
127.0.0.1fails, the problem is on the machine itself. - Ping the local IP address. This confirms that Windows can communicate with its own configured interface.
- Ping the default gateway. If this fails, the device may not be reaching the router or local gateway at all.
- Ping a public IP address. This bypasses DNS and checks raw internet reachability.
- Ping a domain name. This tests both connectivity and name resolution.
Look at response time, packet loss, and timeouts. A few slow replies can point to Wi-Fi interference or congestion. Repeated Request timed out messages can mean the target is unreachable, blocked by a firewall, or down entirely.
This is a strong answer to the query, a technician is troubleshooting a device that can connect to the local network but cannot access the internet. which command should be used to verify the gateway and dns settings on a windows machine? The most useful command is still ipconfig /all, because it verifies the gateway and DNS settings before you move to ping tests.
Microsoft’s ping command reference explains the syntax and output format, which helps when you need to separate latency from outright failure.
How Do You Confirm DNS Resolution with nslookup?
DNS is the naming system that turns human-readable hostnames into IP addresses. If DNS breaks, a device may still reach the internet by IP but fail when you type a website name into the browser.
Run nslookup example.com or another domain that should resolve. If it returns an IP address and a DNS server, name resolution is working at least for that query. If it says Non-existent domain or server can’t find, the name may be wrong, the DNS server may be failing, or the network may be using bad resolver settings.
nslookup is especially helpful when one site fails but others work. That pattern often points to a stale cached record, a bad DNS server, or a problem on the site itself rather than a full network outage.
- Good sign: The hostname resolves to a valid IP address and the query returns quickly.
- Possible DNS issue: The command returns no address, an unexpected server, or a timeout.
- Possible upstream issue: One device resolves the name differently from another device on the same network.
If you want to compare resolver behavior, try the same query on a second device or point a test query at a known public resolver. That is often enough to determine whether the problem is local DNS settings or something broader.
This command is also the best fit for the question, a user is having problems connecting to other computers using hostnames. which of the following commands will best help you troubleshoot this problem? answer a nbtstat b netstat c arp d nslookup The correct choice is nslookup, because the issue is hostname resolution, not routing or ARP table inspection.
For official guidance on Windows DNS troubleshooting, Microsoft’s DNS documentation is the most reliable reference.
How Do You Trace the Route with tracert?
tracert shows the path packets take from your PC to a remote destination. It is useful when a specific service is slow, unreachable, or only failing from certain networks or geographic paths.
Run tracert domain.com and watch the hop-by-hop output. Each line represents a router or hop along the way. Rising hop numbers are normal. Large jumps in response time, repeated timeouts, or a final stop before the destination can point to a routing problem or a remote outage.
Do not panic if one hop times out. Many routers simply do not answer trace requests even when they are forwarding traffic normally. The real question is whether later hops and the final destination still respond.
- Short trace with normal times: Routing is probably fine.
- Trace dies at the gateway: Check the local router, Wi-Fi link, or switch path.
- Trace reaches the ISP but not the site: The issue may be upstream or on the remote network.
- Trace succeeds but the app still fails: The problem may be application-specific, not network-wide.
This tool is useful when only one service is affected, such as a login page, internal SaaS platform, or regional host. It is also a practical way to answer whether a failure is local, ISP-related, or on the destination side.
For route behavior and network analysis concepts, the Internet Engineering Task Force (IETF) maintains the standards environment that underpins Internet routing and IP behavior.
How Do You Refresh the Network Stack with Basic Reset Commands?
Reset commands are the next step when diagnostics point to stale addressing, corrupted DNS cache entries, or a temporarily stuck adapter state. Use them after you gather evidence, not before, so you do not hide the original problem.
A common cleanup sequence is ipconfig /flushdns, ipconfig /release, and ipconfig /renew. The first clears cached name lookups, the second drops the current DHCP lease, and the third asks the network for a fresh IP configuration.
Pro Tip
If you are supporting a user remotely, document the original IP, gateway, and DNS values before you run reset commands. That record makes it easier to tell whether the fix actually changed the network state.
These commands can help when the device has an old DHCP lease, bad cached DNS data, or a temporary stack issue after sleep, roaming between networks, or a router reboot. They do not fix broken cabling, dead access points, or ISP outages.
If you need a deeper reset on Windows, additional commands like netsh winsock reset and netsh int ip reset are sometimes used by administrators. Those are more invasive and should be reserved for cases where basic renewal and cache clearing do not resolve the issue.
For support teams, the key is to treat resets as a controlled test. If connectivity returns after a renew or DNS flush, note whether the fix persists after a reboot. A temporary recovery can still point to a deeper configuration issue.
For command syntax and behavior, Microsoft’s ipconfig documentation is the authoritative reference.
What Is a Simple Troubleshooting Workflow You Can Repeat Every Time?
A repeatable workflow keeps troubleshooting fast and consistent. The best order is: inspect ipconfig /all, ping the gateway, ping a public IP, test DNS with nslookup, and then run tracert if the issue still is not clear.
That sequence matters because each test answers a different question. If the gateway fails, you look at the local network. If the public IP works but the domain name does not, you focus on DNS. If the trace breaks outside the LAN, the problem may be upstream.
- Check IP settings. Confirm the adapter has a valid IP, gateway, and DNS server.
- Test the gateway. Verify the device can reach the local router or default gateway.
- Test raw internet access. Use a public IP to rule out DNS.
- Test hostname resolution. Use nslookup on a known domain.
- Trace the route. Use tracert only when the failure looks external or destination-specific.
For example, if the gateway responds but public IPs do not, the issue is likely between the LAN and the internet connection. If public IPs work but websites fail, DNS is a strong suspect. If only one internal server fails, the issue may be on that host or its DNS record.
Support teams benefit from this method because it shortens ticket handling time and produces better escalation notes. Instead of writing “internet is broken,” you can write “local gateway reachable, public IP unreachable, likely WAN or router issue.” That is the kind of note that gets action.
What Common Problems Can These Commands Identify?
These commands can quickly identify the most common desktop network issues. That includes bad IP configuration, DHCP failure, missing gateway information, DNS misconfiguration, intermittent wireless instability, and reachability problems that only affect one host or one service.
Bad IP configuration usually shows up in ipconfig /all as an APIPA address, missing gateway, or DNS settings that do not belong on that network. DHCP failure often appears when the lease is absent or stale after a restart or network change.
- Router or switch issue: The gateway fails to respond, and nearby devices may show the same problem.
- DNS issue: Raw IP addresses work, but hostnames do not.
- Wireless instability: Ping replies are inconsistent, with latency spikes or packet loss.
- Host-specific problem: One website fails while the rest of the internet works.
These commands also help you separate user error from infrastructure failure. A user may say “the internet is down,” but the real problem could be a wrong proxy setting, a stale DNS record, or a misconfigured laptop that never received a proper lease.
That is why the run command for network settings workflow is so valuable for entry-level support and CompTIA A+ style troubleshooting. It tells you where the failure starts, which is often half the battle.
For broader troubleshooting guidance, NIST’s Cybersecurity Framework is useful when you need a structured way to think about assets, incidents, and recovery priorities, even outside pure security work.
How Do You Read Command Prompt Output Without Jumping to Conclusions?
Command output should be read as evidence, not as a yes-or-no verdict. One command can tell you where to look next, but it rarely tells you everything by itself.
Run a command more than once if the result looks inconsistent. Temporary packet loss, roaming between access points, or background updates can create misleading output that disappears on the second test.
Compare the affected machine to a known-good device on the same network. If both devices show the same gateway but only one has DNS problems, the issue is probably local to that PC. If both fail the same way, the problem may be the router, DNS server, or upstream connection.
The fastest way to make a bad troubleshooting decision is to trust a single line of output without checking the rest of the pattern.
Also watch for outside factors. Firewalls can block ping replies, Wi-Fi can introduce latency, and proxy settings can make a browser look broken even when the network is fine. A failed ping is not always a failed network.
If you save screenshots or copy output into a ticket, include the timestamp and the exact command used. That makes the case much easier to hand off to another technician or an escalation team.
When Should You Move Beyond Command Prompt?
Command Prompt is a fast triage tool, not a full replacement for deeper network analysis. If the basic command sequence does not isolate the issue, it is time to move to broader checks or escalate the problem.
Go beyond Command Prompt when the symptoms point to ISP outages, failed hardware, switch port problems, wireless controller issues, or server-side downtime. If every device on the site fails the same way, the fault is probably not on one PC.
Windows may also need additional troubleshooting if the adapter driver is unstable, the system has corrupted networking components, or the machine keeps losing its lease after sleep or dock/undock cycles. In those cases, an admin may need to review adapter properties, driver versions, or policy settings.
- Escalate to the router or ISP when the gateway is unreachable or multiple devices fail together.
- Escalate to server support when only one internal application or destination is down.
- Escalate to advanced Windows troubleshooting when resets do not stick or the adapter keeps misbehaving.
The practical rule is simple: use Command Prompt to identify the layer that is failing, then stop using it once the next step requires a different tool or a different team. That keeps troubleshooting efficient and avoids random changes that can make the problem harder to fix.
Key Takeaway
• ipconfig /all is the best first command for basic Windows network diagnostics because it reveals IP address, gateway, and DNS settings.
• ping helps you isolate whether the failure is local, on the LAN, or beyond the router.
• nslookup is the fastest way to confirm whether hostname resolution is the real problem.
• tracert shows where a route breaks or slows down when the issue is outside the local network.
• Reset commands like ipconfig /flushdns and ipconfig /renew work best after you collect diagnostic evidence.
CompTIA A+ Certification 220-1201 & 220-1202 Training
Master essential IT skills and prepare for entry-level roles with our comprehensive training designed for aspiring IT support specialists and technology professionals.
Get this course on Udemy at the lowest price →Conclusion
Command Prompt gives you a fast, repeatable way to diagnose basic network problems without guessing. If you use ipconfig, ping, nslookup, and tracert in the right order, you can quickly tell whether the issue is local, gateway-related, DNS-related, or upstream.
That workflow saves time for home users, help desk staff, and anyone building foundational support skills. It also lines up well with the practical troubleshooting expected in CompTIA A+ style work, including the material covered in ITU Online IT Training’s CompTIA A+ Certification 220-1201 & 220-1202 training.
Use the commands the same way every time, document the output, and only reset the stack after you understand what failed. A few simple commands can reveal far more than a reboot, and they often show exactly where the problem starts.
If you want faster results in the field, make this sequence your default process and practice it until it becomes automatic.
CompTIA® and A+™ are trademarks of CompTIA, Inc. Microsoft® and Cisco® are trademarks of their respective owners.
