IPCONFIG Commands Explained: What Each One Does

Share
IPCONFIG Commands Explained: What Each One Does

`ipconfig` shows the network settings Windows is using right now, and some of its switches can refresh those settings when they’re wrong. If you’ve lost internet access, the first commands to try are usually `ipconfig /all`, `ipconfig /renew`, and `ipconfig /flushdns`, depending on whether the problem looks like a bad address or stale DNS. It can show your IP address, subnet mask, default gateway, and DNS details, which are the first clues in a home or office network problem. If the problem is your router, modem, Wi‑Fi signal, or your internet provider, `ipconfig` may only help you confirm that the issue is not on your PC.

What ipconfig is actually for

ipconfig is a Windows command for viewing and refreshing network settings on your computer. The basic command tells you what address your PC has right now and how it is reaching the network. Some versions of the command also let you clear cached name lookups or ask the network for a new address.

That makes it useful for troubleshooting, but not magical. If your adapter is disabled, your router is offline, or your ISP is down, ipconfig can show clues, but it usually cannot repair the root cause by itself.

For example, if your browser says it cannot reach a site, ipconfig can help you check whether your PC has a valid IP address, a working gateway, and DNS servers. If those values look wrong or missing, you have a starting point for the next step.

At a glance, the main fields tell you:

  • IPv4 Address: the local address your PC has on the network.
  • Subnet Mask: which addresses Windows treats as local.
  • Default Gateway: the router Windows uses to reach the internet and other networks.
  • DNS Servers: the systems that translate website names into IP addresses.
A Windows laptop sits on a desk with a terminal window open.

The commands people use most often

These are the ipconfig commands most Windows users reach for:

CommandWhat it does
ipconfigShows the basic network address information for each adapter.
ipconfig /allShows the full set of details, including DNS, DHCP, and adapter status.
ipconfig /releaseDrops the current DHCP lease for an adapter.
ipconfig /renewAsks the network for a new DHCP lease.
ipconfig /flushdnsClears the local DNS cache.
ipconfig /displaydnsShows the DNS records currently stored in the cache.

Use the plain ipconfig command when you want a quick check. Use /all when you need detail. Use /release and /renew when the PC seems to have a bad or expired IP address. Use /flushdns when sites are loading the wrong place or not resolving at all. Use /displaydns when you want to see what your PC has cached already.

For example, if a site opens on your phone but not on your PC, /displaydns can help you confirm whether Windows is holding onto an old lookup. If your PC says it has no usable address, /renew is the better first move.

A Windows laptop shows Ethernet and Wi-Fi network settings on the screen.

When you should run /all instead of the basic command

Run ipconfig /all when the simple command is not enough to explain the problem. The basic version gives you a quick view, but /all adds the pieces that often reveal why the connection is failing.

For example, you can see whether DHCP is enabled, which DNS servers your PC is using, the adapter’s physical address, and whether the adapter is connected at all. That helps when the computer has an address but still cannot browse, or when it looks connected to Wi‑Fi but is actually using the wrong network settings.

A common case is a laptop that connects to Wi‑Fi but gets no useful internet. If /all shows a strange IP address, no default gateway, or a DNS server that does not belong to your router or company network, the problem is probably in the local network setup rather than the website you are trying to open.

If you’re trying to decide what to look at, start with these lines in the output:

  • IPv4 Address: should usually look like your normal home or office address range.
  • Subnet Mask: should match the way your network is set up.
  • Default Gateway: should point to your router if you’re on a normal home network.
  • DNS Servers: should be present and reachable.
  • DHCP Enabled: Yes means Windows is getting settings automatically; No means the address may be set manually.

What /release and /renew do when the internet drops

/release and /renew are the commands to try when Windows has a bad IP address or a DHCP lease that no longer works. DHCP is the system that gives your PC an address on the network. If that lease is stale, expired, or incorrect, your machine may appear connected but still fail to reach anything useful.

/release tells Windows to drop the address it is using. /renew asks the router or DHCP server for a fresh one. This is most helpful on networks that assign addresses automatically, which is common at home and in many offices.

Say your laptop was working yesterday, then wakes up with “no internet.” If the network handed out a broken lease, these commands can clear that out and request a new one.

ipconfig /release
ipconfig /renew
Command Prompt

If /renew fails, that usually points to a problem beyond the PC itself. The router may not be handing out addresses, the cable modem may be down, or the wireless link may not be reaching the network properly.

These commands only affect the current network session. They do not permanently change your network setup, and Windows can get new information again after a reboot or a reconnect.

Why /flushdns helps with stale or wrong website lookups

ipconfig /flushdns clears the DNS cache on your PC. Windows stores recent name lookups so it can open sites faster, but that cache can keep old records after a site changes servers or after a bad lookup gets stored.

This command is useful when a website loads the wrong place, opens an old page, or fails only on your machine while other devices work fine. It does not change your network connection itself. It only forces Windows to ask for fresh name information next time you visit a site.

For example, if example.com stops loading on your computer but works on your phone on the same Wi‑Fi, flushing DNS is a reasonable step. If the problem clears right after that, the issue was probably stale cached name data.

ipconfig /flushdns
Command Prompt

ipconfig /displaydns does the opposite: it shows what is already in the cache. That can help if you want to confirm that Windows is holding onto a specific lookup, but most people only need the flush command.

If the site still fails after a flush, the problem may be the DNS server itself, not just your PC’s cache.

How to read the output without getting lost

The most useful lines are usually easy to spot once you know what they mean.

IPv4 Address is the local address your PC has on the network. If it looks normal for your network, that is a good sign. If it starts with 169.254, Windows usually did not get a proper address from DHCP.

Subnet Mask tells Windows which addresses count as local. For most home networks, you will see a mask that matches the router setup. You usually do not change this by hand unless you are on a network that was set up that way.

Default Gateway is the router your PC uses to reach the internet and other networks. If this line is missing, your PC may talk to itself or the local network but not get out.

DNS Servers are the systems that turn website names into IP addresses. If these are wrong or unreachable, pages may not open by name even when the connection itself is alive.

DHCP Enabled tells you whether your PC is getting settings automatically. If it says Yes, /renew may help. If it says No, the settings may be set manually, so the issue could be a static configuration instead of a DHCP problem.

If you are trying to tell whether the problem is on your PC, router, or ISP, this is the quick read:

  • 169.254 address: Windows did not get a valid address, so the issue is often between your PC and the router.
  • Missing Default Gateway: the PC is not getting a path out to the internet.
  • Normal IP and gateway, but bad DNS: the PC can reach the network, but name lookups are failing.
  • Normal-looking output on every device, but no internet: the problem is more likely the router, modem, or ISP.

What ipconfig will not fix

ipconfig is a network settings tool, not a cure-all. It will not fix a dead router, a modem with no signal, weak Wi‑Fi, a broken Ethernet cable, or an outage at your internet provider.

It also will not repair a disabled adapter. If Wi‑Fi is turned off in Windows, the adapter is disabled in Device Manager, or airplane mode is on, you need to fix that first. In those cases, ipconfig may still show information, but the connection problem is elsewhere.

If your whole house has no internet, the issue is often outside your PC. If only one computer is failing while others work, ipconfig is more likely to help you find a local configuration issue. That difference saves time because you avoid chasing a DNS problem when the modem is actually offline.

This is also where the command’s limits matter: ipconfig can show you what Windows thinks is happening, but it cannot tell you whether the router’s settings are wrong unless you compare its output with a working device or with the router settings themselves.

A safe order to try the commands

Start with the least disruptive check, then move to the commands that change settings temporarily.

  1. Open Command Prompt and run ipconfig /all.
ipconfig /all
Command Prompt
  1. Look at the IPv4 Address, Default Gateway, DNS Servers, and DHCP Enabled lines.
  2. If the address looks wrong or missing, run ipconfig /release, then ipconfig /renew.
ipconfig /release
ipconfig /renew
Command Prompt
  1. If websites still seem to resolve badly, run ipconfig /flushdns.
ipconfig /flushdns
Command Prompt
  1. Test the connection again.

These commands are usually safe because they only affect the current network session or the local DNS cache. The change is temporary. If you reboot, reconnect to another network, or the router hands out fresh settings, Windows will get new network data again.

If nothing improves, check the router, reboot the modem and router, or compare ipconfig /all with another working device on the same network.

Signs the problem is local versus outside your PC

ipconfig output can help you separate a local PC problem from a wider network problem.

If you see a normal IPv4 address, a default gateway, and DNS servers, your PC is at least getting basic network settings. That points you toward the router, DNS service, or internet provider if browsing still fails.

If the IPv4 address starts with 169.254, Windows likely did not get an address from DHCP. That usually means the PC cannot get a proper response from the router or DHCP server.

If the default gateway is missing, your computer may be connected to the local network but not know where to send traffic beyond it.

If DNS servers are blank, strange, or unreachable, websites may not load by name even if the connection itself is alive. In that case, the issue may be the DNS setting on your PC, the router’s DNS setting, or the DNS service your network is using.

If every device in the house has the same problem, the outage is probably outside the PC. If only one device is affected, the problem is more likely local.

When you’re comparing devices, check whether the working one has the same gateway and DNS servers. That gives you a cleaner clue than guessing from the browser alone.

Common mistakes people make in Command Prompt

One common mistake is running the command in the wrong place. ipconfig needs a Command Prompt, PowerShell, or Windows Terminal window. If you are typing into a browser search box or the Run dialog, it will not behave the same way.

Another mistake is assuming every warning means the network is broken. Some adapters may show disconnected if they are not in use, and that is normal. Focus on the adapter you are actually using, such as Wi‑Fi or Ethernet.

People also mix up IPv4 and IPv6. If your router or ISP is set up for IPv4 and the IPv6 line looks unfamiliar, do not jump to a conclusion based on that alone. The IPv4 address and default gateway are usually the first lines to check for most home problems.

Finally, some commands need an elevated prompt in certain situations or on managed computers. If Windows blocks a change, that does not always mean the network is broken. It may mean your account does not have permission to alter that setting.

What to do after ipconfig still doesn’t fix it

If the commands do not help, move to the next practical checks instead of repeating them.

Restart the Wi‑Fi adapter or unplug and reconnect the Ethernet cable. If that does nothing, reboot the router and modem. That clears a lot of temporary network faults and forces the equipment to renegotiate the connection.

Try another network if you can, such as a phone hotspot. If your PC works there, the problem is likely specific to your home or office network rather than Windows itself.

If other devices on the same network fail too, check the router settings or contact your ISP. If only one device keeps failing, look again at its adapter settings, DNS configuration, and whether it is using DHCP or a static address.

At that point, ipconfig /all gives you the best evidence to compare against a working device or to describe the problem clearly to whoever manages the network.

Conclusion

If you only remember one thing, make it this: `ipconfig` tells you what network settings Windows has, while `ipconfig /all` shows the details that explain most problems. Use `/release` and `/renew` for address issues, and `/flushdns` for name lookup problems. If the output looks normal but nothing works, focus on the router, modem, Wi‑Fi signal, or ISP instead of repeating the same command over and over.

Frequently Asked Questions

Do I need to run Command Prompt as administrator for ipconfig?

For basic viewing commands like `ipconfig` and `ipconfig /all`, usually no. Some refresh actions work better with elevated permissions on certain systems, but if a command fails because of permissions, Windows will normally make that clear.

What does a 169.254 address mean?

It usually means Windows did not get a valid address from DHCP. That points to a problem with the router, DHCP server, cable, or wireless connection rather than a normal working setup.

Should I use /flushdns before /renew?

Usually no. If the problem looks like a bad IP address, try `/release` and `/renew` first. If the address looks fine but websites still fail to load by name, then try `/flushdns`.