Sub-pool or pool hierarchy

Sten Carlsen stenc at s-carlsen.dk
Mon Oct 14 19:25:57 UTC 2013


I still think it is completely doable. I include my own dhcpd.conf:

~~~~~~~~~~~~~~~~~~~~
# File: dhcpd.conf
# Computer: Revo.s-carlsen.dk
#
#
# Global parameters
max-lease-time 1800;
default-lease-time 1800;
# Common settings.
log-facility local0;
server-name "revo.s-carlsen.dk";
get-lease-hostnames false;

# ddns update.
ddns-update-style interim;
deny client-updates;

# class definitions
class "gateway-1" {
         match hardware;
       }


class "gateway-2" {
         match hardware;
       }


class "gateway-4" {
         match hardware;
       }



# Subnet Declarations
shared-network hjemme{
    authoritative;
    subnet 192.168.16.0 netmask 255.255.255.0{
        option lpr-servers        192.168.16.38;
        option domain-name        "s-carlsen.dk";
        option domain-name-servers    192.168.16.32;
        option subnet-mask        255.255.255.0;
        option ntp-servers        192.168.16.32;
        # B-NODE: Broadcast - no WINS
        option netbios-node-type 1;
        option smtp-server 192.168.16.32;
        pool{
            option routers            192.168.16.1;
            allow members of "gateway-1";
            range 192.168.16.50    192.168.16.127;
        }
        pool{
            option routers            192.168.16.2;
            allow members of "gateway-2";
            range 192.168.16.128   192.168.16.199;
        }
        pool{
            option routers            192.168.16.4;
            allow members of "gateway-4";
            range 192.168.16.200   192.168.16.240;
        }
    }
    subnet 192.168.61.0  netmask 255.255.255.0{
        max-lease-time 300;
        default-lease-time 150;
        pool{
            deny known-clients;
            deny members of "gateway-1";
            deny members of "gateway-2";
            deny members of "gateway-4";
            range 192.168.61.100   192.168.61.150;
        }
    }
    subnet 192.168.122.0 netmask 255.255.255.0{
    }
}

include "/etc/dhcp/subclass.conf";
~~~~~~~~~~~~~~~~~~~~

As you see I have a shared network, my unknown clients go to there and
have no router or anything.

My known clients are grouped in those 3 classes, in my case by a match
hardware but anything could be used.

In my main subnet 192.168.16.0/24 I have 3 pools each with its own
router and range.

My thinking is that if you simply use the same setup, except your class
definitions are based on the hostname, it should work the same.

This is a working setup, this mail is written from the network set up
this way.


On 14/10/13 21.08, Prunk Dump wrote:
> 2013/10/14 Doug Barton <dougb at dougbarton.us>:
>> On 10/14/2013 11:46 AM, Sten Carlsen wrote:
>>> You may want to look at the man page for dhcpd.conf, the following
>>> example is taken from that:
>>>
>>> subnet 10.0.0.0 netmask 255.255.255.0 {
>>>    option routers 10.0.0.254;
>>>
>>>   # Unknown clients get this pool.
>>>    pool {
>>>      option domain-name-servers bogus.example.com;
>>>      max-lease-time 300;
>>>      range 10.0.0.200 10.0.0.253;
>>>      allow unknown-clients;
>>>    }
>>>
>>>   # Known clients get this pool.
>>>    pool {
>>>      option domain-name-servers ns1.example.com, ns2.example.com;
>>>      max-lease-time 28800;
>>>      range 10.0.0.5 10.0.0.199;
>>>      deny unknown-clients;
>>>    }
>>> }
>>>
>>> As you see here you can put options in subnets as well as pools. The
>>> common options like router is in the subnet and the the more specific
>>> options are in the pools together with the allows and denys.
>>
>> Wouldn't that require host declarations to define the known hosts?
>>
>> Doug
>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
> My problem is that the ranges :
> -> 172.16.0.1 to 172.16.199.254     (my PEDA domain)
> -> 172.16.200.1 to 172.16.255.254  (my ORPEO domain)
> are not "subnets". So I can't regroup my classes like this.
>
> My two domains live in 172.16.0.0/16 !
>
>
> ps : Effectively, "match class hosts" are not recognized as "known hosts"
>
> Thanks for the help !
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20131014/dbedcf5d/attachment.html>


More information about the dhcp-users mailing list