Babel

Shncpd

Shncpd is an implementation of a large subset of the Homenet protocol stack with minimal dependencies. It is useful for running Homenet on a stock Linux system; on OpenWRT, you will probably be better served by hnetd (see also this tutorial).

Shncpd implements the following protocols:

Shncpd source code.

Examples

Set up a Homenet router with internal interfaces eth0 and wlan0:

babeld -C 'redistribute local deny' -C 'redistribute proto 43 allow' eth0 wlan0
shncpd eth0 wlan0

Set up a Homenet border router with internal interface wlan0 and external interface eth0:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
babeld -C 'redistribute local deny' -C 'redistribute proto 43 allow' wlan0
shncpd -E 2001:db8:42::/48 -E 10.0.0.0/8 -N 8.8.8.8 wlan0

Note that in this last example babeld is only running on the wlan0 interface, since eth0 is external.

Set up a mesh node, redistribute all local addresses into the routing protocol, and set up the DNS resolver:

babeld -C 'redistribute proto 43 allow' wlan0
shncpd -s ./shncpd-script.sh -M wlan0

Set up a mesh node on wlan0 and an access point on wlan1:

babeld -C 'redistribute proto 43 allow' wlan0
shncpd -s ./shncpd-script.sh -M wlan0 -L wlan1

Known limitations

Shncpd has been verified to interoperate with hnetd. While it will behave reasonably in most networks, it does not yet implement all of the (somewhat baroque) requirements of the HNCP and DNCP drafts:

Shncpd currently lacks some useful features that are either optional or not in the spec:

Finally, shncpd lacks some optional features that either I don't understand or don't think are useful, or are too difficult to implement without adding dependencies: