MAX-Monthly-Traffic V2 Post
Alexandre Chapellon
alexandre.chapellon at mana.pf
Fri Aug 21 04:52:11 CEST 2009
Le jeudi 20 août 2009 à 01:07 +0100, Neville a écrit :
> Hi Alex,
>
> > You are expecting an interim update to send session-timeout to your nas
> > so it disconnect your user?
> > If so, two things seems incorrect to me.
> >
> > 1- You're measuring traffic volume and want disconnection to set
> > based on time (session-timout)... a bit tricky isn't it?
>
> So VERY True, Too many late nights and I really do appreciate your input as
> this gave me food for thought and I now have EVERYTHING Working.
>
> Both for Traffic & Session USAGE.
>
> For Usage, I still had to use Max-Monthly-Traffic as a Check := and based on
> sqlcounter calc, do a Reply = Sessions-Octets-Limit = XXXXXX on the
> Access-Accept as this is supported by the ppp 2.4.4 NAS.
Be aware that sqlcounter were originatly designed to count time ..... I
remember it has a mechanism to allow user not to be disconnected when
its time left is greater than the time remaining to the 'reset period'.
as an example: if you have 2min left in your account and you connect the
31th of the month at 23h59 (supossing reset period is on the 1st of each
month at OhOO), then your session-timeout will not be 120 sec (2min) but
will be 120sec + the amount of time allowed for the next month (which
starts in 2 minutes)... this allow users not be disconnected stupidly at
end of month.
This mechanism is helpfull for time based counter but is meaningless for
volume based counter. it would means you get the next month quota addded
IF the number of the seconds untill the end of the month is less than
the number of allowed octet at present time... weird!
Check at the source code but I am sure this code existed in 2.1.1
version.
>
> What I would like to know now, is how I can use sqlcounter to do a Month
> Calculation based on the date of the account being registered and NOT the
> Calander Month? Anyone?
>
> > 2- I think the attribute "Session-Timeout" cannot be found in
> > interim-updates packets (maybe I'm wrong), rfc 2869 specify that: "It
> > is envisioned that an Interim Accounting record (with Acct-Status-Type =
> > Interim-Update (3)) would contain all of the attributes normally found
> > in an Accounting Stop message with the exception of the
> > Acct-Term-Cause attribute."
> >
> > What you would need is an attribute known by your nas and representing
> > remaining traffic. That attrbute should be sent at acct-start time and
> > would trigger a disconnection from the NAS when traffic limit is
> > reached. If such a attribute does not exists for your NAS, you should
> > take a look at CoA server.
> > Maybe someone have better idea...?
> >
> > Le mercredi 19 ao?t 2009 ? 15:56 +0100, Neville a ?crit :
> >
>
> Cheers
> Nev
>
> ================
> CentOS 5.3
> pptpd 1.3.4 / ppp 2.4.4
> freeradius2 2.1.6
> radiusclient-ng 0.5.6
> daloRadius 0.9-8-SVN
> ================
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090820/5a5c8d62/attachment.html>
More information about the Freeradius-Users
mailing list