Updated: October 2026
A user says the internet is down, and the first thing you type is ipconfig. It answers three questions in one screen: does this PC have an address, where does it send traffic, and who does it ask for names. Here's every ipconfig command, how to read the output line by line, and which switch to reach for on the tickets you see every week.
What Ipconfig Does
Ipconfig shows the TCP/IP settings of every network adapter on a Windows machine. It also refreshes two of them on demand: the DHCP lease and the DNS client cache. Microsoft's reference lists it on Windows 10, Windows 11 and every current Windows Server release.
Run it with no switches and you get the short view. That's each adapter's IPv4 and IPv6 address, subnet mask and default gateway. Enough to spot a missing address. Not enough to spot a wrong DNS server, which is why the long view exists.
It's most useful on machines that get their address from DHCP. On a statically configured server, ipconfig can show you the settings but can't renew anything.
Every Ipconfig Switch at a Glance
Microsoft's ipconfig reference lists eleven switches. Here's what each one does and when a technician uses it.
| Switch | What it does | When you use it |
|---|---|---|
| /all | Full configuration for every adapter | First look at almost any network ticket |
| /release | Drops the DHCP lease for IPv4 | Forcing a fresh address from the DHCP server |
| /renew | Requests a new DHCP lease for IPv4 | Right after /release, or when the address is 169.254.x.x |
| /release6 | Drops the DHCPv6 lease | IPv6 networks with DHCPv6 |
| /renew6 | Requests a new DHCPv6 lease | Same, for IPv6 |
| /displaydns | Shows the DNS client cache, including Hosts file entries | Checking what a name currently resolves to on this PC |
| /flushdns | Empties the DNS client cache | After a DNS record changes, or a bad answer got cached |
| /registerdns | Re-registers the PC's name and address in DNS | The PC's DNS record is missing or stale |
| /showclassid | Shows the DHCP class ID of an adapter | Rare: DHCP servers that hand out options by class |
| /setclassid | Sets or clears the DHCP class ID | Same rare case |
| /allcompartments | Listed in Microsoft's syntax without a description | You'll almost never need it |
Two details save time. Adapter names with spaces need quotes, as in ipconfig /renew "Ethernet 2". And ipconfig accepts wildcards, so ipconfig /renew Eth* renews every adapter whose name starts with Eth.
Reading Ipconfig /all, Line by Line
ipconfig /all is the switch you'll run most. The output has a short header for the whole PC, then one block per adapter, including virtual ones from VPN clients and Hyper-V.
The header shows the host name and the primary DNS suffix. On a domain-joined PC, the suffix should be your domain. If it's blank, the machine may have lost its domain trust or never joined.
Inside each adapter block, read these lines in order:
- Description and Physical Address. The adapter model and its MAC address. The MAC is what a switch port or a DHCP reservation keys on.
- DHCP Enabled. Yes means the address came from a DHCP server. No means someone typed it in.
- IPv4 Address. The address, marked Preferred when it's in use. An address starting 169.254 means DHCP failed.
- Lease Obtained and Lease Expires. When the PC got its lease and when it has to renew.
- Default Gateway. Where traffic for other networks goes. Blank means the PC can only reach its own subnet.
- DHCP Server. Which server handed out the lease. A surprise address here means a second DHCP server is on the network.
- DNS Servers. Who the PC asks for names. A public resolver on a domain PC breaks logons and file shares.
The adapter you care about is the one with a gateway. Everything else is usually a disconnected Wi-Fi card or a virtual switch.
Release and Renew: What Happens When You Run Them
ipconfig /release sends the DHCP server a release message and drops the address. The adapter has no IPv4 address until you renew. ipconfig /renew asks for a new lease, and on a healthy network the PC gets an address within seconds, often the same one.
Run them back to back when a PC has a stale lease. That's the classic after-a-power-cut ticket: the router came back, the PC kept its old lease, and some pages load while others don't. This r/techsupport thread is exactly that, and a reply blames a stale DHCP lease.
One warning before you type /release on a remote session. The moment the address drops, your remote connection drops with it. Chain both commands on one line, ipconfig /release && ipconfig /renew, or use the approach in our guide to resetting a network adapter so you don't lock yourself out.
Ipconfig Commands for Three Common Tickets
The address starts with 169.254. Windows gave itself a link-local address because no DHCP server answered. RFC 3927 reserves 169.254.0.0/16 for exactly this. Run ipconfig /renew. If it times out with "unable to contact your DHCP server", the problem sits between the PC and the server: cable, switch port, VLAN, port security or the DHCP scope being full.
This dorm ticket shows the pattern well. Renew times out, the address is 169.254 and the gateway is blank. The replies point at the network, not the PC, including a port that may need the machine's MAC registered first.
There's an address but no default gateway. The PC can reach its own subnet and nothing else. Check whether the address is static with a gateway left out, or whether the DHCP scope is missing the router option. If pings to other networks come back with a routing error, our post on destination host unreachable walks through reading the reply.
The address and gateway look fine, but names don't resolve. Look at the DNS Servers line in ipconfig /all. A wrong or unreachable server there is the cause more often than the cache. If the servers look right, check the cache next, which the section below covers.
Displaydns, Flushdns and Registerdns
ipconfig /displaydns prints the DNS client cache. It includes entries loaded from the Hosts file, so it's a quick way to spot a Hosts entry someone forgot about. Search it for the name that's failing and you'll see exactly what this PC thinks the answer is.
ipconfig /flushdns empties that cache. Microsoft's reference notes it also discards negative entries, the cached "this name doesn't exist" answers that keep a fixed record broken on one PC. We cover when it helps and when it doesn't in the post on slow DNS lookups.
ipconfig /registerdns asks the PC to re-register its own name and address with DNS. Use it when you can't reach a machine by name but can by IP, and its record is missing on the DNS server. It saves a reboot. If the whole office can't resolve names, the fix sits upstream, and our guide to DNS server not responding starts there.
PowerCert's explainer covers the everyday switches, including the DNS cache.
PowerShell Equivalents
Ipconfig works fine inside PowerShell. But the PowerShell cmdlets return objects instead of text, which makes them easier to filter and to run across many machines.
| Ipconfig | PowerShell | Notes |
|---|---|---|
| ipconfig, ipconfig /all | Get-NetIPConfiguration | Shows connected, non-virtual interfaces by default |
| ipconfig /all (addresses only) | Get-NetIPAddress | One row per address |
| ipconfig /displaydns | Get-DnsClientCache | Same cache, as objects |
| ipconfig /flushdns | Clear-DnsClientCache | Microsoft documents it as equivalent |
| ipconfig /registerdns | Register-DnsClient | Global only, not per adapter |
| ipconfig /release and /renew | No direct cmdlet | Call ipconfig, or Restart-NetAdapter to bounce the adapter |
Get-NetIPConfiguration skips virtual and disconnected adapters unless you ask for them, which is usually what you want on a support call. For more one-liners like these, see our PowerShell commands guide.
On macOS and Linux
macOS has its own ipconfig, but it's a different tool; ipconfig getifaddr en0 prints an address and ifconfig shows the rest. On Linux, ip addr and ip route replace ipconfig, and resolvectl flush-caches clears the cache on systems running systemd-resolved.
Checking Many PCs at Once
One PC is a quick ipconfig. Fifty PCs after a DHCP change is a script. Run Get-NetIPConfiguration or ipconfig /all remotely and collect the gateway and DNS server lines into one table, then look for the machines that disagree. In OpenFrame, you can run that check as a script across a client's devices and collect the output in one place.
The Short Version
Start every network ticket with ipconfig /all and read the address, gateway and DNS servers in that order. A 169.254 address means DHCP failed, a blank gateway means routing, and a wrong DNS server beats a stale cache as the usual name problem. Release and renew fix stale leases, and flushdns fixes cached answers.
Next, if the address looks fine but the other end won't answer, read destination host unreachable for what the ping reply tells you.

"Fae" Grace Meadows
Lead AI Fairy
Some things defy easy explanation: magic dust, the northern lights… and Flamingo’s AI Angels. Think Charlie’s Angels, reimagined with automation brains and serious RMM (Remote Monitoring & Management) chops. Weird? A little. Effective? Absolutely. That’s the job.
