Hi there,
I had the same problem with my Ascend MAX NASes. I solved it by
writing a custom AuthBy handler with a handle_framedgroup function
that overrides the default one. My version is listed below. I'm simply
calculating the 'effective' port number as the silly port number given to
me by the NAS, MOD (MaxPorts). Where MaxPorts is the
FramedGroupMaxPortsPerClassC value defined in the <Client> section of the
config file for each NAS. This ensures that the address assigned always
stays within the assigned IP Pool.
Note: I'm only modifying octet 4 of the IP address.
sub handle_framedgroup
{
my ($self, $p, $rp, $value) = @_;
$self->log($main::LOG_DEBUG,
"FramedGroup $value address is being assigned");
# Figure out an address to allocate
my $base = $p->{Client}->{FramedGroupBaseAddress}[$value];
if (defined $base)
{
my @base = split(/\./, $base);
my $port = $p->getAttrByNum($Radius::Radius::NAS_PORT);
# calculate effective port number = Port MOD (MaxPorts)
$port = $port % $p->{Client}->{FramedGroupMaxPortsPerClassC};
# Compute octet 4 of the IP address
my $o4 = $base[3] + $port;
$rp->changeAttrByNum($Radius::Radius::FRAMED_IP_ADDRESS,
"$base[0].$base[1].$base[2].$o4");
}
else
{
$self->log($main::LOG_WARNING,
"There is no FramedGroupBaseAddress defined for a ",
"Framed-Group of $value. No address will be allocated");
}
}
Hope this helps,
Richard
On Thu, 17 Feb 2000, [iso-8859-1] "Reina Ortiz, Juan Mar�a" wrote:
> Hi
>
> We are analysing your Radiator radius server and we have some doubts with
> the IP address assignation mechanism.
> As we understand, the IP address given is the FramedGroupBaseAddress plus
> the NAS port number from the request arrives.
> Our problem is that our NASes have port numbers like 2403, or even higher,
> so Radiator gives one IP address out of the Class C assigned to this client
> (we supossed one class C per client basis).
>
> Is there any way to keep the given IP address in the Class C defined for the
> client?.
> Is it necessary to reserve one Class C per client in order to avoid
> duplicate IP address in two different NASes?
>
> Regards,
> _____
>
>
>
>
> Juan Mar�a Reina Ortiz
> Administrador de Sistemas C.O.M.
> * [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> * (+34 ) 91 270 64 48
>
>
>
>
�
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.