09-22-2010 08:30 AM - edited 03-06-2019 01:07 PM
Hi there,
I have setup a DHCP server on cisco 3750 switch and it works perfectly fine except lease time, it looks like it never reuse ip address if it was assignt before:
My config below
ip dhcp pool IT_WORKSTATION_DHCP
network 172.21.133.0 255.255.255.240
default-router 172.21.133.14
dns-server 172.21.100.7
netbios-name-server 172.21.100.7
lease 2
is there anything i am missing in my config ?
Kind regards
Marcin
09-25-2010 03:47 PM
It looks like your lease time is set for two days. Perhaps lower it to something like 6 hours?
##########
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
1 day
DHCP pool configuration
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
09-30-2010 09:11 AM
I have changed my lease time to
lease 0 0 1
and after unpluging my pc and reconnecting my pc after 5 min i got next ip from the pool.
i had x.x.x.7
and now i got x.x.x.8 ...
any other ideas i could try ?
09-30-2010 10:10 AM
I believe that is normal behavior. The DHCP daemon will go through the pool and start over at the beginning. Are you experiencing a situation where the DHCP pool is exhausted and the DHCP daemon isn't issuing addresses? From the 3750 if you execute a 'show ip dhcp binding' or a 'show ip dhcp conflicts' do you see anything conflicting?
Chris
10-08-2010 06:47 AM
Hi Chris,
Thanks for your replay.
show ip dhcp binding - shows ip add which are leased right now
show ip dhcp conflicts - shows 3 machines with "Gratuitous ARP" as a detection method and no conflicts.
Is there any config i can apply so DHCP daemon is not going thrue whole pool but start recycling ip sooner ?
Once again thanks for your help.
Kind regards
Marcin
10-08-2010 07:16 AM
If you need a client to keep the same IP address all the time, then a static binding will be more appropriate, or even assign it a static address.
A longer lease would also satisfy this need in some situations.
The way dhcp pools work, once the lease is over, we will move on to the next ip in the pool, even for the same host. This is how its designed.
So, the answer to your last question is, no .. no configuration to make it sticky (other than extending the lease time).
Rob
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: