lease

Use this command to specify the duration of the lease for an IP address assigned by a DHCP server to a client.

Syntax

lease {days [hours] [minutes]}
no lease {days [hours] [minutes]}

Parameters

days Specifies the number of days an address lease will remain valid.
hours (Optional) When a days value has been assigned, specifies the number of hour an address lease will remain valid.
minutes (Optional) When a days value has been assigned, specifies the number of minutes an address lease will remain valid.

Defaults

If hours or minutes are not specified, no values will be configured for the hours and minutes, and only the days value will apply.

Mode

DHCP address pool or class configuration command mode.

Usage

The “no” form of this command resets the lease duration to the default value of 1 day (24 hours).

Example

This example shows how to set a one-hour lease to the “localpool” address pool:

System(rw-config)->ip dhcp pool localpool
System(rw-config-dhcp-pool)->lease 0 1