[Dnsmasq-discuss] Distributed lease database on a mesh, using batman-adv alfred

Gui Iribarren gui at altermundi.net
Sat Nov 2 20:30:41 GMT 2013

Hello once again Simon,
we are giving one more iteration to this Libre-Mesh[0] idea, this 
weekend at a HackMeeting[1] near Bilbao

i already described a bit of the "interesting" setup generated by the 
firmware in my last email.

To make the mesh as distributed / resilient as possible, there's a 
dnsmasq instance running on each node, with identical configuration 
(i.e. everyone serves the same range to its clients, since they are all 
part of a batadv link-local that enables them to roam around)
This scheme needs some kind of "lease propagation" between all 
instances: not only to avoid collisions in a robust way, but also to 
have cloud-wide hostname resolution (i.e. any dnsmasq will know 
hostname->ip of every client, independent of which dnsmasq gave the 
lease to the client)

Gioacchino did a small script[2] to be used as a --dhcp-script, that 
talks to alfred[3] (a batadv-related daemon that propagates arbitrary 
data over a link-local) and correctly populates dnsmasq lease database 
on startup (since leasefile-ro makes dnsmasq call the script with "init" 

it also accepts "add" actions and such, and instantly propagates leases 
to the rest of the nodes.

Problem is, there's no way to update dnsmasq internal database from 
outside (i.e. when alfred gets new info from another node); SIGHUP will 
not make dnsmasq call dhcp-script "init", only a full restart will do, 
and we'd rather not kill and respawn dnsmasq whenever a new lease is 
given in any part of the cloud :P

Simon, any chance of having dnsmasq call "init" on dhcp-script (or 
lua-hook, if it's simpler) when getting a SIGHUP (or another, dedicated 
signal, for that matter)?

I hope my description of why that'd be highly desirable was 
understandable :)

Hope you're having a nice weekend!


[0]: http://dev.libre-mesh.org/
[3]: http://www.open-mesh.org/projects/alfred

More information about the Dnsmasq-discuss mailing list