The lease command configures an IP address lease for an address pool.
The undo lease command restores the default configuration.
By default, IP address lease is 3 days.
Parameter | Description | Value |
---|---|---|
days |
Specifies the number of days for an IP address lease. |
The value is an integer ranging from 0 to 999. The default value is 3. |
hours |
Specifies the number of hours for an IP address lease. |
The value is an integer ranging from 0 to 23. The default value is 0. |
minutes |
Specifies the number of minutes for an IP address lease. |
The value is an integer ranging from 0 to 59. The default value is 0. |
Usage Scenario
The IP address lease for a host varies according to client requirements. Some hosts, such as the DNS server, need to be used for a long term. To configure the IP address lease to unlimited for such hosts, Some hosts, such as a laptop, are used temporarily. To configure an IP address lease for such hosts, run the lease command with a lease specified. After the lease time elapses, the DHCP server reclaims the IP address so that the IP address can be assigned to another DHCP client.
Precautions
A DHCP server can assign a specific lease to IP addresses in each address pool. All addresses in the same address pool must have the same lease.