Community discussions

MikroTik App
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Mikrotik-Rate-Limit Attribute

Tue Jan 13, 2009 9:57 pm

I have the Mikrotik-Rate-Limit attribute set in radius and my mikrotik log displays the following:

radius,debug,packet MT-Rate-Limit = 0x00000000

The format I used in my radius server is:

128k/256k

Am I missing something?


Thanks,
 
savage
Forum Guru
Forum Guru
Posts: 1263
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Mikrotik-Rate-Limit Attribute

Wed Jan 14, 2009 1:31 pm

ROS Version? Mikrotik's Dictionary up to date on the Radius server?
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Wed Jan 14, 2009 4:57 pm

ROS version 3.18

The Mikrotik-Rate-Limit attribute is in the radius server attribute list.
 
savage
Forum Guru
Forum Guru
Posts: 1263
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Mikrotik-Rate-Limit Attribute

Wed Jan 14, 2009 5:10 pm

I would say try on 3.17 first and see whether it works there.

If it works on 3.17 and not on 3.18, then we have a possible bug perhaps.
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Wed Jan 14, 2009 11:09 pm

Tried on an older version and same results.
 
sdrenner
Member Candidate
Member Candidate
Posts: 138
Joined: Wed Mar 02, 2005 10:03 pm
Contact:

Re: Mikrotik-Rate-Limit Attribute

Wed Jan 14, 2009 11:51 pm

try
128000/256000
 
User avatar
jordantrx
Long time Member
Long time Member
Posts: 505
Joined: Tue Oct 23, 2007 8:58 pm
Location: WAY upstate NY

Re: Mikrotik-Rate-Limit Attribute

Thu Jan 15, 2009 1:39 am

try
128000/256000
Yea try that. However I have been trying to use the User-manager Bursts. That however does not work. It will only set a new Tx/RX setting IF the connection is reset? Is this correct or is it a bug. It would be really nice if I could us the RX/TX limiting rather than a simple queue on the CPE side. Sorry if I hijacked But thought this would be a good place for it. Thanks -Jordan
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Thu Jan 15, 2009 10:36 pm

Still the same result.
 
savage
Forum Guru
Forum Guru
Posts: 1263
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: Mikrotik-Rate-Limit Attribute

Thu Jan 15, 2009 10:57 pm

Try using Rate-Limit (64000/64000), instead of Mikrotik-Rate-Limit. Don't ask me why, but I see in my old configurations that I used the former, and not the later... I know mine worked...
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Mikrotik-Rate-Limit Attribute

Thu Jan 15, 2009 11:36 pm

Mine works ok. I use freeradius, and it is returning 'Mikrotik-Rate-Limit' in the format xxxK/yyyK. I logged in with this attribute on my username, and no message in MT box log. By your log entry, the radius server sent back 'MT-Rate-Limit', not 'Mikrotik-Rate-Limit'.

This is entered in the radius radreply or radgroupreply table, correct?

ADD: This is in the format rx/tx from the hotspot point-of-view. So rx bandwidth is upload from the client, and tx is download to the client. As an example, 128K/512K will give a client 128K upload, and 512K download.
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 7:39 pm

I thought it was odd that it displays MT-Rate-Limit and not Mikrotik-Rate-Limit

Im sure that has something to do with my issue.

Using RadiusNT enterprise here.
 
zhall
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Fri Aug 20, 2004 6:33 pm
Location: Virginia

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 8:59 pm

I thought it was odd that it displays MT-Rate-Limit and not Mikrotik-Rate-Limit

Im sure that has something to do with my issue.

Using RadiusNT enterprise here.
Can you run debug on your radius server and post exactly what its sending out?
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 9:55 pm

Mikrotik-Rate-Limit is set to 128k/25k in radius user config.

Looks like a radius server issue-
Output from radius server:

radrecv: Request from host 10.0.0.1 (testnetworkPrivate) code=Auth Request(1),
id=14, length=175
User-Service = Framed-User
Framed-Protocol = PPP
NAS-Port = 15
NAS-Port-Type = Ethernet
User-Name = "dan"
Caller-Id = "00:1D:72:17:18:F1"
NAS-Port-Id = "bridge1"
MS-CHAP-Challenge = <size:16 Data:CHAP>
MS-CHAP2-Response = <size:50 Data:CHAP id:1 flags:0>
NAS-Identifier = "MikroTik"
NAS-Identifier = 10.0.0.1
Sending Ack of id 14 to 10.0.0.1 (testnetworkPrivate)
Mikrotik-Rate-Limit = 0
Framed-Address = 10.0.0.2
Class = "IEAS08811\005174592\003101"
MPPE-Send-Key = "\256&\332\012\246\016\277\337HA\242\n\002\237\261"
MPPE-Recv-Key = "\262\352l!\234\275\\2441*\220\244W\023\350u"
MS-CHAP2-Success = "\001S=09A7B26EAE961244671CD7F5DCA7E58B01493BDE"
Resp Time: 10 Auth: 43/114/2 -> 157 Acct: 0/0/83 -> 0
 
zhall
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Fri Aug 20, 2004 6:33 pm
Location: Virginia

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 10:04 pm

yah it does seem a radius server issue. i use freeradius and my output debugs are a bit different looking but I think I agree with you that

Mikrotik-Rate-Limit = 0

is not exactly right.

you seem to have the command right though. one of mine that is working is

Mikrotik-Rate-Limit = 512k/512k 1M/1M 256K/256K 30/30 7

in the radiusd config, sorry i can't help with your specific radius server
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 10:11 pm

Something else I noticed:

In my radius database, in the attribute entry config for the user there are two areas to enter the "data" or the "value" for that attribute.

Data meaning a STRING
Value meaning an interger

The "0" is the "value" being sent.

Radius send:
Mikrotik-Rate-Limit = 0

Mikrotik recieve:
MT-Rate-Limit = 0x00000000

If I set the "VALUE" to the integer 2, output follows:

Radius send:
Mikrotik-Rate-Limit = 2

Mikrotik recieve
MT-Rate-Limit = 0x00000002

It should "I assume" be sending the "STRING" or "DATA" value, which I have set to "128k/256k"
 
zhall
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Fri Aug 20, 2004 6:33 pm
Location: Virginia

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 10:13 pm

clearly you should try putting the entire command in value
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 10:18 pm

According to the Mikrotik dictionary that came with freeRadius, this value is a string, not a number. I am not familiar with the database that your radius uses, so I don't know how much help I can be on the rest.
 
dancms
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Fri Oct 06, 2006 5:03 am

Re: Mikrotik-Rate-Limit Attribute

Fri Jan 16, 2009 10:23 pm

Got It!

When I defined the attribute, there is a value called "AttributeType"

0 = string
1 = 32 bit integer

I had this set to "1" which was looking at the "value" field when I setup the attribute for the user.

Changing this to "0" fixed it.

The correct "string" 128k/256k is now being recieved by mikrotik.

Thanks all for your help!

Now I know how to run my radius server in debug mode, very helpfull...

Who is online

Users browsing this forum: Amazon [Bot], eworm and 65 guests