BATMAN MESH: WIFI + WIRED issues

hi!

I'm playing since a few days ago with batman and I have a setup that I would like to see how to deploy it without problems.

taking this drawing as an example:

router1 is GW internet.
router2 is dump wifi ap, connects to router1 with mesh batman.
router3 is dump wifi ap, connect to router1 with mesh batman wired I also want to connect it with wifi and let batman choose the best path to deliver traffic.
router4 is a dump wifi ap, it connects to router2 with mesh batman wired and i want to connect it to batman via wifi as well.

issues faced connecting with wifi + wire batman:

  • when I connect router3 and router4 with wifi using the mesh network created with batman, I lose traffic or experience high latency.

DEvices configs:

router1-gw:

/networks:

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option bridge_loop_avoidance '1'
        option gw_mode 'server'
        option hop_penalty '30'
        option bonding '1'

config interface 'batmesh'
        option proto 'batadv_hardif'
        option master 'bat0'
        option mtu '1532'

/wireless:

config wifi-iface 'wifinet10'
        option device 'radio0'
        option mode 'mesh'
        option encryption 'sae'
        option mesh_rssi_threshold '0'
        option ifname 'bat-mesh'
        option key '*********'
        option mesh_fwding '0'
        option mesh_id 'mesh-bat'
        option network 'batmesh'

router3 or router4:

/network:

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option bridge_loop_avoidance '1'
        option gw_mode 'off'
        option hop_penalty '30'
        option mtu '2304'

config interface 'batwire'
        option proto 'batadv_hardif'
        option master 'bat0'
        option device 'br-wiremesh'
        option mtu '1532'

config interface 'batmesh'
        option proto 'batadv_hardif'
        option master 'bat0'
        option mtu '1532'

config interface 'batmesh'
        option proto 'batadv_hardif'
        option master 'bat0'
        option mtu '1532'

config device
        option type 'bridge'
        option name 'br-wiremesh'
        option mtu '1532'
        option mtu6 '1532'
        list ports 'wan'

/wireless:

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'mesh'
        option mesh_id 'mesh-bat'
        option mesh_fwding '0'
        option mesh_rssi_threshold '0'
        option encryption 'sae'
        option key '*****'
        option network 'batmesh'
        option ifname 'bat-mesh'
        option disabled '1'

According to the setup I share with you, is there anything I am missing and need to add in order not to experience the latency and traffic loss problems when I raise the two interfaces: wifi and wired?

thank so much for your suppor!

You have not set the gw_mode for the router3. I think it need to be set to client.

hi, thanks for the answer, in which cases is the client parameter recommended?
I thought that being off would have the same effect as client or i clarify, it didn't matter much in terms of the purpose of the AP dump which is to reach a gw server.

hi,

yesterday I applied the setup and enabled the client mode on and then I raised the double path links and it seems that it did not work well, the network was all afternoon giving conctivity issues and taking a look at the statistics I observe traffic discarding problems until finally I did rollback of the change and everything returned to normal.

image

any idea why this issues?


On the other hand, I am getting the following duplicate arp message in the bridges I have set up with the different vlans associated to the ssids: lan, guest, iot.

router1:

[59715.290826] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59725.530761] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59725.531051] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59735.770876] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59746.011076] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59756.250973] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59766.491029] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59776.731042] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59786.971133] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59797.221149] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)
[59807.451191] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:75:12:5b, vlan:0)

router2:


[   73.432813] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[   83.673787] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[   93.912824] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  104.152792] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  114.392852] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  124.632851] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  134.872908] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  145.112779] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  155.352772] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  165.592786] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  175.832727] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)
[  175.832906] br-lan: received packet on bat0.10 with own address as source address (addr:9c:9d:7e:cc:90:75, vlan:0)

router4:

[60744.813298] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60755.020869] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60755.031666] br-lan: received packet on bat0.10 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60755.042219] br-lan: received packet on bat0.10 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60755.052876] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.261021] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.271886] br-lan: received packet on bat0.10 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.282472] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.293374] br-lan: received packet on bat0.10 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.303980] br-lan: received packet on bat0.10 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)
[60765.314697] br-guest: received packet on bat0.121 with own address as source address (addr:b4:4b:d6:2c:75:00, vlan:0)

For router1 and router3 I use a single physical link to connect and then set up a bridge interface that I associate to a batman interface associated to bat0.

For router2 and router3 it is the same scenario, physical cable between devices and batman interface of that bridge associated to bat0.

Then router2 and route1 are associated via batman using the mesh wifi network with a batman interface.

Por ejemplo router4 tengo esta config dentro de networks para batman y el bridge br-lan:

/network


config device
        option name 'br-lan'
        option type 'bridge'
        option mtu '1500'
        list ports 'bat0.10'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.4'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option gw_mode 'client'
        option hop_penalty '30'
        option bridge_loop_avoidance '1'
        option mtu '2304'
        option bonding '1'

config interface 'batmesh'
        option proto 'batadv_hardif'
        option master 'bat0'
        option mtu '1532'

config interface 'batwire'
        option proto 'batadv_hardif'
        option master 'bat0'
        option device 'br-wiremesh'
        option mtu '1532'

config device
        option name 'bat0'
        option mtu '2304'

config device
        option type 'bridge'
        option name 'br-wiremesh'
        list ports 'lan4'  -------------> phy interface used to connect towards router2

config device
        option name 'lan4'
        option mtu '1532'

and router2:

config device 'device1'
        option name 'br-lan'
        list ports 'bat0.10'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'wan'
        option type 'bridge'
        option mtu '1500'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option bridge_loop_avoidance '1'
        option gw_mode 'client'
        option hop_penalty '30'
        option mtu '2304'
        option bonding '1'

config device 'device3'
        option mtu '2304'
        option name 'bat0'

config interface 'batwire'
        option proto 'batadv_hardif'
        option device 'br-wiremesh'
        option master 'bat0'
        option mtu '1532'

config device 'device5'
        option name 'br-wiremesh'
        list ports 'lan1'  -------------> phy. interface used to connect towards router4
        option type 'bridge'

config device
        option name 'lan1'
        option mtu '1532'


any idea why this messages for vlan0 on interface bridges according to this setup?

thanks for all your support!!