Mikrotik Bandwidth Priority

P00HB33R

Senior Member
Joined
Jul 15, 2010
Messages
666
#1
So this is a two parter...

Part1:

So lets say i have a 100mbps internet connection, and using a mikrotik rb750 as my main router. Now I want to guarantee 15mbps each to 5 pc's at all times. And split the remaining 25mbps to the the remaining users. But if the full 75mbps is not being used by the guarenteed hosts, allow the other users to use that bandwidth until the guarenteed hosts need the bandwidth. But at the same time the pleb users should not exceed 5Mbps per user.

Part2:
Would it be possible to implement the solution to part1 in a freeradius setup?

Im setting up a hotspot in my office and have some time to kill, so would like to play with this type of setup using said mikrotik and a radiusdesk server.

Thank you in advance
 

Daruk

Honorary Master
Joined
Jul 18, 2008
Messages
35,376
#2
I'll watch this thread... have done this on a number of routers and always had mixed results. Sometimes that kind of QOS comes with overhead of it's own and doesn't work very well - the overall experience is affected but theoretically it should be relatively simple.
 

websquadza

WebSquad
Company Rep
Joined
Mar 26, 2018
Messages
255
#3
Can I make a few assumptions?
1. The guaranteed hosts are connected via lan
2. You're going to have a main SSID
3. You're going to have a Pleb/Guest SSID?
4. You're using some kind of APs to distribute WiFi?

Create two bridges (LAN-BRIDGE, GUEST-BRIDGE) and assign separate /24 networks to each.
Create a DHCP server using the DHCP setup tool - create one for each bridge. Don't forget to configure additional parameters like DNS, Netmask, WINS (If you're running a domain) and any DHCP options you use.

Add a VLAN to your LAN-BRIDGE - (Eg. VLAN 20, Name: Guest VLAN)
Add your Ethernet Ports (2-5) (Leave the WAN port out) to the LAN-BRIDGE
Add the Guest VLAN20 to the GUEST-BRIDGE

Now you have DHCP allocating different subnets to your LAN and GUEST networks. You can configure the Guest SSID on your APs and allocate traffic to VLAN20 on the AP. If you connect to guest now, you'll get an IP address on the Guest network, and If you connect on the main SSID, the other network.

To answer part2 of your question, there are a few great guides that let you set up a hotspot server using Mikrotik - this can then be linked to a RADIUS server of any kind using the built-in radius client.

Now back to part 1, to manage bandwidth.

Use DHCP server to set the 5 PCs addresses as static (don't set these on the PC)

Queues will be your friend here:
- Create a Main Queue for LAN-BRIDGE limiting to 75M, with Burst to 85M, Priority 1
- Create individual queues targeting the IPs of the priority PCs (set bandwidth limit to 15M and I'd recommend a burst of 60s to 25M), set these as children of the main queue
-Create a Guest Queue for GUEST-BRIDGE, Priority 8 (And a max bandwidth if you want one here)
- Using PCQ, you'll assign a PCQ up and PCQ down rate that will distribute the available bandwidth between guest clients
- Or you can create individual child queues for each IP in the Guest VLAN (This is easy if your DHCP pool for guest is small)
 
Top