[ previous ] [ next ] [ threads ]
 
 From:  "M. G. (Michael) de Bruin" <mg dot debruin at buum dot nl>
 To:  ian351c at cox dot net
 Cc:  m0n0wall dash dev at lists dot m0n0 dot ch, Manuel Kasper <mk at neon1 dot net>
 Subject:  Re: [m0n0wall-dev] Re: [m0n0wall] dhpc lease list issue
 Date:  Sat, 03 Jan 2004 01:44:19 +0100
Ian Cartwright wrote:

> On Fri, 2004-01-02 at 15:45, M. G. (Michael) de Bruin wrote:
> 
>>Bart Smit wrote:
>>
>>
>>>Hi Manuel & lists (cc-ing -dev),
>>>
>>>
>>>>m0n0wall loses the DHCP lease database on reboot - this is a design 
>>>>choice.
>>>
>>>
>>>After actually digging up and reading the relevant RFC (2131), I feel 
>>>the need to reiterate my previously stated point that this is a bad 
>>>design choice. It conflicts with an explicit design goal of the DHCP 
>>>mechanism. To quote:
>>>
>>> > The following list gives design goals specific to the transmission of
>>> > the network layer parameters.  DHCP must:
>>>[...]
>>> >     o Retain DHCP client configuration across server reboots, and,
>>> >       whenever possible, a DHCP client should be assigned the same
>>> >       configuration parameters despite restarts of the DHCP mechanism,
>>>
>>>I really feel this leaves no room for slack (apart from the fact that 
>>>I'm one of those rare folks that is actually bitten by the loss of state) .
>>>
>>>Will a big "please" do? :-)
>>>
>>>--Bart
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: m0n0wall dash unsubscribe at lists dot m0n0 dot ch
>>>For additional commands, e-mail: m0n0wall dash help at lists dot m0n0 dot ch
>>>
>>
>>I think you are going to have added cost as soon as you implement this: 
>>especially with a short lease time, your CF will wear out very soon.
>>
>>But: is it possible to use an NFS mount for these kind of things? If you 
>>really need it you probably don't mind setting up another server w/ NFS 
>>(eh... am I the only geek with to many servers? :)). Or, is this too 
>>far-fetched?
>>
>>Anyway, just a thought.
>>
>>Michael
>>
>>
> 
> 
> Or, how about this: keep the dhcp.leases file in memory (probably in
> /var/etc, which is where it is kept today, I presume) and save it to
> flash whenever the system is rebooted (using the M0n0wall equivalent of
> rc.shutdown). This would save wear and tear on any CF while giving lease
> information across (graceful) reboots.
> 
> Cheers,
> 
> Ian
> 

I think this would be another solution indeed. The great advantage is 
you don't wear out your CF, the great disadvantage is that you only keep 
it with a controlled reboot. Since I happen to know not everyone has 2kw 
UPS (actually, I do, but I'm kind of crazy on those things :)), you 
would have a problem with a power outage.

But, from what I can see, there could be three choices for three 
situations (and depending on your needs):
- Just save it on the HD, if that's what you are using. HD setup doesn't 
have a problem with write actions

- Save it in mem and write to CF at shutdown/reboot (saves your CF but 
doesn't work at uncontrolled reboot)

- Save it on a safe location, for example an NFS server, if you are 
worried your CF will wear out (maybe a bit too drastic, for something 
non-mission critical - if you do need this, shouldn't you use a seperate 
DHCP server?)

Darn, I just killed my idea, sort of...

How hard would that be to implement? (*looking at Manuel*)

Regards,

Michael