DHCP on 3750

Unanswered Question
Sep 22nd, 2010

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
gatlin007 Sat, 09/25/2010 - 15:47

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

marcin.piesio Thu, 09/30/2010 - 09:11

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 ?

gatlin007 Thu, 09/30/2010 - 10:10

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

marcin.piesio Fri, 10/08/2010 - 06:47

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

Robert Taylor Fri, 10/08/2010 - 07:16

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

Actions

Login or Register to take actions

This Discussion

Posted September 22, 2010 at 8:30 AM
Stats:
Replies:5 Avg. Rating:
Views:2851 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 15,007
2 8,150
3 7,725
4 7,083
5 6,742
Rank Username Points
165
82
69
65
55