(RADIATOR) Radpool Question

Millington Chris Chris.Millington at uk.fujitsu.com
Wed May 2 06:05:11 CDT 2007


Hi,
 
I want to tweak the <AddressAllocator SQL> to allocate IP addresses from
various tables in a database not just the default RADPOOL table. I have
read section 5.72 in the manual but don't understand where to insert the
queries to make radiator use the new table names. I don't even know how
to action the queries i have seen some examples with FindQuery in front
of the select statement is this correct? Any help and guidance
greatfully recieved, i only know the basics of RADIATOR so feel free to
dunb it down for me. Below is the config to help explain what I'm after.
 
# radius2.cfg
#
# Configuration file for radius server
#
# Author: Mike McCauley (mikem at open.com.au)
# Copyright (C) 1997 Open System Consultants
# $Id: radius2.cfg,v 1.6 1999/07/14 05:28:50 mikem Exp $
#
Foreground
LogStdout
AuthPort 1645
AcctPort 1646
LogDir  .
DbDir  .
LogFile  %L/logfile2
Trace  4
 
<Client DEFAULT>
 Secret mysecret
 DupInterval 0
</Client>
 
<AddressAllocator SQL>
 Identifier SQLAllocator1
                DBSource        dbi:mysql:Radiator
                DBUsername      root
                DBAuth          password
# I want this to look at radpool_customer1 table in the database
 <AddressPool customer1>
  Subnetmask 255.255.255.255
  Range 10.10.10.1 10.10.10.3
 </AddressPool>
</AddressAllocator>
 
<AddressAllocator SQL>
 Identifier SQLAllocator2
                DBSource        dbi:mysql:Radiator
                DBUsername      root
                DBAuth          password
# I want this to look at radpool_customer2 table in the database
 <AddressPool customer2>
  Subnetmask 255.255.255.255
  Range 192.168.0.1 192.168.0.3
 </AddressPool>
</AddressAllocator>
 
<Handler User-Name=/customer1/,Realm=fsdsl.net>
 AuthByPolicy ContinueWhileAccept
               RewriteUsername s/^([^@]+).*/$1/
 <AuthBy FILE>
                Filename        %D/customer.users
                AddToReply
Service-Type=Framed-User,Framed-Protocol=PPP,PoolHint=customer1
        </AuthBy>
 <AuthBy DYNADDRESS>
  AddressAllocator SQLAllocator1
  StripFromReply PoolHint
 </AuthBy>
</Handler>
 
<Handler User-Name=/customer2/,Realm=fsdsl.net>
 AuthByPolicy ContinueWhileAccept
         RewriteUsername s/^([^@]+).*/$1/
 <AuthBy FILE>
                Filename        %D/customer.users
                AddToReply
Service-Type=Framed-User,Framed-Protocol=PPP,PoolHint=customer2
        </AuthBy>
 <AuthBy DYNADDRESS>
  AddressAllocator SQLAllocator2
  StripFromReply PoolHint
 </AuthBy>
</Handler>
 
 
#Where do i place the statements below to mimic the default RADIATOR
behavour when it uses the RADPOOL table?
#select TIME_STAMP, YIADDR, SUBNETMASK, DNSSERVER from RADPOOL_CUSTOMER1
where POOL='%0' and STATE=0 order by TIME_STAMP
#update RADPOOL_CUSTOMER1 set STATE=1,TIME_STAMP=%0, EXPIRY=%1,
USERNAME=%2 where YIADDR='%3' and TIME_STAMP %4
#insert into RADPOOL_CUSTOMER1 (STATE, TIME_STAMP,POOL, YIADDR,
SUBNETMASK, DNSSERVER) values (0, %t, %0, '%1','%2', '%3')
#update RADPOOL_CUSTOMER1 set STATE=0,TIME_STAMP=%t where YIADDR='%0'
#update RADPOOL_CUSTOMER1 set STATE=0 where STATE!=0 and EXPIRY < %0
 

This e-mail is only for the use of its intended recipient.  Its contents
are confidential and may be privileged.  Fujitsu Services does not
guarantee that this e-mail has not been intercepted and amended or that
it is virus-free.

 

Chris Millington 

Systems Engineer

Internet and Core Network Support

 

FUJITSU

Infinity House, Mallard Way, Off Electra Way, Crewe Business Park, Crewe
Cheshire CW1 6ZQ

Tel:          +44  870 325 3444  Internal:  7225 3444

Mobile:     +44  7867 825498

Fax:         +44  870 325 3618

E-mail:      chris.millington at uk.fujitsu.com

Web:        http:// <http://fujitsu.com/> fujitsu.com

Fujitsu Services Limited, Registered in England no 96056, Registered
Office 26, Finsbury Square, London, EC2A 1SL

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20070502/12d9c0ac/attachment.html>


More information about the radiator mailing list