[Babel-users] Open-Mesh migration, 802.11s, babeld, speed degradation

Stuart Trusty stuart.trusty at gmail.com
Tue Mar 5 15:28:35 GMT 2019


Hi Juliusz,

I appreciate your reply very much.

On Mon, Mar 4, 2019 at 3:48 AM Juliusz Chroboczek <jch at irif.fr> wrote:
Hi Stuart,

> I would much rather use babeld, and I had set it up with the default
> settings from OpenWRT, but the radios fell off the net (not a logfile
> issue).

What do you mean they "fell off the net"?  Is the link layer associating?

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.



Please run "iw dev wlan0 station dump" on each of the nodes, and check
whether the link layer sees the neighbours.  If it does not, then you've
got a lower layer problem, and babeld can't help.


Yes, in this situation all neighbor stations enumerate.   Everyone can ping
everyone via 802.11s mesh.

I worked on this quite a bit.  I came to a couple of conclusions, please
tell me if I am wrong.

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

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

config wifi-iface 'default_radio0'
option device 'radio0'
option network 'wlan0'
option mode 'ap'
option encryption 'psk2'
option key 'password'
option ssid 'mySSID'

config wifi-iface
option device 'radio0'
option encryption 'none'
option mode 'mesh'
option mesh_id 'MyMeshID'
option mesh_fwding '1'
option network 'wlan0'

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.

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.

config zone
option name 'lan'
list network 'lan'
list network 'wlan0'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'

I can make babeld work by only attaching it to wlan0 in the scenario where
lan hosts are unpingable but it then does nothing.

I cannot attach it directly to wlan0-1.

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.

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.

This is my /etc/config/babeld modified from OpenWRT default -

package babeld

# Babeld reads options from the following files (the last one takes
precedence
# if an option is defined in several places):
# - the file defined by the option conf_file (default: /etc/babeld.conf),
# - *.conf files in the directory defined by conf_dir (default:
/tmp/babel.d/),
# - this UCI configuration file.

# See "man babeld" for all available options ("Global options").
# Important: remember to use '_' instead of '-' in option names.
config general
# option 'random_id' 'true'
option 'debug' '1'
option 'local_port' '33123'
# option 'log_file' '/var/log/babeld.log'
## Enable ipv6-subtrees by default since OpenWrt should ship with a
## recent enough kernel for it to work.
option 'ipv6_subtrees' 'true'
# list 'import_table' '42'
# list 'import_table' '100'
## Alternative configuration file and directory.
## See comment at the top of this file for more details.
# option 'conf_file' '/etc/babeld.conf'
# option 'conf_dir' '/tmp/babel.d/'

config interface
## Remove this line to enable babeld on this interface
# option 'ignore' 'true'
## You can use aliases (like lan, wlan) or real names (like eth0.0).
## If you use an alias, it must be already defined when babeld starts.
## Otherwise, the name is taken literally and the interface can be
## brought up later (useful for tunnels for instance).
option 'ifname' 'wlan0'
## You can set options, see babeld man page ("Interface configuration")
# option 'rxcost' '256'
# option 'hello_interval' '1'

config interface
option 'ignore' 'true'
## Physical interface name
option 'ifname' 'tun-example'
# option 'max_rtt_penalty' '90'

# A config interface without "option ifname" will set default options
# for all interfaces.  Interface-specific configuration always overrides
# default configuration.
config interface
# option 'enable_timestamps' 'true'
# option 'update_interval' '30'


# A filter consists of a type ('in', 'out' or 'redistribute'), an action
# ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
# etc.).  See babeld man page ("Filtering rules") for more details.
# Here is a sample filter wich redistributes the default route if its
# protocol number is "boot", e.g. when it installed by dhcp.  It is
# disabled by default.
config filter
option 'ignore' 'true'
# Type
option 'type' 'redistribute'
# Selectors: ip, eq, le, ge, src_ip, src_eq, src_le, src_ge, neigh, id,
# proto, local, if.
option 'ip' '0.0.0.0/0'
option 'eq' '0'
option 'proto' '3'
# Action (one of: allow, deny, metric XXX, src-prefix XXX).
option 'action' 'metric 128'

# Notice that the 'local' selector is a boolean.
config filter
option 'ignore' 'true'
option 'type' 'redistribute'
option 'local' 'true'
# No action means "allow"

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.

I really love babeld, I know I am not using it for what it is capable of in
this 802.11s mesh context.


> But the nodes lose their connection every few minutes and reset,

What do you mean exactly?  Try doing

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.

Thanks again for your time, I really appreciate it.

On Mon, Mar 4, 2019 at 3:48 AM Juliusz Chroboczek <jch at irif.fr> wrote:

> Hi Stuart,
>
> > I would much rather use babeld, and I had set it up with the default
> > settings from OpenWRT, but the radios fell off the net (not a logfile
> > issue).
>
> What do you mean they "fell off the net"?  Is the link layer associating?
>
> Please run "iw dev wlan0 station dump" on each of the nodes, and check
> whether the link layer sees the neighbours.  If it does not, then you've
> got a lower layer problem, and babeld can't help.
>
> > Then I ran it on each node with- babeld -d1 -C 'redistribute metric 128'
> > br-lan (with firewall hole),
>
> Don't do that, since it prevents babeld from selecting the right
> interface.  You should un-bridge the LAN interfaces, and run babeld
> directly over the physical interfaces.
>
> In /etc/config/wireless, say something like:
>
> config wifi-iface 'wlan0'
>         option device 'radio0'
>         option mode 'adhoc'
>         option network 'wlan0'
>         ...
>
> The important bit is that you create a new network "wlan0" rather then
> inserting the wlan0 interface into the "lan" network.
>
> In /etc/config/network, you need to define the wlan0 network:
>
> config interface 'wlan0'
>         option ifname 'wlan0'
>         option proto 'static'
>         option ipaddr '192.168.2.1'
>         option netmask '255.255.255.0'
>         option force_link '1'
>
> Finally, add your "wlan0" network to the "lan" zone in
> /etc/config/firewall:
>
> config zone
>         option name             lan
>         list   network          'lan'
>         list network            'wlan0'
>         list network            'wlan1'
>         list network            'wlan2'
>         option input            ACCEPT
>         option output           ACCEPT
>         option forward          ACCEPT
>
> > But the nodes lose their connection every few minutes and reset,
>
> What do you mean exactly?  Try doing
>
>     killall -USR1 babeld
>
> and send us the relevant part of the log.
>
> -- Juliusz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/babel-users/attachments/20190305/ed4a7dc7/attachment-0001.html>


More information about the Babel-users mailing list