Community discussions

MUM Europe 2020
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Help needed on v6 simple queues

Tue Jul 23, 2013 2:33 am

Hi guys, it seems I have to start learning my basics again. Had worked post-v6 simple queues and was given the impression they worked to my needs.

Now with v6 I am lost again. And most of the documentation is still for post-v6 times... :(

So, study example:

1 rb951-2n as simple home wifi router. LAN side (wlan+E2 bridged. (E2=switch)) and WAN side (E1). DHCP server on bridge and basic firewall rule between bridge and E1 for stopping unwanted access. Srce-nat=masq. with source the dhcp network for translation of clients to main IP on WAN port. All pretty basic.

Now I want to setup simple queue (v6!) to have users share same bandwidth equally.
Lets say this wifi router itself is allowed to use in total 1Mb upload and 6Mb download to the internet. (Limited by next uplink router or by user manager.)

Since this wifi router has to serve as free AP in a bar I would like to make equal bandwidth available to each user with a maximum of only 128kbps upload and 512kb download for each user (Max Limit) with 256k upload and 1M download burst. Both streams should have for each user 65k guaranteed (Limit at)


First of all I have to pick a Queue Type for the upload and download target, no?
I think I go for "pcq-upload-default" or its download counter part....
What to set here? Use default values but set rate to 1Mb for upload and 6Mb for download?
/queue type
set 5 pcq-rate=1M
set 6 pcq-rate=6M
were 5 and 6 are the default pcq-upload and download queue types.

so far so good?


Now the simple queue:
/queue simple
add burst-limit=256k/1M burst-threshold=128k/512k burst-time=30s/1m limit-at=64k/64k max-limit=128k/512k name="Client limit" queue=\
    pcq-upload-default/pcq-download-default target=192.168.88.0/24
Is this in anything ok?

If I try to do a download test with 2 devices at the same time it still shows me one eats away the bandwith of the other.....
But since the total available bandwidth for both should be enough to serve both at max. I don't understand what is wrong here?

Any suggestions?
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1723
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Help needed on v6 simple queues

Tue Jul 23, 2013 8:49 am

Your limits are confused
you need to define your global available limits on the queue (so 1M/6M), but individual client limits inside the PCQ queue type.(128k/512k)

Also your bursting is in the wrong place, it must be defined inside PCQ queue types, not on the queue itself , as it is individual client stuff also
With great knowledge comes great responsibility, because of ability to recognize id... incompetent people much faster.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Help needed on v6 simple queues

Tue Jul 23, 2013 11:03 am

Oeps, see that where I write "post" should be written "pre"
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Help needed on v6 simple queues

Tue Jul 23, 2013 10:19 pm

Your limits are confused
you need to define your global available limits on the queue (so 1M/6M), but individual client limits inside the PCQ queue type.(128k/512k)

Also your bursting is in the wrong place, it must be defined inside PCQ queue types, not on the queue itself , as it is individual client stuff also
So, I should do it reverse:
/queue type
set 5 pcq-burst-rate=512k pcq-burst-threshold=256k pcq-rate=128k
set 6 pcq-burst-rate=2M pcq-burst-threshold=1M pcq-burst-time=1m pcq-rate=512k

/queue simple
add limit-at=64k/64k max-limit=1M/6M name="Client limit" queue=pcq-upload-default/pcq-download-default target=192.168.88.0/24
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1723
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Help needed on v6 simple queues

Wed Jul 24, 2013 8:09 am

Assuming that queue type 5 and 6 are correct ones and that you really need limit-at value because other queues - yes - looks OK
With great knowledge comes great responsibility, because of ability to recognize id... incompetent people much faster.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Help needed on v6 simple queues

Wed Jul 24, 2013 10:28 am

Assuming that queue type 5 and 6 are correct ones and that you really need limit-at value because other queues - yes - looks OK
5 & 6 are the 'pcq-upload-default' and 'pcq-download-default'. So the queue types we use in the simple queue.

The 'limit-at' rates are quaranteeing every connection get at least 64K traffic, no matter what....
So it serves as basic minimal speed user get anyway (until all user consume total available bandwidth).
I don't know what actually happen when this parameter is set to "unlimited"?
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Help needed on v6 simple queues

Wed Jul 24, 2013 10:33 am

So, now all my users are getting same rates, what to do now if I want one specific user (IP) to have a better rate? Since the /24 means 'all ip's of this network' (or if interface is set) how do I now treat one user separately?
In the pre-v6 s.queues you could just set such rule in front ('on top') of the more general one. Since traffic was passed through all queues top-down, the specific queue would catch the traffic.
But now it seems all s.queues are processed at once thus the general rule will catch all traffic rendering specific rules without traffic?

Any advice on that?
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1723
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Help needed on v6 simple queues

Thu Jul 25, 2013 8:19 am

So, now all my users are getting same rates, what to do now if I want one specific user (IP) to have a better rate? Since the /24 means 'all ip's of this network' (or if interface is set) how do I now treat one user separately?
In the pre-v6 s.queues you could just set such rule in front ('on top') of the more general one. Since traffic was passed through all queues top-down, the specific queue would catch the traffic.
But now it seems all s.queues are processed at once thus the general rule will catch all traffic rendering specific rules without traffic?

Any advice on that?
NO, simple queues still works like before - if packet is captured in first queue it will not get to the second!!

Thing that is changed is that algorithm that finds queue where packet should go - before it happened as packet went trough the queues one-by-one, now it all happens at very beginning.

in other words, from user perspective everything is the same, but inner workings are better.

and most of this stuff can be easily checked, this is how i figure it all out!!!
With great knowledge comes great responsibility, because of ability to recognize id... incompetent people much faster.
 
WirelessRudy
Forum Guru
Forum Guru
Topic Author
Posts: 3089
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Help needed on v6 simple queues

Thu Jul 25, 2013 11:15 am

So, now all my users are getting same rates, what to do now if I want one specific user (IP) to have a better rate? Since the /24 means 'all ip's of this network' (or if interface is set) how do I now treat one user separately?
In the pre-v6 s.queues you could just set such rule in front ('on top') of the more general one. Since traffic was passed through all queues top-down, the specific queue would catch the traffic.
But now it seems all s.queues are processed at once thus the general rule will catch all traffic rendering specific rules without traffic?

Any advice on that?
NO, simple queues still works like before - if packet is captured in first queue it will not get to the second!!

Thing that is changed is that algorithm that finds queue where packet should go - before it happened as packet went trough the queues one-by-one, now it all happens at very beginning.

in other words, from user perspective everything is the same, but inner workings are better.

and most of this stuff can be easily checked, this is how i figure it all out!!!
well, don't know. I have this 'generic' queue made with the /24 target. Than I made one extra queue with a specific client IP as target, and put that on top. But it didn't get any traffic. Still the /24 queue would get it...
Show your appreciation of this post by giving me Karma! Thanks.

Rudy R. Puister

WISP operator based on MT routerboard & ROS.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1723
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: Help needed on v6 simple queues

Thu Jul 25, 2013 1:35 pm

You did something wrong - i just re-tested it:
[admin@Home] > queue simple print  
Flags: X - disabled, I - invalid, D - dynamic 
 0    name="queue1" target=10.50.100.0/24 parent=none packet-marks="" 
      priority=8/8 queue=default-small/default-small limit-at=0/0 
      max-limit=30M/30M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s 

 1    name="queue2" target=10.50.100.253/32 parent=none packet-marks="" 
      priority=8/8 queue=default-small/default-small limit-at=0/0 
      max-limit=20M/20M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s 
Gives me max 30M from 10.50.100.253
[admin@Home] > queue simple print  
Flags: X - disabled, I - invalid, D - dynamic 
 0    name="queue2" target=10.50.100.253/32 parent=none packet-marks="" 
      priority=8/8 queue=default-small/default-small limit-at=0/0 
      max-limit=20M/20M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s

 1    name="queue1" target=10.50.100.0/24 parent=none packet-marks="" 
      priority=8/8 queue=default-small/default-small limit-at=0/0 
      max-limit=30M/30M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s  
Gives me max 20M from 10.50.100.253
With great knowledge comes great responsibility, because of ability to recognize id... incompetent people much faster.
 
freemannnn
Long time Member
Long time Member
Posts: 669
Joined: Sun Oct 13, 2013 7:29 pm

Re: Help needed on v6 simple queues

Mon Feb 16, 2015 11:30 pm

can someone confirm the rule below?
i want my lan devices to have equal bandwidth (pcq-upload-default/pcq-download-default) but my server (192.168.88.2) to be top of the line.
the question is about server queue type. should it be "default" or "pcq-upload-default/pcq-download-default" like 192.168.88.0/24 ?
i have understand that in inner queues there is no point to set "priority" or "limit-at". only at leaf queues.


Flags: X - disabled, I - invalid, D - dynamic
0 name="SERVER" target=192.168.88.2/32 parent=none packet-marks="" priority=8/8
queue=default/default limit-at=0/0 max-limit=800k/10M burst-limit=0/0
burst-threshold=0/0 burst-time=0s/0s total-queue=default

1 name="queue1" target=192.168.88.0/24 parent=none packet-marks="" priority=8/8
queue=pcq-upload-default/pcq-download-default limit-at=0/0 max-limit=800k/10M
burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=default

Who is online

Users browsing this forum: No registered users and 79 guests