<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000">Hi Juliusz,<br></div><div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div><div><font color="#000000" face="arial, helvetica, sans-serif"><br>I appreciate your reply very much.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">On Mon, Mar 4, 2019 at 3:48 AM Juliusz Chroboczek <<a href="mailto:jch@irif.fr" target="_blank">jch@irif.fr</a>> wrote:</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Hi Stuart,</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">> I would much rather use babeld, and I had set it up with the default</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">> settings from OpenWRT, but the radios fell off the net (not a logfile</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">> issue).</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">What do you mean they "fell off the net"?  Is the link layer associating?</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">What had happened is that I launched babeld in OpenWRT and the devices fell off of the network in about 2 minutes.  It could have been for the reasons you state here, with routes getting lost.  </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"> </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Please run "iw dev wlan0 station dump" on each of the nodes, and check</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">whether the link layer sees the neighbours.  If it does not, then you've</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">got a lower layer problem, and babeld can't help.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Yes, in this situation all neighbor stations enumerate.   Everyone can ping everyone via 802.11s mesh.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I worked on this quite a bit.  I came to a couple of conclusions, please tell me if I am wrong.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">What you are saying can certainly be done, and I did it, but there are some peculiarities around 802.11s, especially on one radio also functioning as an AP.   Maybe you are very familiar with 802.11s and I am very far off on my conclusions.  But, for example, setting up a mesh point and AP on one radio required the mesh radio to be wlan0 (or 1) and the master AP to be wlan0-1 (or wlan1-1).</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">If you configure wlan0 and wlan0-1 without a bridge at least between those two interfaces, there will be no connectivity or pingability between IP's on the lan side, as if you were to Isolate Clients.  I have pored through this /etc/config/firewall trying to see it another way.  There is literally no WAN in this configuration.  wlan0-1 gets all of its connectivity at layer 3 through the 802.11s mesh point -></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config wifi-iface 'default_radio0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span>option device 'radio0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option network 'wlan0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option mode 'ap'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>option encryption 'psk2'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>option key 'password'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">   </span>option ssid 'mySSID'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config wifi-iface</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span>option device 'radio0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option encryption 'none'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>option mode 'mesh'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span>option mesh_id 'MyMeshID'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">       </span>option mesh_fwding '1'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option network 'wlan0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">You can't even go to the shell and ping the outside world because there is no default gateway, I would have to add it manually.  But that doesn't affect wifi clients at the node; I am forcing DHCP at each of the gateways as the default route out on their wan interface that does exist there, but that device isn't disclosed to babeld.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">So wlan0 and wlan0-1 have become the whole of lan to /etc/config/firewall, and that seems to be configured OK to accommodate it with just this changing of the devices directly to wlan0 and away from a bridge to eth0 or wlan1 or anything else, which seems to achieve the purpose you are stating.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config zone</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>option name 'lan'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">       </span>list network 'lan'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span>list network 'wlan0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">    </span>option input 'ACCEPT'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">   </span>option output 'ACCEPT'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option forward 'ACCEPT'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I can make babeld work by only attaching it to wlan0 in the scenario where lan hosts are unpingable but it then does nothing.  </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I cannot attach it directly to wlan0-1.   </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I am unclear if babeld will parse these mesh routes on wlan0 (like an AP client is getting from the 802.11s mesh), or if it is only passing routing messages from the layer 3 AP now known as wlan0-1.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">When I had it misconfigured, it was displaying all kinds of static routes to hosts and stating routes to networks all over the place, and it was very impressive, it just didn't work.  However, now that it is running on the wlan0 that is a bridge of wlan0-1 and wlan0, it just seems boring; I don't see those fancy routing tables, and I am not seeing that it is establishing the shortest route based on prevailing network conditions, I am see only metrics passed of 0, 128, and 65535.  </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">This is my /etc/config/babeld modified from OpenWRT default -</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">package babeld</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># Babeld reads options from the following files (the last one takes precedence</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># if an option is defined in several places):</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># - the file defined by the option conf_file (default: /etc/babeld.conf),</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># - *.conf files in the directory defined by conf_dir (default: /tmp/babel.d/),</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># - this UCI configuration file.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># See "man babeld" for all available options ("Global options").</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># Important: remember to use '_' instead of '-' in option names.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config general</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span># option 'random_id' 'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span> option 'debug' '1'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span> option 'local_port' '33123'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">    </span># option 'log_file' '/var/log/babeld.log'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">       </span>## Enable ipv6-subtrees by default since OpenWrt should ship with a</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>## recent enough kernel for it to work.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span>option 'ipv6_subtrees' 'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">   </span># list 'import_table' '42'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span># list 'import_table' '100'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>## Alternative configuration file and directory.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>## See comment at the top of this file for more details.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span># option 'conf_file' '/etc/babeld.conf'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span># option 'conf_dir' '/tmp/babel.d/'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config interface</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">   </span>## Remove this line to enable babeld on this interface</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span># option 'ignore' 'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">        </span>## You can use aliases (like lan, wlan) or real names (like eth0.0).</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">    </span>## If you use an alias, it must be already defined when babeld starts.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>## Otherwise, the name is taken literally and the interface can be</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span>## brought up later (useful for tunnels for instance).</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option 'ifname' 'wlan0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span>## You can set options, see babeld man page ("Interface configuration")</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">       </span># option 'rxcost' '256'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span># option 'hello_interval' '1'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config interface</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span>option 'ignore' 'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>## Physical interface name</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span>option 'ifname' 'tun-example'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">   </span># option 'max_rtt_penalty' '90'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># A config interface without "option ifname" will set default options</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># for all interfaces.  Interface-specific configuration always overrides</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># default configuration.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config interface</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">       </span># option 'enable_timestamps' 'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span># option 'update_interval' '30'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># A filter consists of a type ('in', 'out' or 'redistribute'), an action</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># etc.).  See babeld man page ("Filtering rules") for more details.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># Here is a sample filter wich redistributes the default route if its</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># protocol number is "boot", e.g. when it installed by dhcp.  It is</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># disabled by default.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config filter</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option 'ignore'<span style="white-space:pre-wrap"> </span>'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span># Type</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option 'type'<span style="white-space:pre-wrap">   </span>'redistribute'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span># Selectors: ip, eq, le, ge, src_ip, src_eq, src_le, src_ge, neigh, id,</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"> </span># proto, local, if.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>option 'ip'<span style="white-space:pre-wrap">     </span>'<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">      </span>option 'eq'<span style="white-space:pre-wrap">     </span>'0'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>option 'proto'<span style="white-space:pre-wrap">  </span>'3'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span># Action (one of: allow, deny, metric XXX, src-prefix XXX).</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>option 'action'<span style="white-space:pre-wrap"> </span>'metric 128'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"># Notice that the 'local' selector is a boolean.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">config filter</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">     </span>option 'ignore'<span style="white-space:pre-wrap"> </span>'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option 'type'<span style="white-space:pre-wrap">   </span>'redistribute'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span>option 'local'<span style="white-space:pre-wrap">  </span>'true'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">  </span># No action means "allow"</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I guess it is an 'ok' solution for me to have each gateway forcing dhcp to give itself as a default gateway, but I don't think babeld is doing what it is capable of for this 802.11s layer 2 mesh.  802.11s by itself it feels a little clunky, like something in batman-adv in Open-Mesh had made this a little better experience on this hardware of theirs.  </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I really love babeld, I know I am not using it for what it is capable of in this 802.11s mesh context.  </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"> </font></div><div><font color="#000000" face="arial, helvetica, sans-serif">> But the nodes lose their connection every few minutes and reset,</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">What do you mean exactly?  Try doing</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I am going to have to attribute this to the propagation of routes on the eth0 that was bonded to two APs and two mesh points all over br-lan device to babeld before you told me not to, unless you think otherwise.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Thanks again for your time, I really appreciate it.</font></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 4, 2019 at 3:48 AM Juliusz Chroboczek <<a href="mailto:jch@irif.fr" target="_blank">jch@irif.fr</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">Hi Stuart,<br>
<br>
> I would much rather use babeld, and I had set it up with the default<br>
> settings from OpenWRT, but the radios fell off the net (not a logfile<br>
> issue).<br>
<br>
What do you mean they "fell off the net"?  Is the link layer associating?<br>
<br>
Please run "iw dev wlan0 station dump" on each of the nodes, and check<br>
whether the link layer sees the neighbours.  If it does not, then you've<br>
got a lower layer problem, and babeld can't help.<br>
<br>
> Then I ran it on each node with- babeld -d1 -C 'redistribute metric 128'<br>
> br-lan (with firewall hole),<br>
<br>
Don't do that, since it prevents babeld from selecting the right<br>
interface.  You should un-bridge the LAN interfaces, and run babeld<br>
directly over the physical interfaces.<br>
<br>
In /etc/config/wireless, say something like:<br>
<br>
config wifi-iface 'wlan0'<br>
        option device 'radio0'<br>
        option mode 'adhoc'<br>
        option network 'wlan0'<br>
        ...<br>
<br>
The important bit is that you create a new network "wlan0" rather then<br>
inserting the wlan0 interface into the "lan" network.<br>
<br>
In /etc/config/network, you need to define the wlan0 network:<br>
<br>
config interface 'wlan0'<br>
        option ifname 'wlan0'<br>
        option proto 'static'<br>
        option ipaddr '192.168.2.1'<br>
        option netmask '255.255.255.0'<br>
        option force_link '1'<br>
<br>
Finally, add your "wlan0" network to the "lan" zone in /etc/config/firewall:<br>
<br>
config zone<br>
        option name             lan<br>
        list   network          'lan'<br>
        list network            'wlan0'<br>
        list network            'wlan1'<br>
        list network            'wlan2'<br>
        option input            ACCEPT<br>
        option output           ACCEPT<br>
        option forward          ACCEPT<br>
<br>
> But the nodes lose their connection every few minutes and reset,<br>
<br>
What do you mean exactly?  Try doing<br>
<br>
    killall -USR1 babeld<br>
<br>
and send us the relevant part of the log.<br>
<br>
-- Juliusz<br>
</blockquote></div>
</div></div>