Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

DHCP on 3750

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

5 REPLIES
Silver

Re: DHCP on 3750

It looks like your lease time is set for two days.  Perhaps lower it to something like 6 hours?

##########

lease

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

Syntax Description

days

Specifies the duration of the lease in numbers of days.

hours

(Optional) Specifies the number of hours in the lease. A days value must be supplied before you can configure an hours value.

minutes

(Optional) Specifies the number of minutes in the lease. A days value and an hours value must be supplied before you can configure a minutes value.

infinite

Specifies that the duration of the lease is unlimited.


Defaults

1 day

Command Modes

DHCP pool configuration

Command History

Release
Modification

12.0(1)T

This command was introduced.


Examples

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

New Member

Re: DHCP on 3750

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 ?

Silver

Re: DHCP on 3750

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

New Member

Re: DHCP on 3750

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

Cisco Employee

Re: DHCP on 3750

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

7019
Views
0
Helpful
5
Replies
CreatePlease login to create content