Rate limit and burst

Hi

When I’m using ratelimit and burst in radius reply attributes, routeros does not accept and ignore it and any other attributes. I’m sending as follows. Let me know if it has any issue

print_radius_attr("Mikrotik-Rate-Limit=%lldk/%lldk %lldk/%lldk %lldk/%lldk %lld/%lld %d %lldk/%lldk ",(long long)(tx_rate/1024),(long long)(rx_rate/1024), (long long)tx_burst, (long long)rx_burst, (long long)(tx_burst/2), (long long)(rx_burst/2), burst_time_sec, burst_time_sec,priority,(long long)min_rx_rate/1024,(long long)min_tx_rate/1024);

my routeros is 3.17

Enable ‘radius,debug’ logs in ‘system logging’ and check, what is received by the router (log print).
Make sure that RADIUS server is configured properly.

Hi

As I described, when I’m using burst, no radius attbute take effect. here is my logs:

This is my sent radius attributes to MT

2008-12-20 09:26:32 mahdi Acct-Interim-Interval=300
2008-12-20 09:26:33 mahdi Mikrotik-Recv-Limit=0
2008-12-20 09:26:33 mahdi Mikrotik-Xmit-Limit=0
2008-12-20 09:26:33 mahdi Mikrotik-Rate-Limit=256k/128k 22528k/23552k 11264k/11776k 2/2 3 0k/0k

and this is the radius debug log on MT

2008-12-20T09:26:23.856513+03:18 radius,debug new request 53:00 code=Access-Request service=ppp called-id=service1
2008-12-20T09:26:23.857045+03:18 radius,debug sending 53:00 to 192.168.0.253:1812
2008-12-20T09:26:23.857619+03:18 radius,debug,packet sending Access-Request with id 63 to 192.168.0.253:1812
2008-12-20T09:26:23.858163+03:18 192.168.0.254 radius,debug,packet Signature = 0xfb40c23dfa26a01baadea1793ac3c675
2008-12-20T09:26:23.858665+03:18 192.168.0.254 radius,debug,packet Service-Type = 2
2008-12-20T09:26:23.859180+03:18 192.168.0.254 radius,debug,packet Framed-Protocol = 1
2008-12-20T09:26:23.859687+03:18 192.168.0.254 radius,debug,packet NAS-Port = 29
2008-12-20T09:26:23.860202+03:18 192.168.0.254 radius,debug,packet NAS-Port-Type = 15
2008-12-20T09:26:23.860701+03:18 192.168.0.254 radius,debug,packet User-Name = “mahdi”
2008-12-20T09:26:23.861218+03:18 192.168.0.254 radius,debug,packet Calling-Station-Id = “00:1B:38:0C:D7:25”
2008-12-20T09:26:23.861720+03:18 192.168.0.254 radius,debug,packet Called-Station-Id = “service1”
2008-12-20T09:26:23.862232+03:18 192.168.0.254 radius,debug,packet NAS-Port-Id = “LAN”
2008-12-20T09:26:23.862792+03:18 192.168.0.254 radius,debug,packet User-Password = 0x313032303330
2008-12-20T09:26:23.863298+03:18 192.168.0.254 radius,debug,packet NAS-Identifier = “NetBill”
2008-12-20T09:26:23.863769+03:18 192.168.0.254 radius,debug,packet NAS-IP-Address = 192.168.0.254
2008-12-20T09:26:23.922558+03:18 radius,debug,packet received Access-Accept with id 63 from 192.168.0.253:1812
2008-12-20T09:26:23.923139+03:18 192.168.0.254 radius,debug,packet Signature = 0x4e363d2bdc0d861172c72fe6d5f66015
2008-12-20T09:26:23.923770+03:18 radius,debug received reply for 53:00
2008-12-20T09:26:23.927918+03:18 radius,debug new request 53:00 code=Accounting-Request service=ppp called-id=service1
2008-12-20T09:26:23.928697+03:18 radius,debug sending 53:00 to 192.168.0.253:1813
2008-12-20T09:26:23.933978+03:18 radius,debug,packet sending Accounting-Request with id 64 to 192.168.0.253:1813
2008-12-20T09:26:23.934920+03:18 192.168.0.254 radius,debug,packet Signature = 0x83e64835f2462f15c090cd323add63c4
2008-12-20T09:26:23.935561+03:18 192.168.0.254 radius,debug,packet Service-Type = 2
2008-12-20T09:26:23.936102+03:18 192.168.0.254 radius,debug,packet Framed-Protocol = 1
2008-12-20T09:26:23.937055+03:18 192.168.0.254 radius,debug,packet NAS-Port = 29
2008-12-20T09:26:23.937630+03:18 192.168.0.254 radius,debug,packet NAS-Port-Type = 15
2008-12-20T09:26:23.938208+03:18 192.168.0.254 radius,debug,packet User-Name = “mahdi”
2008-12-20T09:26:23.943294+03:18 192.168.0.254 radius,debug,packet Calling-Station-Id = “00:1B:38:0C:D7:25”
2008-12-20T09:26:23.944036+03:18 192.168.0.254 radius,debug,packet Called-Station-Id = “service1”
2008-12-20T09:26:23.944581+03:18 192.168.0.254 radius,debug,packet NAS-Port-Id = “LAN”
2008-12-20T09:26:23.945098+03:18 192.168.0.254 radius,debug,packet Acct-Session-Id = “81200000”
2008-12-20T09:26:23.945651+03:18 192.168.0.254 radius,debug,packet Framed-IP-Address = 172.16.1.13
2008-12-20T09:26:23.950831+03:18 192.168.0.254 radius,debug,packet Acct-Authentic = 1
2008-12-20T09:26:23.952033+03:18 192.168.0.254 radius,debug,packet Acct-Status-Type = 1
2008-12-20T09:26:23.953944+03:18 192.168.0.254 radius,debug,packet NAS-Identifier = “NetBill”
2008-12-20T09:26:23.954525+03:18 192.168.0.254 radius,debug,packet NAS-IP-Address = 192.168.0.254
2008-12-20T09:26:23.955336+03:18 192.168.0.254 radius,debug,packet Acct-Delay-Time = 0

There is no any Rate-Limit received by the RouterOS, so you need to check RADIUS server configuration settings.

Hi

As I described, when I’m sending radius rate limit attribute with burst values, it corrupt not only the rate limit attribute, but also other radius attrbiutes. So, u can’t see the rate limit attributes in the log. It was my issue, exactly!