Scooreggione !
Questo firmware è basato su piccole modifiche a OpenWRT Attitude Adjustment I sorgenti qui: https://github.com/zioproto/attitude_adjustment/tree/AA-zioproto
Indice
Aggiornare da un precedente AirOS o Sburratone
0) Entrare in SSH sul device
1) Fai un backup di tutte le tue config in /etc/persistent magari ti serve per il futuro
2) Mettersi nella cartella tmp
cd /tmp/
3) Scaricare il firmware con il comando wget
wget http://URLFIRMWARE -O /tmp/fwupdate.bin
dove URL FIRMWARE è una di queste a seconda del device che devi flashare: http://stud.netgroup.uniroma2.it/~saverio/scooreggione-AA-v2/
4) Controllare l'MD5 per vedere il firmware è valido o corrotto
md5sum /tmp/fwupdate.bin
deve venire il risultato giusto che trovi in questo file:
http://stud.netgroup.uniroma2.it/~saverio/scooreggione-AA-v2/md5sums
5) Se il risultato MD5 è corretto lanciare il seguente comando per aggiornare:
/sbin/ubntbox fwupdate.real -m /tmp/fwupdate.bin -d
6) Dopo il reboot il device ha sulla LAN indirizzo IP 192.168.1.1, puoi entrare in SSH con utente root password root. La radio di default è spenta.
Note
Questo firmware si fa uso di policy routing. Al boot OLSR viene configurato automaticamente per usare queste tabelle
RtTable 111 RtTableDefault 112
E dentro il tuo /etc/rc.local ha questi comandi:
#110 Local routes #111 RtTable #112 RtTableDefault #113 Special Table for /1 #114 blackholes table #Copy local routes only from table main 254 to table 110 ip route show table 254 | grep -Ev ^default | grep -Ev ^blackhole | while read ROUTE ; do MASK=`echo "${ROUTE}" | awk '{print $1}' | awk -F/ '{print $2}'` if [ "$MASK" -ne 16 ] ; then ip route add table 110 $ROUTE fi done #First evaluate local routes ip rule add from all lookup 110 pref 3 #Private routes to OLSR table ip rule add to 10.0.0.0/8 table 111 pref 4 ip rule add to 172.16.0.0/12 table 111 pref 4 ip rule add to 192.168.0.0/16 table 111 pref 4 #Ninux IP Addresses to OLSR table ip rule add to 176.62.53.0/24 table 111 pref 4 #Evaluate blackholes ip rule add from all table 114 pref 5 #Send traffic of public addresses to BGP border routers ip rule add from 176.62.53.0/24 table 113 pref 6 #Lookup default route first from user and then from OLSR ip rule add from all lookup 254 pref 7 ip rule add from all lookup 112 pref 8 #Blackhole private aggregates ip route add blackhole 10.0.0.0/8 table 114 ip route add blackhole 172.16.0.0/12 table 114 ip route add blackhole 192.168.0.0/16 table 114 #Blackhole Ninux aggregate ip route add blackhole 176.62.53.0/24 table 114 exit 0
Per vedere la tabella di routing imparata via OLSR usa il comando
ip route show table 111
o in breve
ip r s t 111
per vedere la default imparata via OLSR è uguale ma la tabella è la 112
Esempio Configurazione come STA
root@M5GalliaBramante:~# cat /etc/config/network
config interface 'loopback'
- option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0'
config interface 'lan'
- option ifname 'eth0' option proto 'static' option ipaddr '10.CAP.x.y' option ip6addr '2001:4c00:893b:CAP::xxxx/64' option netmask '255.255.255.0' option dns '8.8.8.8'
config interface 'backbone'
- option ifname 'wlan0' option proto 'static' option ipaddr '172.16.CAP.x' option netmask '255.255.0.0' option ip6addr '2001:4c00:893b:1:CAP::x/128'
config interface 'wan'
- option ifname 'eth1' option proto 'none'
root@M5GalliaBramante:~# cat /etc/config/wireless
config wifi-device 'radio0'
- option type 'mac80211' option hwmode '11na' option distance '1000' ###Distanza in metri per ACK timeout, option macaddr '00:27:22:38:d0:f1' ###Non cambiare, è il mac della tua antenna list ht_capab 'SHORT-GI-40' list ht_capab 'TX-STBC' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option htmode 'HT40+' ###Setta il canale a 40Mhz option noscan '1'
config wifi-iface
- option device 'radio0' option network 'backbone' option mode 'sta' #STATION, non specificare channel option ssid 'ninux.org' option bssid 'aa:bb:cc:ee:ff' ###LOCK to this AP option encryption 'none'
root@M5GalliaBramante:~#
Features di Scoorreggione
- Based on OpenWRT AA
- tinc to 1.0.21
- Implementing Routing operation inside the OLSR router as described in the Ninux Architecture
6olsr e 4olsr
Stampano il contenuto del txtinfo plugin di olsr
li potete usare anche con argomenti, esempio:
4olsr links 6olsr hna