Mesh network configuration - mesh fails + batman

I didn't read correctly, you are using openssl and not wolfssl.
So I have just replaced wpad-wolfssl by wpad-mesh-openssl on both a R6220 and a x64 (with ath10k card). It works on the 2.4 GHz band
[edit] and also on the 5GHz band

1 Like

wolfssl should've also worked anyway, it's just a different encryption, I already installed wpad-mesh-openssl, this could be related to v19.07.8 only,using a pre-compiled image from OpenWrt, installing the required packages and still I cannot enable it.. I tried to use uci show wireless for any mistakes I might've made in the configuration, the only possibility is to use no encryption and the 2.4Ghz radio works.

Any chance you share your radio0 and mesh interface settings? as in config wireless-device and any interfaces using mesh? (omit unnecessary settings).

I have only tried mesh with 21.02 RCs and final.
I have successfully tried between two R6220. The newifi being very close, you should be able to link.
I suggest that on both devices ...

  • backup your device configs (to return to 19.07.8)
  • flash 21.02 without keeping config
  • setup a basic config from scratch
  • replace wpad-basic-wolfssl by wpad-wolfsll
  • setup a mesh.

Unless you need openssl, use wpad-wolfssl instead. wolfssl librairies are installed by default in 21.02. wpad-openssl will install opensll librairies (+1MB).

Also, I have never use batman, only 802.11s.

1 Like

Damn, just deleted them ... wait

Nothing outrageous as you can read. This is the mesh on the R6220.
Ohhh ? BTW I have just noticed that hwmode is set 11g despite luci showing N mode.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option htmode 'HT40'
        option country 'FR'
        option cell_density '0'
        option txpower '17'
        option channel '4'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'mesh'
        option encryption 'sae'
        option mesh_id '8086'
        option mesh_fwding '1'
        option mesh_rssi_threshold '0'
        option key 'somepassword'
        option network 'lan'
1 Like

Yes, it works, and only with the wpad-wolfssl, using wpad-mesh-wolfss doesn't work for some reason, thank you very much.

It must also be noted that only on channel 1 I could associate between the radios, for some reason channel 11 cannot do that.

I'm currently unsure if it was the package that fixed the problem or if it was the channel - I'm testing that.

BTW it works with the new stable v21.02.0

Update:
Newifi D1's radio gets disabled once set to channel 11 when in Mesh Point mode (it works fine when set to AP mode), R6220's radio doesn't get disabled but obviously won't associate, I tested channel 1 and 6 which work.

Also, I verified that wpad-mesh-wolfssl works as well as wpad-wolfssl, the two radios are associated, so it was a problem with the channels.

Congrats, there were no reason not to work. :heart_eyes:
Considering the tiny file size difference between wpad-mesh and wpad-wolfssl, I consider that using the full is better : all features are here and I can experiment whatever wifi trick I want.
For info, I was also able to link in mesh a router with wpad-openssl, while the other had wpad-wolfssl.
I rememver some channel issue too, set "middle" channels, regarding to channel width you are using (HT20/40).

1 Like

Channel width automatically downgrades to HT20 because of interference, I don't use anything special (like HT40+ or HT40-, etc.), weird that Newifi D1 cannot be set to channel 11 using it as a mesh point.

And what about batman now ? I have never tried (because I have never need).

It seems to be working when I set the mesh interfaces to mesh_fwding '0', I have internet access from the Newifi D1.

It's important to add a bat0 in the /etc/config/network file and add bat0.1 to your bridged network or if you don't use VLAN just bat0 in your br-lan device (you simply add a custom port)

Now I'm self-compiling v21.02.0 and trying to set up, but for now, with the pre-compiled images, it works!

I have never used batman (nor robin).
Yes self compiling your own build is a good idea.

2 Likes

:rofl: I really appreciate your help, thank you.

Nevermind, batman didn't actually work(I didn't test VLANs with it), batctl n didn't show anything because batctl-tiny was installed isntead of batctl-default.. but at least the native mesh is working, I think I will open a new post for that specific problem(batman).

:warning: Update:
It does work, I will update the docs as to how to do it with the new DSA, but it works with VLANs which is awesome!

Essentially you create bat0 and any interface that will serve bat0, with the proto batadv_hardif just like in the docs, the only difference is when you specify how to bridge the VLANs.

Simply follow the docs on how to establish an initial mesh, configure bat0 and its secondary interface(with proto 'batadv_hardif'), make sure batctl n works(you don't get messages about bat0 being disabled or no output whatsoever).

Secondary inteface in `/etc/config/network`
config interface 'nwi_mesh0'
	option mtu '2304'
	option proto 'batadv_hardif'
	option master 'bat0'
in `/etc/config/network`, add the bat0 VLAN interfaces to your lan network and make sure to set VLANs(driver level ones) for your desired networks

in /etc/config/network, add the bat0 VLAN interfaces to your lan network and make sure to set VLANs(driver level ones) for your desired networks:

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	list ports 'bat0.1' # batman VLAN 1
	list ports 'bat0.2' # batman VLAN 2
	option stp '1' 
	option igmp_snooping '1' 
	option ipv6 '0'
	option mtu '2304'

# Driver level VLAN 1
config bridge-vlan
	option device 'br-lan'
	option vlan '1'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	list ports 'bat0.1' # batman VLAN 1 is bridged with Ethernet ports

# Driver level VLAN 2
config bridge-vlan
	option device 'br-lan'
	option vlan '2'
	list ports 'bat0.2' # batman VLAN 2

config interface 'lan'
	option device 'br-lan.1' # Driver level VLAN 1
	option proto 'static'
	option ipaddr '192.168.1.254'
	option netmask '255.255.255.0'
	list dns '1.1.1.1 8.8.8.8'
	option delegate '0'
	option force_link 'yes' # required for static proto

config interface 'guest'
	option device 'br-lan.2' # Driver level VLAN 2
	option proto 'static'
	option ipaddr '192.168.2.254'
	option netmask '255.255.255.0'
	list dns '1.1.1.1 8.8.8.8'
	option delegate '0'
	option force_link 'yes' # required for static proto

Use one of your working mesh points and point them to the "hard" bat0 interface
config wifi-iface 'mesh1'
	option network 'nwi_mesh0' # for the batman interface in /etc/config/network
	option device 'radio1' # your radio
	option mode 'mesh'
	option mesh_id 'mymesh'
	option mesh_fwding '0' # for BATMAN to work
	option encryption 'sae' # WPA-3 or 'none' for no encryption
	option key 'spiderman_is_peter_parker'

The 2nd node is pretty much the same, the only difference is using a different IP for the lan and guest networks, let's say 192.168.1.253 for VLAN 1 and 192.168.2.253 for VLAN 2.

1 Like

I had understood that putting bat0.1 on lan and bat0.2 on guest is enough to bind each VLAN.

I tried that with v19.07.8, batman didn't initiate, with v21.02 and DSA you have to specify the list ports as bat0.1 and bat0.2 in your bridge, using the "hard" batman interface made sure batman is running and batctl n returns actual data and doesn't respond with batman mesh bat0 is DISABLED.

If you can do it without a "hard" batman interface, it would be better ofc.

I have ath79 and I don't use DSA. In my configuration I only had to enter list ports 'bat0.1' in the config device of lan and list ports 'bat0.2' in the config device of guest, in addition to adding config interface 'bat0' and config interface 'mesh0'. I don't know what you mean by "hard", bat0?


config interface 'nwi_mesh0'
	option mtu '2304'
	option proto 'batadv_hardif'
	option master 'bat0'

If it works for you without it then great, I tried that very same
method and for some reason bat0 is disabled when I run batctl n

In my experience, I've configured my meshpoint and set mesh_fwding '0' and only the bat0, bat0.1 and bat0.2 and it "worked" without batctl n returning actual nodes, I assume the mesh worked natively... but only after setting the batadv_hardif interface I'm seeing the actual nodes with batctl n and batctl o, can you confirm that's the same for you? batctl n and batctl o show you the other nodes?

Yes I have that interface. It's called "mesh0" instead of "nwi_mesh0" in my case (I changed it). It is the interface with which 802.11s is linked.
And I show my configuration so that I can help another in my case. In summary I have 2 devices, the main one is an Archer C60 with cable internet access and firewall rules and the second is a CPE210 only to extend the network by Wi-Fi and cable (without dhcp or firewall).

/etc/config/wireless

config wifi-iface 'wifinet4'
        option device 'radio1'
        option mode 'mesh'
        option encryption 'sae'
        option mesh_id 'malla'
        option mesh_fwding '0'
        option mesh_rssi_threshold '0'
        option ifname '2G_malla'
        option key '000000000000000000000000000000'
        option network 'mesh0'
        option macaddr '00:11:22:33:44:55'
/etc/config/network

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'
        list ports 'bat0.1'
        option stp '1'
        option igmp_snooping '1'
        option ipv6 '0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option delegate '0'

config device
        option type 'bridge'
        option name 'br-invitados'
        option stp '1'
        option igmp_snooping '1'
        option ipv6 '0'
        list ports 'bat0.2'

config interface 'invitados'
        option proto 'static'
        option device 'br-invitados'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option delegate '0'

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

config interface 'mesh0'
        option mtu '2304'
        option proto 'batadv_hardif'
        option master 'bat0'

For the second node the IP is changed to 192.168.1.2 for lan and 192.168.2.2 for guest. I also changed the MAC in 802.11s because it takes the br-lan bridge, which in turn takes the eth0 and I see a br-lan: received packet on bat0.1 with own address as source address.

batcl o and batcl n show the second node and the first in the second. They also ping both VLANs.

root@archer_c60:~# batctl o
[B.A.T.M.A.N. adv 2021.2-openwrt-1, MainIF/MAC: 2G_malla/00:11:22:33:44:55 (bat0/2e:81:22:3c:81:1b BATMAN_IV)]
   Originator        last-seen (#/255) Nexthop           [outgoingIF]
 * 22:22:22:22:22:22    0.820s   (243) 22:22:22:22:22:22 [  2G_malla]
root@archer_c60:~# batctl n
[B.A.T.M.A.N. adv 2021.2-openwrt-1, MainIF/MAC: 2G_malla/00:11:22:33:44:55 (bat0/2e:81:22:3c:81:1b BATMAN_IV)]
IF             Neighbor              last-seen
     2G_malla     22:22:22:22:22:22    0.200s
1 Like

Great stuff, thank you for sharing.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.