Changing Schema for radippool
Hi, Our provider is sending the calling-station-id usually larger than 50 characters while the schema for RADIPPOOL table in MYSQL has defined this field for 30 CHARACTERS. because of this we are seeing unusual behaviour in IP address assignment as first 35 characters are same for all users and last part varies. I want to change it to 100. Is it advisable to change the field schema in RADIPPOOL? Thanks Hitesh Vinzoda Network Administrator "There are 10 types of people in this world. One who can understand binary and other's can't."
On Thu, Dec 15, 2011 at 1:19 PM, Hitesh Vinzoda <hiteshvinzoda@yahoo.com> wrote:
Hi,
Our provider is sending the calling-station-id usually larger than 50 characters while the schema for RADIPPOOL table in MYSQL has defined this field for 30 CHARACTERS. because of this we are seeing unusual behaviour in IP address assignment as first 35 characters are same for all users and last part varies.
AFAIK the column you need to change is pool-key. But before you do that, take a look at the comment on sqlippool.conf ## Attribute which should be considered unique per NAS ## Using NAS-Port gives behaviour similar to rlm_ippool. (And ACS) ## Using Calling-Station-Id works for NAS that send fixed NAS-Port ## ONLY change this if you know what you are doing! pool-key = "%{NAS-Port}" # pool-key = "%{Calling-Station-Id}" if NAS-Port is unique, better just use that.
I want to change it to 100. Is it advisable to change the field schema in RADIPPOOL?
It shouldn't be a problem, although I'd recommend just use NAS-Port as pool-key. -- Fajar
Hi Fajar, We have uncommented the pool-key for NAS-PORT & CALLING-STATION-ID under sqlippool.conf and hence want the calling-station-id to be used when the lease expires/new session such that user has more chances of getting the same ip address again. pool-key = "%{NAS-Port}" pool-key = "%{Calling-Station-Id}" As i said earlier, the CALLING_STATION-ID sent by LAC is so long that the first 30 characters are always unique and we end up in users competing for the same IP address i.e. duplicate IP address. so that is the reason we want to modify the schema for RADIPPOOL where field CALLING-STATION-ID is varchar(30) and we would modify is to varchar(100) Please advise. TIA Hitesh Vinzoda Network Administrator +91-9924117399 www.vinzoda.in "There are 10 types of people in this world. One who can understand binary and other's can't." ________________________________ From: Fajar A. Nugraha <list@fajar.net> To: Hitesh Vinzoda <hiteshvinzoda@yahoo.com>; FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Sent: Thursday, 15 December 2011 12:25 PM Subject: Re: Changing Schema for radippool On Thu, Dec 15, 2011 at 1:19 PM, Hitesh Vinzoda <hiteshvinzoda@yahoo.com> wrote:
Hi,
Our provider is sending the calling-station-id usually larger than 50 characters while the schema for RADIPPOOL table in MYSQL has defined this field for 30 CHARACTERS. because of this we are seeing unusual behaviour in IP address assignment as first 35 characters are same for all users and last part varies.
AFAIK the column you need to change is pool-key. But before you do that, take a look at the comment on sqlippool.conf ## Attribute which should be considered unique per NAS ## Using NAS-Port gives behaviour similar to rlm_ippool. (And ACS) ## Using Calling-Station-Id works for NAS that send fixed NAS-Port ## ONLY change this if you know what you are doing! pool-key = "%{NAS-Port}" # pool-key = "%{Calling-Station-Id}" if NAS-Port is unique, better just use that.
I want to change it to 100. Is it advisable to change the field schema in RADIPPOOL?
It shouldn't be a problem, although I'd recommend just use NAS-Port as pool-key. -- Fajar
On Thu, Dec 15, 2011 at 3:38 PM, Hitesh Vinzoda <hiteshvinzoda@yahoo.com> wrote:
Hi Fajar,
We have uncommented the pool-key for NAS-PORT & CALLING-STATION-ID under sqlippool.conf and hence want the calling-station-id to be used when the lease expires/new session such that user has more chances of getting the same ip address again.
pool-key = "%{NAS-Port}" pool-key = "%{Calling-Station-Id}"
I'm pretty sure that won't work. Only one of them can be active. Is the value of NAS-Port persistent for every client? If yes, it's easier to just use that. If no, then comment-out the Nas-Port line.
As i said earlier, the CALLING_STATION-ID sent by LAC is so long that the first 30 characters are always unique and we end up in users competing for the same IP address i.e. duplicate IP address. so that is the reason we want to modify the schema for RADIPPOOL where field CALLING-STATION-ID is varchar(30) and we would modify is to varchar(100)
Try it and see :) As I said earlier though, for ip address allocation purposes, you should only need to adjust pool_key column, as callingstationid column should be informational only. Another alternative, if you don't really know how long your longest calling-station-id will be, is to change pool_key column to varchar(32) and use something like this on sqlippool.conf: pool-key = "%{md5:%{Calling-Station-Id}}" -- Fajar
participants (2)
-
Fajar A. Nugraha -
Hitesh Vinzoda