gigawords and bandwith

Andrew Paternoster andrew at gpk.net.au
Wed Mar 18 13:11:25 CET 2009


What ver of radius u running?

 

Andrew Paternoster 
andrew at gpk.net.au

Senior System Engineer 
 

 

GPK Computers Pty. Ltd.
A.B.N 72 075 618 012
 P.O. 407 Mt Evelyn
 Melbourne, VIC 3796
Australia

Tel: 1300 854 223
Fax: 1300 854 223

________________________________

 

 

 

-----Original Message-----
From: freeradius-devel-bounces+andrew=gpk.net.au at lists.freeradius.org
[mailto:freeradius-devel-bounces+andrew=gpk.net.au at lists.freeradius.org] On
Behalf Of Lars
Sent: Wednesday, 18 March 2009 10:39 PM
To: freeradius-devel at lists.freeradius.org
Subject: gigawords and bandwith

Hi,

i'm new here and i need your help in the following 2 points.

Point 1: Acct-Input/Output-Gigawords
Point 2: Bandwithlimit with PPP and PPPoE

My system: debian with kernel 2.6.8-2-386, Roaring Penguin PPPoE Version
3.10, PPP 2.4.4 (not quit sure) and MySQL 4.1.10a.


Point 1) After I recognized that the accounting data
(acct-input/output-octet) will set to zero if the user downloaded more than
4 GB I added to sql.conf and to table radacct the parameter
acct-input/output-gigawords. But It won't be filled with data, it's always
zero.

The sql statements look like this ({acct_table1} and {acct_table2} are both
radacct)

        accounting_update_query = "UPDATE ${acct_table1} \
			SET FramedIPAddress = '%{Framed-IP-Address}', \
			AcctSessionTime = '%{Acct-Session-Time}', \
			AcctInputOctets = '%{Acct-Input-Gigawords:-0}'  <<
32 | '%{Acct-Input-Octets:-0}', \
			AcctOutputOctets = '%{Acct-Output-Gigawords:-0}'  <<
32 | '%{Acct-Output-Octets:-0}' \
			WHERE AcctSessionId = '%{Acct-Session-Id}' \
			AND UserName = '%{SQL-User-Name}' \
			AND NASIPAddress= '%{NAS-IP-Address}'"

        accounting_stop_query = "UPDATE ${acct_table2} \
			SET AcctStopTime = '%S', \
			AcctSessionTime = '%{Acct-Session-Time}', \
			AcctInputOctets = '%{Acct-Input-Gigawords:-0}'  <<
32 | '%{Acct-Input-Octets:-0}', \
			AcctOutputOctets = '%{Acct-Output-Gigawords:-0}'  <<
32 | '%{Acct-Output-Octets:-0}', \
			AcctTerminateCause = '%{Acct-Terminate-Cause}', \
			AcctStopDelay = '%{Acct-Delay-Time}', \
			ConnectInfo_stop = '%{Connect-Info}' \
			WHERE AcctSessionId = '%{Acct-Session-Id}' \
			AND UserName = '%{SQL-User-Name}' \
			AND NASIPAddress = '%{NAS-IP-Address}'"

        accounting_stop_query_alt = "INSERT into ${acct_table2} \
			(AcctSessionId, AcctUniqueId, UserName, Realm,
NASIPAddress, \
			NASPortId, NASPortType, AcctStartTime, AcctStopTime,
AcctSessionTime, \
			AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
AcctInputOctets, \
			AcctOutputOctets, CalledStationId, CallingStationId,
AcctTerminateCause, \
			ServiceType, FramedProtocol, FramedIPAddress,
AcctStartDelay, AcctStopDelay) \
			values('%{Acct-Session-Id}',
'%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', \
			'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
'%{NAS-Port-Type}', \
			DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), \
			'%S', '%{Acct-Session-Time}', '%{Acct-Authentic}',
'', '%{Connect-Info}', \
			'%{Acct-Input-Gigawords:-0}'  << 32 |
'%{Acct-Input-Octets:-0}', \
			'%{Acct-Output-Gigawords:-0}'  << 32 |
'%{Acct-Output-Octets:-0}', \
			'%{Called-Station-Id}', '%{Calling-Station-Id}',
'%{Acct-Terminate-Cause}', \
			'%{Service-Type}', '%{Framed-Protocol}',
'%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')"

        accounting_update_query_alt = "INSERT into ${acct_table1} \
			(AcctSessionId, AcctUniqueId, UserName, Realm,
NASIPAddress, \
			NASPortId, NASPortType, AcctStartTime,
AcctSessionTime, \
			AcctAuthentic, ConnectInfo_start, AcctInputOctets,
AcctOutputOctets, \
			CalledStationId, CallingStationId, ServiceType,
FramedProtocol, \
			FramedIPAddress, AcctStartDelay)
values('%{Acct-Session-Id}', \
			'%{Acct-Unique-Session-Id}', '%{SQL-User-Name}',
'%{Realm}', \
			'%{NAS-IP-Address}', '%{NAS-Port}',
'%{NAS-Port-Type}', \
			DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), \
			'%{Acct-Session-Time}', '%{Acct-Authentic}', '', \
			'%{Acct-Input-Gigawords:-0}'  << 32 |
'%{Acct-Input-Octets:-0}', \
			'%{Acct-Output-Gigawords:-0}'  << 32 |
'%{Acct-Output-Octets:-0}', \
			'%{Called-Station-Id}', '%{Calling-Station-Id}',
'%{Service-Type}', \
			'%{Framed-Protocol}', '%{Framed-IP-Address}', '0')"


Point 2) I have to limit the user's bandwith so I think about a simple
possibility to do that. The best way imho would be a entry in "radreplay"
for this user. I added there e.g. framed-ip-address.
Is it possible? And if yes: How?

Regards
Lars



-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/devel.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3078 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20090318/c0c92a6d/attachment.bin>


More information about the Freeradius-Devel mailing list