Re: SQL IP Pools Module

2002-12-05 Thread Ruslan A Dautkhanov
Hi all,



  Second, I appreciate your try to create sql version of
  ippool module (btw, why
  it not process accounting on/off packets - recieving this
  packet RADIUS server
  should mark all IPs as deallocated?).

 It does process accounting packets, stop record: unallocate the IP
 address, checkpoint record: increases lease of current IP address by
 'lease-duration'.

Your version of ippool process all types of accounting packets.
It's very well. The second benefit of this ippool module is
that it introduce lease time of each IP. It's guarantee no hang IPs.
I stopped using standard rlm_ippool some days ago, since it is very buggy -
it worked for 1,5 days and after this my NAS start to reject users
since rlm_ippool says No available ip addresses in pool, but it's wrong -
my NAS currently have only one E1 trunk (max. 30 users online), but
I use iprange with 64 adresses! I agree now with the label This module is
highly experimental in the rlm_ippool configuration file.



  Why not using rlm_sql? I think any tries to implement
  rlm_sql module/driver
  specially for this module will be ugly. If it not have
  transactions implemented,
  then we have reason to implement it rlm_sql in the
  interface calls.

 We tried using the rlm_sql module the same way the sqlcounter module
 does but because we used transactions it did not work.
 Yes maybe the rlm_sql module sould support transactions, but it
 currently does not. If you are going to start rewriting rlm_sql it might
 be a good idea to make it a database access module only, and therefore
 remove the sql accounting, authenication etc and put them in separate
 modules.

Anybody know is it possible to use rlm_sql's pool of DB connections in
other modules than rlm_sql self?
I study the rlm_sqlippool and see that it tries to open one DB connection for
each congigured ippool and only one. I don't understand - how it will be worked on
multithread environment - you have only one DB instance for one ippool
instance!?? On the other hand, for example, I have 15 ippools: pool1, ...
pool15 - and it will create 15 additional DB connections!?
Why you say rlm_sql do not support transactions?
You can call sql_query(BEGIN); ...(do something)... and than
sql_query(COMMIT) or sql_query(ROLLBACK). I see that you have mysql
DB schema and maybe some problems exists only for this driver?
I almost sure, that for example on PostgreSQL no problems exists.
But anybody can tell us - is FreeRADIUS allow other modules access
already created pool of DB instances?


Thanks a lot for any comments.



--
 best regards,
Ruslan A Dautkhanov   [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Re: SQL IP Pools Module

2002-12-04 Thread Mike Varley
I had to turn off Passive File Transfers in gFTP (under FTP/Options)

MV

On Tue, 2002-12-03 at 22:58, Allister Maguire wrote:
 Hello,
 
 We have finished the sql version of the ip module it can be downloaded
 from here:
 
 ftp://lopez.globe.net.nz/Linux/freeradius/rlm_sqlippool.tar.gz
 
 Issues:
 1. It does not support multilink (MPPP), we had no need for this so did
 not implement it.
 2. We use transaction so could not use rlm_sql, instead rlm_sql source
 is included. This is bad.
 
 Regards
 Allister P Maguire
 
 - 
 List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- 
~~~
Mike Varley -= SOMA Networks =-
Tel: 416.977.1414   x1578
email: [EMAIL PROTECTED]


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



SQL IP Pools Module

2002-12-03 Thread Allister Maguire
Hello,

We have finished the sql version of the ip module it can be downloaded
from here:

ftp://lopez.globe.net.nz/Linux/freeradius/rlm_sqlippool.tar.gz

Issues:
1. It does not support multilink (MPPP), we had no need for this so did
not implement it.
2. We use transaction so could not use rlm_sql, instead rlm_sql source
is included. This is bad.

Regards
Allister P Maguire

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



RE: SQL IP Pools Module

2002-12-03 Thread Allister Maguire
Sorry,

Fixed version of the tar has been uploaded.

Allister

 -Original Message-
 From: Allister Maguire 
 Sent: Wednesday, 4 December 2002 4:59 p.m.
 To: '[EMAIL PROTECTED]'
 Subject: SQL IP Pools Module
 
 
 Hello,
 
 We have finished the sql version of the ip module it can be 
 downloaded from here:
 
 ftp://lopez.globe.net.nz/Linux/freeradius/rlm_sqlippool.tar.gz
 
 Issues:
 1. It does not support multilink (MPPP), we had no need for 
 this so did not implement it. 2. We use transaction so could 
 not use rlm_sql, instead rlm_sql source is included. This is bad.
 
 Regards
 Allister P Maguire
 

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



RE: SQL IP Pools Module

2002-12-03 Thread Ruslan A Dautkhanov
Hi all,

First, excuse me, but the link not worked properly. I can't download the file.
Second, I appreciate your try to create sql version of ippool module (btw, why
it not process accounting on/off packets - recieving this packet RADIUS server
should mark all IPs as deallocated?).
 2. We use transaction so could not use rlm_sql, instead rlm_sql source
 is included. This is bad.
Why not using rlm_sql? I think any tries to implement rlm_sql module/driver
specially for this module will be ugly. If it not have transactions implemented,
then we have reason to implement it rlm_sql in the interface calls. Anyway,
if it's not currently possible we can create rlm_sqlippool without transactions.
I have my own idea about DB's scheema for this module. Maybe somebody like it.
Datatypes from Postgresql, but you can adopt to any other RDBMS.

ippools
---
poolnametext
This table just store set of ippool names. This table optional and have only
informational usability.

ipranges
--
poolnameint4
rangeid int4
rangefrom   inet
rangeto inet
netmask inet
This relation store ranges of IP addresses for each ippool. netmask field
have the same meaning, as in rlm_ippool module. NB: one pool can have
multiple ip ranges!

allocatedips

ip  inet
nasipaddr   inet
nasport int4
callingstation  text
_Global_ store for allocated IPs. NB: different ippools can have the same
or overlapped ipranges without any problems, because we have global store.
Last tree fields used for the same aims, as on rlm_ippool (for deallocation
on accounting stop,on,off-packets). Now about transactions - you can not
to use transations if you create unique index on ip attribute! RDBMS will
fail to allocate the same IP - and you'll just should properly interpret
this by trying allocation of another IP address.
Thanks a lot for any comments.



--
 best regards,
Ruslan A Dautkhanov   [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature