DHCP Commands
15-98 Configuring DHCP
lease
ThiscommandconfiguresthedurationoftheleaseforanIPaddressthataDHCPserverassignsto
aDHCPclient.Theleasetimesetisthesystemdefaultvaluewhichoverridesthenon‐specified
defaultvalue(oneday).
Iftheclientrequestsaleaseperiodexceedingtheperiod configuredon
theserver,thelease
intervalofferedbytheserverwillequalthatofthevalueconfiguredbythiscommand.Iftheclient
doesnotrequestaparticularleaseperiod‐typicalclientbehavior‐itisgrantedtheconfigured
defaultvalue.Manualbindingsarenotheldaccountabletothisleaseperiod.
Dependingon
theclientconfigurationinheritance,thecommandshouldbeusedfromtheproper
mode.Ifitisspecifiedfrommultiplemodes,anoverridemechanismchoosestheinnermostconfig
value,withclient‐classasinnermost,thenpoolasmostgeneral.
Syntax
lease {days [hours] [minutes] | infinite}
Syntax of the “no” Form
Usethenoformofthiscommandtorestorethedefaultvalue:
no lease
Default
Oneday
Mode
Eitherofthefollowingcommandmodesareavailable:
DHCPpoolconfiguration:
XSR(config-dhcp-pool)#
DHCPclientclassconfiguration:XSR(config-dhcp-class)#
Example
Thefollowingexampleconfiguresaone‐daylease:
XSR(config-dhcp-pool)#lease 1
Thefollowingexampleconfiguresaone‐hourlease:
XSR(config-dhcp-pool)#lease 0 1
Thefollowingexampleconfiguresaone‐minutelease:
XSR(config-dhcp-pool)#lease 0 0 1
days Duration of the lease in days.
hours Number of hours in the lease. A days value must be supplied before you can
configure an hours value.
minutes Number of minutes in the lease. Days and hours values must be set before you
can configure a minutes value.
infinite Duration of the lease is unlimited.