dhclient in 6.0

Chuck Swiger cswiger at mac.com
Fri Feb 3 22:37:33 PST 2006


David W. Hankins wrote:
> Marcin Jessa wrote:
>> Son't be silly. What if you dont know what IP you will get from the
>> lease? That's what working implementation of DHCP is for...
> 
> I thought that was why FreeBSD moved away from ISC DHCP to OpenBSD
> dhclient?
> 
> Actually, I guess I never did understand that move.  Certainly, no
> one ever explained it to me without a great deal of "wifi" handwaving.

I can't explain why the change from ISC to OpenBSD's DHCP was made; I like the
ISC version a little better, perhaps because the OpenBSD version insists that
you name an interface for it to go.

I have some recollections that there was a big debate about the merits of
handling transient link-state changes and what that should mean is terms of
keeping or flushing the arp cache, routing, etc etc.

I seem to recall more firmly-held opinions than consensus, and it is entirely
possible that state of affairs would describe the current situation as well.

> Let me introduce myself...I'm David Hankins.  I work at a small
> non-profit company you may have heard of called ISC (www.isc.org).

Howdy.  Do you have a computer named HAL, by any chance?  :-)

> I'm a pretty lucky guy, because I get paid to maintain the ISC
> DHCP package.  "See the world, write open source software," they
> said.

Ah, recruiters.  Well, even if you only get to do half of what they promised,
you're still doing OK...

> For some time we've been fighting a defensive battle.  Trying to get
> time and resources to spend bringing DHCP back out of the dark ages
> and up to snuff.  When I first started working on DHCP, I was
> volunteering two days a week (don't knock it: I got 3.0.1 final
> released this way).  It seemed the need for maintenance releases
> would never end.  Now, I'm on DHCP full time, we're finally thinking
> offensively, and we've got DHCP 3.1.0 on our plates, forks in hand.

OK, cool.  Are you doing anything with regard to Zeroconf/Rendezvous?

> "We at ISC cherish our relevance."  If you've heard Paul Vixie say this
> once, you've probably heard him say it a million times.  That's mostly
> because it's true.

Paul who?  (Sorry...mutters something about resisting temptation...)

> We lose relevance every time someone forks our code, or outright stops
> using our software alltogether.
> 
> It's also our achilles heel.  If you want to see ISC bring about some
> form of radical, controversial change, history has shown that credible
> threats of code forks will do it.
> 
> Threats, mind you.  Not acts.  It's not supposed to come to that.

"Inconceivable!"  "I do not think that word means what you think it means."

In the event that you are looking for a serious response and not humor, OK:

Some problem domains are sufficiently important or interesting that more than a
single solution appears.  This is less true when a really good reference
implementation exists, but even a perfect implementation may not suit all
preferences.

[ ...long snip; stuff I'll defer to Martin, Brooks, or others to reply to... ]
> I also haven't had any time to look within FreeBSD to see what this
> OpenBSD dhclient was all about.
> 
> So I also still don't even know what base features would get ISC
> back in the running for...I don't know...FreeBSD 7?

I can't speak for others, but beyond understanding Zeroconf mentioned above, it
would be nice if dhcpd would never get confused by it's own /var/db/dhcpd.leases
file.  I don't get useful diagnostics when this happens, but every once in a
blue moon dhcpd will no longer hand out leases until I delete the leases file
and restart it.

It would also be good if dhcpd would reassign the same IP to the same machine
(if the IP is not otherwise being used) if there was a prior lease matching the
client asking for a new lease, and not just when a client is trying to renew an
existing lease.

I assign static host entries for the machines I care about, which is a fine
workaround, but section 4.3.1 of RFC-2131 suggests that the same IP should be
reassigned when possible.

Please use snprintf() and not sprintf() whenever you're dealing with any data
which is not known to be static and compiled in; using sprintf() on data from
the network is simply unwise.  (Why yes, I happen to trust the security of the
OpenBSD code quite a bit more than the ISC code I've seen.  People writing code
which runs as root should take great pains to avoid code patterns which could
ever be exploitable.)

> Indeed, the schizm has grown so great that I recently installed over
> my FreeBSD-5 at-work-workstation with SUSE, so that I would have ready
> access to the tools and environment that my now -only- representative
> user base was most familiar with.
> 
> I used to keep Linux at home and FreeBSD at work so that FreeBSD was
> represented primarily, and Linux was at arm's reach when I had dire
> need for it.
> 
> Now I basically only work in Linux.
> 
> I think we still have a FreeBSD-5 box in the lab if I was feeling
> nostalgic, but at this point I basically have nothing to do with that
> platform, save build testing.

One of the differences between the Linux folks and the locals on most BSD forums
is a lack of platform-driven advocacy, although no doubt some people are
exceptions to that generalization.  If you've found a platform that suits you
well, by all means, enjoy it.

I try to make sure my code goes under FreeBSD, NetBSD, MacOSX/Darwin, Solaris,
Red Hat, and SuSE (not necessarily in that order), although I don't particularly
view it as writing code for those platforms so much as making sure I don't write
platform-specific code except when I really have to.

> So I guess you can imagine my surprise when I hear through the grapevine
> that folks on freebsd-stable are offering the advice of "install
> /usr/ports/isc-dhcp".
> 
> I thought we didn't cut the mustard enough to even talk to.

Whimsical humor is generally good.  Comments reflecting passive-aggressive
demands for attention are generally not.  YMMV.

> If anyone at the FreeBSD project is unhappy with this schizm, it is
> news to me.  If anyone would like to work with me to produce a, I
> shall term, "working implementation of DHCP" that's well suited to
> FreeBSD's needs, I would like to hear your thoughts on needs and
> requirements.

I'd be happy to give you some feedback about the DHCP software, although the
notion of doing things specificly for FreeBSD rather than for all the platforms
one cares about strikes me as a bit odd.

See above.

> Up until this, to me, unusual news, I had been planning the future
> without FreeBSD in the picture at all.
> 
> It's surprising to me to think that someone still uses our client
> software on that platform.

Surprises often happen when one chooses not to pay attention.

FWIW, most people using FreeBSD are using the ISC version of DHCP, simply
because that is what came with FreeBSD-4.x and 5.x, along with some people who
are using ISC DHCP under 6.0 as well.

Either you choose to subscribe to the BSD mailing lists, or review the bug
database for PR's every once in a while, or perhaps even act as the maintainer
of the ISC DHCP port, or you choose not to do so.

Take care,
-- 
-Chuck


More information about the freebsd-stable mailing list