How to assign IPs from different pools (sqlippool) depending on which NAS the request comes from

aquilinux aquilinux at gmail.com
Thu Jan 28 12:18:10 CET 2016


It's obviously working...
Thanks for help!

Regards,
aqx

On Wed, Jan 27, 2016 at 5:46 PM, Alan DeKok <aland at deployingradius.com>
wrote:

> On Jan 27, 2016, at 10:56 AM, aquilinux <aquilinux at gmail.com> wrote:
> >
> > Hi all, I need to assign IPs from different subnets (pools) depending on
> > which NAS the request comes from.
> > Right now i'm using sqlippool with only one pool (main_pool) populated
> with
> > one subnet, 172.20.174.0/23.
> > I need to split this subnet in 2 (ie. 172.20.174.0/24 and
> 172.20.175.0/24)
> > assigning different pool names (ie. pool_A for 172.20.174.0/24 and
> pool_B
> > for 172.20.175.0/24) in radippool.
> >
> > What i want to do is:
> > - if a user comes from NAS-A then he should be assigned an IP from pool_A
> > - if a user comes from NAS-B then he should be assigned an IP from pool_B
> >
> > How can this be done?
>
>   Write those rules in unlang:
>
>         if (Packet-Src-IP-Address == NAS-A.ip.address ) {
>                 update control {
>                         Pool-Name := "pool-A"
>                 }
>         }
>
>   etc.  It's that easy.
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html




-- 
"Madness, like small fish, runs in hosts, in vast numbers of instances."

Nessuno mi pettina bene come il vento.


More information about the Freeradius-Users mailing list