Configuring DHCP Lease Periods on Cisco router.
What Is DHCP Lease Period?
The DHCP (Dynamic Host Configuration Protocol) lease period refers to the length of time that a network device (like a computer, smartphone, or any other connected device) is allowed to use an IP address that’s been assigned to it by a DHCP server.
This concept is crucial in the management of IP addresses in a network, ensuring efficient and dynamic allocation of addresses.
Key Aspects of DHCP Lease Period
Allocation: When a device connects to a network, the DHCP server assigns it an IP address. This address is leased for a specific duration, known as the DHCP lease period.
Duration: The duration of the lease period depends on the network configuration and requirements. Typical durations range from hours to days. The specific duration is often a balance between the need for stability in IP address assignments and the flexibility to reassign IP addresses efficiently in environments with a lot of device turnover.
Renewal: Before the lease expires, the client device will typically attempt to renew the lease with the DHCP server to retain its current IP address. This renewal process usually begins when half of the lease time has elapsed. If the renewal is successful, the lease period starts anew.
Expiration: If the lease period expires without renewal (e.g., if the device is off or disconnected from the network), the IP address is returned to the DHCP server’s pool of addresses and can be reassigned to a different device.
Rebinding: If a renewal request (known as DHCPREQUEST) fails because the original DHCP server is unavailable, the client device enters a rebinding phase, where it broadcasts the request to extend its lease to any available DHCP server on the network.
You want to change the default lease period on your router.
To change the default DHCP lease time for a pool of IP addresses, use the lease configuration command:
R1#configure terminal
R1(config)#ip dhcp pool 192.168.5.0 255.255.255.0
R1(dhcp-config)#lease 5 12 30
R1(dhcp-config)#end
R1#
With The lease command, you are left with three options: lease days, hours, and 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 1 day.
How To Configure Cisco router to assign addresses with infinite lease period.
Use the following command:
R1#configure terminal
R1(config)#ip dhcp pool HQ
R1(dhcp-config)#lease infinite
R1(dhcp-config)#end
R1#
How to Configure DHCP on Windows PC