ipconfig command windows

IPCONFIG: How to Release a Renew IP Address in Windows?


On Windows operating systems, the ipconfig utility is used to get different information about the current TCP/IP protocol settings, release or renew the IP address assigned from a DHCP server, etc. This is one of the most common utilities for troubleshooting network connection problems in Windows (as well as ping, net, netstat, nslookup, tracert, pathping, arp, route).

In this article, we will show how to get information about the current IP address of a computer using the ipconfig utility, how to obtain an IP address from the Dynamic Host Configuration Protocol (DHCP) server or release it.

To get current TCP/IP configuration of the local interface of the computer, including the IP address, subnet mask, gateway IP address, DNS servers IP addresses, domain suffix, open a command prompt as an administrator and run the command:

ipconfig /all

An example of the displayed network adapter configuration:

ipconfig command

It also provides information about each network adapter installed in the system, as well as information about the DHCP service (and DHCP server) or about static IP addressing.

In this example, you can see that the current IP address for the network adapter Ethernet adapter Ethernet0 (Intel(R) 82574L Gigabit Network Connection): 192.168.72.1.

IPv4 Address. . . . . . . . . . . : 192.168.72.1(Preferred)

The fact that this network adapter is allowed to obtain the dynamic IP address from a DHCP server is indicated by the line:

DHCP Enabled. . . . . . . . . . . : Yes

Please note that the address is assigned by the DHCP server 192.168.72.254.

DHCP Server . . . . . . . . . . . : 192.168.72.254

The Lease Obtained field indicates the time of obtaining this dynamic IP address from a DHCP server, Lease Expires—the expiration date of the lease.

Lease Obtained. . . . . . . . . . : Wednesday, March 6, 2019 7:42:01 AM

Lease Expires . . . . . . . . . . : Wednesday, March 6, 2019 8:26:49 AM

To release the IP settings of all network adapters of the computer, use the command:

Ipconfig /release

ipconfig commands

When executing this command, the client sends a DHCPRELEASE packet to the DHCP server, indicating that the client no longer needs to use its network address. All active TCP/IP connections for all network adapters are terminated and the client release the IP address (the computer is disconnected from the Internet in this time).

Or you can reset the IP address for a specific network adapter only. If the adapter name contains spaces, its name must be specified in quotes. You can also use wildcards * and ?. For example:

ipconfig /release *Ethernet0*

In order to renew IP Address from DHCP server you need to run the command:

ipconfig /renew

As with the release option, ipconfig /renew can accept the optional attribute—the name of the network connection.

Both the /renew and /release options work only on clients configured to automatically obtain dynamic IP addresses from a DHCP server (this could be your router or ISP equipment). Updating the IP address will usually resolve problems connecting to a new network or a new router.

In various scripts or when connecting remotely via RDP, you can use the following one-liner to release and renew the IP address for all network adapters:

ipconfig /release && ipconfig /renew

You may also like:

Deploy LGPO with MDT 2013 Local Group Policy (LGPO) of computer is configured through gpedit.msc snap-in, which does not provide the possibility to export/import settings. That...
Using PsExec to Run Commands Remotely The PsExec is an easy Windows utility to replace the telnet tool. It allows you to run programs and processes on remote systems, using all the feature...
How to Migrate User Profiles with User State Migra... One of the most popular tools to migrate user profiles from one Windows computer to another is the set of CLI utilities – User State Migration Tool (U...
How to Fix Can’t Connect to Proxy Server on ... In this article we are going to find out how to fix annoying problem on Windows 10. When you try to go in Web, it says Can’t connect to the proxy serv...
How to Mount Windows Folder into VMware ESXi In this article we will take a look on how to connect a network folder from Windows 2012 R2 Server as a datastore on the VMware ESXi host and use it t...

Add Your Comment