Ipconfig is one of the better-known command-line utilities available through Windows, since it is highly useful for con­fig­ur­ing and analysing networks. Ad­min­is­trat­ors mainly use this command because it allows them to perform their tasks quickly and directly without having to sift through con­vo­luted nested menus in the Windows user interface. Even everyday average users can use this tool to solve Internet con­nec­tion and network problems. In the following article, we will take a look at the ipconfig command which is useful for network setup, con­fig­ur­a­tion, and ad­min­is­tra­tion.

What is ipconfig and how do you run the command?

Ipconfig is a command-line utility that was in­tro­duced in Windows NT. It is spe­cial­ised in network con­fig­ur­a­tion, ad­min­is­tra­tion, and analysis. This command is used to obtain useful network-specific in­form­a­tion, and it can also perform concrete actions and make changes to the network con­fig­ur­a­tion. Ipconfig is accessed and run through the Windows operating system command shell (cmd.exe). There are a variety of options that can be added to this command to extend its func­tion­al­ity and perform specific tasks on the network.

Tip

Windows also offers a variety of other CMD commands. These can be used to greatly speed up your work with the Microsoft operating system.

What is ipconfig used for?

Ipconfig is par­tic­u­larly useful for obtaining a quick, concise overview of important con­fig­ur­a­tion settings in the TCP/IP network and covers all existing network adapters and in­ter­faces (e.g. LAN, WLAN, Bluetooth, ISDN and VPN adapters).

Network ad­min­is­tra­tion and troubleshoot­ing

Being able to find assigned IP addresses can be very useful for local network ad­min­is­tra­tion and troubleshoot­ing. The ipconfig command can display both IPv4 and IPv6 addresses. IPv6 is not yet as relevant as its pre­de­cessor IPv4, but it will become in­creas­ingly important in the future when assigning addresses in networks. IPv6 addresses are already being used more in the Internet of Things (IoT, smart-home in­fra­struc­tures).

Obtaining and con­fig­ur­ing IP addresses

The IP address for the default gateway used to surf the Internet can also be obtained using the ipconfig command (for home users, this is usually the address of their DSL router). In addition, this command can display the address in­form­a­tion for the subnet mask and default gateway for all network adapters. You can even use it to find out whether a WINS proxy (name res­ol­u­tion proxy with WINS) or IP routing (a PC can be con­figured to forward IP data packets to other networks) has been enabled.

DHCP con­fig­ur­a­tion

Nowadays, anyone setting up a network will generally use the Dynamic Host Con­fig­ur­a­tion Protocol (DHCP) to assign IP addresses. Con­nect­ing devices are therefore in­teg­rated into the home network without any user input through the automated as­sign­ment of IP addresses. If you encounter any problems when using this type of dynamic network con­fig­ur­a­tion or if you want to manually modify the address as­sign­ment for other reasons, ipconfig can help.

You can manage and modify DHCP routines with ipconfig. For example, you can release and renew an IP address if it was assigned in­cor­rectly by the DHCP server during the automated as­sign­ment process or if it is not what the user intended. You can also find in­form­a­tion about DHCP leases and therefore about when a DHCP address was assigned and how long it will be valid. IP addresses are not per­man­ently assigned by DHCP; they are only valid for a specific period of time. Servers and clients can terminate, modify, or renew this as­sign­ment at any time.

Clearing the DNS cache

The DNS cache speeds up the retrieval of web pages by storing fre­quently needed data in a local temporary memory for faster access. If the files stored there for speeding up name res­ol­u­tion are corrupt, this can lead to error messages and problems accessing websites (e.g. HTTP 400 error). Caches also pose a security risk since hackers can extract important in­form­a­tion from them and use it, for example, to wreak havoc with online banking through DNS spoofing. Using ipconfig, you can clear the DNS cache and therefore eliminate problems and security risks.

Ipconfig can also provide in­form­a­tion about the DNS server that is re­spons­ible for your computer. There are even more potential ap­plic­a­tions for the ipconfig command which you can find in the overview table below.

Overview of ipconfig options

The basic ipconfig command will list important in­form­a­tion about the network. However, this is by no means the full extent of the tool’s cap­ab­il­it­ies. By adding options to the ipconfig command, it becomes a versatile tool for network ad­min­is­tra­tion and con­fig­ur­a­tion. In the following table, you will find a list of the basic options for the ipconfig command as well as ex­plan­a­tions about how they work and the function of important para­met­ers:

/? Displays ipconfig help
/all Displays all con­fig­ur­a­tion in­form­a­tion­For example, it displays the relevant DNS server, IP addresses for all con­trol­lers if there are multiple network cards, the default gateway, and the subnet mask
/allcom­part­ments Displays in­form­a­tion about all com­part­ments
/release Releases the IP addressIt is possible to indicate a specific adapter (if there are multiple network adapters); the sub­sequent command /renew then assigns a new IP after release
/release6 Releases the IPv6 address(es) Spe­cific­ally addresses the DHCPv6 server and releases IPv6 addresses
/renew Renews the IP addressIt is possible to indicate a specific adapter (if there are multiple network adapters)
/renew6 Renews the IPv6 address(es)Spe­cific­ally addresses the DHCPv6 server and modifies the DHCPv6 con­fig­ur­a­tion
/flushdns Clears the DNS res­ol­u­tion cacheRe­com­men­ded for when the content of a cache has been corrupted and can resolve problems, increase security, and speed up web browsing
/re­gis­terdns Renews all DHCP leases and DNS name re­gis­tra­tion­Re­news the DNS server re­gis­tra­tion; resolves dynamic update problems between a client and the DNS server; this parameter bypasses the need to reboot the client’s computer; renewing the settings can also resolve con­nec­tion problems between the computer and the ISP
/dis­playdns Displays the content from the DNS res­ol­u­tion cache
/show­classid Displays all the DHCP class IDs for an adapter DHCP class IDs enable more precise man­age­ment of com­mu­nic­a­tion between a client and a DHCP server. These are par­tic­u­larly important for pro­fes­sion­al network con­fig­ur­a­tion, such as for im­ple­ment­ing specific user classes or for assigning special DHCP options to a group of clients. Often, the aim here is to increase network security
/set­classid Modifies the DHCP class IDDHCP class IDs enable more precise man­age­ment of internal network com­mu­nic­a­tion. These are par­tic­u­larly important for pro­fes­sion­al network con­fig­ur­a­tion, such as for im­ple­ment­ing specific user classes or for in­teg­rat­ing security mech­an­isms into com­mu­nic­a­tion between a client and the DHCP server

Practical examples il­lus­trat­ing how to use the ipconfig command

Using ipconfig is not par­tic­u­larly com­plic­ated. Before entering the command, you have to access the Windows command prompt terminal (cmd.exe) via the Windows 10 Run dialogue box.

  1. Use the keyboard shortcut ‘Windows key + R’.
  2. Enter ‘cmd’ into the input field (1).
  3. Click OK (2).

Then, enter the command ‘ipconfig’ into the command line and press Enter. For a broader range of uses, you can add para­met­ers or options to the command. For example, you can add the option ‘/?’ to the command to display Help.

For each CMD command and its use with ad­di­tion­al options, there is a template that must be followed on how to write it. This is called the syntax. The following is the basic structure of the template for ipconfig:

ipconfig [/allcompartments] [/all] [/renew [<adapter>]] [/release [<adapter>]] [/renew6[<adapter>]] [/release6 [<adapter>]] [/flushdns] [/displaydns] [/registerdns] [/showclassid <adapter>] [/setclassid <adapter> [<classid>]]</classid></adapter></adapter></adapter></adapter></adapter></adapter>

If you want to access an overview of the network con­fig­ur­a­tion, the syntax for the command is quite short. After accessing the command line terminal via the Run dialogue box, you will enter the following at the end of the command line which will initially display the current active user account (the account is named ‘Peter’ in the following examples):

ipconfig /all

When you press Enter, it will display a list with the requested network con­fig­ur­a­tion in­form­a­tion.

If you want to clear the DNS cache, this will also only require a short command which you can run directly by pressing Enter:

ipconfig /flushdns 
Enter
Tip

You can find step-by-step in­struc­tions on how to clear your DNS cache in our article titled “Flush DNS: how and why you should clear the DNS cache”.

You can also use the command with place­hold­ers (asterisks: *) for installed network adapters. For example, if you enter ‘local*’, all adapters whose names contain the string ‘local’ anywhere in them will be included when an ipconfig command is run. Windows often uses ‘local’ for installed wireless LAN adapters, which are assigned con­sec­ut­ive numbers at the end of their name (e.g., Local Area Con­nec­tion 1, Local Area Con­nec­tion 2, etc.). Now, let’s say you want to renew the IP address for a specific Wi-Fi adapter (e.g. the WLAN adapter named ‘Local Area Con­nec­tion 2’). To do so, you would enter the following command:

ipconfig /renew "Local Area Connection 2"

Always use quotation marks when using longer phrases in the syntax (i.e. multiple words with spaces between them). Otherwise, the ipconfig command will not work.

Go to Main Menu