sending options from wrong subnet in shared-network

Sten Carlsen stenc at s-carlsen.dk
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{
    authoritative;
    subnet 192.168.16.0 netmask 255.255.255.0{
        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;
        pool{
            option routers            192.168.16.1;
            allow members of "gateway-1";
            range 192.168.16.96    192.168.16.127;
        }
        pool{
            option routers            192.168.16.2;
            allow members of "gateway-2";
            range 192.168.16.128   192.168.16.169;
        }
    }
    subnet 192.168.61.0  netmask 255.255.255.0{
        max-lease-time 300;
        default-lease-time 150;
        pool{
            allow unknown-clients;
            deny members of "gateway-1";
            deny members of "gateway-2";
            range 192.168.61.100   192.168.61.150;
        }
    }
}


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 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/20131205/09b2856c/attachment-0001.html>


More information about the dhcp-users mailing list