Simultaneous-Use problem with Mikrotik NAS clients

Fojtán Balázs István balazs at fojtan.hu
Thu Feb 11 17:29:23 CET 2010


Hello Fajar,

thanks for your rapid response!

>> simul_count_query = "SELECT COUNT(*) \
>> FROM ${acct_table1} \
>> WHERE username = '%{SQL-User-Name}' \
>> AND acctstoptime IS NULL"
>
>it uses ${acct_table1} (should be radacct by default). Have you
>enabled accounting?
>

Yes, the accounting is working. It is some field listed from radacct table:
mysql> select
radacctid,acctsessionid,username,nasipaddress,nasporttype,acctstarttime,acctstoptime,acctinputoctets,acctoutputoctets
 from radacct where username="hz00001";
+-----------+---------------+----------+---------------+-----------------+---------------------+---------------------+-----------------+------------------+
| radacctid | acctsessionid | username | nasipaddress  | nasporttype     |
acctstarttime       | acctstoptime        | acctinputoctets |
acctoutputoctets |
+-----------+---------------+----------+---------------+-----------------+---------------------+---------------------+-----------------+------------------+
|         3 | 80600002      | hz00001  | 172.16.2.246  | Wireless-802.11 |
2010-01-28 12:47:46 | 2010-01-28 12:50:37 |           21399 |           
51376 |
|         4 | 80600003      | hz00001  | 172.16.2.246  | Wireless-802.11 |
2010-01-29 17:42:58 | 2010-01-29 17:45:17 |           20811 |           
50802 |
|       160 | 80800010      | hz00001  | 172.17.2.246  | Wireless-802.11 |
2010-02-08 17:54:56 | 2010-02-08 17:56:01 |           18320 |           
35545 |
|       161 | 80800011      | hz00001  | 172.17.2.246  | Wireless-802.11 |
2010-02-08 17:56:26 | 2010-02-08 18:18:37 |          590798 |         
2356358 |
|       183 | 80400003      | hz00001  | 172.17.2.246  | Wireless-802.11 |
2010-02-09 13:48:52 | 2010-02-09 13:49:07 |            9573 |           
10237 |
|       189 | 80b00007      | hz00001  | 172.17.2.246  | Wireless-802.11 |
2010-02-09 15:21:20 | 2010-02-09 15:21:26 |            8474 |            
8869 |
|       230 | 80600000      | hz00001  | 172.17.2.246  | Wireless-802.11 |
2010-02-10 15:44:02 | 2010-02-10 15:46:52 |          580051 |          
896533 |
+-----------+---------------+----------+---------------+-----------------+---------------------+---------------------+-----------------+------------------+

>
>
>> mysql> select * from radcheck;
>> +----+----------+---------------+----+------------+
>> | id | UserName | Attribute     | op | Value      |
>> +----+----------+---------------+----+------------+
>> |  1 | hz00001  | user-password | == | Tfregep5uy |
>
>what does radacct look like? What's the result of  (for example)
>
>SELECT COUNT(*) \
> FROM radacct \
> WHERE username = 'hz00001' \
> AND acctstoptime IS NULL;

mysql> SELECT COUNT(*)   FROM radacct   WHERE username = 'hz00001'   AND
acctstoptime IS NULL;
+----------+
| COUNT(*) |
+----------+
|        1 |
+----------+

regards,
fbi




More information about the Freeradius-Users mailing list