Test meshing with unifi-ac-mesh

hi there
i do long testing mesh network with batman-adv install with custom openwrt image
and this is my results :
test equipment

2 unifi ac mesh one connect to cisco poe switch (48v and its work fine with it without any problem ) with cable cat 6 and second one connect meshing with (batman-adv with first one ) and i have wds router (work with openwrt )
this router connect with ap2 (mesh) by other bssid interfaces

the distance between aps 65 m and between ap2 and router 15 m .

total client connect to AP2 is 10 - 17 client each client have 2mb up and 2mb down
and router have 5 client connect on it and also have 2mb up and 2mb down

my configuration

wired ap (first ap)
network

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

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0 bat0'
        option proto 'static'
        option ipaddr '10.35.1.4'
        option netmask '255.255.240.0'
        option gateway '10.35.1.1'
        option dns '172.109.25.3'

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_mode 'off'
        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 'urufi_mesh'
        option mtu '1536'
        option proto 'batadv_hardif'
        option master 'bat0'

wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'VHT80'
        option txpower '30'  # the maximum txpower for 36 is 22 but for 149 and up its enable 30
        option country 'US'
        option disabled '0'

config wifi-iface 'urufi_meshing'  # mesh radio0 interface
        option device 'radio0'
        option network 'urufi_mesh'
        option mode 'mesh'
        option mesh_id 'xxxx'
        option mesh_fwding '0'
        option hidden '1'
        option encryption 'psk3+ccmp'
        option key 'secret'

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

config wifi-iface 'urufi_access'   # client ssid interface
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'URUFI'
        option ieee80211r '0'
        option encryption 'wpa2'
        option auth_server '*******'
        option auth_port '1812'
        option auth_secret '********'
        option acct_server '*********'
        option acct_port '1813'
        option acct_secret '*******'

second ap (mesh-client)
network

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

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0 bat0'
        option proto 'static'
        option ipaddr '10.35.1.2'
        option netmask '255.255.240.0'
        option gateway '10.35.1.1'
        option dns '172.109.25.3'


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_mode 'off'
        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 'urufi_mesh'
        option mtu '1536'
        option proto 'batadv_hardif'
        option master 'bat0'

wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'VHT80'
        option txpower '30'  # the maximum txpower for 36 is 22 but for 149 and up its enable 30
        option country 'US'
        option disabled '0'

config wifi-iface 'urufi_meshing'  # mesh radio0 interface
        option device 'radio0'
        option network 'urufi_mesh'
        option mode 'mesh'
        option mesh_id 'xxxx'
        option mesh_fwding '0'
        option hidden '1'
        option encryption 'psk3+ccmp'
        option key 'secret'

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

config wifi-iface 'urufi_bridge'   #  router wds ssid 
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'xxxx'
        option hidden '1'
        option wds '1'
        option ieee80211r '1'
        option encryption 'psk3+ccmp'
        option key 'secret'

config wifi-iface 'urufi_access'   # client ssid interface
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'URUFI'
        option ieee80211r '0'
        option encryption 'wpa2'
        option auth_server '*******'
        option auth_port '1812'
        option auth_secret '********'
        option acct_server '*********'
        option acct_port '1813'
        option acct_secret '*******'

wds client router

network

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

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '10.35.2.2'
        option netmask '255.255.240.0'
        option gateway '10.35.1.1'
        option dns '172.109.25.3'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'b0:be:76:9f:09:f2'

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

config switch_vlan   #enable only wan port for router 
        option device 'switch0'
        option vlan '1'
        option ports '0 6t'

wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '1'
        option hwmode '11g'
        option path 'platform/10300000.wmac'
        option htmode 'HT20'
        option country 'US'
        option txpower '24'
        option disabled '0'

config wifi-iface 'urufi_client'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'xxxx'
        option ieee80211r '0'
        option encryption 'wpa2'
        option auth_server '*******'
        option auth_port '1812'
        option auth_secret '******'
        option acct_server '********'
        option acct_port '1813'
        option acct_secret '*******'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel 'auto'  
# its auto so if i have more than 1 ap and one of theme down its connect to other one
        option hwmode '11a' 
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option htmode 'VHT40'
        option country 'US'
        option txpower '30'
        option disabled '0'

config wifi-iface 'urufi_bridge'
        option device 'radio1'
        option network 'lan'
        option mode 'sta'
        option ssid xxxx'
        option hidden '1'
        option wds '1'
        option ieee80211r '1'
        option encryption 'psk3+ccmp'
        option key 'secret'

know the testing results
first things meshing between aps

# for mesh client ap 

iwinfo results 
wlan0     ESSID: "urufi-mesh"
          Access Point: 78:8A:20:28:93:FF
          Mode: Mesh Point  Channel: 36 (5.180 GHz)
          Tx-Power: 23 dBm  Link Quality: 48/70
          Signal: -62 dBm  Noise: -101 dBm
          Bit Rate: 157.5 MBit/s
          Encryption: WPA3 SAE (CCMP)
          Type: nl80211  HW Mode(s): 802.11nac
          Hardware: 168C:003C 0000:0000 [Qualcomm Atheros QCA9880]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

ifconfig 

bat0      Link encap:Ethernet  HWaddr C6:76:08:46:7B:F9
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1029745 errors:0 dropped:0 overruns:0 frame:0
          TX packets:506069 errors:0 dropped:679 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1021521002 (974.1 MiB)  TX bytes:64250384 (61.2 MiB)

iw dev wlan0 statin dump  # for client mesh ap

 inactive time:  0 ms
        rx bytes:       1660687894
        rx packets:     4046166
        tx bytes:       135055059
        tx packets:     825857
        tx retries:     0
        tx failed:      0
        rx drop misc:   62275
        signal:         -60 [-61, -66] dBm
        signal avg:     -58 [-60, -65] dBm
        Toffset:        127149840 us
        tx bitrate:     234.0 MBit/s VHT-MCS 5 80MHz VHT-NSS 1
        tx duration:    24927863 us
        rx bitrate:     195.1 MBit/s VHT-MCS 2 80MHz short GI VHT-NSS 2
        rx duration:    325016568 us
        last ack signal:-95 dBm
        avg ack signal: -94 dBm
        airtime weight: 256
        mesh llid:      0
        mesh plid:      0
        mesh plink:     ESTAB
        mesh local PS mode:     ACTIVE
        mesh peer PS mode:      ACTIVE
        mesh non-peer PS mode:  ACTIVE
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        DTIM period:    2
        beacon interval:100
        connected time: 18257 seconds
        associated at [boottime]:       35.340s
        associated at:  18446725628419676151 ms
        current time:   1454162399 ms

ping from core router to mesh-client ap 

  SEQ HOST                                     SIZE TTL TIME  STATUS                                                                                                        
    0 10.35.1.2                                  56  64 1ms  
    1 10.35.1.2                                  56  64 2ms  
    2 10.35.1.2                                  56  64 2ms  
    3 10.35.1.2                                  56  64 1ms  
    4 10.35.1.2                                  56  64 1ms  
    5 10.35.1.2                                  56  64 2ms  
    6 10.35.1.2                                  56  64 1ms  
    7 10.35.1.2                                  56  64 1ms  
    8 10.35.1.2                                  56  64 2ms  
    9 10.35.1.2                                  56  64 1ms  
   10 10.35.1.2                                  56  64 4ms  
   11 10.35.1.2                                  56  64 2ms  
   12 10.35.1.2                                  56  64 1ms  
   13 10.35.1.2                                  56  64 1ms  
   14 10.35.1.2                                  56  64 3ms  
   15 10.35.1.2                                  56  64 1ms  
   16 10.35.1.2                                  56  64 2ms  
   17 10.35.1.2                                  56  64 1ms  
   18 10.35.1.2                                  56  64 1ms  
   19 10.35.1.2                                  56  64 1ms  
    sent=20 received=20 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=4ms 

bandwidth test
from mikrotik winbox ping speed i have 

25-58 mb total bandwidth 

for wds router on mesh ap


iwinfo for wds 

wlan1     ESSID: "urufi-client"
          Access Point: B0:BE:76:9F:09:CA
          Mode: Client  Channel: 36 (5.180 GHz)
          Tx-Power: 22 dBm  Link Quality: 50/70
          Signal: -60 dBm  Noise: unknown
          Bit Rate: 130.0 MBit/s
          Encryption: WPA3 SAE (CCMP)
          Type: nl80211  HW Mode(s): 802.11nac
          Hardware: 14C3:7662 14C3:7662 [MediaTek MT76x2E]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

iw dev wlan1 station dump # wds ssid connect to mesh ap

Station 7a:8a:20:28:93:ff (on wlan1)
        inactive time:  316 ms
        rx bytes:       977072731
        rx packets:     847864
        tx bytes:       63058704
        tx packets:     440494
        tx retries:     484420
        tx failed:      621
        beacon loss:    1
        beacon rx:      62644
        rx drop misc:   26
        signal:         -60 [-64, -60] dBm
        signal avg:     -60 [-63, -60] dBm
        beacon signal avg:      -60 dBm
        tx bitrate:     65.1 MBit/s VHT-MCS 0 80MHz short GI VHT-NSS 2
        tx duration:    1045244897 us
        rx bitrate:     108.0 MBit/s VHT-MCS 3 40MHz VHT-NSS 2
        rx duration:    79981654 us
        airtime weight: 256
        expected throughput:    31.218Mbps
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        DTIM period:    2
        beacon interval:100
        short slot time:yes
        connected time: 6781 seconds
        associated at [boottime]:       34.504s
        associated at:  18446725628324217804 ms
        current time:   1358703569 ms

ping test from core router to wds router 

  SEQ HOST                                     SIZE TTL TIME  STATUS                                                                                                        
    0 10.35.2.2                                  56  64 7ms  
    1 10.35.2.2                                  56  64 61ms 
    2 10.35.2.2                                  56  64 4ms  
    3 10.35.2.2                                  56  64 5ms  
    4 10.35.2.2                                  56  64 6ms  
    5 10.35.2.2                                  56  64 14ms 
    6 10.35.2.2                                  56  64 32ms 
    7 10.35.2.2                                  56  64 2ms  
    8 10.35.2.2                                  56  64 146ms
    9 10.35.2.2                                  56  64 62ms 
   10 10.35.2.2                                  56  64 9ms  
   11 10.35.2.2                                  56  64 11ms 
   12 10.35.2.2                                  56  64 3ms  
   13 10.35.2.2                                  56  64 48ms 
   14 10.35.2.2                                  56  64 7ms  
   15 10.35.2.2                                  56  64 53ms 
   16 10.35.2.2                                  56  64 15ms 
   17 10.35.2.2                                  56  64 6ms  
   18 10.35.2.2                                  56  64 66ms 
   19 10.35.2.2                                  56  64 29ms 
    sent=20 received=20 packet-loss=0% min-rtt=2ms avg-rtt=29ms max-rtt=146ms 

ping speed form mikrotik winbox i have 

10 - 27 mb and i some time i get less than 10 mb about 6 or 8 


NOTE : i use openssl-mesh for all device and i use batman-adv IV
i wish its help any one
and its nice to see any suggestion to improve speed .

How is throughput using

batctl tp remotenodemac

And

batctl o

batctl tp MAC
results :

Test duration 10040ms.
Sent 78452352 Bytes.
Throughput: 7.45 MB/s (62.51 Mbps)

batctl o
results :

[B.A.T.M.A.N. adv 2020.1-openwrt-2, MainIF/MAC: wlan0/78:8a:20:28:93:ff (bat0/da:01:c0:94:08:4a BATMAN_IV)]
   Originator        last-seen (#/255) Nexthop           [outgoingIF]
 * 78:8a:20:22:19:7d    1.032s   (234) 78:8a:20:22:19:7d [     wlan0]

1 Like

Ok, see you also encrypting your mesh interface, unencrypted your throughput will increase slightly

There was also some performance improvements changing the batman adv hardif mtu

Also in the past choosing "BO' as wifi country meant that you could in some cases increase your tx power, or by leaving it out of your config (overriding your regulatory domain)

The more chains your wifi have the better the signal can get

I still prefer Atheros/Qualcomm wifi over MediaTek

You will notice better throughput when that number reaches 255 for batctl o, yours at the moment was 234 (relates to signal strength)

I have just recently also been using batman-adv over Ethernet and get between 500-900 Mbps

using some old Aruba AP-105 devices

Also I build my firmware by using LibreMesh feeds which does the mesh thing diffirently depending on how you want to use it

Community Mesh Network or Standalone and using just batman-adv or adding bmx6 or bmx7

Also LibreMesh you don't have to configure your gateway

It automatically finds gateways and even allows multiple devices as gateways and uses the mesh metrics to determine which one to use

Further LibreRouter releases a hardware device with their own mix of firmware using LibreMesh, there focus seem to be outdoor mesh community networks

2 Likes

Thank you for your helpful replay i will test libermesh and see what happen with it .

1 Like

here the link to notes

https://libremesh.org/development.html

1 Like

Hello mustafan

I'm glad i found your post ! I'm trying to do a similar set-up: Home set-up with OpenWrt and Ubiquiti

I'm encountering a problem and maybe you can help me with, the mesh0 seems down

49: mesh0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2304 qdisc noqueue state DOWN qlen 1000
    link/ether 26:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff

And my configuration on the wired ap (ap) looks okay I'd say:
/etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd35:4bb4:8223::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0 bat0'

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 'wlan'
        option mtu '2304'
        option proto 'batadv_hardif'
        option master 'bat0'

config interface 'lan'
        option device 'br-lan.100'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '100'
        list ports 'eth0:t'

config interface 'home'
        option device 'br-lan.200'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '200'
        list ports 'eth0:t'

/etc/config/wireless

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1a143000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'                                                                    
        option hwmode '11a'
        option channel '36'
        option band '5g'
        option htmode 'HE80'
        option disabled '0'

config wifi-iface 'mesh0'
        option device 'radio1'
        option ifname 'mesh0'
        option network 'wlan'
        option mode 'mesh'
        option mesh_fwding '0'
        option mesh_id 'meshlr6'
        option encryption 'sae'
        option key 'xxx'

Could you point me out how I could debug that ? I've try service network restart or even ifconfig mesh0 up but nothing is going on. Also check batctl tcpdump mesh0 and its empty.

EDIT: Is it related with my models (Unifi LR-6 Wifi 6 and 5ghz, maybe not using the right hwmode ?) I feel a little bit lost..

EDIT2:

root@lr6-gw:/etc/config# iwinfo
mesh0     ESSID: "meshlr6"
          Access Point: 26:5A:4C:99:F4:15
          Mode: Mesh Point  Channel: unknown (unknown)
          Center Channel 1: unknown 2: unknown
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: none
          Type: nl80211  HW Mode(s): 802.11nacax
          Hardware: 14C3:7915 14C3:7915 [MediaTek MT7915E]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

Finally make it works by removing / re-adding the package wpad-mesh-openssl was incorrectly installed. Certainly due to bad manipulation that I did.