Mesh network configuration - mesh fails + batman

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.