LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-27-2004, 10:22 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
dnsmasq users?


Hello.

I have a dhcp and dnsmasq server running.

All I want to know is how I can get the server to automatically clear the dhcp.leases and dhcp.leases~ files automatically?

The reason being, we are in an environment where a machine is put on the network once and probably only for 4 or 5 minutes. Then shipped off. We are doing this probably 20 - 30 times a day, and I don't want the dhcp to be clogged up.

Anyone know a way I can get around this? I've a feeling it is a dhcpd option but am unsure.

Thanks alot!!!

>Craig
 
Old 04-28-2004, 11:18 AM   #2
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Set the lease to five minutes.
 
Old 04-28-2004, 05:04 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hi David,

Thanks for the reply, I really appreciate it.

I know this might be a stupid question, but do you mean the DHCP release?

This is what I already have as the first two lines in my dhcpd.conf file....

default-lease-time 600;
max-lease-time 7200;


However, in dhcpd.leases and dhcpd.leases~ I still have entries from January this year in there, this is when the server was first built.

Any ideas?

>Craig
 
Old 04-28-2004, 05:45 PM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
The are expired leases, and should not be a problem. You could remove them, but it's not really necessary. It's actually best to leave it as is.

The free ip's will be reclaimed when needed.

http://www.linux-france.org/~fclerc/...hcpd.conf.html

Last edited by DavidPhillips; 04-28-2004 at 05:46 PM.
 
Old 04-28-2004, 05:58 PM   #5
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Great thanks alot David!!! You've been a great help

So when the scope needs new IP's it will automatically overwrite the ones that have gone over the lease time?

Thanks alot.

Have a good day.
>Craig
 
Old 04-29-2004, 01:21 AM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Even if you have static ips out there in the dhcp servers ip range of addresses it will check for that when it prepares to assign the ip and abandon it. It will claim it again later if it becomes free.

 
Old 04-29-2004, 01:24 AM   #7
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Great gotcha. Thanks David!!!

You've helped me heaps.

>Craig
 
  


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
dnsmasq can't work ultrax Linux - Networking 1 08-05-2005 09:06 PM
dnsmasq.conf exvor Linux - Software 2 06-24-2005 05:28 PM
running rc.dnsmasq davidsrsb Slackware 2 09-23-2004 10:12 PM
dnsmasq startup bardinjw Linux - Networking 2 07-19-2003 03:36 AM
Dnsmasq dunkyb Linux - Software 0 03-16-2003 02:25 PM


All times are GMT -5. The time now is 04:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration