Ipconfig Command | Display IP Address Information in Windows CMD
Ipconfig stands for Internet Protocol Configuration. It is a Windows command that is used to display the current configuration of network interfaces.
We can also use the ipconfig
command to manage Windows DNS resolver cache and release and renew IP addresses.
ipconfig
Run the ipconfig
command without any options in the CMD (or PowerShell), and it will display the IP address, subnet mask, and default gateway for each network interface on your computer.
For detailed information on interfaces, you can use the /all
option:
ipconfig /all
This time, Windows displays additional information such as the Host Name, MAC address (Physical Address), DHCP configuration, and DNS Servers.
Release and Renew DHCP Lease
The /release
and /renew
options are used to release and renew the DHCP lease on the specified network interface or all interfaces if none is provided.
ipconfig /release
ipconfig /renew
The following two commands will release and renew the IPv4 address for the interface named Ethernet:
ipconfig /release "Ethernet"
ipconfig /renew "Ethernet"
For IPV6, use the release6
and renew6
options.
Manage DNS Resolver Cache
The ipconfig
command can be used to display and clear DNS cache on a Windows computer.
Open a command prompt and run the following command to display the local DNS cache on your Windows PC:
ipconfig /displaydns
To clear the current DNS cache, use the /flushdns
switch:
ipconfig /flushdns
The above command forces Windows to delete its locally cached copies of DNS resolver records.
At the command prompt, type ipconfig /?
to display a list of all options you can use.