≡ Menu

Check IP address from CMD

Ipconfig command is used to find the IP address of a system from command line. Run the command ipconfig to print IP addresses for all network adapters installed on the system.

c:\>ipconfig
Windows IP Configuration

Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.1.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Wireless LAN adapter Wireless Network Connection:
   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

If you are interested in just knowing the IP address and not bothered about all other details printed by the command, you can use findstr to filter out unwanted details.

c:\>ipconfig | findstr /C:Address
   Link-local IPv6 Address . . . . . : fe80::f9d5:883c:9ae7:3af0%12
   IPv4 Address. . . . . . . . . . . : 192.168.0.105
   IPv6 Address. . . . . . . . . . . : 2001:0:4137:9e76:14b6:3da3:b662:d819
   Link-local IPv6 Address . . . . . : fe80::14b6:3da3:b662:d819%11
c:\>

Here, it shows IP addresses for various interfaces installed on the computer, it includes IPv6 interfaces as well.

If the system is connected to a DHCP configured network then you can release the IP obtained from DHCP.

ipconfig /release

The above command works for IPv4. To release IPv6 address the command is given below.

ipconfig /release6

 

0 comments… add one

Leave a Comment