ipconfig: the complete Windows reference
ipconfig has shipped with every version of Windows since Windows NT 3.5 in 1994. It shows the TCP/IP configuration of every network adapter, manages DHCP leases and controls the DNS resolver cache. This page covers every switch, with output from Windows 11 that you can compare against your own screen.
Quick reference
| Command | What it does | Admin? |
|---|---|---|
ipconfig | IPv4 address, IPv6 addresses, subnet mask and default gateway for each adapter | No |
ipconfig /all | Everything: MAC address, DHCP state, lease times, DHCP server, DNS servers, DUID, NetBIOS | No |
ipconfig /release | Give up the IPv4 DHCP lease on all adapters (or a named one) | Yes |
ipconfig /renew | Request a new IPv4 DHCP lease on all adapters (or a named one) | Yes |
ipconfig /release6 | Give up the IPv6 DHCPv6 lease | Yes |
ipconfig /renew6 | Request a new IPv6 DHCPv6 lease | Yes |
ipconfig /flushdns | Empty the DNS resolver cache | No (usually) |
ipconfig /displaydns | Print the DNS resolver cache, including hosts-file entries | No |
ipconfig /registerdns | Refresh all DHCP leases and re-register the computer's name in DNS | Yes |
ipconfig /showclassid adapter | List the DHCP class IDs the adapter may use | No |
ipconfig /setclassid adapter [id] | Set (or, with no ID, clear) the DHCP user class | Yes |
ipconfig /showclassid6 / /setclassid6 | The same for DHCPv6 | No / Yes |
ipconfig /allcompartments | Show every routing compartment, not just the default one | No |
ipconfig /? | Built-in help | No |
Syntax
This is the usage text printed by ipconfig /? on Windows 10 and 11. The switch names are case-insensitive, and a hyphen works in place of the slash (ipconfig -all).
USAGE:
ipconfig [/allcompartments] [/? | /all |
/renew [adapter] | /release [adapter] |
/renew6 [adapter] | /release6 [adapter] |
/flushdns | /displaydns | /registerdns |
/showclassid adapter |
/setclassid adapter [classid] |
/showclassid6 adapter |
/setclassid6 adapter [classid] ]
where
adapter Connection name
(wildcard characters * and ? allowed, see examples)The adapter argument is the connection name you see in Network Connections (ncpa.cpl), such as Ethernet, Wi-Fi or Ethernet 2. It is not the hardware description. Names with spaces need quotes: ipconfig /renew "Local Area Connection". Wildcards are allowed: ipconfig /renew Eth* renews every adapter whose name starts with Eth, and ipconfig /release *Wi* releases anything containing Wi.
ipconfig with no switches
Run alone, ipconfig prints a compact summary of every adapter that is bound to TCP/IP, including disconnected ones and virtual adapters from VPN clients, Hyper-V, WSL and VirtualBox.
ipconfigWindows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : home
IPv6 Address. . . . . . . . . . . : 2a00:23c4:5f1a:8b00:1c3e:7a2f:9d4b:6e01
Temporary IPv6 Address. . . . . . : 2a00:23c4:5f1a:8b00:f0a1:2b3c:4d5e:6f70
Link-local IPv6 Address . . . . . : fe80::1c3e:7a2f:9d4b:6e01%12
IPv4 Address. . . . . . . . . . . : 192.168.1.42
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%12
192.168.1.1
Wireless LAN adapter Wi-Fi:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (WSL (Hyper-V firewall)):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::9d2c:1e4f:7b3a:c5d8%38
IPv4 Address. . . . . . . . . . . : 172.29.32.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :What each line means:
- Ethernet adapter / Wireless LAN adapter / Unknown adapter / Tunnel adapter
- The adapter type, followed by the connection name. Tunnel adapter entries (Teredo, ISATAP, 6to4) are IPv6 transition technologies and are usually harmless. Unknown adapter is typical for VPN drivers such as WireGuard or OpenVPN TAP.
- Media State: Media disconnected
- No link. The cable is unplugged, the Wi-Fi is not associated, or the adapter is disabled. The adapter has no addresses at all in this state.
- Connection-specific DNS Suffix
- A domain name supplied by DHCP (option 15). Windows appends it when you look up a bare hostname such as
printer, so the actual query becomesprinter.home. - IPv6 Address
- A globally routable IPv6 address, normally built by SLAAC from a router advertisement. If you have one, your ISP supports IPv6.
- Temporary IPv6 Address
- A randomised, short-lived global address used for outbound connections so that websites cannot track your machine by its stable address (RFC 8981 privacy extensions). It changes roughly daily. More on IPv6 address types →
- Link-local IPv6 Address
- Always starts
fe80::. Valid only on the local segment. The%12is the zone ID, the interface index that tells Windows which adapter the address belongs to, because every adapter has an fe80:: address. - IPv4 Address / Subnet Mask
- Your IPv4 address and the mask that defines the local network.
255.255.255.0means the first three octets identify the network, so 192.168.1.anything is local. Mask to CIDR table → - Default Gateway
- Where traffic goes when the destination is not local: your router. You may see two entries, an IPv6 link-local one (
fe80::1%12) and an IPv4 one. If this line is blank on your main adapter, nothing off-network will work. Fix it →
ipconfig /all
This is the switch you want when diagnosing anything. It adds a global header about the computer and, per adapter, the hardware description, MAC address, DHCP details, lease times and DNS servers.
ipconfig /allWindows IP Configuration
Host Name . . . . . . . . . . . . : DESKTOP-4K2J9QP
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : home
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Intel(R) Ethernet Connection (7) I219-V
Physical Address. . . . . . . . . : 8C-16-45-3A-9B-2D
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2a00:23c4:5f1a:8b00:1c3e:7a2f:9d4b:6e01(Preferred)
Temporary IPv6 Address. . . . . . : 2a00:23c4:5f1a:8b00:f0a1:2b3c:4d5e:6f70(Preferred)
Link-local IPv6 Address . . . . . : fe80::1c3e:7a2f:9d4b:6e01%12(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.42(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 10 September 2026 08:14:52
Lease Expires . . . . . . . . . . : 11 September 2026 08:14:52
Default Gateway . . . . . . . . . : fe80::1%12
192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 101127237
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-1B-3C-4D-8C-16-45-3A-9B-2D
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : EnabledThe global header
- Host Name
- The computer name, the same value
hostnameprints. Other machines on the LAN can usually reach you by this name via mDNS, LLMNR or NetBIOS. - Primary Dns Suffix
- Set when the computer is joined to an Active Directory domain (for example
corp.example.com). Blank on home machines. - Node Type
- How NetBIOS names are resolved: Broadcast (b-node, broadcast only), Peer-Peer (p-node, WINS only), Mixed (m-node, broadcast then WINS), Hybrid (h-node, WINS then broadcast). Hybrid is the default and you can ignore it unless you administer WINS. If it says Unknown, the NetBIOS node type registry value is missing; harmless.
- IP Routing Enabled
- Whether Windows forwards packets between its adapters. No unless you have deliberately turned the machine into a router.
- WINS Proxy Enabled
- Legacy. Always No on modern systems.
- DNS Suffix Search List
- Suffixes tried in order when you look up a short name. Comes from DHCP, Group Policy or the adapter's advanced DNS settings.
Per-adapter fields added by /all
- Description
- The driver's name for the hardware. Use it to identify which physical port or chipset an adapter is.
- Physical Address
- The MAC address, written with hyphens in the Windows style (
8C-16-45-3A-9B-2D). Unix tools write the same address as8c:16:45:3a:9b:2d. The first three bytes identify the manufacturer. More → - DHCP Enabled
- Yes means the adapter asks a DHCP server for its address. No means a static address was configured by hand, and the DHCP-related lines below will be missing.
- Autoconfiguration Enabled
- Whether Windows will fall back to a 169.254.x.x APIPA address if DHCP fails. If you see Autoconfiguration IPv4 Address instead of IPv4 Address, that fallback has happened. Diagnose it →
- (Preferred) / (Deprecated) / (Tentative) / (Duplicate)
- The address state. Preferred is normal. Deprecated means the address still works but will not be chosen for new connections, typical for an old temporary IPv6 address. Tentative means duplicate address detection is still running. Duplicate means another host has the same address and Windows has disabled it.
- Lease Obtained / Lease Expires
- When the DHCP lease started and when it ends. Windows tries to renew at the halfway point (T1) automatically, so a lease that is about to expire is usually a sign the DHCP server is unreachable.
- DHCP Server
- The server that granted the lease. On a home network this is your router. If it is not what you expect, a rogue DHCP server (a second router, a misconfigured NAS, a Raspberry Pi) may be on your LAN.
- DHCPv6 IAID / DHCPv6 Client DUID
- Identifiers used by DHCPv6. The DUID is per machine and the IAID per adapter. You only need them when reserving addresses on a DHCPv6 server.
- DNS Servers
- The resolvers this adapter uses, in order. Windows sends queries to the first and only fails over on timeout, not on a negative answer. If you have set DNS-over-HTTPS in Settings, the addresses shown are still the ones that get used, encrypted.
- NetBIOS over Tcpip
- Whether the legacy NetBIOS name service is active on this adapter. Enabled by default, harmless, and sometimes disabled in hardened environments.
ipconfig /release and /renew
These two switches drive the DHCP client. /release sends a DHCPRELEASE message to the server and removes the IPv4 address, mask, gateway and DNS servers from the adapter. /renew sends a DHCPREQUEST for the previous address, or a fresh DHCPDISCOVER if there is no previous lease, and applies whatever the server hands back.
ipconfig /release
ipconfig /renewWindows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : home
IPv6 Address. . . . . . . . . . . : 2a00:23c4:5f1a:8b00:1c3e:7a2f:9d4b:6e01
Temporary IPv6 Address. . . . . . : 2a00:23c4:5f1a:8b00:f0a1:2b3c:4d5e:6f70
Link-local IPv6 Address . . . . . : fe80::1c3e:7a2f:9d4b:6e01%12
IPv4 Address. . . . . . . . . . . : 192.168.1.42
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%12
192.168.1.1Points worth knowing:
- Renew does not usually change your address. The server normally re-issues the same one. To force a different address you need to release, then make the server forget you (delete the lease or reservation on the router), then renew. Even then most servers hand back the last address for that MAC.
- It affects only DHCP adapters. Static adapters are skipped with the message The operation failed as no adapter is in the state permissible for this operation. If every adapter is static, you will see that message and nothing else happens.
- It does not touch IPv6. Use
/release6and/renew6for that. - Target one adapter to avoid dropping a VPN or a second NIC:
ipconfig /renew "Wi-Fi". - It does not reset the adapter. If the link itself is flapping, disable and re-enable the adapter (netsh or PowerShell) or reboot.
Errors you may see
| Message | Meaning | What to do |
|---|---|---|
| An error occurred while renewing interface Ethernet : unable to contact your DHCP server. Request has timed out. | Windows broadcast for a DHCP server and got no reply within about 60 seconds. | Check the link light, the cable, the router, and whether DHCP is enabled on it. See DHCP failures. |
| The operation failed as no adapter is in the state permissible for this operation. | No adapter matched that is enabled, connected and DHCP-configured. | Check the adapter name, confirm it is set to obtain an address automatically, and that it is not disabled or disconnected. |
| An error occurred while releasing interface Ethernet : An address has not yet been associated with the network endpoint. | You released an adapter that had no address, for example one already sitting on 169.254. | Harmless; go straight to /renew. |
| The requested operation requires elevation. | Not running as administrator. | Open an elevated prompt. |
| An error occurred while renewing interface Wi-Fi : The system cannot find the file specified. | The DHCP Client service is stopped or the adapter driver is broken. | Run sc query dhcp; start it with net start dhcp. If that fails, reinstall the adapter driver. |
| The RPC server is unavailable. | The DHCP Client service cannot be reached. | Start the service from services.msc or reboot. |
ipconfig /release6 and /renew6
The IPv6 equivalents. They act on DHCPv6 leases only. Most home networks use SLAAC (stateless autoconfiguration from router advertisements) rather than DHCPv6, in which case these switches will report that no adapter is in a permissible state, or will succeed without visibly changing anything. On corporate networks with stateful DHCPv6 they behave like their IPv4 cousins.
ipconfig /release6
ipconfig /renew6To force Windows to re-run SLAAC and pick up a fresh router advertisement, the reliable method is to disable and re-enable the adapter, or to run netsh interface ipv6 reset followed by a reboot (which is heavy-handed). A lighter option is ipconfig /renew6 followed by netsh interface ipv6 show route to confirm the default route is back.
ipconfig /flushdns
Empties the DNS resolver cache maintained by the DNS Client service. Windows caches every answer, positive and negative, for the TTL set by the authoritative server. Flushing forces the next lookup to go to your DNS server again. It is the standard fix after changing a hosts entry, moving a website to a new server, or seeing a stale "site can't be reached" for something that works on your phone.
ipconfig /flushdnsWindows IP Configuration
Successfully flushed the DNS Resolver Cache.If you see Could not flush the DNS Resolver Cache: Function failed during execution, the DNS Client service (Dnscache) is disabled. It cannot be stopped from services.msc on recent Windows, so check for a Group Policy or a "privacy" tool that turned it off, and re-enable it via the registry key HKLM\SYSTEM\CurrentControlSet\Services\Dnscache (Start = 2).
Flushing the Windows cache does not clear the caches inside browsers (Chrome and Edge keep their own at chrome://net-internals/#dns and edge://net-internals/#dns), nor the cache on your router. The full flush-DNS guide covers all of them →
ipconfig /displaydns
Prints everything in the resolver cache: each record name, type, TTL remaining and value. Entries from C:\Windows\System32\drivers\etc\hosts appear too, because Windows preloads them into the cache, which is why editing hosts takes effect only after a flush (or immediately on recent builds, which watch the file).
ipconfig /displaydnsWindows IP Configuration
www.bbc.co.uk
----------------------------------------
Record Name . . . . . : www.bbc.co.uk
Record Type . . . . . : 5
Time To Live . . . . : 173
Data Length . . . . . : 8
Section . . . . . . . : Answer
CNAME Record . . . . : www.bbc.net.uk
Record Name . . . . . : www.bbc.net.uk
Record Type . . . . . : 1
Time To Live . . . . : 173
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 212.58.237.253Record types are numeric: 1 = A (IPv4), 28 = AAAA (IPv6), 5 = CNAME, 12 = PTR, 15 = MX, 16 = TXT, 33 = SRV. A block that says Name does not exist is a cached negative answer, which Windows keeps for up to 15 minutes by default. The output is long; pipe it: ipconfig /displaydns | findstr /i "record name" or ipconfig /displaydns | more.
ipconfig /registerdns
Does two things: refreshes every DHCP lease (like /renew on all adapters) and asks the DNS Client service to re-register the computer's A and AAAA records with its DNS server using dynamic DNS update. It is mainly useful on Active Directory networks when a machine's record has gone stale or missing and other computers cannot resolve its name. On a home network it is harmless but rarely necessary. The registration happens in the background; check the System event log (source DNS Client Events) for the result.
ipconfig /registerdnsWindows IP Configuration
Registration of the DNS resource records for all adapters of this computer has been initiated. Any errors will be reported in the Event Viewer in 15 minutes.ipconfig /showclassid and /setclassid
DHCP user classes (option 77) let a server hand different settings to different groups of clients: a "laptops" class might get a shorter lease, a "voip" class a different gateway. These switches show and set the class ID the adapter sends. You will only use them if your DHCP administrator tells you to.
ipconfig /showclassid Ethernet
ipconfig /setclassid Ethernet Laptops
ipconfig /setclassid EthernetThe last form, with no class ID, removes the class. The IPv6 variants /showclassid6 and /setclassid6 work the same way for DHCPv6.
Windows IP Configuration
DHCP Class ID for Adapter "Ethernet":
DHCP ClassID Name . . . . . . . . : Default BOOTP Class
DHCP ClassID Description . . . . : User class for BOOTP Clients
DHCP ClassID Name . . . . . . . . : Default Routing and Remote Access Class
DHCP ClassID Description . . . . : User class for remote access clientsipconfig /allcompartments
Windows can have more than one routing compartment, each with its own interfaces and routing table. Compartments are used by Hyper-V and Windows containers, some VPN products, and Windows Sandbox. By default ipconfig shows only the compartment your prompt is running in. /allcompartments shows all of them, and combines with /all.
ipconfig /allcompartments
ipconfig /allcompartments /allWindows IP Configuration
==============================================================================
Network Information for Compartment 1 (ACTIVE)
==============================================================================
Ethernet adapter Ethernet:
...Things ipconfig cannot do
People often reach for ipconfig expecting more than it offers. It has never been able to:
- Set a static IP address, mask or gateway. Use netsh or PowerShell New-NetIPAddress.
- Change DNS servers. Use
netsh interface ip set dnsorSet-DnsClientServerAddress. - Enable or disable an adapter. Use
netsh interface set interfaceorDisable-NetAdapter. - Show the routing table. Use
route printorGet-NetRoute. - Show the ARP table. Use
arp -aorGet-NetNeighbor. - Show your public IP. Nothing local can; see Find my IP.
- Show Wi-Fi signal or SSID. Use
netsh wlan show interfaces. - Show link speed. Use
Get-NetAdapterorwmic nic get name,speed. - Show traffic counters. Use
netstat -eorGet-NetAdapterStatistics.
Scripting and filtering the output
The output is designed for humans; the dotted alignment and localised strings make it fragile to parse. A few practical patterns:
ipconfig | findstr /i "IPv4"
ipconfig /all | findstr /i "Physical Address"
ipconfig /all | findstr /c:"DNS Servers" /c:"Default Gateway"
for /f "tokens=2 delims=:" %a in ('ipconfig ^| findstr /c:"IPv4 Address"') do @echo %aIn a batch file, double the percent signs (%%a). For anything beyond a one-liner, use PowerShell, which gives you objects instead of text:
(Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias Ethernet).IPAddress
Get-NetIPConfiguration | Select-Object InterfaceAlias, IPv4Address, IPv4DefaultGateway, DNSServer
(Get-NetAdapter -Name Ethernet).MacAddressOn non-English Windows the labels are translated (Adresse IPv4, IPv4-Adresse), so any findstr against label text breaks. PowerShell property names never change.
ipconfig on older Windows
- Windows 95, 98 and Me shipped a graphical tool,
winipcfg, and a limited command-lineipconfigthat lacked most switches. - Windows NT 3.5 to 2000 had
ipconfigwith/all,/releaseand/renew./flushdns,/displaydnsand/registerdnsarrived with Windows 2000, when the DNS client cache was introduced. - Windows XP added
/showclassidand/setclassid. - Windows Vista added the IPv6 switches,
/allcompartmentsand wildcard adapter names, alongside the rewritten dual-stack TCP/IP. - Windows 7 onward is unchanged apart from the output format for temporary and deprecated addresses.