ipconfig is the built-in Windows command-line utility that displays the current TCP/IP configuration of every network adapter and performs a small set of maintenance actions, such as renewing DHCP leases and flushing the DNS resolver cache. It ships with every modern edition of Windows, runs from Command Prompt, PowerShell or Windows Terminal, and remains the first diagnostic step for most connectivity problems in PowerShell & command line work.
The tool reads configuration that Windows already holds rather than probing the network, so its output answers one precise question: what addressing the computer believes it has. Whether that addressing actually works must then be confirmed with tools such as ping, tracert or the PowerShell cmdlet Test-NetConnection.
How ipconfig reads and changes network settings
ipconfig queries the IP Helper API and the DHCP Client service, which together maintain the operating system’s view of each adapter. Without arguments it prints a short summary: the IPv4 address, subnet mask, default gateway and any IPv6 addresses for each connected interface.
The maintenance switches do not edit configuration directly. Instead, they send requests to Windows services: /renew asks the DHCP Client to negotiate a new lease with the DHCP server, and /flushdns instructs the DNS Client service (Dnscache) to discard cached name resolutions. Static addresses are never altered by ipconfig; changing them requires the Settings app, netsh or the cmdlet New-NetIPAddress.
Because several switches change system state, some of them require an elevated prompt. Viewing configuration works for any user, while flushing the DNS cache or registering DNS records is typically run as administrator to avoid an access-denied error.
Common ipconfig switches and what they do
The utility accepts a compact set of switches, and the table below lists the ones administrators use most often together with their effect on the system.
| Switch | Action | Changes state | Typical use |
|---|---|---|---|
| /all | Shows full detail for every adapter | No | Inventory, MAC address, DNS servers |
| /release | Gives up the IPv4 DHCP lease | Yes | Before moving to another network |
| /renew | Requests a new IPv4 DHCP lease | Yes | After router or VLAN changes |
| /flushdns | Clears the DNS resolver cache | Yes | Stale or poisoned name records |
| /displaydns | Lists cached DNS entries | No | Checking what a name resolved to |
| /registerdns | Refreshes leases and re-registers DNS names | Yes | Domain-joined clients missing in DNS |
| /release6, /renew6 | Same actions for DHCPv6 leases | Yes | IPv6-enabled corporate networks |
Most switches accept an adapter name filter, and wildcards are allowed. For example, ipconfig /renew "Wi-Fi" renews only the wireless adapter, while ipconfig /release *Ethernet* affects every adapter whose name contains that word. Quoting names with spaces is required.
Reading the output of ipconfig /all
The /all view is the most informative output, and correct interpretation of a few fields resolves most addressing faults before any further testing. The table summarizes those fields and the warning signs that each one can reveal.
| Field | What it means | Warning sign |
|---|---|---|
| Physical Address | MAC address of the adapter | Unexpected value after hardware swap |
| DHCP Enabled | Whether the address is leased | No, on a client expected to use DHCP |
| IPv4 Address | Assigned address and its status | 169.254.x.x or the word Duplicate |
| Default Gateway | Router for traffic leaving the subnet | Blank or on a different subnet |
| DNS Servers | Resolvers the client will query | Public resolvers on a domain client |
| Lease Obtained / Expires | Validity window of the lease | Very short or already expired lease |
An address in the 169.254.0.0/16 range is an APIPA (Automatic Private IP Addressing) address. It means the client failed to reach any DHCP server and assigned itself a link-local address, which allows communication only with neighbors on the same segment and never with the internet.
ipconfig compared with PowerShell networking cmdlets
ipconfig produces formatted text intended for humans, while PowerShell cmdlets return structured objects that scripts can filter and sort. Both views draw on the same underlying configuration, so the choice depends on whether the result will be read or processed.
| Task | ipconfig | PowerShell equivalent |
|---|---|---|
| Show addressing summary | ipconfig | Get-NetIPConfiguration |
| Show detailed adapter data | ipconfig /all | Get-NetAdapter with Get-NetIPAddress |
| Clear the DNS cache | ipconfig /flushdns | Clear-DnsClientCache |
| List cached DNS entries | ipconfig /displaydns | Get-DnsClientCache |
| Register DNS records | ipconfig /registerdns | Register-DnsClient |
| Renew a DHCP lease | ipconfig /renew | No direct cmdlet; restart the adapter |
In scripts, parsing ipconfig text is fragile because field labels are localized: a German or French installation prints different words. The recommendation for automation is to use the cmdlets and keep ipconfig for interactive troubleshooting, where its familiar layout is fastest to scan.
Troubleshooting connectivity with ipconfig
ipconfig supports a layered diagnostic sequence: confirm local addressing first, then gateway reachability, then name resolution. The decision table maps typical symptoms to the most useful ipconfig action.
| Symptom | Likely cause | Recommended action |
|---|---|---|
| Self-assigned 169.254 address | DHCP server unreachable | Check cabling or Wi-Fi, then /renew |
| Website opens by IP but not by name | Stale or wrong DNS data | /flushdns, then verify DNS servers |
| Wrong subnet after moving desks | Old lease still active | /release followed by /renew |
| Server missing from DNS zone | Dynamic registration failed | /registerdns from an elevated prompt |
| Traffic leaves through VPN adapter | Gateway or metric precedence | Inspect /all, then route table |
Running ipconfig /release over a remote desktop session disconnects the session immediately, because the adapter loses its address before /renew can run. A safer pattern on remote machines is to chain both commands on one line, for example ipconfig /release && ipconfig /renew, or to restart the adapter with PowerShell remoting.
Limitations and common misconceptions
ipconfig is a configuration viewer, not a connectivity tester, and several widespread assumptions about it are inaccurate.
- Flushing DNS does not fix every name problem: browsers and some applications keep their own caches, and the hosts file is not affected by
/flushdns. - A valid address does not prove connectivity: firewalls, routing faults and upstream outages remain invisible to ipconfig.
- Renew does not always produce a new address: DHCP servers usually return the same address to the same client identifier.
- ipconfig does not configure static addresses; that task belongs to Settings,
netsh interface ipor the NetTCPIP cmdlets. - ifconfig is a different tool: it is the traditional Unix and Linux counterpart, with different switches and output.
Put simply
ipconfig is like asking a computer to read out its own mailing address. It tells you which address the computer was given on the network, which router it sends outside traffic through and which address books it uses to look up website names.
It can also ask for a fresh address or throw away a stale address book. The key point is that ipconfig shows what the computer believes, not whether the network actually works, so it is the first check rather than the final answer.
In practice
A help desk technician at a medium-sized office receives a call from an accountant whose laptop cannot reach the internal finance application. The technician opens Windows Terminal remotely and runs ipconfig /all. The output shows an IPv4 address of 169.254.31.7, no default gateway and an expired lease, which points to a DHCP failure rather than an application fault.
The technician learns that the laptop had been docked at a new desk on a different VLAN. After the network team corrects the switch port assignment, ipconfig /renew obtains a 10.20.4.x address with the correct gateway, and ipconfig /flushdns clears an old cached record for the finance server. The application opens within two minutes, and the ticket is closed with the root cause documented as a misconfigured switch port.