ipconfig
(short for “Internet Protocol configuration”) is a command-line utility used in Microsoft Windows operating systems (and macOS, though its functionality is different and ifconfig
is more commonly used there) to display and manage the IP network configuration of your computer.
It’s a crucial tool for anyone troubleshooting network connectivity issues, from IT professionals to home users.
Core Functions of ipconfig
Without any options, ipconfig
provides a quick summary of your primary network adapters:
-
IPv4 Address: The IP address assigned to your computer on the local network.
-
Subnet Mask: Defines the network portion of your IP address, indicating which devices are on the same local subnet.
-
Default Gateway: The IP address of the router that connects your local network to other networks (like the internet).
Common ipconfig
Commands and Their Uses:
ipconfig
becomes much more powerful when used with various command-line options (called “switches” in Windows, prefixed with a /
).
-
ipconfig /all
This is perhaps the most useful and frequently usedipconfig
command. It provides a comprehensive, detailed listing of the TCP/IP configuration for all network adapters (Ethernet, Wi-Fi, VPN, virtual adapters, etc.), whether they are currently active or not.The information displayed by
ipconfig /all
includes:-
Host Name: The name of your computer on the network.
-
Primary DNS Suffix: If your computer is part of a domain.
-
Node Type: How the computer resolves NetBIOS names (e.g., Broadcast, Peer-to-Peer).
-
IP Routing Enabled / WINS Proxy Enabled: (Usually “No” unless specifically configured as a router or WINS proxy).
-
Adapter Description: The make and model of your network card.
-
Physical Address (MAC Address): The unique hardware address of the network adapter.
-
DHCP Enabled: Indicates if the adapter is configured to obtain an IP address automatically from a DHCP server.
-
Autoconfiguration Enabled: Indicates if the adapter is using Automatic Private IP Addressing (APIPA) if DHCP is unavailable.
-
IPv6 Address / Link-local IPv6 Address: If IPv6 is enabled.
-
IPv4 Address: Your primary IP address.
-
Subnet Mask: The subnet mask for the IPv4 address.
-
Default Gateway: The IP address of your router.
-
DHCP Server: The IP address of the DHCP server that assigned your IP address (if DHCP enabled).
-
DHCPv6 IAID / Client DUID: DHCP identifiers for IPv6.
-
DNS Servers: The IP addresses of the DNS servers your computer uses to resolve domain names to IP addresses.
-
NetBIOS over Tcpip: Indicates if NetBIOS is enabled over TCP/IP.
-
Lease Obtained / Lease Expires: For DHCP-assigned IP addresses, this shows when your current IP lease began and when it will expire.
Why it’s useful:
/all
gives you a complete picture of your network configuration, essential for diagnosing connection issues, identifying IP conflicts, and understanding DNS settings. -
-
ipconfig /release
This command sends a DHCPRELEASE message to the DHCP server, causing your computer to immediately give up its current IPv4 address lease. The IP address then becomes available for other devices on the network. This is useful when you want to force your computer to get a new IP address or when you are moving your computer to a different network segment.-
Example:
ipconfig /release
(releases IP for all adapters) oripconfig /release "Ethernet"
(releases for a specific adapter named “Ethernet”).
-
-
ipconfig /renew
After running/release
, or if your DHCP lease has expired, this command sends a DHCPDISCOVER message to request a new IPv4 address from a DHCP server. This is commonly used in conjunction with/release
to obtain a fresh IP address.-
Example:
ipconfig /renew
(renews IP for all adapters) oripconfig /renew "Wi-Fi"
(renews for a specific adapter).
-
-
ipconfig /flushdns
This command clears the DNS resolver cache on your computer. Your computer stores a local cache of recently resolved domain names (likegoogle.com
) and their corresponding IP addresses to speed up future lookups. If DNS records have changed, or if you’re experiencing issues accessing websites due to outdated DNS information, flushing the cache forces your computer to perform fresh DNS queries.-
Example:
ipconfig /flushdns
-
-
ipconfig /displaydns
This command shows the current contents of your computer’s DNS resolver cache. It’s useful for verifying if your system has cached an incorrect IP address for a domain.-
Example:
ipconfig /displaydns
-
-
ipconfig /registerdns
This command refreshes all DHCP leases and re-registers DNS names. It initiates a manual dynamic registration of the DNS names and IP addresses configured on the computer with your DNS server(s). This can be helpful if your computer’s hostname or IP address mapping in DNS is outdated.-
Example:
ipconfig /registerdns
-
How to Use ipconfig
:
-
Open Command Prompt:
-
On Windows 10/11: Type
cmd
in the Start Menu search bar and press Enter. -
For commands like
/release
,/renew
,/flushdns
,/registerdns
, you typically need to Run as administrator (right-click Command Prompt and select “Run as administrator”).
-
-
Type the command: Enter
ipconfig
followed by any desired options, then press Enter.
ipconfig
(Windows) vs. ifconfig
/ ip
(Linux/Unix/macOS):
It’s important to note that while ipconfig
is the standard for Windows, Unix-like operating systems (including Linux and macOS) historically used ifconfig
. However, ifconfig
is considered deprecated in many modern Linux distributions, which now favor the more comprehensive and powerful ip
command (from the iproute2
utility suite).
-
ipconfig
(Windows): Primarily for displaying IP configuration and managing DHCP/DNS client settings. Does not typically configure network interfaces (like setting static IPs directly). -
ifconfig
(Linux/Unix/macOS – older): Could display and configure network interfaces (e.g., setting static IP addresses, enabling/disabling interfaces). -
ip
(Linux – modern): The preferred tool in modern Linux for all aspects of network configuration and routing (ip addr show
,ip link set
,ip route show
, etc.).
In essence, ipconfig
is your go-to command-line utility on Windows for quickly getting information about your network setup and performing common network troubleshooting tasks related to IP addresses and DNS.