Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Ad-Hoc Configuration Protocol daemon

Octocat-spinner-32 .gitattributes Add .gitattributes. August 05, 2011
Octocat-spinner-32 .gitignore Add gitignore file. July 30, 2011
Octocat-spinner-32 CHANGES Update CHANGES for 0.53. December 08, 2011
Octocat-spinner-32 LICENCE Initial import of ahcpd-0.50. August 11, 2009
Octocat-spinner-32 Makefile Rename babel to babeld in man page February 23, 2010
Octocat-spinner-32 README Include compilation instructions for BSD. March 16, 2013
Octocat-spinner-32 ahcp-config.sh ahcp-config.sh: circumvent a bug in MacOS X 10.6 (Snow Leopard). July 11, 2013
Octocat-spinner-32 ahcpd.c Fix memory leak in error-handling path when attempting to renew a lease. December 28, 2011
Octocat-spinner-32 ahcpd.h More date changes. January 17, 2010
Octocat-spinner-32 ahcpd.man Rename babel to babeld in man page February 23, 2010
Octocat-spinner-32 config.c Fix error handling in getword at end of file. March 15, 2013
Octocat-spinner-32 config.h Implement server configuration file. January 17, 2010
Octocat-spinner-32 configure.c Protect against (unlikely) buffer overflow in run_script. January 08, 2014
Octocat-spinner-32 configure.h Keep track of which options were marked mandatory. January 17, 2010
Octocat-spinner-32 lease.c Swap headers to prevent warnings during compilation November 03, 2010
Octocat-spinner-32 lease.h Initial import of ahcpd-0.50. August 11, 2009
Octocat-spinner-32 monotonic.c Initial import of ahcpd-0.50. August 11, 2009
Octocat-spinner-32 monotonic.h Initial import of ahcpd-0.50. August 11, 2009
Octocat-spinner-32 prefix.c Clean up raw_prefix_list. January 08, 2014
Octocat-spinner-32 prefix.h Tweak copyright dates. January 17, 2010
Octocat-spinner-32 protocol.h Initial import of ahcpd-0.50. August 11, 2009
Octocat-spinner-32 transport.c Swap headers to prevent warnings during compilation November 03, 2010
Octocat-spinner-32 transport.h Initial import of ahcpd-0.50. August 11, 2009
README
Ahcpd
=====

Ahcpd is a daemon for configuring an IPv6 network using the Ad-Hoc
Configuration Protocol (AHCP).  AHCP is designed for wireless mesh
networks, where DHCP and IPv6 autoconfiguration do not work, but could in
principle also be used on wired networks.


Installation
============

    $ make
    # make install

If compiling for BSD, you probably don't need to link with -lrt:

    $ make LDLIBS=''

If compiling for OpenWRT, you will probably want to say something like

    $ make CC=mipsel-linux-gcc PLATFORM_DEFINES='-march=mips32'

You can reduce the size of the ahcpd binary by omitting server
functionality; to do so, specify

    $ make EXTRA_DEFINES=-DNO_SERVER


Setting up a server
===================

You need to set up one or more authoritative servers in your network.  The
server should be run as

    $ ahcpd -c /etc/ahcpd.conf wlan0

where the configuration file /etc/ahcpd.conf should say something like

    mode server

    prefix fde6:20f5:c9ac:358::/64
    prefix 192.168.4.128/25
    lease-dir /var/lib/leases
    name-server fde6:20f5:c9ac:358::1
    name-server 192.168.4.1
    ntp-server 192.168.4.2

If you want ahcpd to fork into the background, pass it the ``-D'' flag.
The server does not need to run ahcpd as root, as long as it can write the
lease database and the pidfile.

The server should synchronise its clock using NTP.  If ahcpd doesn't detect
time synchronisation, it will only give out leases for short periods of
time, and will be extremely conservative about releasing them.  Note that
ahcpd actually checks with the kernel for time synchronisation, so most
SNTP clients will not do; you will most probably need Mills' implementation
of NTP.

For redundancy, you may set up multiple servers in a single network as long
as they serve disjoint IPv4 address ranges.


Setting up a client
===================

Unlike the server, the client needs to run ahcpd as root.  No configuration
file is needed, just run

    # ahcpd wlan0

and you should get IPv4 and IPv6 addresses in a few seconds.


--Juliusz Chroboczek
Something went wrong with that request. Please try again.