IP address renewal is the process of leasing a new IP address from the Dynamic Host Configuration Protocol (DHCP) server. However, you may not always obtain a new address from the DHCP server after IP renewal—sometimes, it will only renew the lease period for the existing IP.
There isn’t any absolute necessity to renew the IP because once you release the IP and reconnect to the network, you will automatically get a new IP. However, it can come in handy if you need to renew your IP address to solve network problems due to misconfigured DHCP server.
First, let’s start by discussing how the IP renewal process works on a network.
What Does It Mean to Renew IP Address?
DHCP servers have a limited pool of IP addresses that they can assign to the client’s devices. For instance, class C IP addresses can be assigned to 254 devices.
When the IP is released (using ipconfig /release
), the DHCP server makes the IP available for other devices to use. After the server receives a renewal request (ipconfig /renew
), it leases the available IP from the pool. Most often, this IP address is the same one you released earlier.
When the IP lease time is at 50%, the client device sends a lease renewal request to the DHCP server. If the server responds back with an acknowledgment message (ACK), the lease is renewed.
However, if the client receives a No acknowledgment message (NAK), it stops using the IP address and starts the negotiation process again by sending a Discover message.
When the IP lease time reaches 87.5%, the client sends a rebinding request to the server again. If it receives an ACK message, the IP lease time will be renewed. Otherwise, if the lease time expires, the client goes through the process again and sends a Discover message to the DHCP server requesting a new IP.
How to Renew IP Address?
Windows offers some command-line tools to renew the private IP address, which we will go through in detail.
Note: These processes are only for the renewal of private IP and this won’t affect the public IP addressby any means. Ensure that the computer is connected to the network ( through Wi-fi or wired connection) before you proceed with the renewal process.
Using ipconfig
IPconfig is a handy command-line tool that can be used to configure, troubleshoot, and tests the IPv4 and IPv6 connections. Using the ipconfig /renew
command, users can reconfigure the IP address based on the details stored in the registry.
This command line is essential if a new DHCP server is placed in the network or the existing DHCP server is reconfigured.
- Press Windows Key + X and select Terminal( Admin).
- Now, use this command line to release existing network configurations for all of the network adapters.
ipconfig /release
- Then, execute this command to retrieve an IP address, and other configurations.
ipconfig /renew
Note: While releasing or renewing the IPv6 addresses, use these variations of the above commands.ipconfig /release6
ipconfig /renew6
Using Powershell Script
Although you can use the ipconfig
command lines on the Powershell terminal, there is also another workaround that can let you renew the IP address. Here’s how to use a PowerShell script in order to release and renew the IP address.
- Open Powershell.
- Paste this script in PowerShell and hit Enter.
$ethernet = Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Where { $_.IpEnabled -eq $true -and $_.DhcpEnabled -eq $true}
foreach ($lan in $ethernet) {
Write-Host "Flushing IP addresses" -ForegroundColor Yellow
Sleep 2
$lan.ReleaseDHCPLease() | out-Null
Write-Host "Renewing IP Addresses" -ForegroundColor Green
$lan.RenewDHCPLease() | out-Null
Write-Host "The New Ip Address is "$lan.IPAddress" with Subnet "$lan.IPSubnet"" -ForegroundColor Yellow
}
Using the Router Dashboard
Some routers allow users to renew the IP addresses by logging in to its dashboard. The older models of Netgear routers have this feature.
The option might be available on other routers as well, but here’s how it is done on a Netgear router.
- Connect to the Wi-fi router.
- Access the router’s dashboard.
- Go to the Advanced tab.
- Click on Connection status under the Internet Port section.
- In the connection status pop-up, you will see Release and Renew buttons. Click on the Release button to clear the existing IP address. The network connection will restart when this happens.
- Then click on the Renew button to renew the IP address.