IPConfig Explained: Commands, Uses, Benefits, and Troubleshooting in Windows
QUICK ANSWER ipconfig is a built-in Windows command that displays a computer’s TCP/IP configuration. It can show IPv4 and IPv6 addresses, subnet masks, defau...
QUICK ANSWER
ipconfig is a built-in Windows command that displays a computer’s TCP/IP configuration. It can show IPv4 and IPv6 addresses, subnet masks, default gateways, DNS servers, DHCP details, and network adapter information.
It can also renew DHCP leases, release dynamically assigned addresses, clear the DNS resolver cache, and request DNS registration. These functions make ipconfig useful for diagnosing common Windows network and internet connectivity problems. Microsoft Learn
What Is IPConfig?
IPConfig—short for Internet Protocol Configuration—is a Windows command-line utility for viewing and managing selected TCP/IP, DHCP, and DNS client settings.
It is included with supported Windows and Windows Server releases and can be run from Command Prompt, PowerShell, or Windows Terminal. Windows commands can run inside PowerShell, although Microsoft recommends PowerShell cmdlets for more advanced automation. Microsoft Learn
IPConfig is primarily a diagnostic tool. It does not test connection quality, configure every network setting, reveal the public internet address in most networks, or prove that internet access is working.
How IPConfig Works
Windows maintains network configuration separately for each network adapter, including:
- Ethernet adapters
- Wi-Fi adapters
- VPN connections
- Virtual-machine adapters
- Loopback and tunnel interfaces
- Disconnected or disabled adapters
When ipconfig runs, it reads the TCP/IP configuration Windows currently associates with these adapters and displays selected values. It can also instruct Windows networking components to perform specific actions, such as:
- Requesting a DHCP lease renewal
- Releasing a DHCP-assigned configuration
- Clearing the local DNS resolver cache
- Requesting dynamic DNS registration
ipconfig does not contact a website to determine the public IP address. It normally displays addresses assigned directly to the computer’s interfaces.
How to Open and Run IPConfig
- Open Start.
- Search for Command Prompt, PowerShell, or Windows Terminal.
- Open the application.
- Enter:
ipconfig
The basic display command normally works without administrator rights. Commands that change network state may require an elevated terminal:
- Right-click Command Prompt or Windows Terminal.
- Select Run as administrator.
- Approve the User Account Control prompt.
On managed business devices, organizational policies may restrict network operations even when the user has local administrative rights.
Understanding Basic IPConfig Output
Running ipconfig without parameters displays the essential IPv4 and IPv6 configuration, subnet mask, and default gateway for each applicable adapter. Microsoft Learn
Example:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : example.local
IPv4 Address. . . . . . . . . . : 192.168.1.25
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . : 192.168.1.1
Important fields
| Field | Meaning | Why it matters |
|---|---|---|
| IPv4 Address | The adapter’s IPv4 address | Identifies the computer on an IPv4 network |
| IPv6 Address | An address used for IPv6 communication | A device may legitimately have several IPv6 addresses |
| Link-local IPv6 Address | An IPv6 address normally beginning with fe80:: |
Used on the local link and not routed across the internet |
| Subnet Mask | Identifies the network and host portions of an IPv4 address | Determines whether a destination is local or must use a router |
| Default Gateway | The router used to reach other networks | A missing or incorrect gateway can prevent internet or remote-network access |
| DNS Suffix | A suffix Windows may append to unqualified hostnames | Common in business and Active Directory environments |
| Media State | Whether the adapter has an active link | “Media disconnected” usually indicates no cable, disabled Wi-Fi, or an inactive virtual adapter |
A blank default gateway is not always a fault. VPN, virtual, loopback, and isolated adapters may not require one.
Using ipconfig /all
For detailed configuration, run:
ipconfig /all
This displays the full TCP/IP configuration for physical and logical adapters. Microsoft Learn
Additional fields can include:
| Field | Purpose |
|---|---|
| Host Name | The computer’s configured hostname |
| Node Type | A legacy NetBIOS name-resolution setting |
| IP Routing Enabled | Whether Windows IP forwarding is enabled |
| WINS Proxy Enabled | Whether WINS proxy functionality is enabled |
| Description | The adapter or driver description |
| Physical Address | The adapter’s MAC address |
| DHCP Enabled | Whether IPv4 configuration is obtained through DHCP |
| Autoconfiguration Enabled | Whether Windows can automatically configure the adapter |
| DHCP Server | The server that supplied the IPv4 lease |
| DHCPv6 IAID and Client DUID | Identifiers used with DHCPv6 |
| Lease Obtained | When the current DHCP lease began |
| Lease Expires | When the current DHCP lease is scheduled to expire |
| DNS Servers | DNS resolvers assigned to the adapter |
| NetBIOS over TCP/IP | Whether legacy NetBIOS over TCP/IP is enabled |
Not every field appears for every adapter. Static configurations, disconnected adapters, IPv6-only networks, VPNs, and virtual adapters produce different output.
Complete IPConfig Command Reference
| Command | Purpose |
|---|---|
ipconfig |
Displays basic TCP/IP configuration |
ipconfig /all |
Displays detailed configuration for all adapters |
ipconfig /release |
Releases DHCP-assigned IPv4 configuration |
ipconfig /renew |
Requests or renews DHCP-assigned IPv4 configuration |
ipconfig /release6 |
Releases DHCPv6 configuration |
ipconfig /renew6 |
Requests or renews DHCPv6 configuration |
ipconfig /displaydns |
Displays the DNS client resolver cache |
ipconfig /flushdns |
Clears and resets the DNS client resolver cache |
ipconfig /registerdns |
Initiates dynamic DNS registration |
ipconfig /showclassid <adapter> |
Displays an adapter’s DHCP class ID |
ipconfig /setclassid <adapter> [<classID>] |
Assigns or removes an IPv4 DHCP class ID |
ipconfig /allcompartments |
Displays configuration across network compartments |
ipconfig /? |
Displays built-in command help |
The DHCP class-ID and network-compartment options are advanced features generally used by network administrators. Microsoft’s documented syntax and supported parameters should be checked before using them in production scripts. Microsoft Learn
Releasing and Renewing a DHCP Address
Renew an address
Use the following command when an adapter is configured to obtain its IPv4 address automatically:
ipconfig /renew
To renew one adapter only:
ipconfig /renew "Wi-Fi"
Use the adapter name displayed by ipconfig. Put quotation marks around a name containing spaces. Wildcards are also supported for adapter matching. Microsoft Learn
Release an address
ipconfig /release
For one adapter:
ipconfig /release "Ethernet"
/release sends a DHCPRELEASE message and discards the DHCP configuration for the selected adapter. Network connectivity through that adapter will normally stop until a valid configuration is renewed or otherwise assigned.
Warning: Do not release the address of a remote computer unless you have another management path. Doing so can immediately disconnect Remote Desktop, PowerShell remoting, monitoring, and other remote services.
Release and renew safely
For a local computer using DHCP:
ipconfig /release "Wi-Fi"
ipconfig /renew "Wi-Fi"
These operations do not apply to manually configured static IPv4 addresses. A renewal can return the same address because DHCP servers commonly renew the existing lease.
For DHCPv6, use:
ipconfig /release6 "Ethernet"
ipconfig /renew6 "Ethernet"
These commands affect DHCPv6 configuration. They do not necessarily remove every IPv6 address because Windows may also have link-local, temporary, or router-advertisement-derived IPv6 addresses.
Displaying and Clearing the DNS Cache
View cached DNS records
ipconfig /displaydns
The DNS client resolver cache can contain records obtained through recent name lookups and entries loaded from the local Hosts file. Cached records help Windows resolve frequently requested names without immediately querying a DNS server. Microsoft Learn
Clear the DNS cache
ipconfig /flushdns
This clears the DNS client resolver cache, including dynamically cached positive and negative responses. Use it after a DNS record changes or when Windows continues using an outdated or failed lookup.
Flushing the cache:
- Does not change configured DNS servers
- Does not clear a web browser’s independent DNS cache
- Does not clear DNS caches on routers or DNS servers
- Does not repair an incorrect DNS record
- Does not change the computer’s IP address
- Does not guarantee that the next DNS response will be correct
Registering DNS Records
Run:
ipconfig /registerdns
This asks Windows to initiate dynamic registration of the computer’s configured names and IP addresses. It is mainly useful in managed networks that support dynamic DNS, including properly configured Active Directory environments. The adapter’s advanced TCP/IP settings determine which names are registered. Microsoft Learn
The command does not guarantee successful registration. The DNS zone must accept the update, permissions must be valid, and the computer must be using an appropriate DNS server.
Microsoft recommends that domain members and domain controllers use DNS servers capable of resolving the Active Directory namespace rather than public or ISP DNS servers directly. Microsoft Learn
DHCP Class IDs
DHCP class IDs allow a DHCP server to apply class-specific options to selected clients. These settings should be changed only when required by the network’s DHCP design.
Display the class ID for an adapter:
ipconfig /showclassid "Ethernet"
Display class IDs for matching adapters:
ipconfig /showclassid *
Set a class ID:
ipconfig /setclassid "Ethernet" Accounting-PC
Remove the current class ID by omitting the ID:
ipconfig /setclassid "Ethernet"
Changing a class ID without coordinating with the DHCP administrator can cause the client to receive unsuitable DHCP options or fail to obtain the expected network configuration.
A Practical Troubleshooting Workflow
1. Check the relevant adapter
Run:
ipconfig /all
Locate the adapter that should be providing connectivity. Ignore unrelated disconnected VPN and virtual adapters unless they are part of the problem.
2. Check the media state
If the active adapter reports Media disconnected:
- Check the Ethernet cable and switch port.
- Confirm that Wi-Fi is enabled and connected.
- Verify that the adapter is enabled.
- Reconnect the VPN if the affected resource requires it.
Releasing or renewing DHCP cannot repair a disconnected physical or wireless link.
3. Inspect the IP address
A private IPv4 address commonly falls within one of these ranges:
10.0.0.0through10.255.255.255172.16.0.0through172.31.255.255192.168.0.0through192.168.255.255
An address beginning with 169.254 usually indicates IPv4 link-local autoconfiguration, commonly called APIPA. It often means the adapter did not receive an IPv4 lease from DHCP. However, a 169.254 address can be valid on an intentionally link-local network.
If DHCP should be available:
- Confirm the connection is active.
- Run
ipconfig /renewfor the affected adapter. - Check whether the DHCP server or router is reachable.
- Check switch, VLAN, wireless authentication, DHCP relay, and address-pool configuration as appropriate.
- Review Windows event logs and DHCP server logs if the failure continues.
4. Check the default gateway
A normal client usually needs a default gateway to reach destinations outside its local subnet. A missing or incorrect gateway can permit local communication while preventing internet or remote-network access.
IPConfig displays the gateway but does not test whether it responds.
5. Check DNS servers
Verify that the DNS servers are appropriate for the network:
- Home devices commonly receive DNS settings from the router or ISP.
- Domain-joined devices should generally use organizational DNS servers that can resolve the Active Directory namespace.
- VPN clients may receive internal DNS servers while connected.
Do not replace corporate DNS settings with a public resolver without authorization. Doing so can prevent internal hostname resolution, domain discovery, authentication, and policy processing.
6. Clear stale DNS data when justified
ipconfig /flushdns
Retry the hostname afterward. If the problem persists, investigate the configured DNS server, authoritative records, suffix search list, Hosts file, VPN policy, and application-specific caches.
7. Test each layer with other tools
IPConfig reports configuration; combine it with purpose-built tests:
ping 127.0.0.1
ping <default-gateway-address>
nslookup example.com
tracert example.com
In PowerShell, a useful alternative is:
Get-NetIPConfiguration
For service-specific connectivity testing:
Test-NetConnection example.com -Port 443
Ping failure alone does not prove a device is offline because firewalls and network policies may block ICMP traffic.
Common Problems and Their Meaning
| Symptom | Likely interpretation | Recommended action |
|---|---|---|
Media disconnected |
No active link on that adapter | Check cable, Wi-Fi association, VPN, or adapter state |
IPv4 address begins with 169.254 |
DHCP may be unavailable | Check the link, VLAN, DHCP server, relay, and address pool |
| No default gateway | The adapter may only have local access | Verify DHCP or static gateway configuration |
Address is 127.0.0.1 |
This is the IPv4 loopback address | Inspect the actual Ethernet or Wi-Fi adapter |
| Several IPv6 addresses appear | Windows may have global, temporary, and link-local addresses | Usually normal; assess address type and scope |
/renew fails |
DHCP server may be unreachable, or the adapter may use a static address | Confirm media state, DHCP enablement, and network path |
/flushdns succeeds but the site still fails |
The issue may not be the Windows DNS cache | Test DNS, routing, proxy, firewall, browser, and service availability |
| Unexpected adapters appear | VPN, virtualization, containers, or tunnelling software may have created them | Identify the adapter before changing anything |
| Command is not recognized | PATH may be damaged, or the executable is unavailable | Try %SystemRoot%\System32\ipconfig.exe /all and investigate system configuration |
Benefits of IPConfig
IPConfig provides several practical advantages:
- It is built into Windows and requires no separate installation.
- It gives a fast overview of network configuration.
- It helps distinguish link, addressing, gateway, DHCP, and DNS problems.
- It exposes configuration for physical and logical adapters.
- It can renew DHCP configuration without restarting Windows.
- It can clear stale client-side DNS entries.
- Its text output can be saved for support and auditing.
- It is suitable for interactive troubleshooting and basic scripts.
- It works from both Command Prompt and PowerShell.
To save detailed output:
ipconfig /all > "%USERPROFILE%\Desktop\ipconfig.txt"
Review the file before sharing it because it may contain hostnames, domain details, internal addresses, DNS servers, DHCP information, VPN adapter names, and MAC addresses.
Limitations and Safety Considerations
IPConfig does not normally show your public IP address
On networks using Network Address Translation, ipconfig shows the computer’s private or local interface address. The router or firewall holds the public address. Determining that address requires checking the gateway or using an approved external service.
It does not configure every network setting
IPConfig does not directly provide general-purpose configuration of static IP addresses, gateways, or DNS servers. Use Windows Settings, Control Panel, PowerShell networking cmdlets, or supported enterprise management tools for those tasks.
It does not prove end-to-end connectivity
A valid IP address does not confirm that DNS, routing, firewalls, proxies, authentication, or the destination service is working.
Release and renew can interrupt service
Releasing an address removes usable DHCP configuration from the adapter until renewal succeeds. Exercise particular caution on servers, remote systems, clusters, and production devices.
Output can disclose internal information
Before posting ipconfig /all output publicly, remove information that could identify the device or network, including:
- Host and domain names
- Internal addressing schemes
- MAC addresses
- DNS and DHCP server addresses
- VPN and virtual adapter information
- Organization-specific DNS suffixes
FAQ
Frequently Asked Questions
What is the difference between ipconfig and ipconfig /all?
ipconfig shows essential address, subnet, and gateway information. ipconfig /all provides additional details such as MAC addresses, DHCP state, lease times, DHCP servers, DNS servers, and DNS suffixes.
Does IPConfig show my public IP address?
Usually not. It displays addresses assigned to the computer’s network adapters. On a typical home or office network, the public address is assigned to a router or firewall performing Network Address Translation.
Is ipconfig /flushdns safe?
Yes, under normal circumstances. It removes cached DNS resolver entries, so Windows must query DNS again when names are next requested. It does not delete browser history or change DNS server settings.
Do I need to run IPConfig as an administrator?
Viewing configuration generally does not require administrative access. Commands that alter DHCP or DNS client state may require an elevated terminal, depending on the operation, Windows configuration, and organizational policy.
Will ipconfig /renew give me a new IP address?
Not necessarily. The DHCP server may renew the existing address. The result depends on the server, available leases, reservations, and network policy.
Why do I see multiple network adapters?
Windows may list physical Ethernet and Wi-Fi adapters along with VPN, Hyper-V, virtualization, container, Bluetooth, tunnel, and software-created interfaces. Identify the adapter providing the affected connection before making changes.
Why does my computer have more than one IPv6 address?
An interface can simultaneously have link-local, global, temporary privacy, and other IPv6 addresses. This is often normal and does not by itself indicate a configuration problem.
What does a 169.254.x.x address mean?
It is an IPv4 link-local address automatically assigned when Windows has no usable manually configured address and cannot obtain the expected DHCP lease. It permits limited local-link communication but normally cannot reach other routed networks.
Does ipconfig /release affect static IP addresses?
The IPv4 release command applies to adapters configured to obtain addresses automatically. It does not function as a general command for removing manually configured static addresses.
FINAL RECOMMENDATION / CONCLUSION
Use ipconfig /all as the starting point for Windows network troubleshooting. Confirm the correct adapter’s media state, IP address, subnet, gateway, DHCP status, and DNS servers before changing anything.
Use /renew, /flushdns, and /registerdns only for the problems they are designed to address. Avoid releasing an address on a remote or production system without an alternate management path, and coordinate DHCP, DNS, or class-ID changes with the network administrator. Combine IPConfig with ping, nslookup, tracert, Get-NetIPConfiguration, and Test-NetConnection when configuration alone does not reveal the cause.
#IPConfig #WindowsNetworking #NetworkTroubleshooting #Windows11 #WindowsServer #IPAddress #IPv4 #IPv6 #DHCP #DNS #FlushDNS #DefaultGateway #SubnetMask #APIPA #CommandPrompt #PowerShell #ITSupport #SystemAdministration #NetworkDiagnostics #TCPIP
SOURCES
- Microsoft Learn — IPConfig command reference: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig Microsoft Learn
- Microsoft Learn — Windows Commands: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands Microsoft Learn
- Microsoft Learn — Best practices for DNS client settings in Windows Server: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/best-practices-for-dns-client-settings
Was this guide useful?
Your answer helps us keep BISONKB accurate and practical.