<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Ciao raga, come posso risolvere secondo voi per alcuni router che
    non hanno una wan (tipo zone rurali).<br>
    <p>Uso Openwrt 19 e 21 e dato che olsrd2 non è più mantenuto ne si
      installa...con Francesco Bonanno abbiamo messo Bird2 con
      protocollo babel.</p>
    <p>Nei test le route ci sono, ma staccando la wan (simulazione
      router in campagna) non c'è più connessione verso internet.<br>
      Voglio che deve cambiare gateway in modo automatico, non ci sono
      riuscito neanche manualmente...</p>
    <p>La config di bird è questa:<br>
    </p>
    <pre># Configure logging</pre>
    <pre>log syslog all;</pre>
    <pre>log "/var/log/bird.log" all;</pre>
    <pre>log stderr all;</pre>
    <pre>router id from "br-lan";</pre>
    <pre>
# Sync bird routing table with kernel</pre>
    <pre>protocol kernel kernel4 {</pre>
    <pre>    description "Kernel protocol for IPv4";</pre>
    <pre>    metric 50;</pre>
    <pre>    ipv4 {</pre>
    <pre>        table master4;</pre>
    <pre>        export filter {</pre>
    <pre>            if proto = "lan" then reject;</pre>
    <pre>            accept;</pre>
    <pre>        };</pre>
    <pre>        import all;</pre>
    <pre>    };</pre>
    <pre>};</pre>
    <pre>
protocol kernel kernel6 {</pre>
    <pre>    description "Kernel protocol for IPv6";</pre>
    <pre>    metric 300;</pre>
    <pre>    ipv6 {</pre>
    <pre>        table master6;</pre>
    <pre>        export filter {</pre>
    <pre>            if proto = "lan" then reject;</pre>
    <pre>            accept;</pre>
    <pre>        };</pre>
    <pre>        import all;</pre>
    <pre>    };</pre>
    <pre>};</pre>
    <pre>
protocol device {</pre>
    <pre>    description "Device protocol";</pre>
    <pre>};</pre>
    <pre>
protocol direct lan {</pre>
    <pre>    description "LAN protocol";</pre>
    <pre>    ipv4;</pre>
    <pre>    ipv6;</pre>
    <pre>    interface "br-lan";</pre>
    <pre>    check link;</pre>
    <pre>}</pre>
    <pre>protocol babel ninux {</pre>
    <pre>    description "Babel protocol for NINUX network";</pre>
    <pre>    ipv4 {</pre>
    <pre>        export where (source = RTS_DEVICE) || (source = RTS_BABEL);</pre>
    <pre>    };</pre>
    <pre>    ipv6 {</pre>
    <pre>        export where (source = RTS_DEVICE) || (source = RTS_BABEL);</pre>
    <pre>    };</pre>
    <pre>    interface "vpnbas" {</pre>
    <pre>        check link;</pre>
    <pre>    };</pre>
    <pre>## Used to connect with other neighbours on the same layer 2 network.</pre>
    <pre>## Decomment the config to use it, not this comments of course!</pre>
    <pre>## Use the correct name interface, not the logical openwrt/(l)uci one.</pre>
    <pre>## You can define more interfaces maches using * in regex (like "ifnet*")</pre>
    <pre>## or "ifnet1", "ifnet2", "ifnetN", "otherifnetnames" form.</pre>
    <pre>## You can also define more interfaces with other parameters, please refer to:</pre>
    <pre>## <a class="moz-txt-link-freetext" href="https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.1">https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.1</a></pre>
    <pre>## After, reload the bird daemon with: /etc/init.d/bird reload</pre>
    <pre>## or if you perefer, reastart with: /etc/init.d/bird restart</pre>
    <pre>    interface "mesh" {</pre>
    <pre>        type wireless; # or wired</pre>
    <pre>        check link;</pre>
    <pre>    };</pre>
    <pre>}</pre>
    <p><br>
    </p>
  </body>
</html>