I’m trying to set up a PPPoE server on a Mikrotik router, 6.0rc11
I’m using PCQ queues to limit traffic for each separate user.
For example, let’s take the queue “TEST_1MB_DOWNLOAD”. All users which are processed by this queue should receive 1 Megabit/sec download. However it’s not working as expected.
Problem: If only one user is being processed by this queue he gets 1Mbit/sec, however if me and my colleague connect at the same time and start downloading, we get only 500kb/sec each! The queue does not respect the “pcq-rate=1M” setting for each user, it divides this “pcq-rate=1M” between the two of us, so we get only 500 kbit/s!
/queue tree
add max-limit=1G name=TOTAL_DOWNLOAD parent=ether2 priority=1 queue=default
add max-limit=1G name=TEST_1MB_DOWNLOAD packet-mark=TEST_1MB_TRAF parent=TOTAL_DOWNLOAD queue=TEST_1MB_DOWNLOAD
add max-limit=1G name=TEST_4MB_DOWNLOAD packet-mark=TEST_4MB_TRAF parent=TOTAL_DOWNLOAD priority=4 queue=
TEST_4MB_DOWNLOAD
add name=TEST_8MB_DOWNLOAD packet-mark=TEST_8MB_TRAF parent=TOTAL_DOWNLOAD priority=1 queue=TEST_8MB_DOWNLOAD
add max-limit=1G name=TOTAL_UPLOAD parent=ether1 queue=default
add max-limit=1G name=TEST_1MB_UPLOAD packet-mark=TEST_1MB_TRAF parent=TOTAL_UPLOAD queue=TEST_1MB_UPLOAD
add max-limit=1G name=TEST_4MB_UPLOAD packet-mark=TEST_4MB_TRAF parent=TOTAL_UPLOAD priority=4 queue=TEST_4MB_UPLOAD
add name=TEST_8MB_UPLOAD packet-mark=TEST_8MB_TRAF parent=TOTAL_UPLOAD priority=1 queue=TEST_8MB_UPLOADI cannot understand what I am doing wrong. Max-limit is set to 1G, pcq-rate is set to 1M, why is bandwidth of 1M evendly divided between two users? Each user should get his own 1M.
Thank you, derr12. I’ve altered my configuration and now it seems to be working as needed (two users get 1Mbit each). I have eliminated connection marking completely, still not sure why it was needed in the first place, and also in the queue tree I changed parent interface from “ether2” to “global”.
Is this how it’s supposed to be configured, didn’t I miss anything? I still don’t get the whole picture how all these queues and packet marking work, so it’s more like trial and error to me at the moment.:
/ip firewall mangle
add action=mark-packet chain=postrouting new-packet-mark=UNRESTRICTED_UPLOAD src-address-list=VIP
add action=mark-packet chain=postrouting new-packet-mark=UNRESTRICTED_DOWNLOAD dst-address-list=VIP
add name=VIP_DOWN packet-mark=UNRESTRICTED_DOWNLOAD parent=global queue=default
add name=VIP_UP packet-mark=UNRESTRICTED_UPLOAD parent=global queue=defaultUsers from the VIP list should not get any traffic rate restrictions at present.
Connection marking is only required if you are going to use Queue tree’s.
The easiest way to do this would be by sorting your speed classes into different IP subnets:
If your unlimited users are all on the same subnet you can simply not include them at all in your rules. so all you really need is;
And your simple queue for the 1m/1m limited guys assuming the 1/1m limited users are being assigned ip’s from 192.168.1.0/24 and your unlimited guys are on a different subnet:
So this way you only need create rules for the users who need limiting. Those who dont have no mention. you will of couse have to have your IP scheme set up to work this way…
Queue tree’s are best used for when you want to specify how much avaialble bandwidth you want to share amung users, for example.
A queue tree to QOS a 20mbit Half duplex WAN link might look like this;
If you dont have your subnets organized like suggested above then you will have to use packet marks and your address list in order to place them in the correct simple queue.