<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,<br>
if the gateway is down (disconnected wan cable), bird works.<br>
On the router with the cable disconnected bird must say: use the
wireless gateway not the wan. example:<br>
Router A, B, C, D<br>
C cut the wan cable<br>
All routers communicate with each other over the mesh, but C can't
get to the Internet.<br>
Bird needs to tell C to use A, B or D as gateway.</p>
<p><br>
</p>
<div class="moz-cite-prefix">Il 04/09/22 04:48, Brandon Zhi ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:CAAyZddGfXjsMQdv0y41ETkwfwm1NUQ7QahMM6w-A-OCmSmcDiw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:large">Hi,</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:large"> I'm trying to
understand the thing that you want to do. So if the GW is
down, then babel is down too. Maybe you could announce <a
href="http://0.0.0.0/0" moz-do-not-send="true">0.0.0.0/0</a>
by babel when babel is down, the GW will change.</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:large"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:large"><br>
</div>
<div class="gmail_default" style="font-family:"trebuchet
ms",sans-serif;font-size:large"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 1 Sept 2022 at 22:28,
Michele Salerno <<a href="mailto:mikysal78@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">mikysal78@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Hi, I have this script that configures routes for me
between different routers and servers.<br>
I have a few routers that have down in the wan and connect
with the mesh network.<br>
How can I dynamically change the gateway?<br>
Example: if the wan drops, use the mesh as the gateway.
<p><br>
</p>
<pre># Configure logging
log syslog all;
log "/var/log/bird.log" all;
log stderr all;
router id from "br-lan";
# Sync bird routing table with kernel
protocol kernel kernel4 {
description "Kernel protocol for IPv4";
metric 50;
ipv4 {
table master4;
export filter {
if proto = "lan" then reject;
accept;
};
import all;
};
};
protocol kernel kernel6 {
description "Kernel protocol for IPv6";
metric 300;
ipv6 {
table master6;
export filter {
if proto = "lan" then reject;
accept;
};
import all;
};
};
protocol device {
description "Device protocol";
};
protocol direct lan {
description "LAN protocol";
ipv4;
ipv6;
interface "br-lan";
check link;
}
protocol babel ninux {
description "Babel protocol for NINUX network";
ipv4 {
export where (source = RTS_DEVICE) || (source = RTS_BABEL);
};
ipv6 {
export where (source = RTS_DEVICE) || (source = RTS_BABEL);
};
interface "vpnbas" {
check link;
};
## Used to connect with other neighbours on the same layer 2 network.
## Decomment the config to use it, not this comments of course!
## Use the correct name interface, not the logical openwrt/(l)uci one.
## You can define more interfaces maches using * in regex (like "ifnet*")
## or "ifnet1", "ifnet2", "ifnetN", "otherifnetnames" form.
## You can also define more interfaces with other parameters, please refer to:
## <a href="https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.1" target="_blank" moz-do-not-send="true">https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.1</a>
## After, reload the bird daemon with: /etc/init.d/bird reload
## or if you perefer, reastart with: /etc/init.d/bird restart
interface "mesh" {
type wireless; # or wired
check link;
};
}</pre>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:"lucida
Grande",Verdana;font-size:14px"><b
style="font-size:12px;color:rgb(24,43,75);font-family:Helvetica,sans-serif">Brandon
Zhi</b></div>
<div style="color:rgb(0,0,0);font-family:"lucida
Grande",Verdana;font-size:14px"><font face="Helvetica,
sans-serif" color="#5f5f5f"><span
style="font-size:10.6667px">HUIZE LTD</span></font></div>
<div style="color:rgb(0,0,0);font-family:"lucida
Grande",Verdana;font-size:14px">
<p class="MsoNormal"
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small"><span
style="font-size:8pt;font-family:Helvetica,sans-serif;color:black"
lang="EN-HK"><a href="https://huize.asia/"
style="outline:none;color:rgb(40,108,69)"
target="_blank" moz-do-not-send="true"><span
style="color:rgb(4,74,145)">www.huize.asia</span> </a>| <a
href="https://www.ixp.su/"
style="outline:none;color:rgb(40,108,69)"
target="_blank" moz-do-not-send="true"><span
style="color:rgb(4,74,145)">www.ixp.su</span></a> | Twitter</span></p>
<p class="MsoNormal"
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small"><br>
</p>
<p class="MsoNormal"
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">This
e-mail and any attachments or any reproduction of this
e-mail in whatever manner are confidential and for the use
of the addressee(s) only. HUIZE LTD can’t take any
liability and guarantee of the text of the email message
and virus.</p>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Informativa Privacy - Ai sensi del D. Lgs n. 196/2003 (Codice Privacy) si precisa che le informazioni contenute in questo messaggio sono riservate e ad uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.
Privacy Information - This message, for the D. Lgs n. 196/2003 (Privacy Code), may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.</pre>
</body>
</html>