The “ipconfig” is a Transmission Control Protocol or Internet Protocol tool to show the existing settings for each Network Interface. This command is the initial line of action to understand the communication problems on the network by showing the status of the connection. The ipconfig command is used to get the details of all the networks like wired or wireless network adapters.
This guide will explain the usage of the ipconfig command in detail and its uses in Windows.
What is ipconfig Command?
The ipconfig command is useful to determine the DHCP configurations as it enables us to determine the TCP/IP configurations. It allows the user to confirm the configurations provided by the DHCP adapter like automatic IP addressing or alternated configurations.
While using the ipconfig command, if the adapter name contains spaces, use the quotation marks like “Adapter Name”.
How to Use the “ipconfig” Command on Windows
To use the ipconfig command on Windows, simply open the Command Prompt or Terminal and type the command to get the desired details. The ipconfig command provides multiple flags to get additional information about the network. The complete range of flags is mentioned in the code block mentioned in the syntax section below:
Syntax
ipconfig [/allcompartments] [/all] [/renew [<adapter>]] [/release [<adapter>]] [/renew6[<adapter>]] [/release6 [<adapter>]] [/flushdns] [/displaydns] [/registerdns] [/showclassid <adapter>] [/setclassid <adapter> [<classID>]]
- ipconfig: without any flag, this command is used to show all the network adapters available in the network
- /all: this flag with the ipconfig command is used to list the complete settings or configurations for all the networks on the system
- /release: this flag with the ipconfig command shares the DHCPRELEASE message to the DHCP server for displaying the DHCP settings. It also discards all the IP address configurations for either all the adapters or for the particular adapter
- /renew: it renews the DHCP configurations for all the adapters(if any specific adapter is not specified) or for a specific adapter if the parameter is included
- /displaydns: This flag displays the content or configurations stored in the Domain Name Server or DNS of the network
- /flushdns: It resets the content of the DNS server client resolver cache
- /registerdns: this flag initiates the registration for the names of the Domain Name Server and IP addresses set on the system
- /setclassid: it configures the DHCP class ID for a specific adapter. To set it for all the adapters, use the asterisk (*) wildcard character instead of the adapter and this parameter is only available on computers with configured adapters that can get IP addresses automatically
The above section explains almost all the flags for the ipconfig command and now we will implement some of them below:
Using ipconfig Command
To use the ipconfig command on Windows, simply open the Command Prompt or Windows Terminal from the start menu and execute the ipconfig command to get the details of the network configurations:
ipconfig
The following screenshot displays the networks configured on Windows such as Ethernet0 and Bluetooth Networks. The Ethernet0 contains the localdomain as the DNS suffix to use Microsoft’s Active Directory(AD) concept. It also displays the IPv6 and IPv4 addresses for the PC with their Subnet Mask and Default Gateway. The Bluetooth adapter does not display any configurations as its media is not connected at the moment:
Using ipconfig Command With /all
Using the /all flag with the ipconfig command displays the configurations of all the adapters. It also contains physical interfaces like installed network adapters or logical interfaces such as dial-up connections:
ipconfig /all
The following screenshot displays the details of the networks as compared to the ipconfig command without the /all flag. The huge amount of details it provides is visible like description, physical address of the system, DHCP enabled, etc:
The following screenshot is the focused version of the above screenshot with details of the Ethernet0 network. We only highlighted a few configurations from the detailed information of the network to show the DHCP configurations:
Using ipconfig Command With /release
The /release parameter disables the TCP/IP for the adapter configured to obtain the IP address automatically. Use the following command to execute the “DHCPRELESE” message and remove the DHCP configurations:
ipconfig /release
Executing the above command displays the following screen showing that the configurations are released. Now, the network only contains the IPv6 address and everything else is simply not available for the network:
You can also specify an adapter by typing its name that appears when you use ipconfig without parameters. The following command releases the DHCP configurations for the Wireless adaptor and like that you can do it for any of your adapters:
ipconfig /release Wireless*
Now, execute the ipconfig command to check the DHCP configurations, which are already released previously:
ipconfig
Here, the Windows IP configurations section contains nothing but the IPv6 address after releasing all other configurations:
Using ipconfig Command With /renew Flag
It simply renews the DHCP configurations if the previous configurations are not released or not proper. Execute the following command to get the new DHCP configurations for all the adapters:
ipconfig /renew
The configurations are renewed with the DNS suffix, IPv4, Subnet Mask, and Gateway settings shown in the screenshot below:
Note: To specify an adapter name, simply type its name extracted from the ipconfig command without parameters
Using ipconfig Command With /displaydns
Get the DNS configurations with any recently acquired resources using the following command with the details of the DNS server client resolver cache:
ipconfig /displaydns
Using ipconfig Command With /flushdns
The /flushdns parameter with the ipconfig command removes any additional entries by executing the following command.
ipconfig /flushdns
The following screenshot displays the success message after flushing the DNS resolver cache:
Note: You can also register DNS servers using the /registerdns parameter with the ipconfig command in case of an accidental flush. It simply troubleshoots the DNS name settings and registration to resolve the issues attached to updates that come dynamically. It completes the process without rebooting the computer on the client side.
That’s all about the process of working with the ipconfig on the Windows system.
Conclusion
The ipconfig command is used to display the DHCP configurations for all the adapters on the PC with its additional flags. These flags are there to get specific information related to the network configurations or to implement some configurations yourself. This guide has explained the ipconfig command and also implemented the command with its flags to provide a practical experience as well.