1 ---------------------------------------------------------------------
2 NAMESERVICE PLUGIN FOR OLSRD
3 by Bruno Randolf <bruno.randolf@4g-systems.biz>
4 ---------------------------------------------------------------------
6 a simple DNS replacement for OLSR networks
8 this plugin distributes host name information over OLSR
9 and writes a file in /etc/hosts format. this file can be
10 used to resolve hostnames on the local system and/or be
11 read by a DNS server like "dnsmasq", to make the names
12 available via ordinary DNS to other clients as well.
14 the default location of the hosts file is
15 "/var/run/hosts_olsr" on unixes
16 "C:\WINDOWS\hosts_olsr" on windows
19 ---------------------------------------------------------------------
20 PLUGIN PARAMETERS (PlParam)
21 ---------------------------------------------------------------------
23 PlParam "name" "my-name.mesh"
25 the name of this OLSR node (main address).
26 can be specified multiple times
28 PlParam "IP.ADDR" "another-name.mesh"
30 a name for a specified IP address.
31 the IP address has to be either from one of the olsr
32 interfaces or within a HNA network we announce.
33 can be specified multiple times
35 PlParam "filename" "/name/of/hosts_file"
37 which file to write to.
38 (default: /var/run/hosts_olsr)
40 PlParam "interval" "SEC"
42 interval for sending NAME messages in seconds.
43 (default: 120 - 2 minutes)
45 PlParam "timeout" "SEC"
47 validity time for received NAME messages.
48 (default: 3600 - 1 hour)
50 PlParam "suffix" ".olsr"
52 local suffix which is appended to all received names
56 ---------------------------------------------------------------------
58 ---------------------------------------------------------------------
60 add in /etc/olsrd.conf:
62 LoadPlugin "olsrd_nameservice.so.0.2"
64 PlParam "name" "thisismyname.mesh"
68 ---------------------------------------------------------------------
69 USING THE NAME INFORMATION
70 ---------------------------------------------------------------------
72 to use the name information distributed by the plugin actually for
73 name resolution you can do one of the following.
77 * overwrite /etc/hosts
78 be sure you have nothing in /etc/hosts which you still need and
79 configure the plugin with PlParam "filename" "/etc/hosts"
81 * link /etc/hosts (only on unix variants)
82 ln -s /var/run/hosts_olsr /etc/hosts
85 if you want to make the names available via ordinary DNS
86 you can use dnsmasq to read the hosts file and serve it to
87 users. add the following to dnsmasq.conf and restart dnsmasq
88 addn-hosts=/var/run/hosts_olsr
92 * overwrite C:\WINDOWS\system32\etc\hosts
93 [windows users, please verify that this is the right path]
94 be sure you have nothing in the file which you still need
95 and configure the plugin with
96 PlParam "filename" "C:\WINDOWS\system32\etc\hosts"
99 ---------------------------------------------------------------------
101 ---------------------------------------------------------------------
103 * implement a small DNS server into the plugin?
104 * or make dynamic DNS updates for bind?
106 ---------------------------------------------------------------------