Mesh Configuring | TP-Link | Batman-ADV

Dear Reader.
I love OpenWrt! I learn so much from you!
So here's my situation, I want to build a mesh network for learning purposes.
I also wish to enable SQM (bufferfloat)

My Situation:
I have Openwrt Version 18.06.4 running on:
TP-Link WNDR3600 (Modem) With IP 172.16.0.1 255.255.0.0 DHCP (Forced, starting from x.x.x.100)
TP-Link WNDR4300 (Mesh1) With IP 172.16.0.2 255.255.0.0
TP-Link WR1043ND (Mesh2) With IP 172.16.0.3 255.255.0.0

My Changes:
I configured Dropbear for LAN only

  • Set my Admin password
  • Added Mesh1 & Mesh2 in Modem it's DNS table.

My installation procedure
Login via SSH to update & Install the software

I've run the following commands (ascending) without error.
opkg update
opkg install kmod-batman-adv
opkg install batctl
opkg remove wpad-basic (Nothing is removed, cause it's not installed)
opkg install wpad-mesh-openssl
Reboot.

After Reboot
SCP to /etc/config/wireless & adding step 1 from tutorial

config wifi-iface 'mesh0'
option device 'radio5pci' (I changed this to radio0) (it's the wlan on tp-link)
option ifname 'mesh0'
option network 'nwi_mesh0'
option mode 'mesh'
option mesh_fwding '0'
option mesh_id 'meshnet'
option encryption 'psk2+ccmp'
option key 'test'

SAVE > SSH > Reboot

After Reboot
SCP to: /etc/config/network & add:

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

SAVE > SSH > Reboot

After Reboot
Open SCP connection > Open /etc/config/network and paste

Bridge With IPv4 Address
config interface 'vlan1111'
option type 'bridge'
option stp '1'
option ifname 'eth1.1111 bat0.1111'
option proto 'static'
option ipaddr '192.168.11.11'
option netmask '255.255.255.0'
option delegate '0'

Bridge Without IPv4 Address
config interface 'vlan2222'
option type 'bridge'
option stp '1'
option ifname 'eth1.2222 bat0.2222'
option proto 'none'
option auto '1'
option delegate '0'

Bridge Without Ethernet Interface
config interface 'vlan3333'
option type 'bridge'
option stp '1'
option ifname 'bat0.3333'
option proto 'none'
option auto '1'
option delegate '0'

SSH > Reboot > Result .
After Opening LUCI > network > interfaces i see:
BAT0 - unsuppored protocol type (wtf)
nwi_mesh0 ( unsuppored protocol type)
vlan 1111
vlan 2222
vlan 3333

And that's the point where I am stuck.
Who can help me?

Researched documents. and everything in there.
https://openwrt.org/docs/guide-user/network/wifi/mesh/batman

The WR1043ND is 2.4 GHz only, so you will need to run your mesh on 2.4 GHz.

Be sure to set the radio channel explicitly. All meshed radios must be on the same channel.

Keep VLAN numbers below 16 for best compatibility with older hardware switches. I think the routers you have can handle 128, but above that will need a special configuration.

Of course LuCI stock doesn't understand BATMAN though there may be a luci-proto package for it.

Hey, truly thanks for your answer
Yes, I want 2.4Ghz only. For my test it's more than Ok!
Also, I will keep the Vlan numbers low next time!
Ofcource default LuCI doesn't understand, But why is the interface disabled?

It is correct that I have to add all 3 vlan's? what about the Class C.11 adress?

I would suggest testing a setup with no VLANs and no encryption at first. You can add those later once you are familiar with the basic setup.

OK, will do and post the results.
Currently trying to get the TP-LinkWDR4300 back to live.

Update
Got it back, it didn't like those Vlans.
Within a few days I will try to set up b.a.t.m.a.n ADV again.

Check out LibreMesh using the web builder

http://chef.libremesh.org/

Wow, I will definitely take a look at this. This works with 18.06.4?

I've been seeing problems with master builds (can't comment on release builds) with increasing the MTU. Omitting the MTU line, or setting to to the default of 1500 may be needed. I'm still trying to understand why increased MTU over 802.11s is causing hangs. The symptom is that ping or interactive ssh works, but large transfers of data (over ~1 kB of text or data) hang the connection.

1 Like

Everything works for me right now with mtu 1532 on 18.06.4
On the snapshot version I tested a couple of weeks ago it was an mtu related error in the log and I had to increase it (in the different place) to get rid of the error.

1 Like

Thank you so much for all the support everyone.

My goal:
Offer free Wi-Fi in a kampung in Indonesia.
But currently in test phase.

1 Like
  1. It was updated to 18.06.2 by p4u,

  2. if you want later you can use the cooker and make some changes to the feeds.conf

  3. or compile completely from source

1

2

3

So, I finally bargained some time from my wife to continue my little project.
The first test are very promising. I see that the nodes get their 10.x.x.x adress and all have DHCP. Is it safe to give them their own static 10.X adresses and only 1 DCHP. And what about the SQM package. do I have to install this on one device or multiple?

Its not clear what network this is or your intent. Assuming these are clients of the network, then addressing would be like any other subnet.

Unless you have a good reason to manage traffic flow within your own network, it would only need to be run on the Internet-facing interface on your border router.

Those node IP addresses are generated from their MAC addresses. You could change then if you wish.

This has been frustrating me for a few weeks... ( couldn't access the web interface on a bridged VLAN on the mesh) was digging through routing tables, dropped packets, firewalls..

I can live with the performance hit for now of fragmenting the L2 packets ( frames ? ),

What is strange is that internet services ( also going through a bridged VLAN to a gateway far away) are running fine, maybe the MTU of the ISP's router/ transport is smaller than Ethernet's 1500 and that's why LAN traffic on the mesh was affected but not the internet traffic..

Edit : openwrt 19.07 using ath10k-ct on Compex WPJ428 with batman-adv, batctl openwrt-2019.2-1 [batman-adv: openwrt-2019.2-3] , and mesh is on the 5GHz radio

another edit : a router between us and "them" has a 1480mtu

tracepath -n 8.8.8.8
 1: [LOCALHOST]                      pmtu 1500
 1:  192.168.87.1                                          1.175ms 
 1:  192.168.87.1                                          1.667ms 
 2:  10.0.0.1                                              6.126ms 
 3:  192.168.20.1                                         28.570ms 
 4:  192.168.0.1                                          25.224ms 
 5:  10.0.0.2                                             21.443ms 
 6:  10.0.0.2                                             13.876ms pmtu 1480
...
1 Like

Iā€™m seeing it totally locally, no ISP involved. I think I saw some patches in the batman-adv package around config options that I should look into again

some more tests on the MTU with iperf , Fragmentation on batman-adv is enabled

When I leave the MTU of the mesh interface at 1500 ( running iperf -c )

iperf3 -c 192.168.1.165
Connecting to host 192.168.1.165, port 5201
[  5] local 192.168.1.223 port 35276 connected to 192.168.1.165 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  3.09 MBytes  25.9 Mbits/sec   18   72.1 KBytes
[  5]   1.00-2.00   sec  10.6 MBytes  89.0 Mbits/sec    5    132 KBytes
[  5]   2.00-3.00   sec  11.9 MBytes  99.8 Mbits/sec   61   93.3 KBytes
[  5]   3.00-4.03   sec  12.8 MBytes   105 Mbits/sec    0    163 KBytes
[  5]   4.03-5.03   sec  12.6 MBytes   105 Mbits/sec    3    198 KBytes
[  5]   5.03-6.05   sec  14.1 MBytes   116 Mbits/sec    1    226 KBytes
[  5]   6.05-7.04   sec  12.1 MBytes   102 Mbits/sec    1    257 KBytes
[  5]   7.04-8.02   sec  14.1 MBytes   121 Mbits/sec   19    215 KBytes
[  5]   8.02-9.06   sec  14.2 MBytes   115 Mbits/sec    0    239 KBytes
[  5]   9.06-10.00  sec  10.8 MBytes  96.5 Mbits/sec   66    160 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   116 MBytes  97.5 Mbits/sec  174             sender
[  5]   0.00-10.03  sec   116 MBytes  96.7 Mbits/sec                  receiver

iperf Done.

When the MTU is set to larger than 1500 ( set to 1564 )

iperf3 -c 192.168.1.165
Connecting to host 192.168.1.165, port 5201
[  5] local 192.168.1.223 port 35276 connected to 192.168.1.165 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  42.4 KBytes   347 Kbits/sec    2   1.41 KBytes
[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  42.4 KBytes  34.7 Kbits/sec    5             sender
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf Done.

Thank you for all your advice.
Everything works as expected. :slight_smile:
I am really satisfied!

1 Like

Some updates have been applied to the master branch ath10k-ct and ath10k driver, so now MTU > 1500 works on IPQ40xx devices ( tested on my IPQ4019 based device ) -Setup is as on the openwrt batman-adv page with several VLANS inside the bat0 (the 50.x network in this case is bat0.6 )
/etc/config/network MTU value :

config interface 'nwi_mesh0'
        option mtu '2304'
        option proto 'batadv_hardif'
        option master 'bat0'

Iperf between 2 mesh nodes with the MTU at 2304

Connecting to host 192.168.50.2, port 5201
[  5] local 192.168.50.1 port 43000 connected to 192.168.50.2 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  13.7 MBytes   115 Mbits/sec    0    636 KBytes       
[  5]   1.00-2.00   sec  14.1 MBytes   118 Mbits/sec    0   1005 KBytes       
[  5]   2.00-3.02   sec  13.7 MBytes   113 Mbits/sec    0   1005 KBytes       
[  5]   3.02-4.00   sec  13.6 MBytes   116 Mbits/sec    0   1005 KBytes       
[  5]   4.00-5.00   sec  16.8 MBytes   141 Mbits/sec    0   1005 KBytes       
[  5]   5.00-6.00   sec  16.6 MBytes   140 Mbits/sec    0   1005 KBytes       
[  5]   6.00-7.00   sec  17.5 MBytes   147 Mbits/sec    0   1005 KBytes       
[  5]   7.00-8.00   sec  13.0 MBytes   109 Mbits/sec    0   1005 KBytes       
[  5]   8.00-9.00   sec  15.5 MBytes   130 Mbits/sec    0   1005 KBytes       
[  5]   9.00-10.00  sec  16.1 MBytes   135 Mbits/sec    0   1005 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   151 MBytes   126 Mbits/sec    0             sender
[  5]   0.00-10.03  sec   150 MBytes   125 Mbits/sec                  receiver

apparently we also get VLANS on wifi ( multiple Vifs on ath10k )

 iw phy | fgrep mesh
                 * mesh point
                 * #{ managed } <= 16, #{ AP, mesh point } <= 16, #{ IBSS } <                                                                          = 1,
1 Like

That looks very good, will check this out also. Thank you