Mesh Batman-adv mode query

iw dev and iw dev <wlanX-Y> station dump are the tools I typically use.

The underlying link is set by whether you configured in /etc/config/wireless as mode mesh or mode adhoc.

1 Like

Node 1 which is connected to the router which act as a gateway for internet, in wireless configuration its set as mode adhoc.

All other nodes that act as clients are set as mode AP.
Is what I have running a true mesh network.

Can I just change from adhoc to mesh in wireless the wireless configuration settings.

Cheers thanks for the reply.
David

It's not clear what you have then. If a node is only an AP it doesn't have a way to link back to the Internet. Almost always two interfaces are set up on the radio (or one interface on each radio in a dual band situation). One is a regular AP which would be used for people to connect with phones or laptops, and the mesh interface (adhoc or 802.11s) would carry the data back to the gateway node which has an Internet connection.

I followed "Creating a basic Batman-adv mesh" and a similar video on YouTube,
See settings below.

WIFI NODE1

option device 'radio0' 
option network 'lan' 
option mode 'ap'
 option ssid 'node1'
 option encryption 'none' 

config wifi-iface 'wmesh'
 option device 'radio0' 
option ifname 'adhoc0' 
option network 'mesh' 
option mode 'adhoc'
 option ssid 'mesh' 
option bssid '02:CA:FE:CA:CA:40' 

network 
config interface 'lan' 
option ifname 'eth0 bat0' 
option type 'bridge' 
option proto 'static' 
option ipaddr '192.168.0.25' 
option netmask '255.255.255.0' 
option ip6assign '60'

 config interface 'mesh' 
option ifname 'adhoc0' 
option mtu '1532' 
option proto 'batadv' 
option mesh 'bat0'

 NODE2 WIFI
 
 config wifi-iface 
option device 'radio0' 
option network 'mb' 
option mode 'ap'
 option ssid 'node2'
 option encryption 'none' 

config wifi-iface 'wmesh' 
option device 'radio0' 
option ifname 'adhoc0'
 option network 'mesh' 
option mode 'adhoc' 
option ssid 'mesh' 
option bssid '02:CA:FE:CA:CA:40' 

network config interface 'lan' 
option ifname 'eth0' 
option type 'bridge' 
option proto 'static' 
option ipaddr '192.168.0.6' 
option netmask '255.255.255.0' 

config interface 'mesh' 
option ifname 'adhoc0' 
option mtu '1532' 
option proto 'batadv' 
option mesh 'bat0'
 
config interface 'mb' 
option ifname 'bat0'
 option type 'bridge'
 option proto 'static' 
option ipadder '192.168.0.26
 option netmask '255.255.255.0'

Node 3 and 4 are similar to node 2 only different IP addresses.

That config for batman-adv is no longer supported, at least on master

Had a quick look,
Have batman-adv already downloaded on each router, and batctl and wpad-mesh.

All I need to do is change my configuration settings in wireless and network to something similar to yours. No additional files or changes needed elsewhere, is a specific version of openwrt needed, using old ubiquiti boards were updated recently.

Am I correct in my assumption?
Cheers thanks.

Checking the version of the batman-adv package will let you know which config approach is correct.

When dealing with “advanced” use, I only run master (snapshot, if you don’t build your own). 18.06 may not have updated the package yet.

It is an adhoc mesh then. The trend is toward 802.11s, since it is supported by more drivers and allows you to encrypt the mesh to prevent eavesdropping or unauthorized mesh points from joining. But in this case it may not matter since you are forwarding from unencrypted APs anyway.

You should implement firewall rules to prevent the users of the 'mb' network from having ssh or http access to the routers.

I intend using encryption on all devices, where can I get an image that supports the updated features with regards to batman-adv and it implementation.

http://downloads.openwrt.org/snapshots/

Cheers thanks.

Hi Jeff,

Using the command Prompt tool this is how I have been flashing my files to he ubiquiti board tftp –i 192.168.1.20 put openwrt-18.06.2-ar71xx-generic-ubnt-rspro-squashfs-factory.bin
Is there a image available for download in that format. Or have you a link that explains how its done using the image above, as I am not farmiliar with that method. Cheers

This is the standard TFTP recovery built into Ubiquiti devices. Booting the router with the reset button held down makes it a TFTP server. You need a TFTP client on your PC to put (push) the file to the router. One comes standard with both Linux and Windows though with Windows you need to activate it in the control panel and use it from the command line.

The file is in the 18.06.2/ar71xx/generic release on the download server.

I’m a bit confused, I have a mesh up and working with 4 nodes in Adhoc mode. I want to Add security so therefore I need to implement 802.11s. The file image installed on all nodes is 18.06.2xx. Therefore Iam I correct to think that all I need to do is follow the wiki page and add the following configuration settings for bat0 below to network. Then config each node as the wiki page suggests.

Configuration interface 'bat0'
	option proto 'batadv'
	option routing_algo 'BATMAN_IV'
	option aggregated_ogms 1
	option ap_isolation 0
	option bonding 0
	option fragmentation 1
	#option gw_bandwidth '10000/2000'
	option gw_mode 'off'
	#option gw_sel_class 20
	option log_level 0
	option orig_interval 1000
	option bridge_loop_avoidance 1
	option distributed_arp_table 1
	option multicast_mode 1
	option network_coding 0
	option hop_penalty 30
	option isolation_mark '0x00000000/0x00000000'

Cheers thanks for your time.

I What version of batman-adv and bactl are installed? Not OpenWrt version, but package version.

Configuration is completely different with later versions than from earlier versions, as called out on the wiki. The wiki only describes the current approach, which was not the approach when 18.06.2 was released, and may not be the approach with current packages for 18.06.2. There is a link on the wiki to the older version of the page.

As a general recommendation, if you are working with sophisticated configuration, then master is likely a better option, due to it being more up to date. As advanced users also often follow master, it also means that releases get less "testing" in these scenarios, especially as they age.

Hi all,
The version of batman-adv installed is "kmod-batman-adv - 4.9.152+2018.1-5"
and the version of batctl is "batctl - 2018.1-1"
Is it just a matter of updating batman-adv file?
Or what steps do I need to do to get 802.11s mesh up and running?
Cheers

Personally, I would update to master ("snapshot") and move to the current configuration approach. The older one I found to be wildly confusing, even after staring at it for several weeks and trying to explain it multiple times.

How is that update to master achieved, is it an systems upgrade, or done through opkg, is their a wiki page that explains what needs to be done.

Cheers

and then use sysupgrade or the equivalent through LuCI