How to Use ipconfig on Windows

ipconfig is a built-in Windows command that shows your complete network configuration — including your Default Gateway (router IP), IP address, subnet mask, and DNS servers — in seconds.

Opening Command Prompt

Press Win + R, type cmd, and press Enter. Alternatively, search for "Command Prompt" in the Start menu. You do not need administrator mode to run ipconfig — it works in a standard user prompt.

Keyboard shortcut: Press Win + X then press C to open Command Prompt directly. On Windows 11, this opens Windows Terminal instead.

Basic ipconfig Commands

CommandWhat It Shows / Does
ipconfigIPv4 address, subnet mask, and Default Gateway for each network adapter
ipconfig /allFull detail — adds MAC address, DHCP server, DNS servers, lease times, IPv6
ipconfig /releaseReleases the current DHCP-assigned IP address
ipconfig /renewRequests a new IP address from the DHCP server (your router)
ipconfig /flushdnsClears the local DNS resolver cache — fixes stale DNS entries
ipconfig /displaydnsShows current DNS cache entries
ipconfig /registerdnsRe-registers DNS with the DHCP server (enterprise networks)

Reading the ipconfig Output

Type ipconfig and press Enter. The output shows a section for each network adapter. Find the one for your active connection — either "Wireless LAN adapter Wi-Fi" for Wi-Fi or "Ethernet adapter Ethernet" for a wired connection. Ignore sections that say "Media disconnected."

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix . :
   IPv4 Address. . . . . . . . . : 192.168.1.42
   Subnet Mask . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . : 192.168.1.1
IPv4 Address (192.168.1.42)

Your device's local IP address. This is what other devices on your network use to reach you.

Default Gateway (192.168.1.1)

Your router's IP address. Type this in a browser to reach the router admin panel.

Subnet Mask (255.255.255.0)

Defines which part of the IP address identifies the network vs individual devices. 255.255.255.0 means the first 3 octets are the network.

ipconfig /all — Full Detail

Running ipconfig /all adds several important additional fields:

FieldWhat It Means
Physical AddressYour device's MAC address — a unique hardware identifier for the network adapter
DHCP EnabledWhether the IP was automatically assigned (Yes) or manually configured (No)
DHCP ServerThe IP of the DHCP server that assigned your address — usually your router
DNS ServersThe DNS servers your device uses for domain lookups — often your router or ISP
Lease Obtained / ExpiresWhen DHCP assigned the IP and when it will be renewed
IPv6 AddressYour device's IPv6 address if IPv6 is enabled

Frequently Asked Questions

When should I use ipconfig /release then /renew?

This sequence is useful when your device has an IP address problem — a conflict with another device, a stale IP from a previous network, or failure to get an IP after connecting. Release drops the current IP, and renew requests a fresh one from your router's DHCP server. Run them in order: ipconfig /release first, wait a second, then ipconfig /renew. This often resolves "Limited connectivity" and "No internet access" errors.

What does ipconfig /flushdns actually fix?

Windows caches DNS lookups to speed up repeated visits to the same sites. If a website moved to a new IP, or if you changed your router's DNS servers, the old cached entries can cause failed connections even though everything is configured correctly. Flushing the DNS cache clears all these stored entries, forcing fresh lookups. This fixes issues like websites loading but others not, "server not found" errors after changing DNS settings, and redirect problems after website migrations.