Dynamic Host Configuration Protocol (DHCP) Commands
©2008 Allied Telesis Inc. All rights reserved.
53.16
AlliedWare Plus
TM
Operating System Software Reference C613-50003-00 REV E
Software Version 5.2.1
lease
This command sets the expiration time for a leased address for the DHCP address pool you
are configuring. The time set by the days, hours, and minutes is cumulative. The default lease
time is one day.
The lease details use the pre-defined option 51. Note that if you add a user-defined option 51
using the
option
command, then you will override any settings created with this command.
Use the
infinite
parameter to set the lease expiry time to infinite (leases never expire). Use
the
no
parameter to return the lease expiration time back to the default of one day.
Syntax
lease <
days
> <
hours
> <
minutes
>
lease infinite
no lease
Mode
DHCP mode
Examples
To set the lease expiration time for address pool “P2” to 35 minutes, use the commands:
awplus(config)#
ip dhcp pool P2
awplus(dhcp-config)#
lease 0 0 35
To set the lease expiration time for the address pool “Nerv_Office” to 1 day, 5 hours, and 30
minutes, use the commands:
awplus(config)#
ip dhcp pool Nerv_Office
awplus(dhcp-config)#
lease 1 5 30
To set the lease expiration time for the pool to never expire, use the command:
awplus(dhcp-config)#
lease infinite
To return the lease expiration time to the default of one day, use the command:
awplus(dhcp-config)#
no lease
Related Commands
service dhcp-server
Parameter
Description
<
days
>
The number of days, from 0 to 30, that the lease expiry time is
configured.
Default:
1
<
hours
>
The number of hours, from 0 to 24, that the lease expiry time is
configured.
Default:
0
<
minutes
>
The number of minutes, from 0 to 60, the lease expiry time is
configured.
Default:
0
infinite
The lease never expires.