Community discussions

MikroTik App
 
Bandicoot
just joined
Topic Author
Posts: 1
Joined: Wed Mar 01, 2023 9:21 am

Rate limit not applied to the hotspot

Wed Mar 01, 2023 9:34 am

Hi guys,

I've just configured the Hotspot using Mikrotik Hap ac2, but there is no way to limit the rate per user. For some reasons, the rate limit option doesn't work in the User Profiles. In particular, I've set the value 20M/20M in the default "User Profile" and assigned this profile in the tab "Users".

After that I go into the queue and see that for each connected user the values 100M / 100M are set.

Rate limit could only be set entirely to a point using "Server profiles", however, it is necessary to set limits for each user.

I would appreciate your assistance!
 
User avatar
rumahnetmks
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Mon Dec 21, 2020 10:00 am

Re: Rate limit not applied to the hotspot

Wed Mar 01, 2023 4:20 pm

From what your story, you set hotspot using Local User database ("Users" tab). Your goal is to limit user bandwith.
Have you try using simple queue on that particular queue target=user ip? When create the entry to make it work, drag the entry on top your dynamic queue created by the hotspot related to that user ip. Or simply drag it to first line just to make sure the entry should be run.
Example :
User A with IP 172.16.16.254, you want to limit at Download 2Mbps Upload 2Mbps
at terminal :
/queue simple add disabled=no max-limit=2M/2M name=A packet-marks="" parent=none priority=8/8 queue=default-small/default-small target=172.16.16.254/32

If not work, please export your mikrotik config with hide your sensitive info like public ip,serial number, password,etc.
 
taksa
just joined
Posts: 2
Joined: Sun Feb 12, 2023 6:45 pm

Re: Rate limit not applied to the hotspot

Mon Mar 27, 2023 5:39 pm

Good afternoon, hap ac 2 , 6.48.6 the problem is the same in the queues created by hotspot 200M/200M

/interface bridge
add arp=reply-only name=bridge-hotspot
/interface ethernet
set [ find default-name=ether1 ] disabled=yes
set [ find default-name=ether2 ] comment=WAN
set [ find default-name=ether4 ] disabled=yes
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
add dns-name=xxxx.xxx hotspot-address=192.168.7.1 html-directory=\
flash/hotspot login-by=http-chap,http-pap name=hsprof1 \
radius-interim-update=5m rate-limit=29M/29M use-radius=yes
/ip hotspot user profile
set [ find default=yes ] keepalive-timeout=2d mac-cookie-timeout=5d \
rate-limit=5M/5M
/ip pool
add name=hs-pool-8 ranges=192.168.7.20-192.168.7.254
/ip dhcp-server
add add-arp=yes address-pool=hs-pool-8 disabled=no interface=bridge-hotspot \
lease-time=2h name=dhcp1
/ip hotspot
add address-pool=hs-pool-8 disabled=no interface=bridge-hotspot name=hotspot1 \
profile=hsprof1
/queue type
set 9 kind=pcq
/interface bridge port
add bridge=bridge-hotspot interface=ether3
/interface bridge settings
set allow-fast-path=no
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set allow-fast-path=no
/interface list member
add interface=ether2 list=WAN

add address=192.168.7.1/24 interface=bridge-hotspot network=192.168.7.0
/ip dhcp-server network
add address=192.168.7.0/24 comment="hotspot network" gateway=192.168.7.1
/ip dns
set servers=8.8.8.8,1.1.1.1

/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.168.7.0/24
/ip hotspot service-port
set ftp disabled=yes
/ip hotspot user
add name=admin
/ip hotspot walled-garden
add dst-host=xxxxxxx.xxx server=hotspot1
/radius
add address=123.123.123.123 service=hotspot
add address=234.234.234.234 service=hotspot
 
miguelos
just joined
Posts: 18
Joined: Wed Mar 09, 2011 2:15 pm

Re: Rate limit not applied to the hotspot

Sat Oct 21, 2023 11:29 am

I've just configured the Hotspot using Mikrotik Hap ac2, but there is no way to limit the rate per user. For some reasons, the rate limit option doesn't work in the User Profiles. In particular, I've set the value 20M/20M in the default "User Profile" and assigned this profile in the tab "Users".
After that I go into the queue and see that for each connected user the values 100M / 100M are set.
Rate limit could only be set entirely to a point using "Server profiles", however, it is necessary to set limits for each user.
Hi, in case you haven't figured out the answer yet I believe I found the solution. I was lately playing with hotspot a bit
it seems that enabling "Add ARP for Leases" for hotspot DHCP pool is the key.

Also - you can nest rate-limit queues :
- you need hotspot queue manually (instead one on server profile level) - it does not work on dynamically created ones
- then on user profile queue you select the one created as parent queue
result - dynamic queues are created per user and nested within main limiting queue

Confirmed working on ROS 7.1-7.11 (I'm testing on CHR virtual images). Still invalid ARP issue viewtopic.php?t=187802 is showstopper for me, and I need to move back to ROS 6.x
 
miguelos
just joined
Posts: 18
Joined: Wed Mar 09, 2011 2:15 pm

Re: Rate limit not applied to the hotspot

Thu Nov 09, 2023 12:24 pm

And back to non-working state...
when I moved to real hardware it does not seem to work at all. Queue is created, see some traffic there, but like 1% of real traffic for this client.
Eg. doing speedtest I can see 200Mbit, but looking at queue live I can see around 200kbps traffic for this IP. What is going on ? And limits for user were specified like 20M/5M D/U
 
User avatar
v0t
just joined
Posts: 1
Joined: Wed Dec 06, 2023 10:26 am
Location: Toronto

Re: Rate limit not applied to the hotspot

Wed Dec 06, 2023 10:27 am

Turn off "Allow Fast Path" under IP -> Settings

Who is online

Users browsing this forum: Bing [Bot], ccrsxx, inna and 41 guests