Wireless mesh network: Unterschied zwischen den Versionen
Vater (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
Vater (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
= Mesh-Geräte im HQ | = [[w:de:B.A.T.M.A.N.|B.A.T.M.A.N.]] = | ||
; Mesh-Geräte im HQ | |||
Wir haben ein gemeinsames Ethernet in dem alle Geräte sind. Das bildet eine sogenannte Broadcast-Domäne, weshalb sich alle User und Server direkt finden können, bspw. durch Broadcast. | Wir haben ein gemeinsames Ethernet in dem alle Geräte sind. Das bildet eine sogenannte Broadcast-Domäne, weshalb sich alle User und Server direkt finden können, bspw. durch Broadcast. | ||
Zeile 7: | Zeile 9: | ||
Hardware ist Konkret WR841-nd V8.[1-2]{1} | Hardware ist Konkret WR841-nd V8.[1-2]{1} | ||
== OpenWRT bauen == | == [[OpenWRT]] bauen == | ||
OpenWRT kommt by default nicht mit batman-adv. Also folge den [ | [[w:de:OpenWRT | OpenWRT]] kommt by default nicht mit [https://www.open-mesh.org/projects/batman-adv batman-adv] (B.A.T.M.A.N.). Also folge den [https://wiki.openwrt.org/doc/howto/build Vorbereitungsanweisungen]. Du musst auch Package-Feeds installieren. | ||
Wähle Zielplattform, lade Default-Configs: | Wähle Zielplattform, lade Default-Configs: | ||
< | : <source lang=bash>make menuconfig</source> | ||
make defconfig | : <source lang=bash>make defconfig</source> | ||
make menuconfig</ | : <source lang=bash>make menuconfig</source> | ||
Nun konfiguriere folgende Pakete (''Y'' damit sie fest im Image sind): | Nun konfiguriere folgende Pakete (''Y'' damit sie fest im Image sind): | ||
Zeile 21: | Zeile 23: | ||
Bauen je nach Kernzahl: | Bauen je nach Kernzahl: | ||
< | <source lang=bash>make -j5 V=s</source>. | ||
Nun gibts die Images bspw. unter ''bin/ar71xx/''. Übertrage das richtige mit ''-sysupgrade.bin'' nach /tmp auf dem Zielgerät und flashe es mit | Nun gibts die Images bspw. unter ''bin/ar71xx/''. Übertrage das richtige mit ''-sysupgrade.bin'' nach /tmp auf dem Zielgerät und flashe es mit <source lang=bash>sysupgrade</source>. | ||
== Konfiguration == | == Konfiguration == | ||
Zeile 37: | Zeile 39: | ||
=== /etc/config/wireless === | === /etc/config/wireless === | ||
<pre>config wifi-device radio0 | <pre> | ||
config wifi-device radio0 | |||
option type mac80211 | option type mac80211 | ||
option channel 11 | option channel 11 | ||
Zeile 66: | Zeile 69: | ||
=== /etc/config/network === | === /etc/config/network === | ||
<pre># Das ist das Adhoc-Interface direkt (wlan0, aus dem zweiten wifi-iface oben) | <pre> | ||
# Das ist das Adhoc-Interface direkt (wlan0, aus dem zweiten wifi-iface oben) | |||
# Pakete von lan aus bat0 bekommen noch etwas Overhead. | # Pakete von lan aus bat0 bekommen noch etwas Overhead. | ||
config interface 'mesh' | config interface 'mesh' | ||
Zeile 87: | Zeile 91: | ||
Installiere opkg-Pakete ''libnetsnmp'' und ''snmpd''. Mache startbar mit: | Installiere opkg-Pakete ''libnetsnmp'' und ''snmpd''. Mache startbar mit: | ||
< | : <source lang=bash>cd /etc/rc.d</source> | ||
ln -s ../init.d/snmpd S99snmpd</ | : <source lang=bash>ln -s ../init.d/snmpd S99snmpd</source> | ||
=== /etc/config/snmpd === | === /etc/config/snmpd === | ||
<pre>config exec | <pre> | ||
config exec | |||
option name wlan0-stations | option name wlan0-stations | ||
option prog /bin/sh | option prog /bin/sh | ||
option args '-c "exit `iw dev wlan0-1 station dump|egrep -e ^Station\ |wc -l`"'</pre> | option args '-c "exit `iw dev wlan0-1 station dump|egrep -e ^Station\ |wc -l`"' | ||
</pre> | |||
=== Eintragen in Poller === | === Eintragen in Poller === | ||
Zeile 101: | Zeile 107: | ||
https://github.com/astro/spacemsg/tree/master/spaceapi | https://github.com/astro/spacemsg/tree/master/spaceapi | ||
[[category: | == Siehe auch == | ||
[[category: | |||
* [[w:de:wireless mesh network]] | |||
== Weblinks == | |||
* [https://www.open-mesh.org/ Open Mesh] | |||
[[category:Netzwerk]] | |||
[[category:Projekt]] | |||
[[category:HQ]] |
Aktuelle Version vom 25. Dezember 2014, 18:25 Uhr
B.A.T.M.A.N.
- Mesh-Geräte im HQ
Wir haben ein gemeinsames Ethernet in dem alle Geräte sind. Das bildet eine sogenannte Broadcast-Domäne, weshalb sich alle User und Server direkt finden können, bspw. durch Broadcast.
Für Mesh-Experimente wird mit Batman-adv genau jenes Layer2 zusammenbridged. In der Praxis bedeutet das dass die Mesh-Geräte bei Trennung vom restlichen Kabelethernet weiterhin Routing unser Netz finden. Achtung: die Wireless-Bandbreite halbiert sich für Traffic über diese.
Hardware ist Konkret WR841-nd V8.[1-2]{1}
OpenWRT bauen
OpenWRT kommt by default nicht mit batman-adv (B.A.T.M.A.N.). Also folge den Vorbereitungsanweisungen. Du musst auch Package-Feeds installieren.
Wähle Zielplattform, lade Default-Configs:
make menuconfig
make defconfig
make menuconfig
Nun konfiguriere folgende Pakete (Y damit sie fest im Image sind):
- kmov-batman-adv, batctl
- ip-full, tcpdump
Bauen je nach Kernzahl:
make -j5 V=s
. Nun gibts die Images bspw. unter bin/ar71xx/. Übertrage das richtige mit -sysupgrade.bin nach /tmp auf dem Zielgerät und flashe es mit
sysupgrade
.
Konfiguration
/etc/config/batman-adv
config 'mesh' 'bat0' # Denn es wird von mehreren Geräten mit einem Ethernet zusammenbridged option 'bridge_loop_avoidance' 'enabled' # Sonst kein IPv6, http://www.open-mesh.org/projects/batman-adv/wiki/DistributedARPTable-technical option 'distributed_arp_table' 'disabled'
/etc/config/wireless
config wifi-device radio0 option type mac80211 option channel 11 option hwmode 11g option htmode HT20 # Geblubber von `wifi detect`: option path 'platform/ar934x_wmac' # Offener AP config wifi-iface option device radio0 option network lan option mode ap option ssid C3D2.meshed option encryption none # Adhoc-Interface config wifi-iface option device radio0 option ifname mesh0 option network mesh option mode adhoc option ssid batman-adv option bssid '02:CA:FE:CA:CA:40' option mcast_rate 18000 option encryption none
/etc/config/network
# Das ist das Adhoc-Interface direkt (wlan0, aus dem zweiten wifi-iface oben) # Pakete von lan aus bat0 bekommen noch etwas Overhead. config interface 'mesh' option mtu 1532 option proto batadv option mesh bat0 # Ethernet-Ports (eth1) und das AP-Interface (wlan0-1, aus dem ersten wifi-iface) werden mit bat0 zusammenbridged config interface 'lan' option ifname 'eth1 bat0' option force_link '1' option type 'bridge' option proto 'static' # Schau ins [[DNS]] option ipaddr '172.22.99.18' option netmask '255.255.255.0' option gateway '172.22.99.4'
SpaceAPI-Integration
Installiere opkg-Pakete libnetsnmp und snmpd. Mache startbar mit:
cd /etc/rc.d
ln -s ../init.d/snmpd S99snmpd
/etc/config/snmpd
config exec option name wlan0-stations option prog /bin/sh option args '-c "exit `iw dev wlan0-1 station dump|egrep -e ^Station\ |wc -l`"'
Eintragen in Poller
https://github.com/astro/spacemsg/tree/master/spaceapi