Mesh Batman-adv mode query

Hi all,

Have a mesh network up and running, with 4 nodes.
Using a wireless router with SIM card, connected by cable to a ubiquiti router board.
The 3 other router boards form the wireless mesh, clients can connect to any one and get internet connection, that all works ok.

Question, when I check the connection properties on any connected client devices it shows the 802.11g. All driver are set to 802.11n in the wireless configuration settings, all drivers support n standard.

If I set up any individual board as an AP, the work as wireless configuration settings, displaying wireless properties on the client device connected, “802.11n”.

If these a something to do with Batman-adv. or do I need to change some settings.
David

How are the links configured, IBSS, 802.11s, something else?

Batman-adv is the routing protocol running on each node, sorry is that what you're looking for.

The wireless utilities will report the underlying link, and is independent of how traffic is routed. Many of the user-land utilities (command-line or LuCI) don't render 802.11s links "properly". I don't know about IBSS links.

How do you check with certainty what underline link is running.

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

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman

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.