ipconfig command provides basic network management functionalities about Windows operating systems like Windows Server and Windows Desktop families. With
ipconfig command IP address information about network interfaces can be listed, changed or DNS cache can be flushed. In this tutorial we will look these usage examples.
Ipconfig command uses default Windows style parameters and help syntax. We will use /
h for print help.
$ ipconfig /h
List Network Interfaces and IP Addresses
Windows operating systems have more than one interfaces. These interfaces have information like IP, DNS, Network etc. We can display this information with
ipconfig command without providing any parameters. This will list all interfaces and related information.
We can see that there are following information;
- Interfaces name
- IPv4 Address
- Subnet Mask
- Default Gateway if exists
- Link-local IPv6 Address
List DNS, DHCP Server and Detailed Information
In previous example we have listed basic information about network interfaces. Some times this information is not enough for us. We need more detailed information like DHCP Server, DNS Server etc. We can get these details with
$ ipconfig /all
Renew IP Address
DHCP is a protocol used to get IP address and other related network information automatically. DHCP ease system and network administrators life. DHCP protocol details can be get from following tutorial
DHCP mechanism started d by client side or a network node generally connected newly. Ipconfig command can start this mechanism with
/renew parameter. We will release our IP address if allready exists and try to get new IP address in the following example.
$ ipconfig /renew
Renew Specific Network Interface IP Address
We have the option to renew IP address of a specific Network Interface. We need to provide the whole network interface name or some part of the name with glob prefix and postfix. In this example we will renew IP address of interface which name contains
Con in some part of its name.
$ ipconfig /renew *Con*
Clear DNS Cache
One of the most faced network problem is DNS problem. After some times using internet connection DNS cache became corrupt and can not work properly. I we can connect network by can not surf internet or get a DNS related error from the browser like Chrome, Firefox, Explorer we can try to clear DNS cache. We will clear the DNS cache with
/flushdns command like below.
$ ipconfig /flushdns