Community discussions

MikroTik App
 
betulum
just joined
Topic Author
Posts: 3
Joined: Thu Nov 03, 2022 12:03 pm

Terribly slow Wi-Fi speed

Thu Dec 15, 2022 5:32 pm

Sometimes we suffer from terribly slow Wi-Fi speed down to 5Mbps on 5GHz channels.
We use Mikrotik router (with RouterOS 6.49.6) with CapsMan for managing 8 cAPs (Miktotik cAP AC) with roaming enabled. CapsMan configuration is attached.
Normally we get 100-200 Mbps on laptop connections, but sometimes laptop connections drop to 5-10 Mbps on one cAP or another. All laptops connected to that cAP suffer the same slow connection. Meanwhile we have never seen more than 20 clients connected to any cAP at once. Furthermore, number of clients does not influence cAP. I tried switching clients off cAP that suffer from terrible slow speed and ended with single client still suffering slow speed. Others laptops connected to other cAPs are not effected. We have noticed that 3 of 8 our cAPs sometimes drop their speed in that manner. After a while (ten minutes or half an hour) cAP regains speed to normal 100-200 Mbps. Sometimes we have no time to wait and hard reset cAP. After hard reset cAP always works fine with normal 100-200 Mbps.

What may be a culprit or what should I examine else ?
Thanks in advance for your help.
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 1:26 am

This is how wifi works, and is supposed to work.
There might be a clear reason why the speed drops (wall's, distance, interference).
If transmissions fail, wifi retries 7 times, but if still no success the interface rate is lowered to compensate.
Wifi will slow further down until it works or until it disconnec,ts (really fails in that setup at the lowest rate)

These actions can be monitored in the "Registration table" (interface rate, and CCQ value based on needed retransmits)
Multicast/broadcast packets are always sent at the basic rate, by default only 6 Mbps, because there is no "check and retransmit" mechanism.

The impact of a slow connection (eg sticky client holding on to the current AP too long even when there is a better one nearby. The client decides where to connect, not CAPsMAN) is felt by every transmitter in the same channel, (That is more than the same AP) because there can only be one transmitter at the same time in each channel.
And a slow transmitter will occupy the channel for a much longer time, than the fast transmitter. Bringing the effective speed down for everyone in the channel.

Restarting a cAP will force its clients to check for a better AP. Any sticky client will probably roam then, and be at full speed until moved while remaining sticky.
 
erlinden
Forum Guru
Forum Guru
Posts: 1926
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 9:21 am

From your configuration I would like to give you the following hints/tips:
  • Don't use 802.11a neither 802.11b
  • Don't use extension channel on the 2.4GHz radio
  • Consider using 40MHz bandwidth on the 5GHz radio
  • Specify your channels explicitely
  • Don't use tkip
And furthermore...don't share a config that might still contain a passphrase
 
Rox169
Member
Member
Posts: 434
Joined: Sat Sep 04, 2021 1:47 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 9:51 am

try ROS 7.6
 
betulum
just joined
Topic Author
Posts: 3
Joined: Thu Nov 03, 2022 12:03 pm

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 10:14 am

Thank you for detailed answer. Please, clarify:
There might be a clear reason why the speed drops (wall's, distance, interference).
If transmissions fail, wifi retries 7 times, but if still no success the interface rate is lowered to compensate.
Wifi will slow further down until it works or until it disconnects (really fails in that setup at the lowest rate)
Can we get evidence of transmission failures other than Tx/Rx rate ? Maybe, sniffering AP traffic ? I know about TCP retransmissions, does Wi-Fi work in the same manner ?
Multicast/broadcast packets are always sent at the basic rate, by default only 6 Mbps, because there is no "check and retransmit" mechanism.
Does it mean that streaming multicast video always flow at 6 Mbps ? I am confused.
The impact of a slow connection (eg sticky client holding on to the current AP too long even when there is a better one nearby. The client decides where to connect, not CAPsMAN) is felt by every transmitter in the same channel, (That is more than the same AP) because there can only be one transmitter at the same time in each channel.
And a slow transmitter will occupy the channel for a much longer time, than the fast transmitter. Bringing the effective speed down for everyone in the channel.
We use the same channel Ceee (actually I always see 5180) on all our APs. As far as I understand from your explanation all APs must slow down in case of single slow client on any of AP. But we noticed different behaviour: all clients on the same AP work slowly while clients on other (nearby) APs work fine at 100-200 Mbps. Maybe, I misunderstood you.
 
betulum
just joined
Topic Author
Posts: 3
Joined: Thu Nov 03, 2022 12:03 pm

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 10:29 am

Thank you for your answer.
Don't use 802.11a neither 802.11b
Does it mean that Wi-Fi AP will refuse to connect old Wi-Fi clients that support only 54Mbps ?
[*]Don't use extension channel on the 2.4GHz radio
[*]Consider using 40MHz bandwidth on the 5GHz radio
[*]Specify your channels explicitely
[*]Don't use tkip[/list]
Currently all APs share the same Ceee channel. How should I specify Wi-Fi channels properly ? Can I set different channel for each AP using CapsMan ? Will roaming work if adjacent APs have different channels ?
 
erlinden
Forum Guru
Forum Guru
Posts: 1926
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 10:44 am

If you mean by old ancient...yes

Interference will always have to be avoided...sharing the same channel is the worst you can do. When I used CAPsMAN (years ago, so I have to answer by heart) I made a configuration per radio. That way I could specify everything per radio.

Roaming will definitely work better when using different (non overlapping) channels.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 10:56 am

Can we get evidence of transmission failures other than Tx/Rx rate ? Maybe, sniffering AP traffic ? I know about TCP retransmissions, does Wi-Fi work in the same manner ?
Yes there is detailed information , ratio of frames (good transmissions) versus HW frames (all transmissions) leads to calculate TX CCQ.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 12:18 pm

Does it mean that streaming multicast video always flow at 6 Mbps ? I am confused.
Yes and no. There can be multiple basic rates defined. Which one is choosen, I don't know the algorithm.
Mostly using multicast for much traffic kills the wifi environment. Be aware that Apple Bonjour, mDNS, some camera streams all are multicast.

Multiast will be avoided if "Multicast helper" is set to "FULL", by converting multicasts in unicasts per device.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 12:32 pm

We use the same channel Ceee (actually I always see 5180) on all our APs. As far as I understand from your explanation all APs must slow down in case of single slow client on any of AP. But we noticed different behaviour: all clients on the same AP work slowly while clients on other (nearby) APs work fine at 100-200 Mbps. Maybe, I misunderstood you.

I have just given the working principle. If another transmission is detected on the same channel, then the other transmitters all will WAIT. APs and stations are equal in this.
Will it be detected? Depends on the signal strength and quality. Sometimes even -96dBm is still decodeable.
So your experience depends on the distance for one parameter. A slow transmitter disturbs the whole channel when transmitting very often, or continously.
Only one AP slow, e.g. could be disturbed by its own reflected transmissions.

Half overlapping channels will not be waited for, but the signal will be distorted due to adjacent channel interference. Corrupting the packet and causing retransmits for both channels.
802.11ac is a bit special in this, where the C and e 20MHz channels are handled differently. (Look up the theory: https://www.oreilly.com/library/view/80 ... index.html )

One very interesting tool with MT is "Snooper", that will show AP and clients on the channels. The Wifi Sniffer there will even show all the packets. To be analysed with Wireshark. The multicast Beacons are very interesting to analyse.
Last edited by bpwl on Fri Dec 16, 2022 12:38 pm, edited 1 time in total.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 12:37 pm

sharing the same channel is the worst
Channel overlap [adjacent channel interference] can be worse than same channel co-existence. [Same channel interference], because the former destroys transmissions, the later make them wait for each other. WMM defines the priority in that wait state. WMM and MT is yet another story. (activated by default, but everything is the lowest prirority by default config).
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2990
Joined: Mon Apr 08, 2019 1:16 am

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 12:46 pm

Fully agree with tips from @erlinden. Important tips!

802.11n (HT MCS rates) and 802.11ac (VHT MCS rates), are fully backward compatible with 802.11g (6-54Mbps data rates)

Roaming works fine with different channels. The station seeks to find the SSID.
 
erlinden
Forum Guru
Forum Guru
Posts: 1926
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Terribly slow Wi-Fi speed

Fri Dec 16, 2022 12:50 pm

Fully agree with tips from @erlinden. Important tips!
What a compliment! And thanks for learning from you again!
 
gotsprings
Forum Guru
Forum Guru
Posts: 2107
Joined: Mon May 14, 2012 9:30 pm

Re: Terribly slow Wi-Fi speed

Sat Dec 17, 2022 2:24 am

Seek another vendor for WiFi.

As a recovering caps-man addict
I miss caps-man speed of setup, tight integration, flexibility... BUT I SURE DON'T MISS THE CONSTANT COMPLAINTS AND TROUBLE TICKETS.
 
Ratatouille
just joined
Posts: 22
Joined: Mon May 25, 2020 11:57 pm
Location: Africa

Re: Terribly slow Wi-Fi speed

Wed Dec 21, 2022 2:56 pm

Just to add to the answers from @bpwl and @erlinden:

(1) from a quick review of your config, I'd suggest you change "local-forwarding=no" from no to yes to eleminate one potential source of the slowing-down problem. Does the CPU load on the CAPSMAN router/controller jump up during the slowdown? Perhaps it's not a factor in the slowdown, but I personally avoid CAPSMAN forwarding if I can. You may have to reconfigure your network, though. for the change from CAPSMAN forwarding to local forwarding, depending on your network config.
capsman.rsc:
add arp=enabled bridge=bridge_wifi client-to-client-forwarding=yes \
    local-forwarding=no name=datapath_master
add arp=enabled bridge=bridge_wifi_guest client-to-client-forwarding=no \
    local-forwarding=no name=datapath_guest 

(2) Also I'd suggest you keep the bandwidth at 20Mhz for the 5Ghz while trying to determine the source of the wireless problem; you may go back to 40Mhz when you've isolated and solved the problem.
[*]Consider using 40MHz bandwidth on the 5GHz radio
 
volkirik
Member Candidate
Member Candidate
Posts: 208
Joined: Sat Jul 23, 2016 2:03 pm

Re: Terribly slow Wi-Fi speed

Tue Feb 13, 2024 10:59 am

for your testing;

ON ACCESS POINT
/queue type set [find] kind=pcq pcq-classifier=src-address,src-port,dst-address,dst-port pcq-limit=12500KiB pcq-total-limit=12500KiB

ON CORE ROUTERS:
/queue type set [find] kind=pcq pcq-classifier=src-address,src-port,dst-address,dst-port pcq-limit=125000KiB pcq-total-limit=125000KiB

/interface wireless set [find ] adaptive-noise-immunity=ap-and-client-mode hw-protection-mode=rts-cts mtu=2290 l2mtu=2290 frame-lifetime=1500 disconnect-timeout=15s hw-retries=15 on-fail-retry-time=0.1 noise-floor-threshold=default installation=indoor distance=indoors radio-name="" update-stats-interval=10s frequency-mode=superchannel ampdu-priorities=0,1,2,3,4,5,6,7 amsdu-limit=7935 amsdu-threshold=7935 wmm-support=enabled antenna-mode=txa-rxb multicast-helper=full keepalive-frames=enabled multicast-buffering=enabled

# https://networkengineering.stackexchange.com/a/37324
tkip; hw-protection-threshold=2359 hw-fragmentation-threshold=2358
wep; hw-protection-threshold=2347 hw-fragmentation-threshold=2346
ccmp; hw-protection-threshold=2355 hw-fragmentation-threshold=2354
open; hw-protection-threshold=2339 hw-fragmentation-threshold=2338

# remove simple queues and use queue tree. enable IP fastpath and IP fasttrack. disable loose-TCP-tracking.

# I get about ~250 MBPS with this setup (trial and error method, speedtest on each combination).
# formerly it was about ~20 MBPS. couldnt increase to 300 MBPS with any combination...

YMMV, I wish you all best of success

Regards.
Last edited by volkirik on Tue Mar 05, 2024 6:15 pm, edited 106 times in total.
 
maigonis
Member Candidate
Member Candidate
Posts: 183
Joined: Sat Jul 20, 2019 8:16 pm

Re: Terribly slow Wi-Fi speed

Tue Feb 13, 2024 3:32 pm

Use wave2, legacy drivers have issues that pop up on larger networks quite often.
 
volkirik
Member Candidate
Member Candidate
Posts: 208
Joined: Sat Jul 23, 2016 2:03 pm

Re: Terribly slow Wi-Fi speed

Tue Feb 13, 2024 3:51 pm

I know. But my home AP does not support wave2.

Also there is something weird. If i set wifi mtu to 1500, speed is about 100 mbps. If i set wifi mtu to 2290 bytes (max), speed is about 250 MBPS.

I just wanted to share with the community

and also for WMM;
/ipv6 firewall mangle
add action=change-mss chain=postrouting new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=change-mss chain=forward new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=change-mss chain=output new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=set-priority chain=postrouting new-priority=7 packet-size=0-200 passthrough=yes
add action=set-priority chain=postrouting new-priority=6 packet-size=201-400 passthrough=yes
add action=set-priority chain=postrouting new-priority=5 packet-size=401-600 passthrough=yes
add action=set-priority chain=postrouting new-priority=4 packet-size=601-800 passthrough=yes
add action=set-priority chain=postrouting new-priority=3 packet-size=801-1000 passthrough=yes
add action=set-priority chain=postrouting new-priority=2 packet-size=1001-1200 passthrough=yes
add action=set-priority chain=postrouting new-priority=1 packet-size=1201-1400 passthrough=yes
add action=set-priority chain=postrouting new-priority=0 packet-size=1401-65535 passthrough=yes
add action=change-dscp chain=postrouting new-dscp=56 passthrough=yes priority=7
add action=change-dscp chain=postrouting new-dscp=48 passthrough=yes priority=6
add action=change-dscp chain=postrouting new-dscp=40 passthrough=yes priority=5
add action=change-dscp chain=postrouting new-dscp=32 passthrough=yes priority=4
add action=change-dscp chain=postrouting new-dscp=24 passthrough=yes priority=3
add action=change-dscp chain=postrouting new-dscp=16 passthrough=yes priority=2
add action=change-dscp chain=postrouting new-dscp=8 passthrough=yes priority=1
add action=change-dscp chain=postrouting new-dscp=0 passthrough=yes priority=0

/ip firewall mangle
add action=change-mss chain=postrouting new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=change-mss chain=forward new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=change-mss chain=output new-mss=clamp-to-pmtu passthrough=yes protocol=tcp tcp-flags=syn
add action=set-priority chain=postrouting new-priority=7 packet-size=0-200 passthrough=yes
add action=set-priority chain=postrouting new-priority=6 packet-size=201-400 passthrough=yes
add action=set-priority chain=postrouting new-priority=5 packet-size=401-600 passthrough=yes
add action=set-priority chain=postrouting new-priority=4 packet-size=601-800 passthrough=yes
add action=set-priority chain=postrouting new-priority=3 packet-size=801-1000 passthrough=yes
add action=set-priority chain=postrouting new-priority=2 packet-size=1001-1200 passthrough=yes
add action=set-priority chain=postrouting new-priority=1 packet-size=1201-1400 passthrough=yes
add action=set-priority chain=postrouting new-priority=0 packet-size=1401-65535 passthrough=yes
add action=change-dscp chain=postrouting new-dscp=56 passthrough=yes priority=7
add action=change-dscp chain=postrouting new-dscp=48 passthrough=yes priority=6
add action=change-dscp chain=postrouting new-dscp=40 passthrough=yes priority=5
add action=change-dscp chain=postrouting new-dscp=32 passthrough=yes priority=4
add action=change-dscp chain=postrouting new-dscp=24 passthrough=yes priority=3
add action=change-dscp chain=postrouting new-dscp=16 passthrough=yes priority=2
add action=change-dscp chain=postrouting new-dscp=8 passthrough=yes priority=1
add action=change-dscp chain=postrouting new-dscp=0 passthrough=yes priority=0
most importantly;
/ip firewall mangle
add action=clear-df chain=postrouting passthrough=yes protocol=tcp tcp-flags=syn
add action=clear-df chain=prerouting passthrough=yes protocol=tcp tcp-flags=syn

Who is online

Users browsing this forum: ivanusevanton and 13 guests