Freeradius-Users Digest, Vol 27, Issue 24
Peter Nixon
listuser at peternixon.net
Fri Jul 6 19:15:30 CEST 2007
On Fri 06 Jul 2007, Hugh Messenger wrote:
> Peter Nixon <listuser at peternixon.net> said:
> > And different pool names in each instance....
>
> Yup, although obviously the Pool-Name is set up independently of the
> sqlippool instances. I have some unlang at the start of 'authorize'
> section that sets the Pool-Name based on a mix of NAS IP and
> Calling-Station-Id.
>
> I also have some NAS's in the main 'dialup' Huntgroup that do their own
> pool assignments (so I don't set a Pool-Name). So I've wrapped the group
> stuff inside a test ...
>
> Post-Auth-Type alaweb {
> if ("%{control:Pool-Name}") {
> group {
> ...
> }
> }
> }
>
> (I tried wrapping it round the whole of the Post-Auth-Type block, but FR
> doesn't like that)
>
> Anyway, that part now works famously, thank you.
>
> My one remaining question is, what should the 'accounting' section look
> like? As far as I can tell, the accounting queries always return OK
> (except if there was some kind of database problem) regardless of whether
> a table row was affected or not. Which is to be expected I suppose, as
> 'notfound' isn't normally relevant in an accounting query.
yep. thats exactly what they are supposed to do.
> But I obviously need to apply the right instance, so I get the right
> pool-key for the allocate/clear queries. So I guess I'll have to wrap
> some unlang around it like ...
>
> if ("%{control:Pool-Name}") {
> if ("%{control:Huntgroup-Name" == "dialup") {
> sqlippool_dialup
> }
> elsif ("%{control:Huntgroup-Name" == "wireless") {
> sqlippool_wireless
> }
> }
Nope. Accounting does not know which Pool-Name was used, or even IF a pool
was used or not....
> Just out of interest, what would the recommended 'accounting' config look
> like for the Wiki example?
Just list them both.
Either your pools overlap (probably not a good idea) and the same IP will be
updated in both modules or that don't overlap (the normal, recommended way),
or they overlap, but you have virtualised everything based on some other
attribute like "Called-Station-Id". (You will of course need to be running
VRF or NAT inbetween your NASes with overlapping IP ranges) and in this case
you will have modified the sql to make this work. (This is how I am
deployed, but I doubt many people outside of other GSM or MPLS operators
have this setup)
> > > Thankyou for being so patient!
> >
> > You are welcome. Everyone is/was helped by someone when they start out
> > :-)
>
> I'm definitely at that "a little knowledge is a dangerous thing" stage
> with FR. :)
>
> I do fully intend to try and pay forward some of the help I've been
> getting by building a "Wireless and Dialup with MySQL Cookbook" for the
> wiki, once I've gotten this all sorted out!
great :-)
Even just fixing existing pages that you feel are unclear is helpfull as you
are a new comer and have found by trial and error which bits are difficult
to understand. That was years ago for many of the wiki authors :-)
--
Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
More information about the Freeradius-Users
mailing list