History of dhcpcd

dhcpcd first started life at phystech where it was written by Yoichi Hariguchi and Sergei Viznyuk. It was used in most Linux distributions as the primary DHCP client. I took over maintenance of dhcpcd in Gentoo Linux in 2004. By this time, dhcpcd had an ever growing patchset and I contacted Simon Kelly, the Debian maintainer of dhcpcd and asked if he had any luck contacting upstream about merging the combined patches. To this date we had no reply from them.

So, in mid 2005, dhcpcd-2 was born out of a massive patchset which added many new features. Then it slowly languished, just getting small patches here and there.

Fast forward to late 2006 and I discover FreeBSD. Well, porting Gentoo to it. As the maintainer for Gentoo baselayout (system startup scripts) I was asked to help with the porting effort, which I did. And I liked what I saw, FreeBSD was good. However, dhcpcd was obviously Linux only and the only other DHCP client on FreeBSD was dhclient by ISC. Now, dhclient is probably the most flexible DHCP client you’ll find, but that’s not without a price. To cut to the chase, I find dhclient bloated and too complex to use mostly. It’s also a memory hog and at times, slow. dhcpcd was none of these, but Linux only. Also, the patchset we had previously added made the code for it look quite unsightly and a maintenance nightmare.

I then took the big decision to re-write dhcpcd from the ground up, and at the end of November 2006, dhcpcd-3 was released to the world. The code base is a lot smaller, DHCP protocol management is now in easy to manage chunks that make sense and the interface/routing code now uses netlink on Linux.

August 2008 sees the first release of dhcpcd-4. The new version moves all configuration to /libexec/dhcpcd-run-hooks, apart from interface address and routing. We also use the same variables as dhclient which means existing custom scripts for dhclient can readily work with dhcpcd with minimal tweaking. Also, the dhcpcd internals have been re-worked around a table setup to extract options directly from the DHCP message instead of populating a custom object and dealing with that. Finally, NetworkManager-0.7.0 works with dhcpcd-4 when built with --with-dhcp-client=dhcpcd. NetBSD-current (4.99.72) imports dhcpcd-4.0.0-rc4 into their base system :)

September 2008 sees the first experimental release of dhcpcd-5 (4.99.1). This version moves to registering function callbacks to fire off fd ready or time reached. This enables us to handle >1 interface, which in turn allows us to prefer one interface over another and manage the routing table sanely. We also attempt to reboot the last lease the interface obtained instead of just discovering from the start.

December 2011 sees an implementation of RFC6106 in dhcpcd-5.5 which allows the receiving of RDNSS and DNSSL options inside an IPv6 Router Advertisement message. dhcpcd also transmits a Router Solicitation, removing the need for rtsold on BSD systems. July 2012 sees an implemenation of RFC4861 which allows dhcpcd to control addresses and routes from IPv6 Router Advertisments.

November 2012 sees an implemenation of the DHCPv6 in RFC 3315 in dhcpcd-5.99.2.

February 2013 sees dhcpcd split into a main controller and 100% separate stacks for DHCPv4, DHCPv6, IPv6RS and IPv6NS. It is now possible to compile dhcpcd just for INET or INET6.

April 2013 sees dhcpcd gain Prefix Delegation support

May 2013 sees dhcpcd gain TimeZone support