Community discussions

MikroTik App
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

change rate limit

Sat Aug 14, 2010 7:04 pm

I have Mikrotik v4.11 with hot spot account. I want each user to have two speed limit: one when there is few users login and other if the server is croweded.

for example if the user rate rate limit is 42k/600k, I want it to drop to 42k/512k.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: change rate limit

Sat Aug 14, 2010 7:07 pm

It can be done, but it is too complicated to say 'here's how you do it'.

There is another thread by gunther01 looking to do something similar, and he says he's working on it.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: change rate limit

Sat Aug 14, 2010 7:08 pm

How are you going to decide if the router is 'crowded'? How does that condition reset?

You will either have to use RADIUS CoA (http://wiki.mikrotik.com/wiki/Manual:RA ... horization) or use PCQ in HTB attached to global-in and global-out completely bypassing the Hotspot rate limits and doing everything manually.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: change rate limit

Sat Aug 14, 2010 7:32 pm

Beware !

COA will only work for you if the RADIUS server has access to your network, and you have allowed Incoming Radius on the mikrotik.

You'll also need something to actually push the COA requests.
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: change rate limit

Sun Aug 15, 2010 10:27 am

Following instructions are for download traffic:

1) packet mark normal_traffic traffic when there's no congestion
and packet mark heavy_traffic traffic during congestion. Decision when to mark_heavy is up to you.

2) create pcq_normal_traffic with rate limit 640 with dst address as classifier
3)create pcq_heavy_traffic with rate limit 512 with dst address as classifier

4)create HTB with two leafs: normal and heavy
assign normal_traffic packet mark and pcq_normal queue to normal leaf
assign heavy_traffic packet mark and pcq_heavy queue to heavy leaf
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

Re: change rate limit

Sun Aug 15, 2010 11:24 pm

Following instructions are for download traffic:

1) packet mark normal_traffic traffic when there's no congestion
and packet mark heavy_traffic traffic during congestion. Decision when to mark_heavy is up to you.

2) create pcq_normal_traffic with rate limit 640 with dst address as classifier
3)create pcq_heavy_traffic with rate limit 512 with dst address as classifier

4)create HTB with two leafs: normal and heavy
assign normal_traffic packet mark and pcq_normal queue to normal leaf
assign heavy_traffic packet mark and pcq_heavy queue to heavy leaf
the speed I mention is example. I have other user profiles with different speeds
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: change rate limit

Mon Aug 16, 2010 12:02 am

Attach address lists to the profiles, mark packets based on address list.
 
rmichael
Forum Veteran
Forum Veteran
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: change rate limit

Mon Aug 16, 2010 8:12 am

Attach address lists to the profiles, mark packets based on address list.
Or, If user IP addresses are not static - mark traffic from given traffic group with unique DSCP (on user's station or AP). Mark packets, where HTB resides (GW?), according to DSCP marks.
 
namo
Long time Member
Long time Member
Topic Author
Posts: 530
Joined: Sat Oct 03, 2009 4:44 pm

Re: change rate limit

Mon Aug 16, 2010 1:58 pm

then I think that I will just leave it at 600kbps
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: change rate limit

Mon Aug 16, 2010 3:00 pm

Attach address lists to the profiles, mark packets based on address list.
Or, If user IP addresses are not static - mark traffic from given traffic group with unique DSCP (on user's station or AP). Mark packets, where HTB resides (GW?), according to DSCP marks.
Both local and AAA Hotspot users can be given dynamic address listst that they will be added to on login, and removed from on logout.

Who is online

Users browsing this forum: No registered users and 65 guests