--------------------------------------------------------------------- NAMESERVICE PLUGIN FOR OLSRD by Bruno Randolf --------------------------------------------------------------------- a simple DNS replacement for OLSR networks this plugin distributes host name information over OLSR and writes a file in /etc/hosts format. this file can be used to resolve hostnames on the local system and/or be read by a DNS server like "dnsmasq", to make the names available via ordinary DNS to other clients as well. the default location of the hosts file is "/var/run/hosts_olsr" on unixes "C:\WINDOWS\hosts_olsr" on windows --------------------------------------------------------------------- PLUGIN PARAMETERS (PlParam) --------------------------------------------------------------------- PlParam "name" "my-name.mesh" the name of this OLSR node (main address). can be specified multiple times PlParam "IP.ADDR" "another-name.mesh" a name for a specified IP address. the IP address has to be either from one of the olsr interfaces or within a HNA network we announce. can be specified multiple times PlParam "filename" "/name/of/hosts_file" which file to write to. (default: /var/run/hosts_olsr) PlParam "interval" "SEC" interval for sending NAME messages in seconds. (default: 120 - 2 minutes) PlParam "timeout" "SEC" validity time for received NAME messages. (default: 3600 - 1 hour) PlParam "suffix" ".olsr" local suffix which is appended to all received names (default: "") --------------------------------------------------------------------- SAMPLE CONFIG --------------------------------------------------------------------- add in /etc/olsrd.conf: LoadPlugin "olsrd_nameservice.so.0.2" { PlParam "name" "thisismyname.mesh" } --------------------------------------------------------------------- USING THE NAME INFORMATION --------------------------------------------------------------------- to use the name information distributed by the plugin actually for name resolution you can do one of the following. UNIX VARIANTS: * overwrite /etc/hosts be sure you have nothing in /etc/hosts which you still need and configure the plugin with PlParam "filename" "/etc/hosts" * link /etc/hosts (only on unix variants) ln -s /var/run/hosts_olsr /etc/hosts * use dnsmasq if you want to make the names available via ordinary DNS you can use dnsmasq to read the hosts file and serve it to users. add the following to dnsmasq.conf and restart dnsmasq addn-hosts=/var/run/hosts_olsr WINDOWS: * overwrite C:\WINDOWS\system32\drivers\etc\hosts be sure you have nothing in the file which you still need and configure the plugin with PlParam "filename" "C:\WINDOWS\system32\drivers\etc\hosts" --------------------------------------------------------------------- TODO --------------------------------------------------------------------- * implement a small DNS server into the plugin? * or make dynamic DNS updates for bind? --------------------------------------------------------------------- EOF / 03.03.2005