News: This forum is now permanently frozen.
Pages: [1]
Topic: -1969- DHCP leases Max File System, crash DHCP allocate/daemon (1.32)  (Read 3320 times)
« on: June 25, 2010, 03:33:44 »
knightmb ****
Posts: 341

Took about 2 months to track this down, but I was curious if anyone else has seen this.

Basically, you have a stock m0n0wall 1.32 system (PC-generic) with DHCP running.

Now, it doesn't matter if you allocate 2 address or 2,000 address for DHCP, as this will still bring down the file system I noticed.

What happens is, for reasons I haven't figured out yet, a device/PC/iPod/whatever will ask for a DHCP lease, gets one from the DHCP server, but the DHCP server assigns the expiration wrong.

Here is a sample log entry from one server I found this one.
Code:
192.168.67.168  00:23:df:b7:51:e6  breona-ipod  2010/05/05 14:55:59  1969/12/31 17:59:59
192.168.67.155  00:14:a1:41:12:f1  linux-pc-s  2010/05/05 14:57:51  1969/12/31 17:59:59
The lease start time makes sense, but the expiration time doesn't (1969?), so basically these lease will never expire. The problem gets worse when over time, this build up and finally overflow the file system.  I don't think m0n0wall has a cleanup script to get rid of these does it?

Anyway, is this a bug in m0n0wall or the DHCP daemon itself?

Feedback certainly welcome.

Radius Service for m0n0wall Captive Portal - http://amaranthinetech.com
« Reply #1 on: June 25, 2010, 03:40:11 »
knightmb ****
Posts: 341

I just found another system in the same state. I can't read the DHCP lease page (times out trying to render it), is there a way to grab the DHCP lease file from the exec.php page? I want to have this on hand in case a bug report would be better.

Radius Service for m0n0wall Captive Portal - http://amaranthinetech.com
« Reply #2 on: June 25, 2010, 11:13:12 »
brushedmoss ****
Posts: 446

Leases are kept in /var/db/dhcp.leases , so you can download this from /exec.php

dhcpd periodically rolls this file , so you will also see dhcp.leases~

in 1.32 we recompiled dhcpd with the interval for rolling the file to be much shorter, as we had reports of this file getting too big for the ramdisk as some machines were renewing their lease periodically , like android phones etc.  You report could be the cause for this.

Can you post your dhcp.conf from /status.php#dhcpd.conf  or at least the lines
Code:
default-lease-time ?????;
max-lease-time ?????;
« Reply #3 on: June 25, 2010, 14:54:01 »
knightmb ****
Posts: 341

Leases are kept in /var/db/dhcp.leases , so you can download this from /exec.php

dhcpd periodically rolls this file , so you will also see dhcp.leases~

in 1.32 we recompiled dhcpd with the interval for rolling the file to be much shorter, as we had reports of this file getting too big for the ramdisk as some machines were renewing their lease periodically , like android phones etc.  You report could be the cause for this.

Can you post your dhcp.conf from /status.php#dhcpd.conf  or at least the lines
Code:
default-lease-time ?????;
max-lease-time ?????;

When I try to download or just view the file, I get a file not found error. Is that a bad thing?  Grin

I was able to view the config from the status page at least. Is /var/db/dhcp.leases the correct location/file for the DHCP?

Code:
option domain-name "hometownwireless.biz";
default-lease-time 7200;
max-lease-time 86400;
authoritative;
log-facility local7;
ddns-update-style none;
subnet 172.18.0.0 netmask 255.255.240.0 {
pool {
range 172.18.1.1 172.18.5.254;
}
option routers 172.18.0.1;
option domain-name-servers 172.18.0.1;

}

Radius Service for m0n0wall Captive Portal - http://amaranthinetech.com
« Reply #4 on: June 25, 2010, 15:01:58 »
knightmb ****
Posts: 341

Ah, found it, was just a spelling typo.
cat /var/db/dhcpd.leases let me take a peak at the file. It seems that Belkin routers are causing this issue (or basically a bunch of Belkin routers for some reason)

Code:
172.18.5.242  00:11:50:f0:a7:21    2010/05/19 15:13:47  1969/12/31 18:59:59
172.18.4.242  00:22:75:52:e4:79  SC52E478  2010/05/04 11:04:37  1969/12/31 18:59:59
172.18.3.225  00:22:75:70:9e:05    2010/06/19 20:46:38  1969/12/31 18:59:59
172.18.1.225  00:22:75:52:e4:79    2010/05/02 20:21:12  1969/12/31 18:59:59
172.18.1.219  00:22:75:47:ae:6b    2010/06/24 14:53:41  1969/12/31 18:59:59
172.18.5.197  00:ab:00:00:00:00    2010/05/10 19:56:15  1969/12/31 18:59:59
172.18.5.193  00:22:75:46:e9:8f    2010/06/24 14:02:30  1969/12/31 18:59:59
172.18.5.188  00:22:75:5b:d7:c3    2010/06/24 15:52:19  1969/12/31 18:59:59
172.18.1.181  00:17:3f:bb:57:93    2010/06/24 13:58:29  1969/12/31 18:59:59
172.18.1.178  00:22:75:c6:f3:f5    2010/06/24 14:01:35  1969/12/31 18:59:59

Radius Service for m0n0wall Captive Portal - http://amaranthinetech.com
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines