LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-10-2011, 03:38 AM   #1
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Rep: Reputation: 0
Many entries in /var/lib/dhcpd/dhcpd.leases


Dear all,

I've a question about how work dhcpd.
I'm on CentOS 5.6.
I has a dhcpd server on it. His configuration:

authoritative;
ddns-update-style none;
deny declines;
deny bootp;

option domain-name "mydomain.domain";
option domain-name-servers IP;
option routers IP;
option time-offset -18000;
#option ntp-servers IP;

subnet IP netmask MASK {

range IP START IP END ;
default-lease-time 86400;
max-lease-time 172800;
}

And now in the /var/lib/dhcpd/dhcpd.lease file, there few entrie for the same IP. Sometime I've ten same entries for the same IP...
Why? Can I have only one entrie by IP?
Is there any problems in my configuration of my dhcpd.conf file?

Thanks.
Mouglou
 
Old 05-10-2011, 04:11 AM   #2
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
Allo!

This from the dhcpd.leases manual page:

"So if more than one declaration appears for a given lease, the last one in the file is the current one."

Sort of a log file, by the looks of things: keeps track of what it's done, long after it's done something else! So ignore everything except the last entry for a given IP address....
 
Old 05-10-2011, 04:23 AM   #3
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks baltho.
I think I could look the manpage before...

Is it a good idea to empty the file (dhcpd.lease) every night or one by week to be more clearly to read?
With touch command.

Mouglou
 
Old 05-11-2011, 05:09 AM   #4
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Unhappy

Is it a good solution?

I have another problems.
I fixed an IP address for a computer by his mac address in the dhcpd.conf file.

But the computer which is running on Windows XP is lost the network connection every day when the bail is ending...
Why? I fixed the address why it lost the connection? My users must log off her sessions and restart it to recover the network...
It make this problem only on this computer. Other fixed computer doesn't have this problem...

Any idea?
Mouglou


[EDIT]: Sorry for the latest question! I fixed the first IP adresse of my range to the computer... I think the problem was here!

Last edited by Mouglou; 05-11-2011 at 05:12 AM. Reason: Sorry for the latest question! I fixed the first IP adresse of my range to the computer... I think was here!
 
Old 05-13-2011, 07:07 AM   #5
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Joke!

Now the IP is fixed, the problem continue...
The IP fixed is not in the range of DHCP, but the bail is renew every day. And when it renew, it close the connection and re-open it...

Is it normal that the bail was renew even if the IP is fixed?

All computers of the company have the same configuration, used the same GPO for configuration nothing different...
Why this computer shutdown the network connection at every renewal?

I've no idea...
I hope you yes!

Mouglou
 
Old 05-17-2011, 08:48 AM   #6
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Nobody have an idea?

Somethings wrong in my configuration file of DHCP?

Mouglou
 
Old 06-13-2011, 06:53 AM   #7
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Hi everybody,

I come back to you cause my problem still exist.

My dhcpd.conf file is already the same.
But for many computers, when the lease ends, the computer lost network connection...
We've to wait many seconds to open again a file on network.

Why? And how I can resolve this problem?

Thanks
Mouglou

Last edited by Mouglou; 06-13-2011 at 07:04 AM.
 
Old 06-13-2011, 11:37 AM   #8
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779
I am catching up on this thread a little belated. Are you deleting the file? You should not have to and I would not recommend it. As you asked, "is this a good solution?" My response would be solution to what? Are the entries creating an operational difficulty? You will see multiple entries and if you look closely, only one of them will have a binding state of active.

You will need to look at the DHCP log for clues. See what is happening around the time of the lease renewal. You may have to look on both the server and the client. There should be some sort of error indicating what problem(s) occurred that prevented renewal of the lease.
 
Old 06-14-2011, 03:59 AM   #9
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Noway.

I didn't delete the file. It's my production environment so if I'm not sure I don't modify the sort of settings!
I understand for the entries which appears in loop.

But for the problem of computers which lost network connections during the lease, I've these informations:

On windows computers, the log says:
"Dchp" error with id 1003, and the specifications is: The semaphore timeout period has expired

On my dhcp server, I've this:

Jun 14 09:45:11 bsi-fw dhcpd: DHCPREQUEST for IP from 00:23:ae:8a:b9:f4 (computer-name) via eth2
Jun 14 09:45:11 bsi-fw dhcpd: DHCPACK on IP to 00:23:ae:8a:b9:f4 (computer-name) via eth2

And I've this informations which is write fifteen just for today...

I search on the web but don't find solution...

Mouglou
 
Old 06-14-2011, 04:29 AM   #10
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779
The Windows DHCP error 1003 (nice how they obfuscate these things) means:
Quote:
The DHCP Client service on your computer did not receive a response from the DHCP server to renew your computer's IP address lease
Typical causes include network troubles. The most common cause is running more than one DHCP server that is causing a conflict. Do you perchance have a router or some other device also running DHCP? If you have multiple DHCP servers they need to be configured to work together else you will have collision problems. See the following: link1 and link2.

You might also want to have a look here. The one post lists several articles on this subject. The problem in this case was caused by improper firewall settings and / or router settings.

Here is an example of a working DHCP exchange:
Code:
Jun 13 07:00:18 server dhcpd: DHCPDISCOVER from xx:xx:xx:xx:xx:xx (BLACKBERRY-5D92) via br0
Jun 13 07:00:19 server dhcpd: DHCPOFFER on 192.168.A.B to xx:xx:xx:xx:xx:xx (BLACKBERRY-5D92) via br0
Jun 13 07:00:19 server dhcpd: DHCPREQUEST for 192.168.A.B (192.168.A.C) from xx:xx:xx:xx:xx:xx (BLACKBERRY-5D92) via br0
Jun 13 07:00:19 server dhcpd: DHCPACK on 192.168.A.B to xx:xx:xx:xx:xx:xx (BLACKBERRY-5D92) via br0
As you can see the request and ack are the final two statements. This suggests that from the DHCP server side, the request was successfully completed and the problem lies on the client end.
 
Old 06-14-2011, 09:56 AM   #11
Mouglou
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Original Poster
Rep: Reputation: 0
I've only one dhcp server on our network.

I will search if something wrong in my firewall.
Maybe error with open port used by dhcp...

Mouglou
 
  


Reply


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 no free leases HiOctane21 Linux - Networking 6 10-02-2013 11:21 PM
Delete leases from dhcpd.leases when remove a subnet from dhcpd.conf phongnh Linux - Server 2 10-12-2010 04:49 AM
DHCP on CentOS 4.7 - /var/lib/dhcp/dhcpd.leases: Permission denied Latitude Linux - Networking 1 06-05-2009 02:08 AM
DHCPD Has No free leases? FishGills Linux - Networking 7 01-24-2009 06:49 PM
dhcpd.leases desertwanderer Linux - Server 0 10-25-2007 03:39 PM

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

All times are GMT -5. The time now is 07:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration