IP allocation from Pool

classic Classic list List threaded Threaded
8 messages Options
| Threaded
Open this post in threaded view
|

IP allocation from Pool

kabin mool
hi,

With the help of below documentation, I am able to allocated the static IP to user from my MySQL DB but is it possible to allocated IP from pool . If yes, can you share me the step how can we manage it.

https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database
guide/dhcp for static ip allocation<https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database>
Before You Start. This example assumes that the network adapter where is connected freeradius have the following settings: auto eth1 iface eth1 inet static address 192.168.10.1 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255
wiki.freeradius.org
Thanks,
Kabin
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

kabin mool
hi

Just to clear my requirement:

I have two users - A & B. I want to provide A user with one IP range from radius DHCP and B from another IP range.

Kabin

________________________________
From: kabin mool
Sent: Monday, September 21, 2020 9:08 PM
To: FreeRadius users mailing list <[hidden email]>
Subject: IP allocation from Pool

hi,

With the help of below documentation, I am able to allocated the static IP to user from my MySQL DB but is it possible to allocated IP from pool . If yes, can you share me the step how can we manage it.

https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database
guide/dhcp for static ip allocation<https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database>
Before You Start. This example assumes that the network adapter where is connected freeradius have the following settings: auto eth1 iface eth1 inet static address 192.168.10.1 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255
wiki.freeradius.org
Thanks,
Kabin
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Fwd: IP allocation from Pool

kabin mool
Dear friends,

Can you help me on below requirement, how to manage in freeradius?

kabin

________________________________
From: Freeradius-Users <freeradius-users-bounces+kabin_mool=[hidden email]> on behalf of kabin mool <[hidden email]>
Sent: Tuesday, September 22, 2020, 11:58 AM
To: FreeRadius users mailing list
Subject: Re: IP allocation from Pool

hi

Just to clear my requirement:

I have two users - A & B. I want to provide A user with one IP range from radius DHCP and B from another IP range.

Kabin

________________________________
From: kabin mool
Sent: Monday, September 21, 2020 9:08 PM
To: FreeRadius users mailing list <[hidden email]>
Subject: IP allocation from Pool

hi,

With the help of below documentation, I am able to allocated the static IP to user from my MySQL DB but is it possible to allocated IP from pool . If yes, can you share me the step how can we manage it.

https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database
guide/dhcp for static ip allocation<https://wiki.freeradius.org/guide/dhcp-for-static-ip-allocation#let-s-start_prepare-mysql-database>
Before You Start. This example assumes that the network adapter where is connected freeradius have the following settings: auto eth1 iface eth1 inet static address 192.168.10.1 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255
wiki.freeradius.org
Thanks,
Kabin
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

Alan DeKok-2
On Sep 26, 2020, at 10:39 AM, kabin mool <[hidden email]> wrote:
> Can you help me on below requirement, how to manage in freeradius?

  Do you have a *specific* question?

  The file mods-available/dhcp_sqlippool explains how IP pools are managed in SQL, for DHCP.

  The file mods-available/sqlippool explains how IP pools are managed in SQL, for RADIUS.

  If you grab the latest code from GitHub, there's even some scripts to help you create / manage IPs in SQL:

scripts/sql/align_sql_pools.pl
scripts/sql/generate_pool_addresses.pl
scripts/sql/rlm_sqlippool_tool

  The tools are just Perl scripts.  The comments at the top explain how to use them.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

kabin mool
Hi,

I went through the document mods-available/dhcp_sqlippool and mods-available/sqlippool , do I need to enable both the files or what are necessary steps , can you please help me on this?

Do I need to do something on mods-enabled/dhcp files?

Kabin

________________________________
From: Freeradius-Users <freeradius-users-bounces+kabin_mool=[hidden email]> on behalf of Alan DeKok <[hidden email]>
Sent: Saturday, September 26, 2020 8:36 PM
To: FreeRadius users mailing list <[hidden email]>
Subject: Re: IP allocation from Pool

On Sep 26, 2020, at 10:39 AM, kabin mool <[hidden email]> wrote:
> Can you help me on below requirement, how to manage in freeradius?

  Do you have a *specific* question?

  The file mods-available/dhcp_sqlippool explains how IP pools are managed in SQL, for DHCP.

  The file mods-available/sqlippool explains how IP pools are managed in SQL, for RADIUS.

  If you grab the latest code from GitHub, there's even some scripts to help you create / manage IPs in SQL:

scripts/sql/align_sql_pools.pl
scripts/sql/generate_pool_addresses.pl
scripts/sql/rlm_sqlippool_tool

  The tools are just Perl scripts.  The comments at the top explain how to use them.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

Alan DeKok-2
On Oct 8, 2020, at 1:09 PM, kabin mool <[hidden email]> wrote:
>
> I went through the document mods-available/dhcp_sqlippool and mods-available/sqlippool , do I need to enable both the files

  It depends what you want to do.  The comments in those files should make it *very* clear when / why they're being used.

> or what are necessary steps , can you please help me on this?

  Read the docs and follow them?

  We're not going to cut & paste the docs into a message on the mailing list.  There's no point.

> Do I need to do something on mods-enabled/dhcp files?

  Maybe.  Are you using DHCP?  You should know that.  And if you know if you're using DHCP, you have the answer to your question.

  Please ask SPECIFIC questions: http://wiki.freeradius.org/list-help

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

kabin mool
Thanks Alan with your guidance, I was able to manage this configuration as required for me.

I have two questions:

  1.  in dhcp_sqlippool
sqlippool_log_exists = "DHCP: Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"

        sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"

        sqlippool_log_clear = "DHCP: Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"

        sqlippool_log_failed = "DHCP: IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"

        sqlippool_log_nopool = "DHCP: No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
How to enable this log, cannot figure where it writes this information?
  2.  Inside virtual server, I have define this:
Post-Auth-Type REJECT {
                        attr_filter.access_reject
                        update reply {
                                User-Name := "%{User-Name}"
                                Calling-Station-Id := "%{Calling-Station-Id}"
                                Reply-Message := "PASSWORD incorrect or IPPool Full = %{Pool-Name} for %{NAS-IP-Address}"
                        }
                        sql
                        reply_log
                }
  3.
How can I show different error messages?

Thanks,
Kabin

________________________________
From: Freeradius-Users <freeradius-users-bounces+kabin_mool=[hidden email]> on behalf of Alan DeKok <[hidden email]>
Sent: Friday, October 9, 2020 12:58 AM
To: FreeRadius users mailing list <[hidden email]>
Subject: Re: IP allocation from Pool

On Oct 8, 2020, at 1:09 PM, kabin mool <[hidden email]> wrote:
>
> I went through the document mods-available/dhcp_sqlippool and mods-available/sqlippool , do I need to enable both the files

  It depends what you want to do.  The comments in those files should make it *very* clear when / why they're being used.

> or what are necessary steps , can you please help me on this?

  Read the docs and follow them?

  We're not going to cut & paste the docs into a message on the mailing list.  There's no point.

> Do I need to do something on mods-enabled/dhcp files?

  Maybe.  Are you using DHCP?  You should know that.  And if you know if you're using DHCP, you have the answer to your question.

  Please ask SPECIFIC questions: http://wiki.freeradius.org/list-help

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: IP allocation from Pool

Alan DeKok-2
On Oct 15, 2020, at 10:56 PM, kabin mool <[hidden email]> wrote:
>
> Thanks Alan with your guidance, I was able to manage this configuration as required for me.

  Good to hear.

> I have two questions:
>
>  1.  in dhcp_sqlippool
> sqlippool_log_exists = "DHCP: Existing IP: %{reply:Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
>
>        sqlippool_log_success = "DHCP: Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
>
>        sqlippool_log_clear = "DHCP: Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
>
>        sqlippool_log_failed = "DHCP: IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
>
>        sqlippool_log_nopool = "DHCP: No Pool-Name defined (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
> How to enable this log, cannot figure where it writes this information?

  You should be able to just list "sql" in the "Post-auth" section.

>  2.  Inside virtual server, I have define this:
> Post-Auth-Type REJECT {
>                        attr_filter.access_reject
>                        update reply {
>                                User-Name := "%{User-Name}"
>                                Calling-Station-Id := "%{Calling-Station-Id}"
>                                Reply-Message := "PASSWORD incorrect or IPPool Full = %{Pool-Name} for %{NAS-IP-Address}"
>                        }
>                        sql
>                        reply_log
>                }
>  3.
> How can I show different error messages?

   That's too vague for me to answer.  What error messages do you want?

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html