Skip to main content

Інструкція користувача

Changing the IP address lease time

An IP address is assigned to a computer from the router's DHCP server not for permanent use but for a specific period. This is called the lease time of an IP address. When the lease time expires, the IP address is again considered free, and the client must request a new one (it can, however, be the same one).

In KeeneticOS, the default DHCP lease time for home and guest networks is set to 25200 sec (7 hours). This is the amount of time allocated for IP leasing.

When 50% of the lease period has passed, the client will attempt to renew the lease or update the IP address information.

change-dhcp-lease-01-en.png

You can set the IP lease time in the router's web interface. This setting is located on the 'Home segment' page in the 'IP settings' section. To change the parameters of an existing home network segment in the 'IP settings' section, click 'Show DHCP settings' and set the required value in seconds in the 'Lease time' field.

change-dhcp-lease-02-en.png

Here is an example of setting a lease period of an IP address assigned automatically by the DHCP server of the Keenetic router and its renewal.

For example, let's set the IP address lease time for the main home network to 60 seconds (we purposely set such a short time in our example to show how the IP address lease mechanism works). Generally, the recommended time to lease an IP address is 48 hours (172800 seconds) to renew the IP address once a day.

change-dhcp-lease-03-en.png

After applying the specified parameters, clients will receive an IP address for 1 minute, after which they will send a request to the DHCP server for a new IP address every 30 seconds. To update the IP lease timer, disconnect and reconnect the network adapter (or disconnect the Ethernet cable from the computer for a few seconds and then reconnect it).

change-dhcp-lease-04-en.png

This mechanism is clearly visible from the network packet dump collected on the DHCP client side. On the screenshot below, you can see that after 30 seconds there is a request to update the IP address.

change-dhcp-lease-05-en.jpg

You can also set the IP address lease time with a special command through the command-line interface (CLI) of the router:

ip dhcp pool _WEBADMIN lease xxx

where xxx is the time in seconds. The maximum value of the IP address lease in KeeneticOS is 259200 seconds (72 hours, 3 days).

change-dhcp-lease-06-en.jpg

To save the settings to the non-volatile memory of the router, run the command.

system configuration save