LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


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

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


Hi,

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 (192.168.2.101 to 192.168.2.108) 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 )?

Thanks,
 
Old 07-21-2008, 08:22 AM   #2
pinniped
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
piercey
LQ Newbie
 
Registered: Sep 2007
Distribution: Gentoo, RHEL 5.2, CentOS 5
Posts: 23

Original Poster
Rep: Reputation: 15
Hi,

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:
Code:
# dhcpd.conf
option domain-name "internal";
ddns-update-style none;
default-lease-time 600;
max-lease-time 0;
authoritative;
log-facility local7;

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

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

So I plug in the first device, and it requests the IP like so:
Code:
Jul 21 15:20:33 irtux dhcpd: DHCPREQUEST for 192.168.2.101 from 00:00:00:00:00:00 via eth1
Jul 21 15:20:33 irtux dhcpd: DHCPACK on 192.168.2.101 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:

Code:
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;

Code:
lease 192.168.2.101 {
  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)?

Thanks,

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:09 PM.

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