Robbert Haarman



Ahoy is an efficient, decentralized service discovery protocol, designed for mobile ad-hoc networks (MANETs). Based on attenuated Bloom filters, it has a low impact on the network and allows services up to a configurable distance (measured in hops) to be discovered. The protocol is described in full detail in the report Ahoy: A Proximity-Based Discovery Protocol. The report and implementation where developed as part of my Master of Science work at the University of Twente.


A prototype implementation of the Ahoy protocol is available here:

It runs on Unix-like systems (GNU/Linux, BSD, Mac OS X) and requires a Ruby interpreter (version 1.8 or higher) to be installed. The implementation serves both as a proof of concept that shows implementation of the Ahoy protocol is feasible and as a platform for further experimentation. It may be used, modified, and distributed under the terms of the MIT license (a copy of which is included in the distribution).


Full installation instructions are provided in the file INSTALL in the distribution. However, in short, the steps are as follows:

  1. Make sure you have a Ruby interpreter (version 1.8 or compatible) installed.
  2. Download the distribution from the link above.
  3. Unpack the distribution. E.g., if the distribution file is ahoy-1.1.0.tar.gz, it can be unpacked using the command tar xzf ahoy-1.1.0.tar.gz. This will unpack the distribution to the directory ahoy-1.1.0.
  4. Enter the distribution directory (E.g., cd ahoy-1.0.0).
  5. Run ./configure to autodetect your Ruby interpreter and set up installation paths. The configure script optionally takes a number of parameters, which are described in the file INSTALL.
  6. Run make to build Ahoy. Either GNU Make or BSD make should work.
  7. Optionally, install Ahoy on your system using make install. Alternatively, you can run the provided commands from the current directory, without installing.
  8. To use the prototype, your computer needs a routable IPv6 address. The way to configure this depends on your operating system. On GNU/Linux, an IPv6 address can be added to a network interface by running ifconfig eth0 add fec0::1, where eth0 is the name of the network interface and fec0::1 is the IPv6 address to assign. The fec0 prefix indicates a site-local IPv6 address; these should be safe to use if you don't have an officially assigned IPv6 address.
  9. Ahoy also needs to know the IPv6 address to use. It reads this address (and other parameters; see the report for details) from a configuration file named ahoy.conf in the current directory. An example configuration file is provided as ahoy.conf.example in the distribution.


Usage instructions are contained in the file README in the distribution. In short:

  • Start the Ahoy daemon: ahoyd
    Be aware that the deamon generates a lot of debug output; you may want to run it on a separate terminal.
  • Announce a service: ahoy-announce test fec0::1 8000
  • Locate a service: ahoy-query test
    This will give you results that look like
    fec0:0:0:0:0:0:0:1 8000
  • Revoke the service announced earlier: ahoy-revoke test fec0::1 8000

Note: before you can use Ahoy, it must be built and configured (see Installation).


The report Ahoy: A Proximity-Based Discovery Protocol describes the design and implementation of Ahoy. It is available in two formats:


The final part of my Master's project was a presentation. The members of the graduation committee were present, of course, as were a host of family members, some friends, and a few other interested people. I received 9 out of 10 points for the whole project (a very high score), partly thanks to the presentation, which I have been told was very enjoyable both for the tech-savvy people and the not so tech-savvy people who were present.

The slides of the presentation are available below.

Valid XHTML 1.1! Valid CSS! Viewable with Any Browser