Proper use of Mikrotik-Xmit-Limit-Gigawords
Hi, I've been following the postings in this mailing list for a while (mostly on FR 3.x) so please forgive me for asking this "basic" stuff. I want to use FreeRADIUS to limit user data above 4GB, of course the right attribute is Mikrotik-Xmit-Limit-Gigawords. The documentation explains it as 4G (2^32). I get that. My question is (and forgive me if it sounds silly to some of you), assuming I want to limit data such as 10GB, 11GB and such figures, how am I supposed to approach it using Mikrotik-Xmit-Limit-Gigawords. Thank you
You need to use both Mikrotik-Xmit-Limit-Gigawords and Mikrotik-Xmit-Limit-Gigawords... Taking 11 GiB as an example: For Mikrotik-Xmit-Limit: (11 * 0x40000000) & 0xFFFFFFFF) = 0xC0000000 -or- (11 * 1073741824) & 4294967295) = 3221225472 For Mikrotik-Xmit-Limit-Gigawords: (11 * 0x40000000) >> 32 = 0x2 -or- (11 * 1073741824) >> 32 = 2 Nick On Thu, Jan 23, 2014 at 11:14 AM, Kwesi Yankson <kkwised@yahoo.com> wrote:
Hi, I've been following the postings in this mailing list for a while (mostly on FR 3.x) so please forgive me for asking this "basic" stuff. I want to use FreeRADIUS to limit user data above 4GB, of course the right attribute is Mikrotik-Xmit-Limit-Gigawords. The documentation explains it as 4G (2^32). I get that.
My question is (and forgive me if it sounds silly to some of you), assuming I want to limit data such as 10GB, 11GB and such figures, how am I supposed to approach it using Mikrotik-Xmit-Limit-Gigawords.
Thank you
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Typo, Mikrotik-Xmit-Limit and Mikrotik-Xmit-Limit-Gigawords. On Thu, Jan 23, 2014 at 3:20 PM, Nick Lowe <nick.lowe@gmail.com> wrote:
You need to use both Mikrotik-Xmit-Limit-Gigawords and Mikrotik-Xmit-Limit-Gigawords...
Taking 11 GiB as an example:
For Mikrotik-Xmit-Limit:
(11 * 0x40000000) & 0xFFFFFFFF) = 0xC0000000 -or- (11 * 1073741824) & 4294967295) = 3221225472
For Mikrotik-Xmit-Limit-Gigawords:
(11 * 0x40000000) >> 32 = 0x2 -or- (11 * 1073741824) >> 32 = 2
Nick
On Thu, Jan 23, 2014 at 11:14 AM, Kwesi Yankson <kkwised@yahoo.com> wrote:
Hi, I've been following the postings in this mailing list for a while (mostly on FR 3.x) so please forgive me for asking this "basic" stuff. I want to use FreeRADIUS to limit user data above 4GB, of course the right attribute is Mikrotik-Xmit-Limit-Gigawords. The documentation explains it as 4G (2^32). I get that.
My question is (and forgive me if it sounds silly to some of you), assuming I want to limit data such as 10GB, 11GB and such figures, how am I supposed to approach it using Mikrotik-Xmit-Limit-Gigawords.
Thank you
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi Nick, Thank for replying. Correct me if I'm wrong. From your answer, assuming I want 11GB of data, I need to set Mikrotik-Xmit-Limit to 3GB and Mikrotik-Xmit-Limit-Gigawords to 2 (that is 8GB). That is speaking in simpler terms (with no 0C0000x@#$%^%) :) If that is so, it mean Mikrotik-Xmit-Limit will be a "check" attribute whiles Mikrotik-Xmit-Limit-Gigawords will be a "reply" attribute". How right or wrong am I so far? On Thursday, January 23, 2014 7:23 AM, Nick Lowe <nick.lowe@gmail.com> wrote: Typo, Mikrotik-Xmit-Limit and Mikrotik-Xmit-Limit-Gigawords. On Thu, Jan 23, 2014 at 3:20 PM, Nick Lowe <nick.lowe@gmail.com> wrote:
You need to use both Mikrotik-Xmit-Limit-Gigawords and Mikrotik-Xmit-Limit-Gigawords...
Taking 11 GiB as an example:
For Mikrotik-Xmit-Limit:
(11 * 0x40000000) & 0xFFFFFFFF) = 0xC0000000 -or- (11 * 1073741824) & 4294967295) = 3221225472
For Mikrotik-Xmit-Limit-Gigawords:
(11 * 0x40000000) >> 32 = 0x2 -or- (11 * 1073741824) >> 32 = 2
Nick
On Thu, Jan 23, 2014 at 11:14 AM, Kwesi Yankson <kkwised@yahoo.com> wrote:
Hi, I've been following the postings in this mailing list for a while (mostly on FR 3.x) so please forgive me for asking this "basic" stuff. I want to use FreeRADIUS to limit user data above 4GB, of course the right attribute is Mikrotik-Xmit-Limit-Gigawords. The documentation explains it as 4G (2^32). I get that.
My question is (and forgive me if it sounds silly to some of you), assuming I want to limit data such as 10GB, 11GB and such figures, how am I supposed to approach it using Mikrotik-Xmit-Limit-Gigawords.
Thank you
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Kwesi Yankson wrote:
Hi Nick, Thank for replying. Correct me if I'm wrong. From your answer, assuming I want 11GB of data, I need to set Mikrotik-Xmit-Limit to 3GB and Mikrotik-Xmit-Limit-Gigawords to 2 (that is 8GB). That is speaking in simpler terms (with no 0C0000x@#$%^%) :)
Yes. In simpler terms: Limit = X GB Mikrotik-Xmit-Limit-Gigawords = X / 4GB Mikrotik-Xmit-Limit = X - (Mikrotik-Xmit-Limit-Gigawords * 4GB)
If that is so, it mean Mikrotik-Xmit-Limit will be a "check" attribute whiles Mikrotik-Xmit-Limit-Gigawords will be a "reply" attribute".
No. They're both reply attributes. You need to send both to the NAS in order for the limit to be enforced. Alan DeKok.
Thanks a lot Nick On Thursday, January 23, 2014 1:57 PM, Alan DeKok <aland@deployingradius.com> wrote: Kwesi Yankson wrote:
Hi Nick, Thank for replying. Correct me if I'm wrong. From your answer, assuming I want 11GB of data, I need to set Mikrotik-Xmit-Limit to 3GB and Mikrotik-Xmit-Limit-Gigawords to 2 (that is 8GB). That is speaking in simpler terms (with no 0C0000x@#$%^%) :)
Yes. In simpler terms: Limit = X GB Mikrotik-Xmit-Limit-Gigawords = X / 4GB Mikrotik-Xmit-Limit = X - (Mikrotik-Xmit-Limit-Gigawords * 4GB)
If that is so, it mean Mikrotik-Xmit-Limit will be a "check" attribute whiles Mikrotik-Xmit-Limit-Gigawords will be a "reply" attribute".
No. They're both reply attributes. You need to send both to the NAS in order for the limit to be enforced. Alan DeKok.
Hi Alan, The thing is that, I once tried using Mikrotik-Xmit-Limit as a reply attribute. When I did this, the client kept having the same amount of data left at every login. It was as if the attribute was not being updated. However, when I used Mikrotik-Xmit-Limit as a check attribute, the user's data was updated and subtracted as it should. They got no access after using up their data. I don't know if this experience has been reported before. What do you make of it? On Thursday, January 23, 2014 1:57 PM, Alan DeKok <aland@deployingradius.com> wrote: Kwesi Yankson wrote:
Hi Nick, Thank for replying. Correct me if I'm wrong. From your answer, assuming I want 11GB of data, I need to set Mikrotik-Xmit-Limit to 3GB and Mikrotik-Xmit-Limit-Gigawords to 2 (that is 8GB). That is speaking in simpler terms (with no 0C0000x@#$%^%) :)
Yes. In simpler terms: Limit = X GB Mikrotik-Xmit-Limit-Gigawords = X / 4GB Mikrotik-Xmit-Limit = X - (Mikrotik-Xmit-Limit-Gigawords * 4GB)
If that is so, it mean Mikrotik-Xmit-Limit will be a "check" attribute whiles Mikrotik-Xmit-Limit-Gigawords will be a "reply" attribute".
No. They're both reply attributes. You need to send both to the NAS in order for the limit to be enforced. Alan DeKok.
Kwesi Yankson wrote:
Hi Alan, The thing is that, I once tried using Mikrotik-Xmit-Limit as a reply attribute. When I did this, the client kept having the same amount of data left at every login.
Read the debug log to see why.
It was as if the attribute was not being updated.
Read the debug log to see why.
However, when I used Mikrotik-Xmit-Limit as a check attribute, the user's data was updated and subtracted as it should. They got no access after using up their data. I don't know if this experience has been reported before. What do you make of it?
I don't know. I'd have to see the debug log. Alan DeKok.
participants (3)
-
Alan DeKok -
Kwesi Yankson -
Nick Lowe