Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: include in pool (BASSAGET C?dric)
   2. Re: include in pool (BASSAGET C?dric)


----------------------------------------------------------------------

Message: 1
Date: Wed, 10 Nov 2021 14:22:33 +0100
From: BASSAGET C?dric <cedric.bassaget...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: include in pool
Message-ID:
        <can+ozjsrfgsc067tulm+nqwau0wyjity6pttjpsetgnyy2h...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Simon,
class are already defined, can't change that. but maybe I can create a
"master" class which will group all subclasses ?

all my classes are defined like this :

class "Alcatel-SIP" {
    match if option vendor-class-identifier = "alcatel.sip.0";

    vendor-option-space ALU;
    option ALU.http-server-name = config-option VOIP.http-server-uri;
    log(concat("[", binary-to-ascii(16, 8, ":", hardware), "] ", "BOOT
Alcatel SIP"));
}
Regards
C?dric

Le mar. 9 nov. 2021 ? 19:42, Simon Hobson <si...@thehobsons.co.uk> a ?crit :

>
>
> > On 9 Nov 2021, at 08:21, BASSAGET C?dric <cedric.bassaget...@gmail.com>
> wrote:
> >
> > Hello.
> > I have to configure a dhcp server wich will act as master for dozens of
> relays.
> > My basic pool config includes a lot of "allow members of" statements,
> like this :
> >
> >
> > subnet 192.168.2.0 netmask 255.255.255.0 {
> >     option routers 192.168.2.1;
> >     #option domain-name-servers 192.168.2.1;
> >     #option bootfile-name = "snom821.htm";
> >     pool {
> >         range 192.168.2.100 192.168.2.200;
> >         ### Assign who is going to use this pool
> >         allow members of "voip-mac-address-prefix";
> >         # allow localhost for NRPE
> >         # allow members of "localhost";
> >         # Aastra
> >         allow members of "Aastra6730i";
> >         allow members of "Aastra6731i";
> >         allow members of "Aastra6739i";
> >         allow members of "Aastra6751i";
> >         allow members of "Aastra6753i";
> >         allow members of "Aastra6755i";
> >         allow members of "Aastra6757i";
> >         # Snom
> >         allow members of "Snom300";
> >         allow members of "Snom320";
> >         allow members of "Snom360";
> >         allow members of "Snom370";
> >         allow members of "Snom820";
> >        ....
> >      }
> > }
>
> Do you need to define the classes separately ? If not, then you could
> simplify things a lot :
>     pool {
>         range 192.168.2.100 192.168.2.200;
>         allow members of "Aastra";
>         allow members of "Snom";
>        ....
>      }
>
> Simon
>
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20211110/f62e0034/attachment-0001.htm>

------------------------------

Message: 2
Date: Wed, 10 Nov 2021 14:23:24 +0100
From: BASSAGET C?dric <cedric.bassaget...@gmail.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: include in pool
Message-ID:
        <CAN+OZjRgs=qoxrk5_fxmto4vfnxgf7dom-oiybxqb3j7bgx...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Peter,
the include line in your example is commented. I think you will get an
error if you un-comment it :)
Regards
C?dric

Le mar. 9 nov. 2021 ? 15:36, Peter Davies <peter.watson.dav...@outlook.com>
a ?crit :

> Hi C?dric,
>    Have you tried having each shared-network/subnet in its own include
> file.
> Then include a file with "members of" statements within that?
> ie:
> dhcpd.conf:
>          class "allocation-class-1" {
>          match pick-first-value (option dhcp-client-identifier, hardware);
>        }
>
>        class "allocation-class-2" {
>          match pick-first-value (option dhcp-client-identifier, hardware);
>        }
>
>         allow members of "allocation-class-1";
>         allow members of "allocation-class-1";
>
>        class "allocation-class-1" {
>          match pick-first-value (option dhcp-client-identifier, hardware);
>        }
>
>        class "allocation-class-2" {
>          match pick-first-value (option dhcp-client-identifier, hardware);
>        }
>        subclass "allocation-class-1" 1:8:0:2b:4c:39:ad;
>        subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3;
>        subclass "allocation-class-1" 1:0:0:c4:aa:29:44;
>
>       include "subnet-1.include";
> ...
>
> subnet-1.include:
> shared-network "SN1" {
>   subnet 10.0.0.0 netmask 255.255.255.0 {
>     option routers 10.0.0.1;
>     pool {
>            #include "access-1.include";
>            range 10.0.0.10 10.0.0.254; } }
> }
>
> access-2.include:
> allow members of "allocation-class-1";
> allow members of "allocation-class-2";
>
> This appears to work
>
> Kind Regards Peter
>
>
> ------------------------------
> *From:* dhcp-users <dhcp-users-boun...@lists.isc.org> on behalf of
> BASSAGET C?dric <cedric.bassaget...@gmail.com>
> *Sent:* 09 November 2021 09:21
> *To:* dhcp-users@lists.isc.org <dhcp-users@lists.isc.org>
> *Subject:* include in pool
>
> Hello.
> I have to configure a dhcp server wich will act as master for dozens of
> relays.
> My basic pool config includes a lot of "allow members of" statements, like
> this :
>
>
> subnet 192.168.2.0 netmask 255.255.255.0 {
>     option routers 192.168.2.1;
>     #option domain-name-servers 192.168.2.1;
>     #option bootfile-name = "snom821.htm";
>     pool {
>         range 192.168.2.100 192.168.2.200;
>         ### Assign who is going to use this pool
>         allow members of "voip-mac-address-prefix";
>         # allow localhost for NRPE
>         # allow members of "localhost";
>         # Aastra
>         allow members of "Aastra6730i";
>         allow members of "Aastra6731i";
>         allow members of "Aastra6739i";
>         allow members of "Aastra6751i";
>         allow members of "Aastra6753i";
>         allow members of "Aastra6755i";
>         allow members of "Aastra6757i";
>         # Snom
>         allow members of "Snom300";
>         allow members of "Snom320";
>         allow members of "Snom360";
>         allow members of "Snom370";
>         allow members of "Snom820";
>        ....
>      }
> }
>
> As I have to create dozens of pools, I tried to put all these "allow
> members of ..." in a file called "allowed_members.include", and replace my
> pool def by :
>
> subnet 192.168.2.0 netmask 255.255.255.0 {
>     option routers 192.168.2.1;
>     pool {
>         include "path/to/allowed_members.include";
>     }
> }
>
>
> but it does not work, it throws a config error when testing config.
>
> So my questions are :
> - is there a way to do an "include" inside a pool ?
> - is there another way to declare multiple pools for each relay ? (all
> relays will have the same config)
>
> The aim of this is to have a small and comprehensible dhcpd.conf file.
>
>
> Regards,
> C?dric
>
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20211110/d368dfdd/attachment.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 157, Issue 3
******************************************

Reply via email to