Notes basant-se en la configuració dels Linksys per accedir a la mesh de graciasensefils.net des d'un portàtil amb Debian (crec que Ubuntu serà pastat), si algú ho prova ja hem dirà que tal.
Amb això podríem aconseguir que gent sense comprar-se el hw d'un node (però tenint un gnu/linux amb wifi) pogués tenir un node de la mesh.
Provar si veiem algun node a la mesh:
# ifconfig ath0 up # iwlist ath0 scanning |grep mesh.guifi.net
Si ens retorna:
ESSID:"ch01.mesh.guifi.net"
Es que veiem algun node ja existent a la mesh.
1) Instal·lar OLSR (apt-get)
# apt-get install olsrd olsrd-plugins
2) Fitxer de configuració: Tallar i enganxar canviant els parametres PlParam “name” per el que volguem. Interface ath0 per la nostre interface.
# cat /etc/olsrd/olsrd.conf
DebugLevel 1
IpVersion 4
AllowNoInt yes
FIBMetric "approx"
Pollrate 0.025
TcRedundancy 2
NatThreshold 0.75
MprCoverage 7
LinkQualityFishEye 1
LinkQualityWinSize 100
LinkQualityDijkstraLimit 0 10.0
LoadPlugin "olsrd_nameservice.so.0.3"
{
PlParam "name" "trave42portatil"
PlParam "hosts-file" "/var/etc/hosts"
PlParam "suffix" ".olsr"
PlParam "interval" "180"
PlParam "timeout" "3600"
}
LoadPlugin "olsrd_txtinfo.so.0.1"
{
PlParam "Accept" "127.0.0.1"
}
LinkQualityLevel 2
UseHysteresis no
Interface "ath0"
{
HelloInterval 5.0
HelloValidityTime 125.0
TcInterval 2.0
TcValidityTime 500.0
MidInterval 25.0
MidValidityTime 500.0
HnaInterval 25.0
HnaValidityTime 500.0
}
3) Configurar l'interface Utilitzem l'interface de la nostre wifi.
# ifconfig ath0 up # iwconfig ath0 mode ad-hoc essid ch01.mesh.guifi.net # ifconfig ath0 10.139.242.XX netmask 255.255.255.0
4) Arrencar el dimoni olsrd Per provar que tot estigui funcionant ho farem:
# /usr/sbin/olsrd -f /etc/olsrd/olsrd.conf
Per veure si esta funcionant correctament, si tot va bé hauríem d'anar veient la “TOPOLOGY” de la xarxa. Si és així ja podem parar el proces i arrencar-lo al inici.
Modifiquem el fitxer /etc/default/olsrd descomentant la línia
START_OLSRD="YES"
Així ja ho podem arrencar amb:
# /etc/init.d/olsrd start
1) Descarregar i compilar les fonts. (Validar que hi ha els paquets per compilar-ho: apt-get install build-essential )
# wget -c http://downloads.open-mesh.net/batman/development/sources/batmand_0.3-beta-current_sources.tgz # tar -zxvf batmand_0.3-beta-current_sources.tgz # cd batmand_0.3-beta-rv1080_sources/ # make # strip batmand
2) Configurar l'interface
# iwconfig ath0 mode ad-hoc essid ch01.mesh.guifi.net # ifconfig ath0 up # ip addr flush dev ath0 label ath0:bat # ip addr add dev ath0 10.139.246.XX/22 broadcast 10.139.247.255 label ath0:bat
3) Arrencar el dimoni batmand
# ./batmand ath0:bat
Aquí el proces es molt semblant al anterior, l'únic que canvia son els paquet a compilar i uns canvis d'IPs.
1) Descarregar i compilar les fonts.
# wget -c http://downloads.open-mesh.net/batman/development/sources/batmand-exp_0.3-alpha-current_sources.tgz # tar -zxvf batmand-exp_0.3-alpha-current_sources.tgz # cd batmand-exp_0.3-alpha-rv1069_sources/ # make # strip batmand -o bmxd
2) Configurar l'interface
# iwconfig ath0 mode ad-hoc essid ch01.mesh.guifi.net # ifconfig ath0 up # ip addr flush dev ath0 label ath0:bmx # ip addr add dev ath0 10.139.250.XX/22 broadcast 10.139.251.255 label ath0:bmx
3) Arrencar el dimoni bmxd
# ./bmxd --netb --window-size 50 --one-way-tunnel 3 -o 500 -a 10.139.251.XX/30 -r 3 ath0:bmx