COMMAND

ipconfigIP configuration and DNS cache

ipconfig displays the IP address, subnet mask and default gateway for each network adapter on Windows. Its options manage DHCP leases and the DNS cache: /all shows full detail, /flushdns clears the resolver cache, and /release with /renew requests a fresh DHCP address.

BlackhawkHub Editorial · Updated

Purpose

ipconfig (IP Configuration) reports and manipulates the TCP/IP settings of every network adapter on a Windows machine. It is the first command to run for almost any connectivity problem: it tells you whether the machine has an address, from where, and which DNS servers and gateway it is using.

Syntax

text
ipconfig [/all] [/release [adapter]] [/renew [adapter]]
         [/flushdns] [/displaydns] [/registerdns]
         [/release6] [/renew6]

Options that matter

OptionEffect
(none)Address, mask and gateway per adapter
/allFull detail: hostname, MAC, DHCP server, lease times, DNS servers
/flushdnsClear the DNS resolver cache
/displaydnsShow the current DNS resolver cache
/registerdnsRefresh DHCP leases and re-register DNS names
/releaseRelease the IPv4 DHCP lease (adapter loses its address)
/renewRequest a new IPv4 DHCP lease
/release6, /renew6The IPv6 equivalents

Examples

See everything about your adapters:

cmd
ipconfig /all
text
Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . : lan
   Physical Address. . . . . . . . . : A4-5E-60-1B-2C-3D
   DHCP Enabled. . . . . . . . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.1.37(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, 16 September 2026 08:14:02
   Lease Expires . . . . . . . . . . : Thursday, 17 September 2026 08:14:02
   Default Gateway . . . . . . . . . : 192.168.1.1
   DHCP Server . . . . . . . . . . . : 192.168.1.1
   DNS Servers . . . . . . . . . . . : 1.1.1.1
                                       1.0.0.1

Clear the DNS cache after a DNS change (see the flush DNS guide):

cmd
ipconfig /flushdns
text
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.

Get a fresh DHCP address:

cmd
ipconfig /release
ipconfig /renew

Release drops the address (you lose connectivity for a moment); renew requests a new lease from the DHCP server on port 67.

Common mistakes

  • Expecting your public IP. ipconfig shows the private address behind NAT, never the public one your traffic arrives from.
  • Flushing DNS to fix everything. It only helps when a stale cached record is the problem; it does nothing for connectivity or a resolver that is itself wrong.
  • Renewing without releasing when the adapter has an APIPA address; /renew alone often works, but if it fails, release first.
  • Wrong adapter name with /release "Wi-Fi": names with spaces need quotes, and the name must match what ipconfig shows.

PowerShell equivalents

Get-NetIPConfiguration and Get-NetIPAddress give the same information as objects; Clear-DnsClientCache replaces /flushdns; Get-DnsClientCache replaces /displaydns.

Frequently asked questions

What is the difference between ipconfig and ipconfig /all?

Plain ipconfig shows the address, mask and gateway per adapter. /all adds the hostname, MAC address, DHCP server, lease times, DNS servers and whether DHCP is enabled, which is what you need for most troubleshooting.

Does ipconfig /flushdns need administrator rights?

On current Windows it usually runs without elevation, but on some configurations it reports "action requires elevation". If so, run it from an elevated prompt.

ipconfig shows 169.254.x.x — what does that mean?

The adapter got no DHCP address and self-assigned an APIPA link-local address. There is no gateway, so no internet. Check the cable or Wi-Fi and the DHCP server, then run ipconfig /renew.

Sources