ALFRED(8) | Almighty Lightweight Fact Remote Exchange Daemon | ALFRED(8) |
alfred - Almighty Lightweight Fact Remote Exchange Daemon
alfred [options]
alfred is a user space daemon for distributing arbitrary local information over the mesh/network in a decentralized fashion. This data can be anything which appears to be useful - originally designed to replace the batman-adv visualization (vis), you may distribute hostnames, phone books, administration information, DNS information, the local weather forecast ...
alfred runs as daemon in the background of the system. A user may insert information by using the alfred binary on the command line, or use special programs to communicate with alfred (done via unix sockets). alfred then takes care of distributing the local information to other alfred servers on other nodes. This is done via IPv6 link-local multicast, and does not require any configuration. A user can request data from alfred, and will receive the information available from all alfred servers in the network.
Note that 0 - 63 are reserved (please send an e-mail to the authors if you want to register a datatype), and can not be used on the commandline. Information must be periodically written again to alfred, otherwise it will timeout and alfred will forget about it (after 10 minutes).
Skipping the parameter entirely has the same effect as setting the parameter to 0 ('-V 0').
primary
Switch daemon to mode primary secondary
Switch daemon to mode secondary
The interface option -i is optional. If interface 'none' is specified, the alfred daemon will not communicate with other alfred instances on the network unless the interface list is modified at runtime via the unix socket. The -b option is optional, and only needed if you run alfred on a batman-adv interface not called bat0, or if you don't use batman-adv at all (use '-b none'). In this case, alfred will still work but will not be able to find the best next primary server based on metrics.
alfred servers may either run as primary or secondary in the network. Primaries will announce their status via broadcast, so that secondaries can find them. Secondaries will then send their data to their nearest primary (based on TQ). Primaries will exchange their data (which they have received from secondaries or got on their own) with other primaries. By using primaries and secondaries, overhead can be reduced while still keeping redundancy (by having multiple primaries). Obviously, at least one primary must be present in the network to let any data exchange happen. Also having all nodes in primary mode is possible (for maximum decentrality and overhead).
Start an alfred server listening on bridge br0 (assuming that this
bridge includes the batman interface bat0):
alfred -i br0 -m
Send data to the alfred server and store it under id 65:
cat /etc/hostname | alfred -s 65
Retrieve all data stored as id 65 from all connected alfred
servers:
alfred -r 65
{ "fe:f1:00:00:01:01", "OpenWRT-node-1\x0a" },
{ "fe:f1:00:00:02:01", "OpenWRT-node-2\x0a" },
{ "fe:f1:00:00:03:01", "OpenWRT-node-3\x0a" },
alfred was written by Simon Wunderlich <sw@simonwunderlich.de> and Sven Eckelmann <sven@open-mesh.com>.
This manual page was written by Simon Wunderlich <sw@simonwunderlich.de> and Sven Eckelmann <sven@open-mesh.com>.
September 21, 2013 | Linux |