yuanyonghuio 发表于 2006-4-12 19:15:20

发现freeradius的限速功能

I need solution for trafic shapping pppoe users on mikrotik...

We have Freeradius which is radius server with SQL database and Mikrotik 2.9.2 which is pppoe server.
We need some script or solution how can we limit traffic on radius groups (we need download to slow on 1/2 after 10MB example).

And we have one more problem...
When user is downloading he cannot surf at all, he can`t open any page...

Help, please...Hi!
Providing that you use the sql-databaseformat wich comes with freeradius:

make an entry in "usergroup":

UserName GroupName
test family

and in "radgroupreply"
GroupName Attribute op Value
family Session-Timeout = 43200
family Ascend-Data-Rate = 512000
family Ascend-Xmit-Rate = 1024000

If all parts working well you can see under "simple queues" on your MT-router the entry for test with 512kup/1024kdown. The session will be interruptet after 12h

hope it helps!

yuanyonghuio 发表于 2006-4-12 19:34:05

再来一个,刚才用的是组
现在用的是用户
Hi there,

I'm currently running FreeRadius and Mikrotik RouterOS.

My intention is to have FreeRadius to pass data rate value to Mikrotik RouterOS which shape the date rate based on the value obtained.

What I did was incorporate 'dictionary.mikrotik' into /usr/local/share/freeradius/dictionary and inserted a record in table 'radreply' as below:

Username Attribute ops Value
----------- ---------- ---- -------
higueta Rate-Limit = 1024/384

I see this 'Rate-Limit = 1024/384' begin sent to MT on Access-Accept but I don't see any setting differences in MT, not the log or firewall. I'm wondering if MT has shaped bandwidth according to the value sent?

Are they anyone who has accomplished such task? It would be kind enough if anyone can point out what I've missed or guide me to my goal.

yuanyonghuio 发表于 2006-4-12 19:36:18

Yes Im using Rate-Limit with Radius with success.

Mine looks more like this:
64k/64k 256k/256k 128k/128k 10/10

For a 64k line with 10s burst.

If it works , you should find the Rate Limit in Winbox->Queues

心想事成 发表于 2006-4-12 19:39:28

不错

parphy 发表于 2006-4-12 20:08:42

MT的官网上早就发布了这些属性,可惜看的人太少了

yuanyonghuio 发表于 2006-4-16 18:56:32

UserName GroupName
test family

and in "radgroupreply"
GroupName Attribute op Value
family Session-Timeout = 43200
family Ascend-Data-Rate = 512000
family Ascend-Xmit-Rate = 1024000

用组的方法限速我测试成功了
用户的好像没有效果

yuanyonghuio 发表于 2006-4-17 20:39:20

哈哈,发现用radius限速连迅雷都能封住
看我的迅雷下载始终不会超过20K

183174067 发表于 2007-9-18 19:32:56

请问这个能实现
比如我想让这个机器一天上3个小时
到时间了他就不能上外网了
能实现吗?

ljwhf 发表于 2009-11-26 21:21:00

当然可以,只要在simul_count_query中的WHERE加入条件就成了。

coffee777 发表于 2009-12-23 14:42:26

为什么我的报错了啊
Invalid octet string "43200" for attribute name "Session-Timeout

ynduck 发表于 2010-3-24 11:01:21

测试组用户效果不错
设置 2000000 显示 2M 的限速

name1998 发表于 2010-11-29 10:42:22

我应用了这些属性就拨不上号了,提示用户名和密码错误
页: [1]
查看完整版本: 发现freeradius的限速功能