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):

IPv4 Address. . . . . . . . . . . :

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

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

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
I enjoy technology and developing websites. Since 2012 I'm running a few of my own websites, and share useful content on gadgets, PC administration and website promotion.
Cyril Kardashevsky

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.