sending options from wrong subnet in shared-network

Sten Carlsen stenc at
Thu Dec 5 15:09:23 UTC 2013

Just for the record:

ALL host statements are outside ANY subnet declaration? If they are not,
inheritance will come from that subnet as well, overriding the options
in the subnet where the address eventually comes from.

On classes:

I have a setup with two subnets and 2 different gateways in on of the
subnets and none in the other.
Unknown hosts get an address in the subnet without gateway.
# class definitions
class "gateway-1" {
         match hardware;

class "gateway-2" {
         match hardware;

# Subnet Declarations
shared-network hjemme{
    subnet netmask{
        option domain-name        "";
        option domain-name-servers;
        option subnet-mask;
        option ntp-servers;
            option routers  ;
            allow members of "gateway-1";
            option routers  ;
            allow members of "gateway-2";
    subnet  netmask{
        max-lease-time 300;
        default-lease-time 150;
            allow unknown-clients;
            deny members of "gateway-1";
            deny members of "gateway-2";

subclass "gateway-1" 1:00:04:20:17:fd:6d;        # host Sq-rcvr
subclass "gateway-2" 1:00:04:20:1b:d1:1c {always-broadcast
on;ddns-hostname ds-209;}        # host ds-209
subclass "gateway-1" 1:00:04:20:28:ee:44;        # host Sq-rdo

I keep all subclass definitions in an included file for ease of use. The
1: in front of the MAC indicates ethernet.

Since it looks like you have the MAC-address for all of your hosts, this
might be a way to do it.

On 05/12/13 15.39, Brian J. Murrell wrote:
> On Thu, 2013-12-05 at 15:18 +0100, Sten Carlsen wrote: 
>> Suggestions:
>> I see nothing in the host declaration that tells it which subnet to get
>> the IP from?
> Only the second subnet is available for dynamic address assignment.  The
> first subnet has no "range" statement in it, so it's only available for
> fixed address assignment.
> But my point wasn't that the address was coming from the wrong subnet
> but that the address is coming from the right subnet but the _options_
> are coming from the wrong subnet.
>> allow / deny may be your friend.
> Indeed.  But I have not found anything I could reasonably match one set
> of hosts on vs. the other.  Ideally I would like to match on say, "mgmt"
> being in host declation's name (but it's position can be variable) but I
> don't think there is any reasonable way of doing that.  I can't use mac
> address/vendor to match since both the fixed-address and dynamic host
> mac addresses are from the same vendor.  I'd even settle for being able
> to class hosts based on whether they have fixed addresses assigned or
> not but I have not found a match for that either.
>> I would likely use class/subclass here with suitable allow/deny.
> Indeed, but what to class/subclass on?
> Cheers,
> b.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at

Best regards

Sten Carlsen

No improvements come from shouting:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dhcp-users mailing list