Double MESH network on one router

Hello,

I'm using mesh-network to extend rover (range). I've 2 rovers then I use 2 wifi chipset (MT7612U, interfaces mesh0 and mesh1) each mounted with directional antenna and tracker.
Both of this 2 chipsets are connected to the same router with USB and both are using the same mesh configuration

It seems some kind network loops appears. In the logs I got lot of
br-lan: received packet on mesh0 with own address as source address (addr:c4:41:1e:f8:98:a7, vlan:0)

Is ther a way to tell mesh0 to ignore mesh1 and mesh1 to ignore mesh0 messages ?

config wifi-device 'radio_wifi_trackeur1'
        option type 'mac80211'
        option macaddr '00:13:ef:4f:12:ef'
        option cell_density '0'
        option country 'FR'
        option txpower '20'
        option band '2g'
        option htmode 'HT20'
        option channel '11'
 
config wifi-iface 'wifinet8'
        option device 'radio_wifi_trackeur1'
        option mode 'mesh'
        option encryption 'sae'
        option mesh_id 'MESH_ID'
        option mesh_fwding '1'
        option mesh_rssi_threshold '0'
        option key 'PWDPWDPWD'
        option network 'lan'
        option ifname 'mesh0'

config wifi-device 'radio_wifi_trackeur2'
        option type 'mac80211'
        option macaddr '00:13:ef:1f:12:d5'
        option cell_density '0'
        option country 'FR'
        option txpower '20'
        option band '2g'
        option htmode 'HT20'
        option channel '11'

config wifi-iface 'wifinet9'
       option device 'radio_wifi_trackeur2'
       option mode 'mesh'
       option encryption 'sae'
       option mesh_id 'MESH_ID'
       option mesh_fwding '1'
       option mesh_rssi_threshold '0'
       option key 'PWDPWDPWD'
       option network 'lan'
       option ifname 'mesh1'

Thanks

This is a very common issue with mesh on OpenWRT. The only workaround I’ve found is changing the MAC addresses of all your interfaces (mesh and networks), devices (ports, bridges, and radios) to their own unique MAC’s. There are universal MAC’s that can be used and you can tailor each MAC according to your needs, though I’m at work and don’t have the time to look them up and I can’t recall what they are off the top of my head.

1 Like

I found a possible workaround with BATMAN that has an option "bridge_loop_avoidance"
But for the moment I don't manage to make it works.

If you can detail a little bit more your solution?

I use batman-adv in my setup and still get those log messages unless I update the MAC addresses as I mentioned. I learned the following from another user on the forum a few months ago

you'll need to assign a private mac-address* to the following:

Device/interface Location
bat0 device /etc/config/network
Bridge devices (eg br-lan) /etc/config/network
Wifi interfaces /etc/config/wireless

The private blocks for MAC addresses are -

*private mac-addresses belong to one of the following blocks:

  • x2:xx:xx:xx:xx:xx
  • x6:xx:xx:xx:xx:xx
  • xA:xx:xx:xx:xx:xx
  • xE:xx:xx:xx:xx:xx

By adding option macaddr xx:xx:xx:xx:xx:xx to each block in the config.
You can organize the MAC addresses logically in a similar way using this map -

02:00:00:AA:00:00
       |  |  |  |
       |  |  |  ╰---for bat0: 00
       |  |  |      for bridge: vlan id (you can also use the previous 2 positions)
       |  |  |      for Wifi interface: 2 for 2.4ghz | 5 for 5ghz radio
       |  |  |
       |  |  ╰------for bridge: vlan id (you can also use the next 2 positions)
       |  |   
       |  ╰---------Type: A = bat0 device
       |            B = Bridge device
       |            C = Wifi interface
       |
       ╰------------Last number of the router's IP-address eg 01
 
 examples:        
    02:00:01:AA:00:00
 Router at IP 192.168.x.01 - bat0 device
  	02:00:04:BB:06:53
 Router at IP 192.168.x.04 - Bridge device with vlan 653
    02:00:02:CC:00:05
 Router at IP 192.168.x.02 - wifi interface on radio at 5Ghz

or... you can randomly assign mac's as long as you're using the private blocks, but using the map makes troubleshooting any issues you may happen to come across in the future so much easier.

2 Likes