Community discussions

MikroTik App
 
mobilexpi
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Thu May 26, 2005 5:24 am
Location: Santiago

How to limit Bandwidth to PPPoE clients?

Thu Jun 02, 2005 7:21 am

Hello,
I need limit the Bandwidth of my clients...I've a 512Kbps/256Kbps line, and I want to offer connections of 128Kbps/64Kbps and 64/32Kbps, but I don't know how setup it.
I create a Simple Queue with "interface=pppoe-user1", It works good, but when the client logout the simple queue clear the interface, and set to Unknown. And when the client login he doesn't have limit.

What can I do?
 
nhalachev
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Fri May 28, 2004 4:41 pm
Location: Bulgaria

Re: How to limit Bandwidth to PPPoE clients?

Thu Jun 02, 2005 9:14 am

What can I do?
Hello,

Just read documtation on Mikrotik web site and search this forums for PCQ .

Regards
 
mobilexpi
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Thu May 26, 2005 5:24 am
Location: Santiago

Fri Jun 03, 2005 7:06 am

I create PCQ rules but, I can't separate the 64Kbps/32Kbps PPPoE users to the 128Kbps/64kbps in the Queue Tree.
Ip range of 128Kbps/64Kbps=192.168.0.160-192.168.0.224 (via Ip Pool)
Ip range of 64/32Kbps=192.168.0.230-246 (via Ip Pool)

Then I create 2 profiles in the PPP Profiles ("prof-128" and "prof-64")
Then I create 4 Queue types (128down, 128up, 64down and 64up) all with PCQ. It's OK

But! I don't know What do here, because I try to create a Queue tree rule, but I only can select parent=global in (or out), but I've 2 types of users with different bandwidth.

How can I limit the bandwidth (via PCQ) for 2 different users group.

Thanks..

Salvador :(
 
nhalachev
Frequent Visitor
Frequent Visitor
Posts: 99
Joined: Fri May 28, 2004 4:41 pm
Location: Bulgaria

Fri Jun 03, 2005 8:47 am


How can I limit the bandwidth (via PCQ) for 2 different users group.
With PCQ you shoul make use of mangle rules. Checkout this:
http://forum.mikrotik.com/viewtopic.php ... ght=#11138

But, instead of PCQ yuc can just setup 2 different profiles with different speeds.
Then when create new pppoe user, just assigm him to neeeded profile. Dynamic simple queeue with apropriate setting for that user will be used when he connect.

Regards
 
mobilexpi
Member Candidate
Member Candidate
Topic Author
Posts: 115
Joined: Thu May 26, 2005 5:24 am
Location: Santiago

Sat Jun 04, 2005 8:45 pm

Thanks a lot nhalachev,

I read the other post w/your example. I follow it, but I've problems :( .

I change some config.
The new range of the PPPoE connections (Basic=128Kbps/64Kbps) is 192.168.0.80-192.168.0.96 =(/28)
The new range of the PPPoE connections (Light=64Kbps/32Kbps) is 192.168.0.100-192.168.132 =(/27).

I set up this.. (I change local to all in connection, because the users connect via PPPoE)

ip firewall mangle
add src-address=192.168.0.80/28 in-interface=all action=passthrough mark-connection=light-up mark-flow=light-
up
add in-interface=local connection=light-up action=accept mark-flow=light-down
add src-address=192.168.0.100/27 in-interface=all action=passthrough mark-connection=basic-up mark-flow=basic-
up
add in-interface=local connection=basic-up action=accept mark-flow=basic-down

/ queue type
add name="light-down" kind=pcq pcq-rate=65536 pcq-classifier=dst-address
add name="light-up" kind=pcq pcq-rate=32768 pcq-classifier=src-address
add name="basic-down" kind=pcq pcq-rate=131072 pcq-classifier=dst-address
add name="silver-up" kind=pcq pcq-rate=65536 pcq-classifier=src-address

/ queue tree
add name="all-out" parent=global-out queue=default
add name="light-down" parent=all-out flow=light-down queue=light-down
add name="basic-down" parent=all-out flow=basic-down queue=basic-down
add name="all-in" parent=global-in queue=default
add name="light-up" parent=all-in flow=light-up queue=light-up
add name="basic-up" parent=all-in flow=basic-up queue=basic-up

The problem is the users continue without bandwidth limitation, and a strange thing when a user (PPPoE) login, the Router automatically create that:
/ip firewall mangle src-address=0.0.0.0/0 in-interface=<pppoe-user1> protocol=tcp. But when the user logout the mangle is erase.
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Sun Jun 05, 2005 7:34 am

Hello

we just send the bandwith via radius to our mt routers like this:
RateLimit=768k/900k 768k/1400k 768k/768k 15/15
that creates a simple queue per user und deletes it when the user logs off

Format is as follows:

rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time]]]]

All rates should be numbers with optional 'k' (100s) or 'M' (1000,000s).

If tx-rate is not specified, rx-rate is as tx-rate too. Same goes for tx-burst-rate and tx-burst-threshold and tx-burst-time.

If both rx-burst-threshold and tx-burst-threshold are not specified (and burst-rate is specified), rx-rate and tx-rate is used as burst thresholds.

regards

Who is online

Users browsing this forum: abdulschizo, fibracapi, Majestic-12 [Bot] and 94 guests