Problems using SQL IP Pool

Nataniel Klug listas.nata at cnett.com.br
Mon Jan 30 13:43:43 CET 2012


                Hello all,

 

                I’ve been using Freeradius for a long time and about 5
months ago I made a change in my default layout so I could use Freeradius
SQL-IPPool running over PostgreSQL. This is working almost fine but for some
reason I can’t figure out it’s giving the same IP address to two different
clients. So, my network layout is something like this:

 

[ freeradius ]

-- [ external* mysql ]

-- [ external* postgresql ]

* external I mean as the databases are running in separate hardware but in
the same physical network

 

                My customers are authenticating over PPPoE interfaces on two
parallel servers that work as a backup for each other but they are running
simultaneously. This would be layout for my clients:

 

(internet) – [ auth01/auth02 ] – (clients)

 

                Auth01 and Auth02 can both communicate with Freeradius in
the same physical network and they are getting there with no more than 1 ms
(it’s a gigabit network that fairly is using 50 mbit).

 

                I am using MySQL and PostgreSQL for a reason: somehow the
software I use to bill my customers can only work with MySQL radacct table
and it was not able to read the radacct from PostgreSQL. So I am running
accounting over MySQL and Authentication/Authorization over PostgreSQL (I
will post the configuration files in the end of this message).

 

                So, returning to the problem, this is what is happening:

 

http://www.cnett.com.br/nata/imagens/Capturar.JPG

 

                There is two clients using the SAME IP which is a problem.
Looking into my Freeradius log file I could not find when “cjunior” got the
IP I have JUST “taise” allocation:

 

Fri Jan 27 12:20:03 2012 : Auth: Login OK: [cjunior] (from client
LJS.AUTH.02 port 69822 cli 74:EA:3A:D1:FD:17)

Fri Jan 27 12:20:03 2012 : Info: Allocated IP: 186.251.148.216 from
main_pool   (did cnett_pppoe cli 74:EA:3A:D1:FD:17 port 69822 user cjunior)

Fri Jan 27 14:41:38 2012 : Info: Released IP 186.251.148.216 (did
cnett_pppoe cli 74:EA:3A:D1:FD:17 user cjunior)

Fri Jan 27 14:45:47 2012 : Auth: Login OK: [taise] (from client LJS.AUTH.02
port 69530 cli 00:02:72:89:34:C5)

Fri Jan 27 14:45:47 2012 : Info: Allocated IP: 186.251.150.130 from
main_pool   (did cnett_pppoe cli 00:02:72:89:34:C5 port 69530 user taise)

Fri Jan 27 15:18:01 2012 : Auth: Login OK: [cjunior] (from client
LJS.AUTH.02 port 69668 cli 74:EA:3A:D1:FD:17)

Fri Jan 27 15:18:01 2012 : Info: Allocated IP: 186.251.150.226 from
main_pool   (did cnett_pppoe cli 74:EA:3A:D1:FD:17 port 69668 user cjunior)

Fri Jan 27 12:19:14 2012 : Info: Allocated IP: 186.251.150.136 from
main_pool   (did cnett_pppoe cli 00:02:72:89:34:C5 port 69799 user taise)

Fri Jan 27 23:22:04 2012 : Info: Released IP 186.251.150.130 (did
cnett_pppoe cli 00:02:72:89:34:C5 user taise)

Mon Jan 30 08:19:05 2012 : Info: Released IP 186.251.150.5 (did cnett_pppoe
cli 00:02:72:89:34:C5 user taise)

Mon Jan 30 08:20:23 2012 : Auth: Login OK: [taise] (from client LJS.AUTH.02
port 69525 cli 00:02:72:89:34:C5)

Mon Jan 30 08:20:23 2012 : Info: Allocated IP: 186.251.151.65 from main_pool
(did cnett_pppoe cli 00:02:72:89:34:C5 port 69525 user taise)

Mon Jan 30 08:23:54 2012 : Info: Released IP 186.251.151.65 (did cnett_pppoe
cli 00:02:72:89:34:C5 user taise)

Mon Jan 30 08:24:05 2012 : Auth: Login OK: [taise] (from client LJS.AUTH.01
port 350112 cli 00:02:72:89:34:C5)

Mon Jan 30 08:24:05 2012 : Info: Allocated IP: 186.251.150.118 from
main_pool   (did cnett_pppoe cli 00:02:72:89:34:C5 port 350112 user taise)

 

                This is really strange. Bellow I am showing my PostgreSQL
radippool table and there is just the taise record (ok, I know, it could not
have both).

 

http://www.cnett.com.br/nata/imagens/Capturar1.JPG

 

                Looking for problems I also checked the usage of CPU and RAM
on PostgreSQL box and MySQL box but there is nothing I could use. For those
who ask I change the pool_key because I was having duplicated pool_key from
my NAS (Auth01 and Auth02) so I just made a change where the name of the
server is showing. The problem with the duplicate IPs is older than the
change so the pool_key is discarded.

 

http://www.cnett.com.br/nata/imagens/cpu_usage_postgres-mysql.JPG

 

                Is it possible to someone help me finding a solution?

 

--

Descrição: Descrição: 111027-nata_at_cnett

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120130/49eeb297/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 40381 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120130/49eeb297/attachment.gif>


More information about the Freeradius-Users mailing list