[Dnsmasq-discuss] Specifying boot options for specific type of
simon at thekelleys.org.uk
Fri Aug 26 09:50:19 BST 2005
Josef Wolf wrote:
> On Mon, Aug 22, 2005 at 12:27:33PM +0100, Simon Kelley wrote:
>>It's correct that dnsmasq provides both BOOTP and DHCP. I guess I never
>>thought about why BOOTP can't do dynamic addresses before - no BOOTP
>>server I know about does. How about this: BOOTP has no notion of lease
>>times and lease renewal or expiry, so any address allocated by BOOTP
>>would have to have an infinite lease and be lost for ever from the pool
>>of allocatable addresses.
> Yeah. That's essentially what rfc1534 describes:
> In summary, a DHCP server:
> o MAY support BOOTP clients,
> o May return automatic addresses to BOOTP clients,
> o MUST provide a configuration switch if returning automatic
> addresses to BOOTP clients,
> o MUST default this optional configuration to OFF,
> o MUST abide by the BOOTP specification when interacting with
> BOOTP clients, and
> o MAY send DHCP options (those options defined in the DHCP options
> document but not in the BOOTP vendor extensions documents) to
> a BOOTP client.
Can't argue with the RFC. The current dnsmasq compiles (only MAY do
automatic addresses.) I guess supporting automatic addresses will need a
new config option to switch it on.
>>There's therefore a big danger that you would
>>eventually run out of dynamically allocatable addresses.
> In the general, you're right. But the boxes I try to get onto the net
> use BOOTP _only_ to load their OS. After the OS (linux) is loaded, the
> normal boot procedure starts and the box configures itself via DHCP.
> I guess this is pretty non-standard and every piece of hardware that
> acts like this is somewhat braindead. But I have no chance to change
> the hardware.
> I think in this special case, handing out and reserving a lease for a
> couple of minutes for this MAC would not generate any problems. The
> box will request a lease (and will be offered the reserved lease) about
> 5 seconds after it had got the BOOTP-reply.
Doing it by the RFC will generate an infinite lease for the MAC (but
there's no reason which that shouldn't be taken over by the DHCP client
once the OS boots. Would that work OK.
RFC 1534 again:
If a DHCP server returns a automatic address, the BOOTP client will
not be aware of the DHCP lease mechanism for network address
assignment. Thus the DHCP server must assign an infinite lease
duration to for automatic addresses assigned to BOOTP clients. Such
network addresses cannot be automatically reassigned by the server.
The local system administrator may choose to manually release network
addresses assigned to BOOTP clients.
> OTOH, this is what actually happens:
> Given following config:
> 1. The box sends a BOOTP request.
> 2. dnsmasq answers with 192.168.1.15
> 3. Box boots and requsts dhcp lease.
> 4. dnsmasq offers 192.168.1.15(!) as lease.
> Note that this address is _not_ withhin dhcp-range.
> 5. Box accepts lease.
> [ ... ]
> n. Box reboots
> n+1. The box sends a BOOTP request.
> n+2. dnsmasq complains "address already in use".
> n+3. Box hangs. (BOOTP-reply is missing)
Hmm, this occurs because the current code doesn't generate any lease at
all for the BOOTP stuff. It would be fixed by the changes suggested above.
I'll try and get some test code to you later today.
More information about the Dnsmasq-discuss