Community discussions

MikroTik App
 
ferry
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 75
Joined: Mon Jan 15, 2007 11:59 am

How to limit user pppoe with pcq

Wed Jun 06, 2007 5:55 am

Hi all,

I used to limit pppoe user with rate-limit in ppp profile. just the simpe to limit the tx/rx / user. The thing i want to ask is what about this :

- i do not want to limit each user, but i have total 256K to share with the all users login to my radius. U can imagine i set the pcq with download rate 256k to limit all users.

Can u all help me how to do this??

Thx for helping me,


Ferry
 
g.tusa
just joined
Posts: 8
Joined: Mon May 07, 2007 6:13 pm

Re: How to limit user pppoe with pcq

Thu Jun 07, 2007 11:52 am

Hi, I tried something similar, following the pcq examples in the MT reference manual and wiki.
I tried something like the following

Mangle rules for packet mark based on dst-address-list (for download):
/ip firewall mangle add chain=prerouting dst-address-list=my_addr_list action=mark-connection new-connection-mark=conn_down comment="Connection Download" passthrough=yes
/ip firewall mangle add chain=prerouting connection-mark=conn_down action=mark-connection new-connection-mark=mark_users_down comment="Packet Download Mark" passthrough=no

Queue Tree (Parent)
/queue tree add name=Download parent=Local max-limit=256K (in your case)

Queue Type (PCQ)
/queue type add name=pcq_down kind=pcq pcq-classifier=dst-address

Queue Tree (Child)
/queue tree add parent=Download queue=pcq_down packet-mark=mark_users_down

My problem was (and still is!), that by using Local interface as parent of the download queue (i.e., the interface where I have the pppoe access concentrator), I'm not able to see any traffic passing through the above pcq queue. So I tried using global-out or global-in as Download parent queue, but with decreasing performance result.
Finally, I switched back on using only the dynamic simple queues created based on the pppoe profile...
If you try and have better results ... I'm very very interesting on it...
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7188
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: How to limit user pppoe with pcq

Thu Jun 07, 2007 11:57 am

you can add one simple queue, specify target address as whole network.
 
g.tusa
just joined
Posts: 8
Joined: Mon May 07, 2007 6:13 pm

Re: How to limit user pppoe with pcq

Thu Jun 07, 2007 12:28 pm

Nobody had the problem to use pcq for sharing download bandwidth, having pppoe access concentrator in the Local interface? It is a problem of the mangle chain to be used when marking packets?
Following the exact steps in the reference manual it seems not to work with such a configuration (PPPoE server in the Local interface). For my experience, it seems that using global-out as parent instead of Local, affects the overall performances, because queues apply also to the upload side.
If someone solved this issue, it could be very helpful...
Thanks.
 
ferry
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 75
Joined: Mon Jan 15, 2007 11:59 am

Re: How to limit user pppoe with pcq

Thu Jun 07, 2007 4:59 pm

Dear all,

thx before.I have the inspration from u guys. I have found the way.. Yes, just that simple,
1. just add mangle with prerouting - mark packet
2. Create queue type - pcq down & upload
3. Just create 2 queue tree, 1 download and 1 upload

---- add mangle ------
/ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=mark_test
passthrough=no

---- add queue type ----
/queue type add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50
pcq-classifier=dst-address pcq-total-limit=20

/queue type add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50
pcq-classifier=dst-address pcq-total-limit=20


---- add queue tree ----
/queue tree add name="queuedown" parent=global-in packet-mark=mark_test limit-at=0
queue=pcq-download priority=8 max-limit=256000 burst-limit=0
burst-threshold=0 burst-time=0s

/queue tree add name="queueupload" parent=global-out packet-mark=mark_test limit-at=0
queue=pcq-upload priority=8 max-limit=256000 burst-limit=0
burst-threshold=0 burst-time=0s


And it's worksss.. the max limit is the total bw u share with amount of users u have.

Thx all,

Ferry
 
rafi1202
just joined
Posts: 1
Joined: Sun Feb 25, 2007 9:17 am

Re: How to limit user pppoe with pcq

Sat Jun 09, 2007 7:17 pm

Dear all,


---- add queue type ----
/queue type add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50
pcq-classifier=dst-address pcq-total-limit=20

/queue type add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50
pcq-classifier=dst-address pcq-total-limit=20
wrong "pcq-total-limit=20", pcq-total-limit mean (count of your client * 50)

Who is online

Users browsing this forum: jounij, miankamran7100 and 37 guests