[Berlin-wireless] Dienste-Liste

Jens Nachtigall nachtigall
Mo Mai 21 16:09:53 CEST 2007


> Im Readme steht nix, weil das Dienste-Zeug ist ein Hack von jensn. Und der
> hat damals nichts weiter aufgeschrieben.

Na, das stimmt nicht. Ich habe die änderungen in der README von dem 
nameservice plugin dokumentiert. Ich habe die DAtei hier nochmal 
drangehangen... (in der Datei mal nach "service" suchen)

Das mit dem hack stimmt natürlich schon ;-)

gruß,
jens
-------------- nächster Teil --------------
---------------------------------------------------------------------
NAMESERVICE PLUGIN FOR OLSRD
by Bruno Randolf <bruno.randolf at 4g-systems.biz>
---------------------------------------------------------------------

a simple DNS replacement and service announcement for OLSR networks

this plugin distributes host name (DNS) information over OLSR. every 
node which runs the olsr daemon can announce it's own name, names for
other IP adresses it is associated with (HNAs) and if it is running
a "real" nameserver which can resolve other (internet) names (upstream 
dns server). Also, it can announce services for itself or its associated
HNA nodes.

the nodes in the network collect this information and write the host 
names to a file (possibly /etc/hosts), and the 3 nearest upstream 
nameservers to another file (possibly /etc/resolv.conf). The services
are written to another file (by default /var/run/services) in a
well-known format, so that it cat be parsed by another (shell) program
to e.g. render it as a html file. 

The dns files 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 the ordinary DNS protocol 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 for different names.

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 "hosts-file" "/path/to/hosts_file"
	which file to write to (usually /etc/hosts).
	(default: /var/run/hosts_olsr)

PlParam "suffix" ".olsr"
	local suffix which is appended to all received names.
	(default: "")

PlParam "add-hosts" "/path/to/file"
	copy contents of this additional hosts file to output file.
	this is practical if you alreay use your /etc/hosts file.

PlParam "dns-server" "IP.ADDR"
	anounce that this IP has a full (upstream) DNS server. if 
	IP.ADDR is not specified (""), the main address is used.
	nodes which don't know a nameserver will automatically use
	this nameserver.

PlParam "resolv-file" "/path/to/resolv.conf"
	path to resolv.conf file (usually /etc/resolv.conf)
	if set, the 3 nearest (best ETX) upstream nameservers annonced 
	by other nodes in the network are written to this file

PlParam "interval" "SEC"
	interval for sending NAME messages in seconds.
	(default: 120 - 2 minutes)

PlParam "timeout" "SEC"
	validity time for received NAME messages in seconds.
	(default: 3600 - 1 hour)

PlParam "services-file" "/path/to/services"
	path to file (default /var/run/services), to which the services of
    the mesh are written in the well-known services format

PlParam "service" "protocol://host.mesh:port|tcp_OR_udp|short description"
    a service string e.g. "http://myhost.mesh:80|tcp|thats my webspace"
	can be specified multiple times for different services. The service
    must belong to us, that is must me our ip or host or by one of our
    HNA announcements

---------------------------------------------------------------------
SAMPLE CONFIG
---------------------------------------------------------------------

add in /etc/olsrd.conf:

LoadPlugin "olsrd_nameservice.so.0.2"
{
	PlParam "name" "thisismyname"
	PlParam "hosts-file" "/etc/hosts"
	PlParam "resolv-file" "/etc/resolv.conf"
    PlParam "service" "irc://me.olsr:6667|tcp|my irc server"

}


---------------------------------------------------------------------
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 "host-file" "/etc/hosts"

* link /etc/hosts
	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 "addn-hosts=/var/run/hosts_olsr" to dnsmasq.conf 
	and restart dnsmasq

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 / 20.04.2005



Mehr Informationen über die Mailingliste Berlin