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 for different names.
29 PlParam "IP.ADDR" "another-name.mesh"
31 a name for a specified IP address.
32 the IP address has to be either from one of the olsr
33 interfaces or within a HNA network we announce.
34 can be specified multiple times.
37 PlParam "hosts-file" "/path/to/hosts_file"
39 which file to write to (usually /etc/hosts).
40 (default: /var/run/hosts_olsr)
43 PlParam "interval" "SEC"
45 interval for sending NAME messages in seconds.
46 (default: 120 - 2 minutes)
49 PlParam "timeout" "SEC"
51 validity time for received NAME messages in seconds.
52 (default: 3600 - 1 hour)
55 PlParam "suffix" ".olsr"
57 local suffix which is appended to all received names.
61 PlParam "add-hosts" "/path/to/file"
63 copy contents of this additional hosts file to output file.
64 this is practical if you alreay use your /etc/hosts file.
67 PlParam "dns-server" "IP.ADDR"
68 anounce that this IP has a full (upstream) DNS server. if
69 IP.ADDR is not specified (""), the main address is used.
70 nodes which don't know a nameserver will automatically use
74 PlParam "resolv-file" "/path/to/resolv.conf"
75 path to resolv.conf file (usually /etc/resolv.conf)
76 if set, an the upstream nameserver annonced by another node
77 in the network is written to this file
80 ---------------------------------------------------------------------
82 ---------------------------------------------------------------------
84 add in /etc/olsrd.conf:
86 LoadPlugin "olsrd_nameservice.so.0.2"
88 PlParam "name" "thisismyname.mesh"
89 PlParam "hosts-file" "/etc/hosts"
90 PlParam "resolv-file" "/etc/resolv.conf"
94 ---------------------------------------------------------------------
95 USING THE NAME INFORMATION
96 ---------------------------------------------------------------------
98 to use the name information distributed by the plugin actually for
99 name resolution you can do one of the following.
103 * overwrite /etc/hosts
104 be sure you have nothing in /etc/hosts which you still need and
105 configure the plugin with PlParam "filename" "/etc/hosts"
107 * link /etc/hosts (only on unix variants)
108 ln -s /var/run/hosts_olsr /etc/hosts
111 if you want to make the names available via ordinary DNS
112 you can use dnsmasq to read the hosts file and serve it to
113 users. add the following to dnsmasq.conf and restart dnsmasq
114 addn-hosts=/var/run/hosts_olsr
118 * overwrite C:\WINDOWS\system32\drivers\etc\hosts
119 be sure you have nothing in the file which you still need
120 and configure the plugin with
121 PlParam "filename" "C:\WINDOWS\system32\drivers\etc\hosts"
124 ---------------------------------------------------------------------
126 ---------------------------------------------------------------------
128 * implement a small DNS server into the plugin?
129 * or make dynamic DNS updates for bind?
131 ---------------------------------------------------------------------