Page 1 of 1
How to limit user pppoe with pcq
Posted: Wed Jun 06, 2007 5:55 am
by ferry
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
Re: How to limit user pppoe with pcq
Posted: Thu Jun 07, 2007 11:52 am
by g.tusa
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...
Re: How to limit user pppoe with pcq
Posted: Thu Jun 07, 2007 11:57 am
by mrz
you can add one simple queue, specify target address as whole network.
Re: How to limit user pppoe with pcq
Posted: Thu Jun 07, 2007 12:28 pm
by g.tusa
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.
Re: How to limit user pppoe with pcq
Posted: Thu Jun 07, 2007 4:59 pm
by ferry
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
Re: How to limit user pppoe with pcq
Posted: Sat Jun 09, 2007 7:17 pm
by rafi1202
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)