DHCP lease is nothing but a lease of IP addresses. A DHCP server assigns an IP address to the client for a specific period known as DHCP Lease Time.
How To Change DHCP Lease Time? Made Easy!
DHCP [What is DHCP article here] stands for Dynamic Host Configuration Protocol. The common DHCP lease timing is 24 hours but can become short or long depending on your server. You can do this by changing the DHCP lease time. And that’s what we will be discussing today, how to change DHCP lease time.
When this time limit reaches, it sends a message to the client that you can’t use this IP address. And after some time, it will be automatically assigned by DHCP Server. If the DHCP timeout limit exceeds, then the client needs to release this IP address and get it back.
This time limit is set by the DHCP administrator, which you can change on your wireless router. You can also assign a static IP address for Wi-Fi, LAN, Both or none of them using the below steps.
Use Of Lease Time: Enabling IP Address
The lease time is also used to assign IP Addresses to dynamic clients like DHCP Relay and DHCP Proxy.
To enable an IP Address the same, follow the steps mentioned below:
- Choose LAN from the top menu bar on your wireless router status page.
- Click on the DHCP Lease Time option to configure it.
- In this window, you will get two radio buttons, one for IP assignment for DHCP server and the other for static IP address assignment. You can select either of them but not both together.
Note: For a specific range, choose a particular protocol you want to use and fill up the start and end IP address along with netmask bits. If you have selected DHCP, then select a pool name from the start address column. Enter an appropriate network id in the network id column.
- Click on the Save button to store these configurations.
Steps To Change Lease Time On Your Wireless Router
To change the DHCP lease time, follow these simple steps given below:
- Login to your router’s interface by typing in the address http://192.168.2.1 or http://192.168.1 in the web browser of a PC connected with LAN cable to your wireless router.
- Go to the status menu and see here. You will see that there is an option called IP lease time. The DHCP server assigns an IP address to the client, which is set for one day. You can change the value from here and enter how long you want to give the IP Address.
For example, if you’re going to set it to 2 days, make the value 48 hours and click on save.
- Go back and see your lease time has been changed. This is how we change the DHCP Lease Time on our wireless router.
In most cases, there is no need to change it, but sometimes you can set a very long time. For example, 30 days if you have many PCs and laptops connecting to the wireless router at different times.
Note: Don’t make lease time too long. the DHCP server may not be able to assign IP addresses to all the clients simultaneously, resulting in IP address conflict.
How To Change DHCP Lease Time In Windows Server?
If you are using DHCP server in Windows server, then follow the below steps to change lease time:
- Click on the Start menu and type cmd. Right-click over the cmd icon and select run as administrator.
- Type ipconfig /renew in the command prompt window and hit enter to continue DHCP IP addresses of all the PCs and laptops connected with LAN cable to your wireless router.
- Now type ipconfig /release in the command prompt window and hit enter to release the IP address of all the PCs and laptops, which are now not working because their DHCP lease time has been over.
- Type ipconfig /renew in the command prompt window, hit enter again, and see that all PCs and laptops will get a fresh DHCP lease.
- Now change the DHCP Lease Time on your wireless router as shown above.
- After this type, ipconfig /renew in the command prompt window and enter one more time to renew DHCP leases for all PCs and laptops.
- Now go back and click on the Start menu and type cmd. Right-click over the cmd icon and select run as administrator.
- Type ipconfig /setclassid “network ID” BASED ON COUNT and hit enter.
- Here replace the network ID with your network ID, which you want to give a static IP address.
For example, if your network ID is 192.168.1.0 then you have to type ipconfig /setclassid “192.168.1” 16777216 2540000000 187859b82b82a5cb046d7aa74e57bc3c9
- Now restart the wireless router after this step.
Note: You can also change DHCP lease time using the DHCP console in Windows Server, but it does not recommend it as it is a very risky step, and you can change lease time for wrong PCs and laptops.
Don’t make lease time too long because, in this case, the DHCP server may not assign IP addresses to all the clients simultaneously, resulting in IP address conflict. Lease time determines how long a client machine gets to keep the IP address assigned to it.
It also ensures that two devices cannot ever use the same IP simultaneously, or we may come across network connectivity issues. We could change our wireless router and other devices, but first, we have to know what DHCP and lease time are before changing it.
Suppose you follow the above steps and set up your lease time as suggested. In that case, you will never encounter any problem while accessing the internet from your PCs or laptops connected with LAN cable to your wireless router because it will always assign new IP addresses for them.