lease
To configure the duration of the lease for an IP address that is assigned from a Cisco IOS Dynamic Host Configuration Protocol (DHCP) server to a DHCP client, use the lease command in DHCP pool configuration mode. To restore the default value, use the no form of this command.
lease {days [hours [minutes] ] | infinite}
no lease
Syntax Description
days |
Specifies the duration of the lease in numbers of days. |
hours |
(Optional) Specifies the number of hours in the lease. A days value must be supplied before you can configure an hours value. |
minutes |
(Optional) Specifies the number of minutes in the lease. A days value and an hours value must be supplied before you can configure a minutes value. |
infinite |
Specifies that the duration of the lease is unlimited. |
Command Default
1 day
Command Modes
DHCP pool configuration
Command History
Release |
Modification |
---|---|
12.0(1)T |
This command was introduced. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2SX |
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware. |
Examples
The following example shows a 1-day lease:
lease 1
The following example shows a 1-hour lease:
lease 0 1
The following example shows a 1-minute lease:
lease 0 0 1
The following example shows an infinite (unlimited) lease:
lease infinite