Batman with Snapshot

Hi all,
I'm trying to configure a TP-Link RE450v2 (which only supports snapshot) to participate in a mesh network that I have already setup and that it's working with one main and one repeater.
After doing all the config (which I copied from other working repeater) I had

root@OpenWrt:~# batctl if
root@OpenWrt:~# 
root@OpenWrt:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.d80d17b2b8f8	no		eth0
br-vlan3333		7fff.d80d17b2b8f8	no		wlan1
							mesh0

so I thought the problem could have been the fact that snapshot has wpad-basic instead of wpad-mesh. Therefore I uninstalled wpad-basic, only to find out that http://downloads.openwrt.org/snapshots/targets/ath79/generic/packages/ doesn't have wpad-mesh...

What can I do now? my kernel is 4.14.113 so I don't know where I can download wpad-mesh from...

Thanks for your help!
Riccardo

opkg should find your choice of wpad-mesh-openssl and wpad-mesh-wolfssl

If you wish to directly download them (and their dependencies), the wpad variants are in the by-platform packages at http://downloads.openwrt.org/snapshots/packages/mips_24kc/base/

Hi thanks I found the packages and installed them. Unfortunately "batctl if" result is still empty and "batctl ag" returns "Error - interface bat0 is not present or not a batman-adv interface"

In fact, I don't see bat0 in ifconfig. I also followed your advice in Batman-adv: Configuration Approach Changed - Feb 2019 and copied /etc/config/batman-adv from there. I also tried changing proto to 'batadv' instead of 'batadv_hardif'

These are my config files

root@OpenWrt:/etc/config# cat wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '40'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'VHT80'
	option disabled '0'


config wifi-device 'radio1'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ahb/ahb:apb/18100000.wmac'
	option htmode 'HT20'
	option disabled '0'


config wifi-iface
	option device 'radio1'
	option mode 'ap'
	option ssid 'ricky4'
	option network 'vlan3333'
	option encryption 'psk2'
	option key 'mykey'
	option ieee80211r '1'
	option mobility_domain '1111'
	option ft_over_ds '1'

config wifi-iface 'mesh0'
	option device 'radio0'
	option ifname 'mesh0'
	option mode 'mesh'
	option mesh_id 'rickymesh'
	option sae_password 'mykeymesh'
	option mesh_fwding '1'
	option encryption 'none'
	option network 'nwi_mesh0 vlan3333'

config wifi-iface 'ricky-radio0'
	option device 'radio0'
	option mode 'ap'
	option encryption 'psk2'
	option key 'mykey'
	option ssid 'ricky5'
	option network 'vlan3333'
	option ieee80211r '1'
	option mobility_domain '1111'
	option ft_over_ds '1'


root@OpenWrt:/etc/config# cat network 

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdc8:a8d6:e867::/48'

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

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '18:d6:c7:99:f4:b0'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 6t'

config interface 'nwi_mesh0'
	option ifname 'mesh0'
	option proto 'batadv'
	option mesh 'bat0'
	option mtu '2304'

config interface 'vlan3333'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '10.16.3.241'
	option gateway '10.16.3.1'
	option ifname 'bat0.3333'
	
root@OpenWrt:/etc/config# cat batman-adv
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 'nwi_mesh0'
        option ifname 'mesh0'
        option mtu '2304'
        option proto 'batadv'
        option master 'bat0'

root@OpenWrt:/etc/config# 

Could it be a switch issue?

root@OpenWrt:/etc/config# /etc/init.d/network restart
Failed to connect to the switch. Use the "list" command to see which switches are available.
root@OpenWrt:/etc/config# swconfig list
root@OpenWrt:/etc/config# 

Thanks for your help!
Riccardo

You should remove your keys from the above -- looking into the rest

There seem to be several problems with the radio config.

  • mesh_fwding needs to be 0 when using BATMAN. This means do not use the internal driver forwarding (HWMP).
  • encryption is none but a password is set. (An unencrypted mesh is supportable with the stripped down default hostapd.)
  • The radio (mesh0) should be joined only to the BATMAN driver. Everything the radio does passes through BATMAN. The user-side IP traffic (including VLANs) is found on the bat0 interface.

When trying to join an existing mesh there can be version incompatibilities. Some versions of BATMAN are not interoperable. But you're not to that point yet.

1 Like

This looks to be at least one of the issues involved. You probably want to be bridging to bat0.3333 there, not to the "raw" interface, mesh0.

1 Like

Hi both thanks for your suggestions, I tried to incorporate all of them (except for the encryption, because it's set like this on the other 2 routers and I will enable it once everything works)

So here are my configs

root@OpenWrt:/etc/config# cat network 

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdc8:a8d6:e867::/48'

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

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '18:d6:c7:99:f4:b0'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 6t'

config interface 'nwi_mesh0'
	option ifname 'mesh0'
	option proto 'batadv'
	option mesh 'bat0'
	option mtu '2304'

config interface 'vlan3333'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '10.16.3.241'
	option gateway '10.16.3.1'
	option ifname 'bat0.3333'
	
root@OpenWrt:/etc/config# cat wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '40'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'VHT80'
	option disabled '0'


config wifi-device 'radio1'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ahb/ahb:apb/18100000.wmac'
	option htmode 'HT20'
	option disabled '0'


config wifi-iface
	option device 'radio1'
	option mode 'ap'
	option ssid 'ricky4'
	option network 'vlan3333'
	option encryption 'psk2'
	option key 'mykey'
	option ieee80211r '1'
	option mobility_domain '1111'
	option ft_over_ds '1'

config wifi-iface 'mesh0'
	option device 'radio0'
	option ifname 'mesh0'
	option mode 'mesh'
	option mesh_id 'rickymesh'
	option sae_password 'mymeshkey'
	option mesh_fwding '0'
	option encryption 'none'
#	option network 'vlan3333'

config wifi-iface 'ricky-radio0'
	option device 'radio0'
	option mode 'ap'
	option encryption 'psk2'
	option key 'mykey'
	option ssid 'ricky5'
	option network 'vlan3333'
	option ieee80211r '1'
	option mobility_domain '1111'
	option ft_over_ds '1'


root@OpenWrt:/etc/config# cat batman-adv
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 'nwi_mesh0'
        option ifname 'mesh0'
        option mtu '2304'
        option proto 'batadv'
        option master 'bat0'

root@OpenWrt:/etc/config# 

but result is still the same (!!)

root@OpenWrt:/etc/config# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.d80d17b2b8f8	no		eth0
br-vlan3333		7fff.d80d17b2b8f8	no		mesh0
							wlan1
root@OpenWrt:/etc/config# batctl if
root@OpenWrt:/etc/config# 

The only difference is that now batctl answer comes after a few seconds..

I am even more confused now, as I changed config but things didn't change even after a reboot...

Thanks!
R