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.
55 PlParam "addhosts" "/path/to/file"
57 copy contents of this additional hosts file to output file.
58 this is practical if you alreay use your /etc/hosts file.
61 ---------------------------------------------------------------------
63 ---------------------------------------------------------------------
65 add in /etc/olsrd.conf:
67 LoadPlugin "olsrd_nameservice.so.0.2"
69 PlParam "name" "thisismyname.mesh"
73 ---------------------------------------------------------------------
74 USING THE NAME INFORMATION
75 ---------------------------------------------------------------------
77 to use the name information distributed by the plugin actually for
78 name resolution you can do one of the following.
82 * overwrite /etc/hosts
83 be sure you have nothing in /etc/hosts which you still need and
84 configure the plugin with PlParam "filename" "/etc/hosts"
86 * link /etc/hosts (only on unix variants)
87 ln -s /var/run/hosts_olsr /etc/hosts
90 if you want to make the names available via ordinary DNS
91 you can use dnsmasq to read the hosts file and serve it to
92 users. add the following to dnsmasq.conf and restart dnsmasq
93 addn-hosts=/var/run/hosts_olsr
97 * overwrite C:\WINDOWS\system32\drivers\etc\hosts
98 be sure you have nothing in the file which you still need
99 and configure the plugin with
100 PlParam "filename" "C:\WINDOWS\system32\drivers\etc\hosts"
103 ---------------------------------------------------------------------
105 ---------------------------------------------------------------------
107 * implement a small DNS server into the plugin?
108 * or make dynamic DNS updates for bind?
110 ---------------------------------------------------------------------