[RADIATOR] how to assign Static and Dynamic Address at same time

Heikki Vatiainen hvn at open.com.au
Mon Jul 30 14:52:14 CDT 2012

On 07/30/2012 12:58 PM, Luke Liu wrote:

> Dear Radiator Support,

Hello Luke,

just a quick note about our lists: We do have a separate list for email
support contract holders in addition to this public list. Please see
http://www.open.com.au/mailing.html for more information

> We use group column on subscriber table to diff static IP address and
> Dynamic IP address for user
> example
> table: subscriber
> username            password          group
> test1 at xxx.com <mailto:test1 at xxx.com>         1                0
> test2 at xxx.com <mailto:test2 at xxx.com>         1                1
> user in group 0 will get static IP address, in group 1 is for dynamic IP
> address.

Please see below for an idea of using AuthBy GROUP to handle the two
different allocation methods.

> Now I can assign Dynamic IP on radiator with following
> <AddressAllocator SQL>
>         Identifier SQLAllocator
>         ..........
> </AddressAllocator>
> <Realm xxx.com>
>     AuthByPolicy ContinueWhileAccept
>     <AuthBy SQL>
>     ..........
>     #Authenticate the user with SQL
>     AuthSelect select password from subscriber where username= ?
>     AuthSelectParam %0
>     ......
>     </AuthBy>
>     <AuthBy DYNADDRESS>
>                 Identifier AllocateIPAddress
>                 AddressAllocator SQLAllocator
>                 PoolHint pool1
>                 MapAttribute yiaddr, Framed-IP-Address
>                 StripFromReply PoolHint
>     </AuthBy>
> </Realm>
> However I do not know how to assign static IP for group 0 user?  Can you
> help me?

You could consider AuthBy GROUP. Try something like this:

<Realm xxx.com>
   AuthByPolicy ContinueWhileReject
   <AuthBy GROUP>
      AuthByPolicy ContinueWhileAccept
      # Your current AuthBy SQL with one change
      AuthSelect select password from subscriber where username=? and
      # Your current AuthBy DYNADDRESS
   <AuthBy SQL>
         AuthSelect select password from subscriber where username=? and
         # Possibly pull the address with select too


Heikki Vatiainen <hvn at open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.

More information about the radiator mailing list