ipconfigIpconfig Command: View and Manage IP Network Configuration | Guide
Master ipconfig to view IP addresses, release/renew DHCP leases, flush DNS cache, and troubleshoot network connectivity issues in Windows.
The ipconfig command is a Windows Command Prompt utility that displays current TCP/IP network configuration values, including IP addresses, subnet masks, default gateways, and DNS servers. Use it to release and renew DHCP leases with /release and /renew, flush the DNS resolver cache with /flushdns, and display detailed adapter information with /all for comprehensive network troubleshooting.
Whether you're diagnosing connectivity problems, fixing DNS resolution errors, resetting network adapters after configuration changes, or simply checking your current IP address, ipconfig is the first tool network administrators and IT professionals reach for. It provides instant access to critical network parameters without navigating through Windows settings interfaces.
This comprehensive guide covers ipconfig syntax, all major switches (/all, /release, /renew, /flushdns, /displaydns, /registerdns), practical examples for common network scenarios, troubleshooting workflows, and frequently asked questions. By the end, you'll confidently diagnose and resolve network issues from the command line.
What Is Ipconfig?
Ipconfig (IP Configuration) is a built-in Windows command-line utility that interacts with the TCP/IP protocol stack to display and manage network adapter configuration. It runs in Command Prompt (CMD), PowerShell, and Windows Terminal on all Windows versions from Windows 2000 through Windows 11 and Windows Server editions.
Unlike GUI network settings, ipconfig provides immediate, scriptable access to network parameters and supports automation through batch files and scripts. It's particularly valuable for remote administration, troubleshooting scripts, and rapid diagnostics.
Syntax
ipconfig [/all] [/release [adapter]] [/renew [adapter]]
[/flushdns] [/displaydns] [/registerdns]
[/showclassid adapter] [/setclassid adapter [classid]]
[/allcompartments] [/allcompartments /all]
Parameters and Options
| Parameter | Purpose | Use Case |
|---|---|---|
| (no parameters) | Display basic IP configuration | Quick IP address check |
/all | Display full TCP/IP configuration for all adapters | Detailed diagnostics, full network inventory |
/release [adapter] | Release DHCP-assigned IP address | Before network changes, troubleshooting connectivity |
/renew [adapter] | Renew DHCP-assigned IP address | After network changes, refresh configuration |
/flushdns | Clear DNS resolver cache | Fix DNS resolution issues, after DNS changes |
/displaydns | Show DNS resolver cache contents | Verify cached DNS entries, troubleshooting |
/registerdns | Refresh DHCP leases and re-register DNS names | Fix DNS registration, update dynamic DNS |
/showclassid adapter | Display DHCP class IDs for adapter | Enterprise network configuration |
/setclassid adapter [classid] | Modify DHCP class ID for adapter | Enterprise DHCP class assignment |
/allcompartments | Display configuration for all compartments | Advanced routing, network isolation scenarios |
Parameters and Options Explained
Basic Display (No Parameters)
Running ipconfig without parameters displays basic TCP/IP configuration for all connected network adapters: adapter name, IPv4 address, subnet mask, and default gateway. This is the fastest way to check your current IP address and gateway.
Example:
ipconfig
Output:
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : home.lan
IPv4 Address. . . . . . . . . . . : 192.168.1.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
/all – Full Configuration Details
Displays comprehensive network information including MAC addresses, DHCP settings, DNS servers, IPv6 addresses, and adapter status. Essential for detailed troubleshooting and network documentation.
Example:
ipconfig /all
Output includes:
- Physical (MAC) address
- DHCP enabled status and DHCP server address
- DHCP lease obtained and expiration times
- DNS server addresses
- NetBIOS over TCP/IP status
- IPv6 addresses and link-local addresses
/release and /renew – DHCP Management
/release releases the current DHCP-assigned IP address, effectively disconnecting the adapter from the network. /renew requests a new IP address from the DHCP server. Often used together to refresh network configuration.
Example:
ipconfig /release
ipconfig /renew
You can target specific adapters:
ipconfig /release "Ethernet"
ipconfig /renew "Ethernet"
/flushdns – Clear DNS Cache
Clears the DNS resolver cache, forcing Windows to perform fresh DNS lookups. Critical for resolving DNS issues after DNS server changes or when cached entries are stale or incorrect.
Example:
ipconfig /flushdns
Output:
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
/displaydns – View DNS Cache
Displays all cached DNS entries with their remaining Time To Live (TTL). Useful for verifying what DNS records Windows has cached and troubleshooting unexpected name resolution results.
Example:
ipconfig /displaydns
/registerdns – Refresh DNS Registration
Initiates DHCP lease renewal and re-registers the computer's name with DNS servers. Used to update dynamic DNS records or fix DNS registration issues in Active Directory environments.
Example:
ipconfig /registerdns
Examples
This section covers practical ipconfig usage across basic, intermediate, and advanced network scenarios.
Example 1: Check Your Current IP Address
Scenario: You need to quickly find your computer's IP address to share with a colleague for remote access.
Command:
ipconfig
Explanation: Displays basic IP information for all adapters. Look for the "IPv4 Address" line under your active adapter (Ethernet or Wi-Fi).
Example 2: View Complete Network Configuration
Scenario: Troubleshooting network connectivity issues and need full adapter details including DNS servers and DHCP information.
Command:
ipconfig /all
Explanation: Shows comprehensive configuration including MAC address, DHCP server, DNS servers, lease times, and more. Save output with ipconfig /all > network-config.txt for documentation.
Example 3: Fix DNS Resolution Issues
Scenario: Websites won't load by name but work with IP addresses, or you recently changed DNS servers.
Command:
ipconfig /flushdns
Explanation: Clears cached DNS entries, forcing Windows to query DNS servers for fresh records. Often resolves issues where old DNS entries are cached.
Example 4: Refresh DHCP IP Address
Scenario: Made changes to router DHCP settings or network adapter, need to get a new IP address.
Command:
ipconfig /release
ipconfig /renew
Explanation: First command releases current IP, second obtains new IP from DHCP server. Equivalent to disconnecting and reconnecting to network.
Example 5: Release and Renew Specific Adapter
Scenario: You have multiple network adapters and only want to refresh your Ethernet connection without affecting Wi-Fi.
Command:
ipconfig /release "Ethernet"
ipconfig /renew "Ethernet"
Explanation: Adapter name must match exactly as shown in ipconfig output. Use quotes for adapter names with spaces.
Example 6: View Cached DNS Entries
Scenario: Want to verify what DNS records Windows has cached or troubleshoot unexpected name resolution.
Command:
ipconfig /displaydns
Explanation: Shows all cached DNS entries with TTL values. Pipe to findstr to search for specific domains: ipconfig /displaydns | findstr "example.com".
Example 7: Save Network Configuration to File
Scenario: Document network settings before making changes or for helpdesk support.
Command:
ipconfig /all > C:\network-info.txt
Explanation: Redirects full output to text file. Use >> to append to existing file instead of overwriting.
Example 8: Flush DNS and Renew DHCP (Complete Refresh)
Scenario: Comprehensive network reset after major configuration changes or persistent connectivity issues.
Command:
ipconfig /release
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns
Explanation: Complete network refresh sequence: release IP → clear DNS cache → obtain new IP → register with DNS. This is a full network stack reset without rebooting.
Example 9: Display Configuration for All Compartments
Scenario: Advanced network diagnostics on systems with network compartments (Hyper-V, Windows containers, advanced routing).
Command:
ipconfig /allcompartments /all
Explanation: Shows network configuration across all network compartments, useful for virtualization troubleshooting.
Example 10: Find Your MAC Address
Scenario: Need physical address for MAC filtering or network documentation.
Command:
ipconfig /all | findstr "Physical"
Explanation: Filters output to show only MAC addresses. Full command shows line with "Physical Address" for all adapters.
Common Use Cases
Ipconfig serves diverse network administration and troubleshooting scenarios:
-
Quick IP Address Check – Rapidly find your computer's current IP address without navigating Windows settings. Essential for remote access setup, sharing your address with colleagues, or verifying network connectivity.
-
DNS Troubleshooting – Flush DNS cache when websites fail to resolve, after changing DNS servers, or when experiencing stale DNS entries. Combine with
/displaydnsto verify cache contents before and after flushing. -
DHCP Lease Renewal – Refresh IP address after router configuration changes, when switching networks, or to force obtaining updated DHCP options. Critical after modifying DHCP reservations or network settings.
-
Network Adapter Reset – Release and renew IP addresses to reset network adapters without rebooting. First troubleshooting step for connectivity issues, especially after driver updates or configuration changes.
-
Dynamic DNS Updates – Use
/registerdnsin Active Directory environments to refresh DNS records after computer name changes or when DNS registration fails. Ensures proper domain name resolution. -
Network Documentation – Export complete network configuration with
/allredirected to file. Essential for change management, troubleshooting documentation, or baseline network configuration records. -
Pre-Configuration Diagnostics – Run before making network changes to establish baseline. Compare before/after output to verify changes applied correctly and identify unexpected modifications.
-
Remote Support Sessions – Ask users to run
ipconfig /alland share output for remote diagnostics. Provides complete picture of network configuration without physical access. -
MAC Address Discovery – Retrieve physical addresses for MAC filtering, network access control, or inventory management. Faster than checking adapter properties through GUI.
-
ISP Troubleshooting – Release and renew when experiencing ISP connectivity issues or after modem/router resets. Forces reestablishing connection with ISP's DHCP server.
-
VPN Connection Issues – Check VPN adapter configuration and IP addresses assigned by VPN server. Useful when VPN connects but network access fails.
-
Dual-Stack IPv6 Diagnostics – View both IPv4 and IPv6 configuration with
/all. Troubleshoot IPv6 connectivity issues or verify dual-stack network operation.
Tips and Best Practices
Master these ipconfig techniques for efficient network management:
-
Run as Administrator When Needed – While basic
ipconfigworks for standard users,/release,/renew,/flushdns, and/registerdnsmay require administrator privileges depending on Windows version and security policies. Right-click Command Prompt → "Run as administrator" to avoid access denied errors. -
Use Adapter Names Carefully – When specifying adapter names with
/releaseor/renew, use exact names as shown inipconfigoutput. Names are case-sensitive and must be enclosed in quotes if they contain spaces. Use wildcard*for partial matches:ipconfig /renew *Ethernet*. -
Combine with Other Network Tools – Chain ipconfig with
ping,tracert, andnslookupin troubleshooting workflows. Standard sequence: check IP configuration → ping gateway → ping external IP → ping domain name → trace route if needed. -
Document Before Changes – Always capture baseline configuration with
ipconfig /all > baseline.txtbefore making network changes. Simplifies rollback and troubleshooting if changes cause issues. -
Flush DNS After Changing DNS Servers – Immediately run
ipconfig /flushdnsafter modifying DNS server settings to ensure Windows uses new DNS servers instead of cached results from old servers. -
Release/Renew Both Adapters in Dual-Network Systems – On systems with both Ethernet and Wi-Fi, specify which adapter to release/renew or run without adapter name to affect all DHCP-enabled adapters. Avoid accidentally disconnecting critical connections.
-
Automate with Batch Scripts – Create
.batfiles for common tasks like network reset (release → flushdns → renew → registerdns). Especially useful for help desk support or frequent network switching. -
Redirect Output for Long Results –
/alland/displaydnsproduce lengthy output. Redirect to file or pipe tomorefor paging:ipconfig /all | more. Usefindstrto filter:ipconfig /all | findstr /i "dns ipv4". -
Verify DHCP vs Static Configuration –
/allshows "DHCP Enabled" status. If "No", IP is statically configured and/release//renewwon't work. Check adapter properties to change from static to DHCP. -
Check Lease Expiration Times –
/alldisplays DHCP lease obtained and expires times. Useful for planning maintenance windows or troubleshooting intermittent connectivity that correlates with lease renewals. -
Use /registerdns Sparingly – Only use when DNS registration actually fails. Overuse can create unnecessary network traffic and DNS server load. Check Event Viewer for DNS registration errors first.
-
Monitor for APIPA Addresses – If
ipconfigshows IP address in 169.254.x.x range (APIPA), DHCP server is unreachable. Troubleshoot DHCP server connectivity or network cable connections first.
Troubleshooting Common Issues
"Media disconnected" Message
Problem: ipconfig shows "Media disconnected" for network adapter.
Cause: Network cable unplugged, adapter disabled, or driver issue.
Solution:
- Check physical cable connections
- Verify adapter is enabled in Network Connections (
ncpa.cpl) - Update or reinstall network adapter driver in Device Manager
- Try different cable or network port if physical connection suspected
Prevention: Regularly verify adapter status; use ipconfig to quickly check all adapter states.
"An error occurred while releasing interface: Access is denied"
Problem: /release or /renew fails with access denied error.
Cause: Insufficient permissions to modify network configuration.
Solution:
- Close Command Prompt
- Right-click Command Prompt → "Run as administrator"
- Re-run
ipconfig /releaseor/renewcommand
Prevention: Always run network modification commands in elevated command prompt. Create shortcut to administrator command prompt for frequent use.
APIPA Address (169.254.x.x) Instead of Valid IP
Problem: Adapter shows 169.254.x.x address instead of expected 192.168.x.x or other valid network IP.
Cause: Cannot reach DHCP server; Windows assigned Automatic Private IP Addressing (APIPA) address.
Solution:
- Verify DHCP server is running and accessible
- Check network cable and switch/router connections
- Restart router if DHCP service may have failed
- Try
ipconfig /releasethen/renewafter verifying DHCP server is accessible - If persistent, check router DHCP pool isn't exhausted
Prevention: Monitor DHCP server availability; ensure adequate DHCP pool size; verify network infrastructure reliability.
DNS Flush Fails or "Could not flush DNS" Error
Problem: ipconfig /flushdns returns error or fails silently.
Cause: DNS Client service stopped or disabled.
Solution:
- Open Services (
services.msc) - Find "DNS Client" service
- Set to "Automatic" and click "Start"
- Retry
ipconfig /flushdns
Prevention: Ensure DNS Client service is set to Automatic startup; some optimization guides incorrectly recommend disabling it.
Release/Renew Does Nothing or Returns Same IP
Problem: ipconfig /release and /renew complete but IP address doesn't change.
Cause: Static IP configuration or DHCP reservation assigning same IP.
Solution:
- Run
ipconfig /alland check "DHCP Enabled" status - If "DHCP Enabled: No", IP is statically configured; change to DHCP in adapter properties
- If DHCP enabled but same IP returns, DHCP server has reservation for your MAC address (this is normal behavior for reserved IPs)
Prevention: Document static vs DHCP configuration; understand DHCP reservations are intentional.
Cannot Renew After Changing Network Location
Problem: /renew fails or times out after moving laptop to different network location.
Cause: Network profile or adapter hasn't fully released previous network configuration.
Solution:
- Disable and re-enable network adapter in Network Connections
- Run
ipconfig /releasethen wait 10 seconds before/renew - If persistent, restart computer to fully reset network stack
- Check if VPN or network management software is interfering
Prevention: Allow adapter time to fully release before renewal; disable VPN when switching physical networks.
Related Commands
ping – Test Network Connectivity
After verifying IP configuration with ipconfig, use ping to test connectivity to gateway, DNS servers, and external hosts. Ipconfig shows what IPs you should be able to reach; ping confirms you can actually reach them.
Example: ipconfig shows gateway 192.168.1.1, then ping 192.168.1.1 tests gateway connectivity.
nslookup – Query DNS Servers
While ipconfig /displaydns shows cached DNS entries and /flushdns clears cache, nslookup actively queries DNS servers shown in ipconfig /all output. Use together for complete DNS troubleshooting workflow.
Example: ipconfig /all shows DNS server 8.8.8.8, then nslookup google.com 8.8.8.8 tests that DNS server.
netsh – Advanced Network Configuration
Ipconfig displays and modifies basic TCP/IP configuration. For advanced network settings like static IP configuration, network profiles, firewall rules, and WiFi management, use netsh. Think of ipconfig as read-mostly, netsh as write-mostly.
Example: Ipconfig shows DHCP IP; netsh interface ip set address "Ethernet" static 192.168.1.100 255.255.255.0 192.168.1.1 switches to static.
getmac – Display MAC Addresses Only
While ipconfig /all includes MAC addresses, getmac provides focused MAC address output for all adapters, useful for scripts and quick lookups without full network configuration clutter.
Example: ipconfig /all | findstr Physical vs getmac /v – latter is cleaner for MAC-only needs.
netstat – Show Network Connections
Ipconfig shows network interface configuration; netstat shows active network connections and listening ports. Complementary tools for complete network status: ipconfig for configuration layer, netstat for connection layer.
Example: After ipconfig confirms valid IP and gateway, netstat -an shows what connections are actually active.
tracert – Trace Network Route
After ipconfig confirms local network configuration is correct (valid IP, gateway reachable with ping), use tracert to diagnose where packets fail beyond local network. Ipconfig verifies local configuration, tracert diagnoses routing issues.
Example: Ipconfig shows 192.168.1.105, gateway 192.168.1.1; tracert 8.8.8.8 shows where route to internet fails if connectivity issues exist.
Frequently Asked Questions
What does ipconfig /all show?
ipconfig /all displays comprehensive TCP/IP configuration for all network adapters including IP addresses, subnet masks, default gateways, DNS servers, DHCP settings, MAC addresses, DHCP lease times, and adapter status. It provides complete network configuration details for diagnostics and documentation.
How do I reset my IP address with ipconfig?
Use ipconfig /release to release your current IP address, then ipconfig /renew to obtain a new IP from the DHCP server. This is equivalent to disconnecting and reconnecting your network adapter, forcing DHCP lease refresh.
What is the difference between ipconfig and ipconfig /all?
Basic ipconfig shows only essential information: adapter name, IP address, subnet mask, and default gateway for each adapter. ipconfig /all displays comprehensive details including DNS servers, DHCP status, MAC addresses, lease times, and all IPv6 addresses.
Why should I use ipconfig /flushdns?
ipconfig /flushdns clears Windows DNS resolver cache, forcing fresh DNS lookups. Use it after changing DNS servers, when websites fail to resolve correctly, or when cached DNS entries are stale or incorrect. Essential for DNS troubleshooting.
How do I find my IP address using ipconfig?
Open Command Prompt and type ipconfig. Look for "IPv4 Address" under your active network adapter (Ethernet or Wi-Fi). The address format is typically xxx.xxx.xxx.xxx (four numbers separated by periods).
Can I use ipconfig on Windows 10 and Windows 11?
Yes, ipconfig works on all Windows versions including Windows 10, Windows 11, Windows Server 2016/2019/2022, and earlier versions back to Windows 2000. Syntax and functionality are consistent across versions.
What does "DHCP Enabled: No" mean in ipconfig /all?
It means the network adapter is configured with a static IP address instead of obtaining IP automatically from DHCP server. When DHCP is disabled, ipconfig /release and /renew won't work; IP must be changed through adapter properties.
How do I release and renew only one network adapter?
Specify adapter name after the switch: ipconfig /release "Ethernet" then ipconfig /renew "Ethernet". Adapter name must match exactly as shown in ipconfig output and use quotes if name contains spaces.
Why does ipconfig show 169.254.x.x address?
169.254.x.x is an APIPA (Automatic Private IP Addressing) address assigned when Windows cannot reach a DHCP server. It indicates DHCP server is unreachable due to network cable issues, disabled DHCP service, or network connectivity problems.
How do I save ipconfig output to a file?
Use output redirection: ipconfig /all > C:\network-config.txt creates new file with output. Use >> to append to existing file: ipconfig /all >> C:\network-log.txt. Useful for documentation and troubleshooting records.
What is the ipconfig /registerdns command used for?
ipconfig /registerdns refreshes DHCP leases and re-registers the computer's DNS name with DNS servers. Use it in Active Directory environments to update dynamic DNS records after computer name changes or when DNS registration fails.
Do I need administrator rights to run ipconfig?
Basic ipconfig and ipconfig /all work for standard users. However, /release, /renew, /flushdns, and /registerdns typically require administrator privileges. Right-click Command Prompt and select "Run as administrator" for full functionality.
Quick Reference Card
| Command | Purpose | Use When |
|---|---|---|
ipconfig | Show basic IP configuration | Quick IP address check |
ipconfig /all | Show detailed configuration | Full diagnostics, documentation |
ipconfig /release | Release DHCP IP address | Before network changes |
ipconfig /renew | Obtain new DHCP IP | After network changes, refresh IP |
ipconfig /flushdns | Clear DNS cache | DNS resolution issues, after DNS changes |
ipconfig /displaydns | View DNS cache contents | Verify cached DNS entries |
ipconfig /registerdns | Refresh DNS registration | Fix DNS registration in AD environments |
ipconfig /all > file.txt | Save config to file | Documentation, support tickets |
ipconfig /release "Adapter" | Release specific adapter | Multi-adapter systems |
ipconfig /all | findstr "DNS" | Filter output | Find specific information quickly |
Try Ipconfig Yourself
Ready to master network configuration? Practice these commands in our interactive Windows Command Simulator where you can safely experiment with ipconfig and see realistic output without affecting your system.
Explore our complete Windows Commands reference for detailed syntax and options for ipconfig and 200+ other commands. For related network troubleshooting topics, check out our guides on ping, netstat, nslookup, and tracert.
Summary
The ipconfig command is an essential network troubleshooting and configuration tool that every Windows user and IT professional should master. From quickly checking your IP address with basic ipconfig to performing comprehensive network diagnostics with ipconfig /all, this utility provides immediate access to critical network parameters.
Key switches covered in this guide include /all for detailed configuration viewing, /release and /renew for DHCP lease management, /flushdns for DNS cache clearing, and /displaydns for cache inspection. These commands form the foundation of network troubleshooting workflows, often used in combination with ping, tracert, and nslookup for comprehensive diagnostics.
Remember to run commands requiring modification operations (/release, /renew, /flushdns) in an administrator command prompt to avoid access denied errors. Use specific adapter names when targeting individual network interfaces, and always document baseline configuration before making network changes.
Common troubleshooting scenarios solved with ipconfig include DNS resolution issues (fixed with /flushdns), DHCP connectivity problems (diagnosed with /all and resolved with /release//renew), and network configuration verification after changes. The ability to quickly check IP addresses, verify gateway connectivity, and refresh network adapters makes ipconfig the first tool to reach for in network diagnostics.
Practice these commands regularly to build confidence. Start with basic ipconfig to familiarize yourself with output format, progress to ipconfig /all for detailed diagnostics, and experiment with /flushdns and DHCP operations in safe environments. The more comfortable you become with ipconfig, the faster you'll resolve network issues and the more effective you'll be at network administration tasks.