ipconfig

On this page 8

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.

SwitchActionChanges stateTypical use
/allShows full detail for every adapterNoInventory, MAC address, DNS servers
/releaseGives up the IPv4 DHCP leaseYesBefore moving to another network
/renewRequests a new IPv4 DHCP leaseYesAfter router or VLAN changes
/flushdnsClears the DNS resolver cacheYesStale or poisoned name records
/displaydnsLists cached DNS entriesNoChecking what a name resolved to
/registerdnsRefreshes leases and re-registers DNS namesYesDomain-joined clients missing in DNS
/release6, /renew6Same actions for DHCPv6 leasesYesIPv6-enabled corporate networks
Frequently used ipconfig switches

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.

FieldWhat it meansWarning sign
Physical AddressMAC address of the adapterUnexpected value after hardware swap
DHCP EnabledWhether the address is leasedNo, on a client expected to use DHCP
IPv4 AddressAssigned address and its status169.254.x.x or the word Duplicate
Default GatewayRouter for traffic leaving the subnetBlank or on a different subnet
DNS ServersResolvers the client will queryPublic resolvers on a domain client
Lease Obtained / ExpiresValidity window of the leaseVery short or already expired lease
Key fields in ipconfig /all output

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.

TaskipconfigPowerShell equivalent
Show addressing summaryipconfigGet-NetIPConfiguration
Show detailed adapter dataipconfig /allGet-NetAdapter with Get-NetIPAddress
Clear the DNS cacheipconfig /flushdnsClear-DnsClientCache
List cached DNS entriesipconfig /displaydnsGet-DnsClientCache
Register DNS recordsipconfig /registerdnsRegister-DnsClient
Renew a DHCP leaseipconfig /renewNo direct cmdlet; restart the adapter
ipconfig tasks and their PowerShell equivalents

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.

SymptomLikely causeRecommended action
Self-assigned 169.254 addressDHCP server unreachableCheck cabling or Wi-Fi, then /renew
Website opens by IP but not by nameStale or wrong DNS data/flushdns, then verify DNS servers
Wrong subnet after moving desksOld lease still active/release followed by /renew
Server missing from DNS zoneDynamic registration failed/registerdns from an elevated prompt
Traffic leaves through VPN adapterGateway or metric precedenceInspect /all, then route table
Symptoms and recommended ipconfig actions

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 ip or 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.