Query regarding rlm_sqlcounter !
Suman Dash
sumandash at gmail.com
Sat Mar 12 21:53:23 CET 2011
Can anyone give me some pointers on how to get this work ?
On Sat, Mar 12, 2011 at 4:24 PM, Suman Dash <sumandash at gmail.com> wrote:
> I am facing some issues in making the rlm_sqlcounter worj with freeradius
> 2.1.9 . I am unable to understand that why the Wiki and the actual config
> files are different .
>
> The wiki link http://wiki.freeradius.org/Rlm_sqlcounter shows an example
> in which there is no Reply-Name whereas the sql/mysql/counter.conf shows a
> Reply-Name attribute..
>
> The config part :
>
> radiusd.conf
>
>
> $INCLUDE ${confdir}/modules/
>
> # Extensible Authentication Protocol
> #
> # For all EAP related authentications.
> # Now in another file, because it is very large.
> #
> $INCLUDE eap.conf
>
> # Include another file that has the SQL-related configuration.
> # This is another file only because it tends to be big.
> #
> $INCLUDE sql.conf
>
> #
> # This module is an SQL enabled version of the counter module.
> #
> # Rather than maintaining seperate (GDBM) databases of
> # accounting info for each counter, this module uses the data
> # stored in the raddacct table by the sql modules. This
> # module NEVER does any database INSERTs or UPDATEs. It is
> # totally dependent on the SQL module to process Accounting
> # packets.
> #
> $INCLUDE sql/mysql/counter.conf
>
> #
> # IP addresses managed in an SQL table.
> #
> $INCLUDE sqlippool.conf
> }
>
>
>
> instantiate {
> #
> # Allows the execution of external scripts.
> # The entire command line (and output) must fit into 253 bytes.
> #
> # e.g. Framed-Pool = `%{exec:/bin/echo foo}`
> exec
>
> #
> # The expression module doesn't do authorization,
> # authentication, or accounting. It only does dynamic
> # translation, of the form:
> #
> # Session-Timeout = `%{expr:2 + 3}`
> #
> # So the module needs to be instantiated, but CANNOT be
> # listed in any other section. See 'doc/rlm_expr' for
> # more information.
> #
> expr
> daily
> expiration
> logintime
>
> #
> # We add the counter module here so that it registers
> # the check-name attribute before any module which sets
> # it
>
> sql/mysql/counter.conf
>
> sqlcounter dailycounter {
> counter-name = Daily-Session-Time
> check-name = Max-Daily-Session
> reply-name = Session-Timeout
> sqlmod-inst = sql
> key = User-Name
> reset = daily
>
> query = "SELECT SUM(acctsessiontime - \
> GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
> FROM radacct WHERE username = '%{%k}' AND \
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
>
> }
>
> sqlcounter monthlycounter {
> counter-name = Monthly-Session-Time
> check-name = Max-Monthly-Session
> reply-name = Session-Timeout
> sqlmod-inst = sql
> key = User-Name
> reset = monthly
>
> query = "SELECT SUM(acctsessiontime - \
> GREATEST((%b - UNIX_TIMESTAMP(acctstarttime)), 0)) \
> FROM radacct WHERE username='%{%k}' AND \
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '%b'"
> }
>
> sqlcounter noresetcounter {
> counter-name = Max-All-Session-Time
> check-name = Max-All-Session
> sqlmod-inst = sql
> key = User-Name
> reset = never
> query = "SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE
> UserName='%{%k}'"
> }
>
>
>
> sites-enabled/default
>
>
> authorize { .......... noresetcounter dailycounter monthlycounter
> daily
> }
> What bothers me is the Reply-Name defined is already instantiated by
> freeradius for daily counter.
>
> DB Scheme
>
> suman Max-Daily-Session := 10suman Expiration := 05 Mar 2012 23:59:59
> NTRadPing Output
>
> Session-Timeour = 10 ( Which is Infact Correct )
>
> But When i change the Max-Daily-Session to Max-Monthly-Session
>
>
> sumanMax-Monthly-Session:=10 suman Expiration := 05 Mar 2012 23:59:59
> NTRadPing Output
>
> Session-Timeour = 10 ( Which is Infact Correct )
>
> But When i change the Max-Daily-Session to Max-Monthly-Session
>
> NTRadPing gives the total session timeout based on the user expiration date
> .
>
>
> Debug Log for Max-Daily-Session:
>
> Listening on authentication address * port 1812
> Listening on accounting address * port 1813
> Listening on proxy address * port 1814
> Ready to process requests.
> rad_recv: Access-Request packet from host 122.175.85.117 port 26130, id=39,
> length=59
> User-Name = "suman"
> User-Password = "duman12"
> Calling-Station-Id = "001122334455"
> +- entering group authorize {...}
> ++[preprocess] returns ok
> ++[chap] returns noop
> ++[mschap] returns noop
> [suffix] No '@' in User-Name = "suman", looking up realm NULL
> [suffix] No such realm "NULL"
> ++[suffix] returns noop
> [eap] No EAP-Message, not doing EAP
> ++[eap] returns noop
> ++[unix] returns notfound
> ++[files] returns noop
> [sql] expand: %{User-Name} -> suman
> [sql] sql_set_user escaped user --> 'suman'
> rlm_sql (sql): Reserving sql socket id: 3
> [sql] expand: SELECT id, username, attribute, value, op FROM
> tbl_check WHERE username = '%{SQL-User-Name}' ORDER BY
> id -> SELECT id, username, attribute, value, op FROM
> tbl_check WHERE username = 'suman' ORDER BY id
> [sql] User found in radcheck table
> [sql] expand: SELECT id, username, attribute, value, op FROM
> tbl_reply WHERE username = '%{SQL-User-Name}' ORDER BY
> id -> SELECT id, username, attribute, value, op FROM
> tbl_reply WHERE username = 'suman' ORDER BY id
> [sql] expand: SELECT groupname FROM tbl_usergroup
> WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT
> groupname FROM tbl_usergroup WHERE username =
> 'suman' ORDER BY priority
> [sql] expand: SELECT id, groupname, attribute, Value,
> op FROM tbl_groupcheck WHERE groupname =
> '%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
> attribute, Value, op FROM tbl_groupcheck WHERE
> groupname = 'Biz1Mbps-UL' ORDER BY id
> [sql] User found in group Biz1Mbps-UL
> [sql] expand: SELECT id, groupname, attribute, value,
> op FROM tbl_groupreply WHERE groupname =
> '%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
> attribute, value, op FROM tbl_groupreply WHERE
> groupname = 'Biz1Mbps-UL' ORDER BY id
> rlm_sql (sql): Released sql socket id: 3
> ++[sql] returns ok
> rlm_sqlcounter: Entering module authorize code
> rlm_sqlcounter: Could not find Check item value pair
> ++[noresetcounter] returns noop
> rlm_sqlcounter: Entering module authorize code
> rlm_sqlcounter: Could not find Check item value pair
> ++[monthlycounter] returns noop
> rlm_sqlcounter: Entering module authorize code
> sqlcounter_expand: 'SELECT SUM(acctsessiontime -
> GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username = '%{User-Name}' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1299868200''
> [dailycounter] expand: SELECT SUM(acctsessiontime -
> GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username = '%{User-Name}' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1299868200' -> SELECT
> SUM(acctsessiontime - GREATEST((1299868200 -
> UNIX_TIMESTAMP(acctstarttime)), 0)) FROM radacct WHERE
> username = 'suman' AND UNIX_TIMESTAMP(acctstarttime) +
> acctsessiontime > '1299868200'
> sqlcounter_expand: '%{sql:SELECT SUM(acctsessiontime -
> GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username = 'suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1299868200'}'
> [dailycounter] sql_xlat
> [dailycounter] expand: %{User-Name} -> suman
> [dailycounter] sql_set_user escaped user --> 'suman'
> [dailycounter] expand: SELECT SUM(acctsessiontime -
> GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username = 'suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1299868200' -> SELECT
> SUM(acctsessiontime - GREATEST((1299868200 -
> UNIX_TIMESTAMP(acctstarttime)), 0)) FROM radacct WHERE
> username = 'suman' AND UNIX_TIMESTAMP(acctstarttime) +
> acctsessiontime > '1299868200'
> rlm_sql (sql): Reserving sql socket id: 2
> rlm_sql_mysql: MYSQL check_error: 1146 received
> rlm_sql (sql): database query error, SELECT SUM(acctsessiontime
> - GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)),
> 0)) FROM radacct WHERE username = 'suman'
> AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime >
> '1299868200': Table 'rdscrm.radacct' doesn't exist
> rlm_sql (sql): Released sql socket id: 2
> [dailycounter] expand: %{sql:SELECT SUM(acctsessiontime -
> GREATEST((1299868200 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username = 'suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1299868200'} ->
> rlm_sqlcounter: No integer found in string ""
> ++[dailycounter] returns noop
> rlm_counter: Entering module authorize code
> rlm_counter: Searching the database for key 'suman'
> rlm_counter: Could not find the requested key in the database.
> rlm_counter: Check item = 10, Count = 0
> rlm_counter: res is greater than zero
> rlm_counter: (Check item - counter) is greater than zero
> rlm_counter: Authorized user suman, check_item=10, counter=0
> rlm_counter: Sent Reply-Item for user suman, Type=Session-Timeout, value=10
> ++[daily] returns ok
> rlm_checkval: Item Name: Calling-Station-Id, Value: 001122334455
> rlm_checkval: Value Name: Calling-Station-Id, Value: 001122334455
> ++[checkval] returns ok
> [expiration] Checking Expiration time: '05 Mar 2012 23:59:59'
> ++[expiration] returns ok
> ++[logintime] returns noop
> ++[pap] returns updated
> Found Auth-Type = PAP
> +- entering group PAP {...}
> [pap] login attempt with password "duman12"
> [pap] Using CRYPT encryption.
> [pap] User authenticated successfully
> ++[pap] returns ok
> +- entering group session {...}
> [radutmp] expand: /var/log/freeradius/radutmp ->
> /var/log/freeradius/radutmp
> [radutmp] expand: %{User-Name} -> suman
> ++[radutmp] returns ok
> +- entering group post-auth {...}
> rlm_sql (sql): Reserving sql socket id: 1
> [sqlippool] expand: %{User-Name} -> suman
> [sqlippool] sql_set_user escaped user --> 'suman'
> [sqlippool] expand: START TRANSACTION -> START TRANSACTION
> [sqlippool] expand: UPDATE tbl_ippool SET nasipaddress = '', pool_key
> = 0, callingstationid = '', username = '', expiry_time = NULL WHERE
> expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress =
> '%{Nas-IP-Address}' -> UPDATE tbl_ippool SET nasipaddress = '', pool_key =
> 0, callingstationid = '', username = '', expiry_time = NULL WHERE
> expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress =
> '122.175.85.117'
> [sqlippool] expand: SELECT framedipaddress FROM tbl_ippool WHERE
> pool_name = '%{control:Pool-Name}' AND expiry_time IS NULL ORDER BY
> RAND() LIMIT 1 FOR UPDATE -> SELECT framedipaddress FROM tbl_ippool
> WHERE pool_name = 'main_pool' AND expiry_time IS NULL ORDER BY RAND()
> LIMIT 1 FOR UPDATE
> [sqlippool] expand: UPDATE tbl_ippool SET nasipaddress =
> '%{NAS-IP-Address}', pool_key = '%{NAS-Port}', callingstationid =
> '%{Calling-Station-Id}', username = '%{User-Name}', expiry_time = NOW() +
> INTERVAL 180 SECOND WHERE framedipaddress = '192.168.1.20' AND expiry_time
> IS NULL -> UPDATE tbl_ippool SET nasipaddress = '122.175.85.117', pool_key
> = '', callingstationid = '001122334455', username = 'suman', expiry_time =
> NOW() + INTERVAL 180 SECOND WHERE framedipaddress = '192.168.1.20' AND
> expiry_time IS NULL
> [sqlippool] Allocated IP 192.168.1.20 [1401a8c0]
> [sqlippool] expand: COMMIT -> COMMIT
> rlm_sql (sql): Released sql socket id: 1
> [sqlippool] expand: Allocated IP: %{reply:Framed-IP-Address} from
> %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id}
> port %{NAS-Port} user %{User-Name}) -> Allocated IP: 192.168.1.20 from
> main_pool (did cli 001122334455 port user suman)
> Allocated IP: 192.168.1.20 from main_pool (did cli 001122334455 port
> user suman)
> ++[sqlippool] returns ok
> [reply_log] expand:
> /var/log/freeradius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d ->
> /var/log/freeradius/radacct/122.175.85.117/reply-detail-20110312
> [reply_log]
> /var/log/freeradius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d expands
> to /var/log/freeradius/radacct/122.175.85.117/reply-detail-20110312
> [reply_log] expand: %t -> Sat Mar 12 16:18:51 2011
> ++[reply_log] returns ok
> [sql] expand: %{User-Name} -> suman
> [sql] sql_set_user escaped user --> 'suman'
> [sql] expand: %{User-Password} -> duman12
> [sql] expand: INSERT INTO tbl_postauth
> (username, pass, reply, authdate) VALUES
> ( '%{User-Name}',
> '%{%{User-Password}:-%{Chap-Password}}',
> '%{reply:Packet-Type}', '%S') -> INSERT INTO
> tbl_postauth (username, pass, reply,
> authdate) VALUES (
> 'suman', 'duman12',
> 'Access-Accept', '2011-03-12 16:18:51')
> rlm_sql (sql) in sql_postauth: query is INSERT INTO
> tbl_postauth (username, pass, reply,
> authdate) VALUES (
> 'suman', 'duman12',
> 'Access-Accept', '2011-03-12 16:18:51')
> rlm_sql (sql): Reserving sql socket id: 0
> rlm_sql (sql): Released sql socket id: 0
> ++[sql] returns ok
> ++[exec] returns noop
> Sending Access-Accept of id 39 to 122.175.85.117 port 26130
> Framed-MTU := 1472
> Reply-Message := "Welcome to Internet Services"
> Acct-Interim-Interval := 60
> Framed-Compression := Van-Jacobson-TCP-IP
> Service-Type := Framed-User
> Framed-Protocol := PPP
> Idle-Timeout := 300
> Mikrotik-Rate-Limit := "512k/1024k 1024k/2048k 512k/512k 30/30 1"
> Framed-IP-Netmask := 255.255.255.255
> Session-Timeout = 10
> Framed-IP-Address = 192.168.1.20
> Finished request 0.
> Going to the next request
> Waking up in 4.9 seconds.
> Cleaning up request 0 ID 39 with timestamp +2
> Ready to process requests.
>
>
>
>
>
> Debug Log for Max-Monthly-Session
>
> Listening on authentication address * port 1812
> Listening on accounting address * port 1813
> Listening on proxy address * port 1814
> Ready to process requests.
> rad_recv: Access-Request packet from host 122.175.85.117 port 26199, id=40,
> length=59
> User-Name = "suman"
> User-Password = "duman12"
> Calling-Station-Id = "001122334455"
> +- entering group authorize {...}
> ++[preprocess] returns ok
> ++[chap] returns noop
> ++[mschap] returns noop
> [suffix] No '@' in User-Name = "suman", looking up realm NULL
> [suffix] No such realm "NULL"
> ++[suffix] returns noop
> [eap] No EAP-Message, not doing EAP
> ++[eap] returns noop
> ++[unix] returns notfound
> ++[files] returns noop
> [sql] expand: %{User-Name} -> suman
> [sql] sql_set_user escaped user --> 'suman'
> rlm_sql (sql): Reserving sql socket id: 3
> [sql] expand: SELECT id, username, attribute, value, op FROM
> tbl_check WHERE username = '%{SQL-User-Name}' ORDER BY
> id -> SELECT id, username, attribute, value, op FROM
> tbl_check WHERE username = 'suman' ORDER BY id
> [sql] User found in radcheck table
> [sql] expand: SELECT id, username, attribute, value, op FROM
> tbl_reply WHERE username = '%{SQL-User-Name}' ORDER BY
> id -> SELECT id, username, attribute, value, op FROM
> tbl_reply WHERE username = 'suman' ORDER BY id
> [sql] expand: SELECT groupname FROM tbl_usergroup
> WHERE username = '%{SQL-User-Name}' ORDER BY priority -> SELECT
> groupname FROM tbl_usergroup WHERE username =
> 'suman' ORDER BY priority
> [sql] expand: SELECT id, groupname, attribute, Value,
> op FROM tbl_groupcheck WHERE groupname =
> '%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
> attribute, Value, op FROM tbl_groupcheck WHERE
> groupname = 'Biz1Mbps-UL' ORDER BY id
> [sql] User found in group Biz1Mbps-UL
> [sql] expand: SELECT id, groupname, attribute, value,
> op FROM tbl_groupreply WHERE groupname =
> '%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
> attribute, value, op FROM tbl_groupreply WHERE
> groupname = 'Biz1Mbps-UL' ORDER BY id
> rlm_sql (sql): Released sql socket id: 3
> ++[sql] returns ok
> rlm_sqlcounter: Entering module authorize code
> rlm_sqlcounter: Could not find Check item value pair
> ++[noresetcounter] returns noop
> rlm_sqlcounter: Entering module authorize code
> sqlcounter_expand: 'SELECT SUM(acctsessiontime -
> GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username='%{User-Name}' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1298917800''
> [monthlycounter] expand: SELECT SUM(acctsessiontime
> - GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)),
> 0)) FROM radacct WHERE username='%{User-Name}'
> AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime >
> '1298917800' -> SELECT SUM(acctsessiontime -
> GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username='suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1298917800'
> sqlcounter_expand: '%{sql:SELECT SUM(acctsessiontime -
> GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username='suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1298917800'}'
> [monthlycounter] sql_xlat
> [monthlycounter] expand: %{User-Name} -> suman
> [monthlycounter] sql_set_user escaped user --> 'suman'
> [monthlycounter] expand: SELECT SUM(acctsessiontime
> - GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)),
> 0)) FROM radacct WHERE username='suman'
> AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime >
> '1298917800' -> SELECT SUM(acctsessiontime -
> GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)), 0))
> FROM radacct WHERE username='suman' AND
> UNIX_TIMESTAMP(acctstarttime) + acctsessiontime > '1298917800'
> rlm_sql (sql): Reserving sql socket id: 2
> rlm_sql_mysql: MYSQL check_error: 1146 received
> rlm_sql (sql): database query error, SELECT SUM(acctsessiontime
> - GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)),
> 0)) FROM radacct WHERE username='suman'
> AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime >
> '1298917800': Table 'rdscrm.radacct' doesn't exist
> rlm_sql (sql): Released sql socket id: 2
> [monthlycounter] expand: %{sql:SELECT SUM(acctsessiontime
> - GREATEST((1298917800 - UNIX_TIMESTAMP(acctstarttime)),
> 0)) FROM radacct WHERE username='suman'
> AND UNIX_TIMESTAMP(acctstarttime) + acctsessiontime >
> '1298917800'} ->
> rlm_sqlcounter: No integer found in string ""
> ++[monthlycounter] returns noop
> rlm_sqlcounter: Entering module authorize code
> rlm_sqlcounter: Could not find Check item value pair
> ++[dailycounter] returns noop
> rlm_counter: Entering module authorize code
> rlm_counter: Could not find Check item value pair
> ++[daily] returns noop
> rlm_checkval: Item Name: Calling-Station-Id, Value: 001122334455
> rlm_checkval: Value Name: Calling-Station-Id, Value: 001122334455
> ++[checkval] returns ok
> [expiration] Checking Expiration time: '05 Mar 2012 23:59:59'
> ++[expiration] returns ok
> ++[logintime] returns noop
> ++[pap] returns updated
> Found Auth-Type = PAP
> +- entering group PAP {...}
> [pap] login attempt with password "duman12"
> [pap] Using CRYPT encryption.
> [pap] User authenticated successfully
> ++[pap] returns ok
> +- entering group session {...}
> [radutmp] expand: /var/log/freeradius/radutmp ->
> /var/log/freeradius/radutmp
> [radutmp] expand: %{User-Name} -> suman
> ++[radutmp] returns ok
> +- entering group post-auth {...}
> rlm_sql (sql): Reserving sql socket id: 1
> [sqlippool] expand: %{User-Name} -> suman
> [sqlippool] sql_set_user escaped user --> 'suman'
> [sqlippool] expand: START TRANSACTION -> START TRANSACTION
> [sqlippool] expand: UPDATE tbl_ippool SET nasipaddress = '', pool_key
> = 0, callingstationid = '', username = '', expiry_time = NULL WHERE
> expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress =
> '%{Nas-IP-Address}' -> UPDATE tbl_ippool SET nasipaddress = '', pool_key =
> 0, callingstationid = '', username = '', expiry_time = NULL WHERE
> expiry_time <= NOW() - INTERVAL 1 SECOND AND nasipaddress =
> '122.175.85.117'
> [sqlippool] expand: SELECT framedipaddress FROM tbl_ippool WHERE
> pool_name = '%{control:Pool-Name}' AND expiry_time IS NULL ORDER BY
> RAND() LIMIT 1 FOR UPDATE -> SELECT framedipaddress FROM tbl_ippool
> WHERE pool_name = 'main_pool' AND expiry_time IS NULL ORDER BY RAND()
> LIMIT 1 FOR UPDATE
> [sqlippool] expand: UPDATE tbl_ippool SET nasipaddress =
> '%{NAS-IP-Address}', pool_key = '%{NAS-Port}', callingstationid =
> '%{Calling-Station-Id}', username = '%{User-Name}', expiry_time = NOW() +
> INTERVAL 180 SECOND WHERE framedipaddress = '192.168.1.28' AND expiry_time
> IS NULL -> UPDATE tbl_ippool SET nasipaddress = '122.175.85.117', pool_key
> = '', callingstationid = '001122334455', username = 'suman', expiry_time =
> NOW() + INTERVAL 180 SECOND WHERE framedipaddress = '192.168.1.28' AND
> expiry_time IS NULL
> [sqlippool] Allocated IP 192.168.1.28 [1c01a8c0]
> [sqlippool] expand: COMMIT -> COMMIT
> rlm_sql (sql): Released sql socket id: 1
> [sqlippool] expand: Allocated IP: %{reply:Framed-IP-Address} from
> %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id}
> port %{NAS-Port} user %{User-Name}) -> Allocated IP: 192.168.1.28 from
> main_pool (did cli 001122334455 port user suman)
> Allocated IP: 192.168.1.28 from main_pool (did cli 001122334455 port
> user suman)
> ++[sqlippool] returns ok
> [reply_log] expand:
> /var/log/freeradius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d ->
> /var/log/freeradius/radacct/122.175.85.117/reply-detail-20110312
> [reply_log]
> /var/log/freeradius/radacct/%{Client-IP-Address}/reply-detail-%Y%m%d expands
> to /var/log/freeradius/radacct/122.175.85.117/reply-detail-20110312
> [reply_log] expand: %t -> Sat Mar 12 16:19:47 2011
> ++[reply_log] returns ok
> [sql] expand: %{User-Name} -> suman
> [sql] sql_set_user escaped user --> 'suman'
> [sql] expand: %{User-Password} -> duman12
> [sql] expand: INSERT INTO tbl_postauth
> (username, pass, reply, authdate) VALUES
> ( '%{User-Name}',
> '%{%{User-Password}:-%{Chap-Password}}',
> '%{reply:Packet-Type}', '%S') -> INSERT INTO
> tbl_postauth (username, pass, reply,
> authdate) VALUES (
> 'suman', 'duman12',
> 'Access-Accept', '2011-03-12 16:19:47')
> rlm_sql (sql) in sql_postauth: query is INSERT INTO
> tbl_postauth (username, pass, reply,
> authdate) VALUES (
> 'suman', 'duman12',
> 'Access-Accept', '2011-03-12 16:19:47')
> rlm_sql (sql): Reserving sql socket id: 0
> rlm_sql (sql): Released sql socket id: 0
> ++[sql] returns ok
> ++[exec] returns noop
> Sending Access-Accept of id 40 to 122.175.85.117 port 26199
> Framed-MTU := 1472
> Reply-Message := "Welcome to Internet Services"
> Acct-Interim-Interval := 60
> Framed-Compression := Van-Jacobson-TCP-IP
> Service-Type := Framed-User
> Framed-Protocol := PPP
> Idle-Timeout := 300
> Mikrotik-Rate-Limit := "512k/1024k 1024k/2048k 512k/512k 30/30 1"
> Framed-IP-Netmask := 255.255.255.255
> Session-Timeout = 31045212
> Framed-IP-Address = 192.168.1.28
> Finished request 0.
> Going to the next request
> Waking up in 4.9 seconds.
> Cleaning up request 0 ID 40 with timestamp +2
> Ready to process requests.
>
>
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20110313/7df8cb19/attachment.html>
More information about the Freeradius-Users
mailing list