What is ipconfig and How to Use it (Full Guide)
When your computer connects to Wi-Fi, joins an office network, or reaches a website, a lot happens quietly in the background. Windows assigns addresses, contacts gateways, talks to DNS servers, and keeps track of network adapters. ipconfig is one of the simplest ways to peek behind the curtain and see what your PC knows about its network connection.
TLDR: ipconfig is a built-in Windows command-line tool used to view and manage network configuration details. It can show your IP address, default gateway, DNS servers, and adapter information. It can also refresh your IP address, clear DNS cache, and help troubleshoot connection problems. If the internet is not working correctly, ipconfig is often one of the first tools you should try.
What Is ipconfig?
ipconfig, short for Internet Protocol Configuration, is a command-line utility included with Microsoft Windows. It displays information about your computer’s network adapters and their current IP configuration. In practical terms, it helps you answer questions like: What is my IP address? Which router am I connected to? What DNS server is my computer using? and Did my device receive a valid network address?
The command is usually run from Command Prompt, although it also works in PowerShell and Windows Terminal. It is especially useful because it requires no installation, opens quickly, and gives direct information without needing to click through several Windows settings screens.
For everyday users, ipconfig can help identify why a laptop is connected to Wi-Fi but still cannot browse the web. For IT professionals, it is a quick diagnostic tool used when configuring networks, troubleshooting DHCP issues, or checking DNS behavior.
How to Open ipconfig
Using ipconfig is straightforward. You do not need to download anything because it is already built into Windows.
- Press Windows + R on your keyboard.
- Type
cmdand press Enter. - In the Command Prompt window, type
ipconfig. - Press Enter to run the command.
You can also open it through the Start menu by searching for Command Prompt, PowerShell, or Windows Terminal. For basic commands, normal user access is usually enough. However, some commands, such as releasing and renewing IP addresses, may work better if you open the terminal as an administrator.
Basic ipconfig Command
The simplest version of the command is:
ipconfig
This displays a short summary of your network adapters. You may see entries for Wi-Fi, Ethernet, Bluetooth, virtual adapters, VPN adapters, or disconnected interfaces. The most important section is usually the adapter currently in use, such as Wireless LAN adapter Wi-Fi or Ethernet adapter Ethernet.
The output often includes:
- IPv4 Address: Your device’s local network address, such as
192.168.1.25. - Subnet Mask: Defines the size of your local network, commonly
255.255.255.0. - Default Gateway: Usually your router’s IP address, such as
192.168.1.1.
If your IPv4 address begins with 169.254, that often means Windows could not get a valid address from the router or DHCP server. This is a useful warning sign when diagnosing connectivity problems.
Understanding the Key Network Details
ipconfig becomes much more useful when you understand what the main fields mean.
IPv4 Address is the address your computer uses inside the local network. This is not usually the same as your public internet address. Your router typically has the public address, while your devices use private addresses internally.
Default Gateway is the device your computer uses to reach outside networks. In a home network, this is almost always your router. If the default gateway is missing, your computer may communicate with nearby devices but fail to access the internet.
Subnet Mask tells Windows which addresses are considered local. Most home users do not need to change this, but it helps the system decide whether traffic should stay inside the network or go through the gateway.
DNS Servers translate domain names like example.com into IP addresses. If DNS is broken, you may be connected to the internet but unable to open websites by name.
Using ipconfig /all
For more detailed information, use:
ipconfig /all
This command displays the full network configuration for all adapters. It includes everything from the basic command, plus more technical details such as MAC addresses, DHCP status, lease times, and DNS configuration.
Some of the most useful fields in ipconfig /all include:
- Physical Address: Also known as the MAC address, this uniquely identifies a network adapter.
- DHCP Enabled: Shows whether your computer is automatically receiving network settings.
- DHCP Server: Shows which device assigned your IP address.
- Lease Obtained: Shows when your current IP address lease began.
- Lease Expires: Shows when Windows must renew the address.
- DNS Servers: Lists the DNS resolvers your computer is using.
This command is especially helpful when comparing two computers on the same network. If one device works and another does not, checking their IP address, gateway, and DNS settings can quickly reveal what is different.
Releasing and Renewing an IP Address
Sometimes a computer receives a bad IP address or loses communication with the DHCP server. In that case, you can ask Windows to release its current address and request a new one.
First, release the address:
ipconfig /release
Then request a new one:
ipconfig /renew
The /release command drops the current DHCP-assigned IP address. The /renew command contacts the DHCP server again, typically your router, and asks for fresh network settings.
This can fix issues such as:
- Connected to Wi-Fi but no internet access
- Invalid IP address configuration
- Network changes after moving between locations
- Router restart causing address conflicts
- Devices showing limited connectivity
If ipconfig /renew fails, the problem may be with the router, DHCP service, cable, Wi-Fi connection, or network adapter driver.
Flushing the DNS Cache
One of the most popular ipconfig commands is:
ipconfig /flushdns
Windows stores DNS lookup results in a local cache. This helps websites load faster because your computer does not need to ask a DNS server every time you visit the same domain. However, cached DNS entries can become outdated or incorrect.
Flushing the DNS cache clears those saved records and forces Windows to request fresh DNS information. This is useful when:
- A website recently moved to a new server
- You changed DNS settings
- A domain loads incorrectly on your computer
- You want to remove old or poisoned DNS records
- Other devices can access a site, but yours cannot
After running the command, Windows should display a message saying the DNS Resolver Cache was successfully flushed. It is a quick, safe command and often solves mysterious browsing problems.
Registering DNS Again
Another useful command is:
ipconfig /registerdns
This command refreshes DHCP leases and re-registers DNS names. It is more common in business or domain environments where computers need to register their names with internal DNS servers. For home users, it is less frequently needed, but it can still help after network changes or DNS-related issues.
Viewing the DNS Cache
If you are curious about what DNS records Windows has stored, use:
ipconfig /displaydns
This command can produce a lot of output because it lists cached domain lookups. It shows domain names, record types, time-to-live values, and associated IP addresses. While not necessary for routine troubleshooting, it can be helpful for advanced users investigating DNS behavior.
If the list is too long to read comfortably, you can export it to a text file:
ipconfig /displaydns > dns-cache.txt
This creates a file named dns-cache.txt in the current directory, making it easier to search and review.
Common ipconfig Commands Cheat Sheet
| Command | What It Does |
|---|---|
ipconfig |
Shows basic IP configuration for active adapters. |
ipconfig /all |
Shows detailed information for all network adapters. |
ipconfig /release |
Releases the current DHCP IP address. |
ipconfig /renew |
Requests a new DHCP IP address. |
ipconfig /flushdns |
Clears the local DNS cache. |
ipconfig /displaydns |
Displays cached DNS records. |
ipconfig /registerdns |
Refreshes DNS registration for the computer. |
Practical Troubleshooting Example
Imagine your laptop says it is connected to Wi-Fi, but websites will not load. Here is a simple ipconfig-based workflow:
- Run
ipconfigand check whether you have a valid IPv4 address. - Confirm that a Default Gateway is listed.
- If the address starts with
169.254, runipconfig /releasefollowed byipconfig /renew. - If websites still fail, run
ipconfig /flushdns. - Run
ipconfig /allto check DNS servers and DHCP details. - Restart the router or reconnect to Wi-Fi if the computer still cannot get proper settings.
This process does not solve every network issue, but it gives you a logical starting point. Instead of guessing, you can see whether the problem is related to addressing, gateway access, or DNS.
ipconfig vs ifconfig and ip
If you use macOS or Linux, you may notice that ipconfig is not the standard tool. Older Unix-like systems commonly used ifconfig, while many modern Linux distributions prefer the ip command, such as ip addr. The purpose is similar: view and manage network interface information.
On Windows, however, ipconfig remains the familiar and reliable choice. It is easy to remember, widely documented, and available on nearly every modern Windows machine.
Tips for Using ipconfig Effectively
- Look at the active adapter: Ignore disconnected adapters unless they are relevant.
- Check the gateway: No gateway usually means no route to the internet.
- Watch for 169.254 addresses: They often indicate DHCP failure.
- Use /all when details matter: The basic command is quick, but
/allgives the full picture. - Flush DNS after changing DNS settings: This helps prevent old records from interfering.
- Copy output when asking for help: Network support teams often request ipconfig results.
Final Thoughts
ipconfig may look plain, but it is one of the most useful troubleshooting tools in Windows. With just a few commands, you can inspect your IP address, verify your router connection, refresh DHCP settings, and clear DNS problems. It is fast, built in, and powerful enough to help both beginners and experienced technicians.
The next time your internet connection acts strangely, do not immediately assume the worst. Open Command Prompt, run ipconfig, and let the network details tell the story. Often, the answer is already there; you just need to know how to read it.