Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-21-2008, 07:21 AM   #1
LQ Newbie
Registered: Sep 2007
Distribution: Gentoo, RHEL 5.2, CentOS 5
Posts: 23

Rep: Reputation: 15
DHCP Server - No lease time?


I have a DHCP server which is connected to an 8 port hub. The devices connected to the hub will be swapped out every few minutes. I'm wondering if there is an easy way to disable lease times, ie. when one of the devices is swapped out it will give its IP to the new device instantly.

The DHCP server is the normal one from ISC. I have it set to give out 8 IP address ( to and I have set the default and max lease-time to "0". This seems to work but my log is filled with constant DHCP requests and acknowledgments.

Is this the correct way to do what I want or is there a better way (preferably less log heavy )?

Old 07-21-2008, 08:22 AM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
It depends on the implementation at one end. If the dhcp server detects a disconnect it should free that IP (unless you configured for persistent leases). Some dhcp servers are broken and require the clients to send a notification that they're disconnecting.

Can you set the 'default' lease time to, say, 1 day (or the maximum if you wish) and the 'max lease time' to zero? What seems to be happening is that your server is relinquishing the lease every second based on the default. Personally I would have expected a default of 0 to mean 'permanent'.
Old 07-21-2008, 11:15 AM   #3
LQ Newbie
Registered: Sep 2007
Distribution: Gentoo, RHEL 5.2, CentOS 5
Posts: 23

Original Poster
Rep: Reputation: 15

Thanks for the reply. I'll try provide a bit more information this time around about the DHCP server. I've taken your suggestion above and this is what's happening:

I'm using DHCP (from ISC) version 3.1.1. This is my dhcpd.conf:
# dhcpd.conf
option domain-name "internal";
ddns-update-style none;
default-lease-time 600;
max-lease-time 0;
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.
subnet netmask {

# My actual DHCP served subnet
subnet netmask {
As you can see it is set to give out only 1 IP address, (for testing purposes - it will be 8 in total later).

So I plug in the first device, and it requests the IP like so:
Jul 21 15:20:33 irtux dhcpd: DHCPREQUEST for from 00:00:00:00:00:00 via eth1
Jul 21 15:20:33 irtux dhcpd: DHCPACK on to 00:00:00:00:00:00 via eth1
I then switch the ethernet cable to a second device looking for DHCP and I get the following:

Jul 21 15:27:20 irtux dhcpd: DHCPDISCOVER from 00:00:00:00:00:00 via eth1: network 192.168.2/24: no free leases
The odd thing is my log file is populated by DHCPREQUEST and DHCPACK every 3 minutes (from the first device) even though my lease file contains this;

lease {
  starts 1 2008/07/21 16:59:47;
  ends 1 2008/07/21 16:59:47;
  cltt 1 2008/07/21 16:59:47;
  binding state active;
  next binding state free;
  hardware ethernet 00:00:00:00:00:00;
  uid "\001\000`.\0020d";
Which shows a lease of 0 minutes. Is there anything glaringly wrong about my configuration, or is what I want unacceptable (ie. non permanent leases)?


ps. Don't mind the MAC address' being all zeros


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPD Server Lease Time & Static IPs emphaze Linux - Server 2 04-30-2007 07:06 AM
DHCP Server lease list mahesh_sonawane Linux - Networking 1 10-05-2006 09:17 PM
DHCP server and client lease question rickyinman Linux - Networking 0 04-14-2006 10:53 AM
Invalid DHCP server lease time CloudBuilder Linux - Wireless Networking 3 04-30-2004 08:41 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration