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. include in pool (BASSAGET C?dric)


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

Message: 1
Date: Tue, 9 Nov 2021 09:21:21 +0100
From: BASSAGET C?dric <cedric.bassaget...@gmail.com>
To: dhcp-users@lists.isc.org
Subject: include in pool
Message-ID:
        <can+ozjsm9xp_7rgjdhycu1qibkpr9d1b+3p2dkkvhxrsmhy...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20211109/19b0f6af/attachment-0001.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 1
******************************************

Reply via email to