找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 12777|回复: 11

[radius] 发现freeradius的限速功能

[复制链接]
发表于 2006-4-12 19:15:20 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
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!
routeros
 楼主| 发表于 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.
routeros
回复

使用道具 举报

 楼主| 发表于 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
routeros
回复

使用道具 举报

发表于 2006-4-12 19:39:28 | 显示全部楼层
不错
routeros
回复

使用道具 举报

发表于 2006-4-12 20:08:42 | 显示全部楼层
MT的官网上早就发布了这些属性,可惜看的人太少了
routeros
回复

使用道具 举报

 楼主| 发表于 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

用组的方法限速我测试成功了
用户的好像没有效果
aaa.JPG
routeros
回复

使用道具 举报

 楼主| 发表于 2006-4-17 20:39:20 | 显示全部楼层
哈哈,发现用radius限速连迅雷都能封住
看我的迅雷下载始终不会超过20K
u.jpg
l.JPG
routeros
回复

使用道具 举报

发表于 2007-9-18 19:32:56 | 显示全部楼层
请问  这个能实现
比如我想让这个机器一天上3个小时
到时间了他就不能上外网了
能实现吗?
routeros
回复

使用道具 举报

发表于 2009-11-26 21:21:00 | 显示全部楼层
当然可以,只要在simul_count_query中的WHERE加入条件就成了。
routeros
回复

使用道具 举报

发表于 2009-12-23 14:42:26 | 显示全部楼层
为什么我的报错了啊
Invalid octet string "43200" for attribute name "Session-Timeout
routeros
回复

使用道具 举报

发表于 2010-3-24 11:01:21 | 显示全部楼层
测试组用户效果不错
设置 2000000 显示 2M 的限速
routeros
回复

使用道具 举报

发表于 2010-11-29 10:42:22 | 显示全部楼层
我应用了这些属性就拨不上号了,提示用户名和密码错误
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-11-5 20:26 , Processed in 0.140528 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表