ipconfig - Check IP Address

Maintained on

The ipconfig command is one of the commands that can be used on the command prompt, used to display details of network connections or to obtain a new IP address from DHCP.

Specific examples of use include checking how your PC is connected to the network, or troubleshooting network connection issues.

Additionally, using the ipconfig command allows you to see what position your PC occupies on the network and what settings it is connected with.

For instance, information such as your PC’s IP address, subnet mask, and default gateway can be instantly obtained by using the ipconfig command.

This article will thoroughly explain the basic to advanced usage of the ipconfig command, as well as troubleshooting methods.

Basic Usage of the ipconfig Command

The basic usage of the ipconfig command is as follows.

ipconfig

You can run the command without specifying any options.

Here are more detailed usage instructions, though you may not often use options other than /all.

ipconfig [/allcompartments] [/all] [/renew [<Adapter Name>]] [/release [<Adapter Name>]] [/renew6[<Adapter Name>]] [/release6 [<Adapter Name>]] [/flushdns] [/displaydns] [/registerdns] [/showclassid <Adapter Name>] [/setclassid <Adapter Name> [<Class ID>]]

Description of Each Option

The options for the ipconfig command are as follows.

OptionDescription
/allcompartmentsDisplays information for all compartments.
/allDisplays all information.
/renewRenews the IP address for the specified adapter.
/releaseReleases the IP address for the specified adapter.
/renew6Renews the IPv6 address for the specified adapter.
/release6Releases the IPv6 address for the specified adapter.
/flushdnsClears the DNS client cache.
/displaydnsDisplays the DNS client cache.
/registerdnsRefreshes the DNS client cache.
/showclassidDisplays the DHCP class ID for the specified adapter.
/setclassidSets the DHCP class ID for the specified adapter.

ipconfig Command Examples

First, let’s examine the most basic usage by executing the ipconfig command on its own.

ipconfig

Executing the above command displays details of your network connections.

The output will vary depending on the PC’s environment, but you can expect to see information such as the following.

×
Command Prompt Icon
Command Prompt
Microsoft Windows [Version xx.x.xxxxx.xxx]
(c) 2024 Ribbit App Development All rights reserved.
 
C:\users\user>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS suffix … : domain.com
Link-local IPv6 Address… . : fe80::d1d9:8f4e:78cd:6a10%4
IPv4 Address … … … . . : 192.168.1.2
Subnet Mask … … … . : 255.255.255.0
Default Gateway … … : 192.168.1.1
Wireless LAN adapter Local Area Connection* 1:
Media State … … … . . : Media disconnected
Connection-specific DNS Suffix … :
Wireless LAN adapter Wi-Fi:
Media State … … … . . : Media disconnected
Connection-specific DNS Suffix … :
Tunnel adapter isatap.domain.com:
Media State … … … . . : Media disconnected
Connection-specific DNS Suffix … : domain.com
C:\users\user>
#Command Prompt #Batch File #Arguments #Command Line #Commands