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