Ipconfig is a powerful tool built into the Windows operating system as an easy way to access and change network settings. Once users understand how to use the commandthey can use it to view IP informationtroubleshootfix DNS and IP issuesand more. In this articlewe’ll cover what ipconfig ishow to use itseveral common ipconfig commands like ipconfig /all and ipconfig /flushdnsand what you should know about the tool and its basic functionality moving forward.
Chapters
What is ipconfig?
Ipconfig is used to view and configure the network settings on a Windows computer. It’s often used to troubleshoot network issueslike connectivity problems or incorrect IP addresses. It also works to view the current IP configuration of a computeras the command displays the IP addresses assigned to their network adapters as well as the default gateway and DNS servers.
The ipconfig command is available on all versions of Windowsincluding Windows 7810and 11. Users don’t need any additional software installed to use itwhich makes the command convenient.

What is ipconfig used for?
The ipconfig has many usesas it’s quite a versatile tool. It has basic functionssuch as viewing IP (Internet Protocol) address information and troubleshooting network issueswhich is helpful for all users. Howeverit also has more advanced functions better for professional usesuch as automating configuration tasks through scripts and diagnosing VPN problems.
Using ipconfig to view IP address information
One of the primary uses of the ipconfig command is to display the current IP information and configuration of a computer. This information includes the IP addressthe subnet maskand the default gateway of each active network interface. If you run the ipconfig command on its ownit will provide an output with the following information for each network adapter:
- Ethernet adapter or wireless adapter name
- IP address
- Subnet mask
- Default gateway
- DHCP server
- DNS servers
The output may look like one of the following examples:
Ethernet adapter EthernetIP address: 192.168.1.100Subnet mask: 255.255.255.0Default gateway: 192.168.1.1
Wireless LAN adapter WiFiIP address: 192.168.2.100Subnet mask: 255.255.255.0Default gateway: 192.168.2.1
You can also use the /all command to get more detailed informationsuch as the physical address (MAC address) of the adapterthe DHCP lease timeand the DNS hostname.
Using ipconfig to monitor network performance
Ipconfig helps monitor network performance by displaying information about the IP addresses and other network settings. It helps identify network bottlenecksdetect connectivity issuesand troubleshoot other network-related problems. You can also use the command to gather information like the IP addresssubnet maskand DNS servers assigned to a network to identify potentially troublesome patterns and trends in network usage.
Using ipconfig in scripts
Ipconfig works in scripts to automate network configuration tasks or to gather information about network settings. This is useful for managing large numbers of computersas well as for monitoring network performance. Users who run their own networks or servers will find ipconfig useful for this purpose.
Using ipconfig to diagnose VPN problems
Ipconfig can be used to view the IP addresses and other network settings of a computer when it is connected to a virtual private network (VPN). This can be useful for troubleshooting VPN connectivity issues or for identifying the cause of slow VPN performance.
Ways to use ipconfig to troubleshoot network issues
One of the things ipconfig can be used for is troubleshooting network issues. Because the command views the IP information and ensures IP address configurationit helps users experiencing network issues who need to diagnose the problem.
In generalipconfig helps diagnose connectivity issues. If a computer can’t connect to the Internet or other network resourcesuse ipconfig to view the IP configuration and ensure that the correct IP addresses and default gateway are being used. Furthermoreif two computers on the same network are using the same IP addressipconfig works to resolve those IP conflicts and view the current IP addresses of the devices.
Renewing DHCP leases
You can also use ipconfig to diagnose issues with DHCP. DHCPor Dynamic Host Configuration Protocolis a network protocol allowing servers to automatically assign IP addresses and other network configuration parameters to devices on a network.
When a device connects to a networkit sends a broadcast message requesting an IP address. The DHCP server then assigns an IP address to the device along with the subnet maskdefault gatewayand DNS server information. This process is known as leasing an IP address.
Leases have limited duration and must be renewedbut there are sometimes issues. The computer may not receive an IP address from a DHCP serverwhich could result in a 169.254 IP address. Howeverthe ipconfig command can request a new DHCP lease for the specified adapter.
It can replace an expired address or help if your current IP assignment is causing problems. Thereforeipconfig can help troubleshoot network connectivity issues related to DHCP or IP address assignment.
It's important to notehoweverthat renewing a DHCP lease will release the current IP and request a new oneso any connections or data transfers that were using the current IP address will be disrupted.
Flushing the DNS cache
Ipconfig also helps troubleshoot domain name system (DNS) issues. The domain name system is a hierarchical decentralized naming system for computersservicesor other resources connected to the Internet or a private network. It translates domain nameswhich are easy for us to understandto IP addresseswhich are easy for computers to understand.
When a computer looks up a domain nameit caches the IP address of that domain name. The computer memory stores the cachewhich it uses to speed up future lookups of the same domain. Howeverif the IP of the domain changesthe computer’s cache may still contain the old IP. This causes problems connecting to the site or domain.
You can use ipconfig to solve this problem by flushing the DNS cache. Ipconfig clears the cache and forces the computer to look up the domain name’s IP againthus resolving the error and improving connectivity.
Though the command isn’t a magic fix for all network issuesit helps quickly view and configure network settingswhich helps to resolve connectivity problems and ensure that the computer is properly configured for the network.
Common ipconfig commands and switches
Ipconfig offers several options and switches that can be used to customize the information displayed in the command or change the actions performed. The basic syntax of the ipconfig command is “ipconfig ,” where “options” are the optional parameters used to modify the command’s output. Some of these most used options include:
- ipconfig /all: Displays detailed information about all adaptersincluding the IP addresssubnet maskdefault gatewayDHCP serverand DNS servers
- ipconfig /release: Releases the DHCP lease for the specified adapter
- ipconfig /renew: Requests a new DHCP lease for the specified adapter
- ipconfig /flushdns: Clears the DNS cache on the computer
- ipconfig /? or /help: Displays all the available options for the ipconfig command

If you run the ipconfig command on its own with no parametersit displays the IP configuration of all active network interfaces on the computer. Howeveryou can also specify a network interface by adding its name to the command. For exampleipconfig /all displays detailed information about all network interfaceswhile ipconfig /all Ethernet displays detailed information specifically about the Ethernet interface. View the breakdown of information displayed by /all below:
| Physical Address | The MAC address or hardware address of your network adapters |
|---|---|
| DHCP Enabled | Shows what your network connection is using: static IP address or DHCP |
| IPv4 Address | Indicates the IP address of your Windows device |
| Subnet Mask | Distinguish between a host address and a network address in the IP address |
| Lease Obtained | The time your hardware received the IP address |
| Default Gateway | The address of the router interface |
| DHCP Server | Automatically provides and assigns IP addresses to your computer |
| DNS Servers | Servers that translate domain names into IP addresses |
The five commands listed above are the most common configurations; howeverthere are also more advanced commands to perform additional tasks.
Advanced ipconfig commands
In addition to the basic functionality of viewing and managing the IP configuration of a Windows computeripconfig also offers advanced options that can be used for more complex network management tasks.
One advanced option is the ipconfig /displaydns commandwhich shows the contents of the DNS resolver cache. It can help troubleshoot DNS issuesas it allows you to view the DNS records stored locally on the computer.
The ipconfig /registerdns command refreshes all DHCP leases and re-registers DNS names. It can help resolve problems between your computer or system and the DNS server.
Another advanced option is the ipconfig /setclassid commandwhich allows users to configure the DHCP class ID for a network adapter. The DHCP class ID is an optional identifier sent to the DHCP server to identify the specific configuration that should be applied to a network adapter. It can help configurefor examplea specific DHCP setting for wireless adapters and then a different setting for wired adapters.
The /showclassid goes in conjunction with the /setclassid command. It displays all the DHCP class IDs allowed for a certain adapter. It also helps when setting a different class ID as it indicates the parameters or limits for a certain adapter.
Additionallythe ipconfig command allows users to change the IP addresssubnet maskand default gateway of a network adapter by using the /setaddress/setmaskand /setgateway optionsrespectively. These optionsthenallow the user to manually configure their network adapter’s IP settings.
Use these commands with cautionas they do impact network connectivity. We recommend them only for advanced users with a solid understanding of network architectureIP addressesand the DHCP protocolsuch as network administrators.
Ipconfig error messages
While ipconfig is a powerful tool for troubleshooting network issuesthere are some common error messages that may appear when using the tool. Some of the most common error messages include:
- “Access is denied” error: This error message appears when you don’t have the necessary permissions to run administrative ipconfig actions. Thereforeto fix thisrun the command prompt as an administrator.
- “Windows IP configuration” error: This is not an error message. It is the standard header that appears whenever ipconfig runs successfully. If no adapters appear beneath itthe likely causes are a disabled network adaptermissing driversor no physical or virtual network interface. To fix thischeck Device Manager to confirm the adapter is enabled and reinstall network drivers if necessary.
- “Media disconnected” error: When the network cable is improperly connected or not functioning properlythis error message appears. It can also appear when the WiFi is turned offthe adapter is disabledor the device is not associated with an access point. To fix itcheck the connections and ensure proper installation and enabling of the network adapters and verify that the WiFi or Ethernet is actively connected.
- “Could not release DHCP lease” error: This error message appears when the DHCP lease couldn’t be releasedmost commonly because the adapter is using a static IP addressthe command was not run as administratorthe adapter is disconnectedor the DHCP Client service is not running. To fix itcheck the network connectionsmake sure the DHCP server functions properlyand confirm the adapter is set to “Obtain an IP address automatically,” then retry the command with elevated privileges.
- “The system cannot find the file specified” error: When this message appearsit either means the user incorrectly typed the command or the Windows system files are damaged. To fix itcheck the command spelling or run sfc /scannow to repair system files.
Keep in mind that these error messages aren’t an exhaustive list. Other error messages may appear when using ipconfig as well. In case of any error messagescheck the command and ensure that the network settings are properly configured.
How to access ipconfig on Windows and Mac
Windows users are used to entering the ipconfig command to show the full configuration of their computer system. On Apple's Macyou won't get any network information from this command. With Macyou need to run the ifconfig commandwhich is the Windows ipconfig Mac alternative; newer macOS versions also include additional commands like ipconfig getifaddr en0 for interface-specific details.
To access the command on Windows:
- Right-click the Start menu or hit Win+X.
- Select the command prompt or Windows PowerShell from the available options.
- Type ipconfig. Thenpress Enter.
To access the command on Mac:
- Press cmd+Space.
- Type Terminal. Thenhit Enter.
- At the Terminal prompttype ifconfig. Thenhit Enter.
You'll find the information regarding your physical IP addresssubnet maskand default gateway.
Comparing ipconfig to other network troubleshooting tools
While ipconfig is a powerful tool for troubleshooting network issuesit isn’t the only tool available. Other network troubleshooting tools that work in conjunction with or as an alternative to ipconfigincluding:
- Pinga command-line utility that tests connectivity to a remote host by sending ICMP echo request packets and waiting for a response
- Tracerta command-line utility that displays the path taken by packets across an IP network
- Netstata command-line utility that displays active TCP/IP connections and their statusincluding the local and remote IP addresses and ports
- Netsha command-line utility that's used to update network configuration settings
- Nslookupa command-line utility that displays information about a domain namesuch as the IP address and the name servers
- Event Viewera graphical tool that displays system and application log datawhich then can be used to troubleshoot issues related to network connectivity or other problems
- Device Managera graphical tool that displays the status of hardware devicesincluding network adapters
Each tool's own strengths make it the best choice to troubleshoot different types of network issues. For exampleipconfig is good for viewing and configuring network settings. But the ping command is useful for testing connectivity to a remote host. Additionallythe tracert command is useful for identifying the path packets take across a network.
Frequently asked questions
What do I use the ipconfig command for?
Use ipconfig to display the IPv4 addressIPv6 addresssubnet masksand the default gateway to each IP.
What are the 3 main commands in ipconfig?
Ipconfig has many purposes and commands. Howeverthe three most popular are /release/renewand /all. These commands show network data and refresh your IP when necessary.
How do I use ipconfig command in Windows 10 or Mac?
Users can access this commandor a variation of iton any computer.
For Windowsgo to the start menu and open the command prompt by typing cmd. Thenenter ipconfig for the basic information. Alternativelyenter the proper associated command for the task if you're looking for something more specific.
For MacOSopen Finder and choose Applications. Nextselect the Utilities folder and open Terminalwhich is the Mac version of Windows' command prompt. Finallyenter ifconfig to perform the same function.
Will ipconfig get my IP address?
Yesthe command will retrieve your IP address. When you launch the ipconfig command on your systemyour IP address will be the IPv4 address.