RES: Problems using SQL IP Pool

Nataniel Klug listas.nata at cnett.com.br
Mon Jan 30 14:47:05 CET 2012


	Hello Fajar,

	Thank you for your reply. I will answer bellow:

> So you have ONLY one instance of sqlipool, backed by postgresql?
> 
> If you don't use mysql for sqlpipool then it's not relevant for this
discussion.
> Focus on what you use for sqlippool

[Nataniel Klug] It's true, I just use PostgreSQL for ippool:

--------- /etc/raddb/sql.conf ---------
sql sqlps {
        database = "postgresql"
        driver = "rlm_sql_${database}"
        server = "186.251.144.XX"
        port = 5432
        login = "radius"
        password = "XX"
        radius_db = "radius"
        acct_table1 = "radacct"
        acct_table2 = "radacct"
        postauth_table = "radpostauth"
        authcheck_table = "radcheck"
        authreply_table = "radreply"
        groupcheck_table = "radgroupcheck"
        groupreply_table = "radgroupreply"
        usergroup_table = "radusergroup"
        deletestalesessions = yes
        sqltrace = no
        sqltracefile = ${logdir}/sqltrace.sql
        num_sql_socks = 30
        connect_failure_retry_delay = 60
        lifetime = 0
        max_queries = 0
        readclients = yes
        nas_table = "nas"
        $INCLUDE sql/${database}/dialup.conf
}

sql sqlmy {
        database = "mysql"
        driver = "rlm_sql_${database}"
        server = "186.251.144.XX"
        port = 3306
        login = "radius"
        password = "XX"
        radius_db = "radius"
        acct_table1 = "radacct"
        acct_table2 = "radacct"
        postauth_table = "radpostauth"
        authcheck_table = "radcheck"
        authreply_table = "radreply"
        groupcheck_table = "radgroupcheck"
        groupreply_table = "radgroupreply"
        usergroup_table = "usergroup"
        deletestalesessions = yes
        sqltrace = no
        sqltracefile = ${logdir}/sqltrace.sql
        num_sql_socks = 60
        connect_failure_retry_delay = 60
        lifetime = 0
        max_queries = 0
        readclients = no
        nas_table = "nas"
        $INCLUDE sql/${database}/dialup.conf
}

--------- /etc/raddb/sqlippool.conf ---------
sqlippool {
sql-instance-name = "sqlps"
ippool_table = "radippool"
lease-duration = 720
pool-key = "%{NAS-Identifier}-%{NAS-Port}"
$INCLUDE sql/postgresql/ippool.conf
sqlippool_log_exists = "Existing IP: %{reply:Framed-IP-Address} \
  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
 sqlippool_log_success = "Allocated IP: %{reply:Framed-IP-Address} from
%{control:Pool-Name} \
  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
 sqlippool_log_clear = "Released IP %{Framed-IP-Address}\
 (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
 sqlippool_log_failed = "IP Allocation FAILED from %{control:Pool-Name} \
  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
 sqlippool_log_nopool = "No Pool-Name defined \
  (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user
%{User-Name})"
}

> And what does freeradius debug log say?
> 
> --
> Fajar

[Nataniel Klug] This is a production server and I can't run it in debug mode
(-X) and as it's not been a common problem it appear just once or twice
during a day I can't be monitoring it all the time. Is there any other way
to make the debug mode?




More information about the Freeradius-Users mailing list