Defining DHCP Lease Periods
Problem
You want to change the default lease time.
Solution
To modify the default DHCP lease time for a pool of IP addresses, use the lease configuration command:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip dhcp poolRouter1(dhcp-config)#172.25.2.0/24lease 2 12 30Router1(dhcp-config)#exitRouter1(config)#endRouter1#
Discussion
The lease command takes up to three options: lease days [hours] [minutes], with hours and minutes being optional. You can specify a maximum period of 365 days, 23 hours and 59 minutes, and a minimum of 1 second. The default is one day.
The shorter the lease period, the faster you can reconfigure DHCP options that may need to change. Short lease periods also permit IP addresses to be returned to the address pool for reallocation more quickly. This can be useful in environments where a large number of end devices connect and disconnect frequently, as in public wireless networks, such as at an airport. A short lease period of say 30 minutes might be useful to ensure that IP addresses are returned quickly to the shared pool. However, short lease periods also mean that workstations must renew their leases more often, which puts an extra strain on the network and DHCP server.
Conversely, a small office with a stable workforce may choose to increase their lease periods. Long lease periods can also reduce the impact of DHCP server failures. Unless a workstation reboots or needs to ...