[1361] in linux-net channel archive
Re: DHCP client for linux?
daemon@ATHENA.MIT.EDU (Jon Peatfield)
Sun Nov 12 18:47:36 1995
To: Jeff Noxon <jeff@router.patch.net>
cc: jp107@damtp.cam.ac.uk, linux-net@vger.rutgers.edu
In-reply-to: Your message of "Sat, 11 Nov 1995 22:51:21 CST."
<199511120451.WAA14398@router.patch.net>
Date: Sun, 12 Nov 1995 17:35:11 +0000
From: Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
Does anyone *really* want to use the dynamic "leased" IP addresses from DHCP?
Apart from that feature, DHCP, is basically just a set of extentions to bootp
(i.e. it adds addtional "options" from those defined in rfc1497/1542). It is
often possible to use a bootp client with a DHCP server (or should be I've not
tested it), see rfc1534 for details).
Basically a DHCP server getting a request without the DHCP message type set,
will assume it is talking bootp and reply accordingly.
My mistrust of the dynamic allocation is based on the fact that such an IP
address, once allocated *MUST* be given up if the client fails to contact the
server to renew it.
At this point the client machine *MUST* shut down it's network. Writing a
client for this is painfull as you have to have a permanent daemon running to
ask for renewal of addresses and cope with failure to talk to the server.
Also if your client machine crashes it is difficult to see how once can
guarentee to safely release the IP address allocated back to the DHCP server.
Personally I'd prefer either "automatic" or "manual" allocation unless you
really are so short of IP addresses that you need to ration them. See rfc1531
for an explanation fo the methods DHCP servers can use.
Adding DHCP support (without dynamic allocation) to bootpc would be a small
extra piece of work:
Add code to handle DHCPREQUEST/DHCPOFFER/DHCPDECLINE/DHCPACK/DHCPNAK etc
negotiation of allocation of parameters.
Add code to handle the extra required options for DHCP, increase max length
of packet to new max allowed by rfc1531 etc.
The specification of all of this is quite clear in rfc1531/1533 and I'd have
added this code to bootpc if I'd got more time.
My current estimate of when I'll have a couple of free days to do this will be
over Christmas/New Year. If anyone else wants to do it before then I'll
gladly accept the patches (you can get the latest bootpc from
ftp://ftp.damtp.cam.ac.uk/pub/linux/bootpc/bootpc.v045.tgz though my working
source has a couple of minor patches which havn't made it to the servers yet).
-- Jon Peatfield