[sqlippool] No Pool-Name defined.

Rôney Eduardo roneyeduardosantos at gmail.com
Mon Apr 28 15:52:04 CEST 2014


You need to set the "Pool-Name" attribute to your test user, in
radcheck or radgroupcheck table.

--
Roney Eduardo

2014-04-28 3:24 GMT-03:00 yata <aurens.memuro02 at gmail.com>:
> Hi
> I wanna use freeradius2 as a radius-server and dhcp-server.
> When I try to connect to radius-server,following errors show up.
> I think authentication is look fine.then message said sqlippool not defined.
> but I set up as below.
> What's wrong with my settings?
>
> ------------radiusd -X-----------------
>  ... adding new socket proxy address * port 55682
> Listening on authentication address * port 1812
> Listening on accounting address * port 1813
> Listening on command file /var/run/radiusd/radiusd.sock
> Listening on authentication address 127.0.0.1 port 18120 as server
> inner-tunnel
> Listening on proxy address * port 1814
> Ready to process requests.
> rad_recv: Access-Request packet from host 10.0.5.200 port 50000, id=3,
> length=205
>         User-Password = "test"
>         User-Name = "user at mondomaine.fr"
>         Acct-Session-Id = "erx FastEthernet 1/6:0011534340"
>         Service-Type = Framed-User
>         Framed-Protocol = PPP
>         ERX-Pppoe-Description = "pppoe 00:1d:72:c6:7b:d5"
>         Calling-Station-Id = "#ERX-40-b0-7a#E16#0"
>         NAS-Port-Type = Ethernet
>         NAS-Port = 369098752
>         NAS-Port-Id = "FastEthernet 1/6"
>         NAS-IP-Address = 10.0.5.200
>         NAS-Identifier = "ERX-40-b0-7a"
> # Executing section authorize from file /etc/raddb/sites-enabled/default
> +- entering group authorize {...}
> ++[preprocess] returns ok
> ++[chap] returns noop
> ++[mschap] returns noop
> ++[digest] returns noop
> [suffix] Looking up realm "mondomaine.fr" for User-Name =
> "user at mondomaine.fr"
> [suffix] No such realm "mondomaine.fr"
> ++[suffix] returns noop
> [eap] No EAP-Message, not doing EAP
> ++[eap] returns noop
> [files] users: Matched entry user at mondomaine.fr at line 6
> [files] users: Matched entry DEFAULT at line 183
> ++[files] returns ok
> ++[expiration] returns noop
> ++[logintime] returns noop
> ++[pap] returns updated
> Found Auth-Type = PAP
> # Executing group from file /etc/raddb/sites-enabled/default
> +- entering group PAP {...}
> [pap] login attempt with password "test"
> [pap] Using clear text password "test"
> [pap] User authenticated successfully
> ++[pap] returns ok
> Login OK: [user at mondomaine.fr] (from client GGSN1 port 369098752 cli
> #ERX-40-b0-7a#E16#0)
> # Executing section post-auth from file /etc/raddb/sites-enabled/default
> +- entering group post-auth {...}
> [sqlippool] No Pool-Name defined.
> [sqlippool]     expand: No Pool-Name defined   (did %{Called-Station-Id} cli
> %{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) -> No Pool-Name
> defined   (did  cli #ERX-40-b0-7a#E16#0 port 369098752 user
> user at mondomaine.fr)
> No Pool-Name defined   (did  cli #ERX-40-b0-7a#E16#0 port 369098752 user
> user at mondomaine.fr)
> ++[sqlippool] returns noop
> ++[exec] returns noop
> Sending Access-Accept of id 3 to 10.0.5.200 port 50000
>         NAS-IP-Address == 10.0.5.200
>         Framed-Protocol = PPP
>         Framed-Compression = Van-Jacobson-TCP-IP
> Finished request 0.
> Going to the next request
> Waking up in 4.9 seconds.
> rad_recv: Accounting-Request packet from host 10.0.5.200 port 50016, id=73,
> length=246
>         Acct-Status-Type = Stop
>         User-Name = "user at mondomaine.fr"
>         Event-Timestamp = "Apr 27 2014 14:19:10 PDT"
>         Acct-Delay-Time = 0
>         NAS-Identifier = "ERX-40-b0-7a"
>         Acct-Session-Id = "erx FastEthernet 1/6:0011534340"
>         NAS-IP-Address = 10.0.5.200
>         Service-Type = Framed-User
>         Calling-Station-Id = "#ERX-40-b0-7a#E16#0"
>         Acct-Input-Gigawords = 0
>         Acct-Input-Octets = 0
>         Acct-Output-Gigawords = 0
>         Acct-Output-Octets = 0
>         ERX-Input-Gigapkts = 0
>         Acct-Input-Packets = 0
>         ERX-Output-Gigapkts = 0
>         Acct-Output-Packets = 0
>         NAS-Port-Type = Ethernet
>         NAS-Port = 369098752
>         NAS-Port-Id = "FastEthernet 1/6"
>         Acct-Authentic = RADIUS
>         Acct-Session-Time = 0
>         Acct-Terminate-Cause = NAS-Request
> # Executing section preacct from file /etc/raddb/sites-enabled/default
> +- entering group preacct {...}
> ++[preprocess] returns ok
> [acct_unique] Hashing 'NAS-Port = 369098752,Client-IP-Address =
> 10.0.5.200,NAS-IP-Address = 10.0.5.200,Acct-Session-Id = "erx FastEthernet
> 1/6:0011534340",User-Name = "user at mondomaine.fr"'
> [acct_unique] Acct-Unique-Session-ID = "fbbf6a6fb6bf3d32".
> ++[acct_unique] returns ok
> [suffix] Looking up realm "mondomaine.fr" for User-Name =
> "user at mondomaine.fr"
> [suffix] No such realm "mondomaine.fr"
> ++[suffix] returns noop
> ++[files] returns noop
> # Executing section accounting from file /etc/raddb/sites-enabled/default
> +- entering group accounting {...}
> [detail]        expand: %{Packet-Src-IP-Address} -> 10.0.5.200
> [detail]        expand:
> /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
> -> /var/log/radius/radacct/10.0.5.200/detail-20140427
> [detail]
> /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
> expands to /var/log/radius/radacct/10.0.5.200/detail-20140427
> [detail]        expand: %t -> Sun Apr 27 22:49:32 2014
> ++[detail] returns ok
> ++[unix] returns ok
> [radutmp]       expand: /var/log/radius/radutmp -> /var/log/radius/radutmp
> [radutmp]       expand: %{User-Name} -> user at mondomaine.fr
> rlm_radutmp: Logout for NAS GGSN1 port 369098752, but no Login record
> ++[radutmp] returns ok
> rlm_sql (sql): Reserving sql socket id: 13
> [sqlippool]     expand: %{User-Name} -> user at mondomaine.fr
> [sqlippool] sql_set_user escaped user --> 'user at mondomaine.fr'
> [sqlippool]     expand: START TRANSACTION -> START TRANSACTION
> [sqlippool]     expand: UPDATE radippool  SET nasipaddress = '', pool_key =
> 0, callingstationid = '', username = '',  expiry_time = NULL  WHERE
> nasipaddress = '%{Nas-IP-Address}' AND pool_key = '%{NAS-Port}'  AND
> username = '%{User-Name}'  AND callingstationid = '%{Calling-Station-Id}'
> AND framedipaddress = '%{Framed-IP-Address}' -> UPDATE radippool  SET
> nasipaddress = '', pool_key = 0, callingstationid = '', username = '',
> expiry_time = NULL  WHERE nasipaddress = '10.0.5.200' AND pool_key =
> '369098752'  AND username = 'user at mondomaine.fr'  AND callingstationid =
> '=23ERX-40-b0-7a=23E16=230'  AND framedipaddress = ''
> [sqlippool]     expand: COMMIT -> COMMIT
> [sqlippool]     expand: Released IP %{Framed-IP-Address} (did
> %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name}) ->
> Released IP  (did  cli #ERX-40-b0-7a#E16#0 user user at mondomaine.fr)
> Released IP  (did  cli #ERX-40-b0-7a#E16#0 user user at mondomaine.fr)
> rlm_sql (sql): Released sql socket id: 13
> ++[sqlippool] returns ok
> ++[exec] returns noop
> [attr_filter.accounting_response]       expand: %{User-Name} ->
> user at mondomaine.fr
> attr_filter: Matched entry DEFAULT at line 12
> ++[attr_filter.accounting_response] returns updated
> Sending Accounting-Response of id 73 to 10.0.5.200 port 50016
> Finished request 1.
> Cleaning up request 1 ID 73 with timestamp +10
> Going to the next request
> Waking up in 4.9 seconds.
> Cleaning up request 0 ID 3 with timestamp +10
> Ready to process requests.
> ------------------------------------------------------------
>
>
>
>
>
> ---------------------sqlippool.conf------------------------------
> ##  Configuration for the SQL based IP Pool module (rlm_sqlippool)
> ##
> ##  The database schemas are available at:
> ##
> ##       raddb/sql/DB/ippool.sql
> ##
> ##  $Id$
>
> sqlippool {
>
>  #########################################
>  ## SQL instance to use (from sql.conf) ##
>  ##
>  ##  If you have multiple sql instances, such as "sql sql1 {...}",
>  ##  use the *instance* name here: sql1.
>  #########################################
>  sql-instance-name = "sql"
>
>  ## SQL table to use for ippool range and lease info
>  ippool_table = "radippool"
>
>  ## IP lease duration. (Leases expire even if Acct Stop packet is lost)
>  lease-duration = 3600
>
>  ## Attribute which should be considered unique per NAS
>  ## Using NAS-Port gives behaviour similar to rlm_ippool. (And ACS)
>  ## Using Calling-Station-Id works for NAS that send fixed NAS-Port
>  ## ONLY change this if you know what you are doing!
>  pool-key = "%{NAS-Port}"
>  # pool-key = "%{Calling-Station-Id}"
>
>  ################################################################
>  #
>  #  WARNING: MySQL has certain limitations that means it can
>  #           hand out the same IP address to 2 different users.
>  #
>  #           We suggest using an SQL DB with proper transaction
>  #           support, such as PostgreSQL, or using MySQL
>  #     with InnoDB.
>  #
>  ################################################################
>
>  #
>  #  Use the same database as configured in the "sql" module, "database"
>  #  configuration item.  Change the "postgresql" name below to be the
>  #  same as the "database" field of the SQL module referred to in the
>  #  "sql-instance-name", above.
>  #
> #$INCLUDE sql/postgresql/ippool.conf
> $INCLUDE sql/mysql/ippool.conf
>
>  ## Logging configuration. (Comment out to disable logging)
>  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})"
>
> }
> -------------------------------------------------------------------
>
>
>
>
>
> ------------------------------sql.conf---------------------------------
> # -*- text -*-
> ##
> ## sql.conf -- SQL modules
> ##
> ## $Id$
>
> ######################################################################
> #
> #  Configuration for the SQL module
> #
> #  The database schemas and queries are located in subdirectories:
> #
> # sql/DB/schema.sql Schema
> # sql/DB/dialup.conf Basic dialup (including policy) queries
> # sql/DB/counter.conf counter
> # sql/DB/ippool.conf IP Pools in SQL
> # sql/DB/ippool.sql schema for IP pools.
> #
> #  Where "DB" is mysql, mssql, oracle, or postgresql.
> #
>
> sql {
> #
> #  Set the database to one of:
> #
> # mysql, mssql, oracle, postgresql
> #
> database = "mysql"
>
> #
> #  Which FreeRADIUS driver to use.
> #
> driver = "rlm_sql_${database}"
>
> # Connection info:
> server = "localhost"
> #port = 3306
> login = "userfreeradius"
> password = "pwdfreeradius"
>
> # Database table configuration for everything except Oracle
> radius_db = "freeradius"
> # If you are using Oracle then use this instead
>         # radius_db =
> "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))"
>
> # If you want both stop and start records logged to the
> # same SQL table, leave this as is.  If you want them in
> # different tables, put the start table in acct_table1
> # and stop table in acct_table2
> acct_table1 = "radacct"
> acct_table2 = "radacct"
>
> # Allow for storing data after authentication
> postauth_table = "radpostauth"
>
> authcheck_table = "radcheck"
> authreply_table = "radreply"
>
> groupcheck_table = "radgroupcheck"
> groupreply_table = "radgroupreply"
>
> # Table to keep group info
> usergroup_table = "radusergroup"
>
> # If set to 'yes' (default) we read the group tables
> # If set to 'no' the user MUST have Fall-Through = Yes in the radreply table
> read_groups = yes
>
> # Remove stale session if checkrad does not see a double login
> deletestalesessions = yes
>
> # Print all SQL statements when in debug mode (-x)
> sqltrace = no
> sqltracefile = ${logdir}/sqltrace.sql
>
> # number of sql connections to make to server
> num_sql_socks = 15
>
> # number of seconds to dely retrying on a failed database
> # connection (per_socket)
> connect_failure_retry_delay = 60
>
> # lifetime of an SQL socket.  If you are having network issues
> # such as TCP sessions expiring, you may need to set the socket
> # lifetime.  If set to non-zero, any open connections will be
> # closed "lifetime" seconds after they were first opened.
> lifetime = 0
>
> # Maximum number of queries used by an SQL socket.  If you are
> # having issues with SQL sockets lasting "too long", you can
> # limit the number of queries performed over one socket.  After
> # "max_qeuries", the socket will be closed.  Use 0 for "no limit".
> max_queries = 0
>
> # Set to 'yes' to read radius clients from the database ('nas' table)
> # Clients will ONLY be read on server startup.  For performance
> # and security reasons, finding clients via SQL queries CANNOT
> # be done "live" while the server is running.
> #
> readclients = yes
>
> # Table to keep radius client info
> nas_table = "nas"
>
> # Read driver-specific configuration
> $INCLUDE sql/${database}/dialup.conf
> }
> ---------------------------------------------------------------------------
>
> If these information is not enough please let me know.
>
> Thanks,
>
>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list