Mail archive

Re: [alpine-devel] Default DHCP server on Alpine Linux v3.3

From: Isaac Dunham <>
Date: Sat, 21 Nov 2015 19:46:16 -0800

On Sat, Nov 21, 2015 at 01:56:35PM +0100, Christie Taylor wrote:
> ISC DHCP is maintained by a team that focuses on DHCP and has been tested over and over on giant networks and is pretty solid.
> BusyBox DHCP (udhcp) is just another BusyBox tool that shouldn't be (in
> my opinion) coupled with BusyBox. It looks like they try to do everything
> on what should be just the coreutilities. Bite off more than can chew.

Booting a system takes more than coreutils.
It takes init, a shell, coreutils, linux-utils, some networking programs...

> What do you think about ISC DHCP? Maybe that v3.3 is coming soon, this could be another great change to come with it.

ISC dhcp is probably some of the most reliable code from ISC, but that
isn't saying much.
I always found dhclient to hang shutdown on my Debian Squeeze laptop, due
to it persistently trying to release the lease after the wireless
interface went down (and retrying repeatedly...).

> I think the more Alpine distances from BusyBox the better. A single
> binary doing all these things, from coreutilities to device manager
> and dhcp server?! Crazy. Programs should be separate. For coreutilities
> I recommend sbase and for the dhcp server, I think ISC DHCP is the best
> out there.

Try morpheus, then.
Other than using the suckless dhcp client, it sounds more like what you

It seems you fundamentally reject the concept of Busybox.
Alpine was built around exploiting it.

But if you're actually curious about what the justification for a
multi-call binary like Busybox is, here are some.
- shared code:
Almost every program out there has a standard routine for parsing arguments.
A lot of programs need to read files and convert them into numbers.
A lot of programs need to write a buffer in full.
There are pretty standard formats for writing errors...
In summary, the bulk of most small *nix programs have a pattern that
could be factored out into shared code.
- total binary size:
Code can be shared a lot of ways, including static and shared libraries
as well as multicall binaries.
Static libraries and compile-time tricks with #include only share it at
the source level.
If you use shared libraries, they share the same implementation.
But every binary that you have has a standard ELF header, taking up a bit
of space.
You can only avoid this by sharing the header, which requires a single
(Shared libraries have their own headers, so using them is sharing code
at the expense of increasing the number of headers.)
- simple, atomic upgrades:
Frequently, one program will rely on a specific version of another.
With Busybox, you can just drop one new binary in, and you don't
need to worry about whether (for example) your new ifup requires a newer
version of ip, or if it uses ifconfig...
And if the new binary is properly copied, you don't need to
worry about what happens when an upgrade gets interrupted by a reboot.
- easily portable binary:
Besides not depending on external programs that might not be on every
system, it's easier to just copy a single binary over.

Now, I will say that Busybox does have some tools that perhaps shouldn't
be there.
For example:
-pscan: you don't need a port scanner for most uses
-dnsd: while a DNS server can be useful for small network devices that
often use Busybox, this one is essentially useless without dnsmasq or
similar tools, which make it redundant.
-fbsplash: a timed PPM display on a framebuffer doesn't need to happen
in Busybox; you'll need another file anyhow, and PPM more than makes up
for any savings in space...


Received on Sat Nov 21 2015 - 19:46:16 UTC