Subnet assigment using subClass

Bob Harold rharolde at umich.edu
Tue Nov 25 18:41:37 UTC 2014


Not all clients send a dhcp-client-identifier, so try also listing the
hardware address, and I think the semicolon is needed:

subclass "clsDesktop" 1:08:00:27:12:34:56;
subclass "clsDesktop" 08:00:27:12:34:56;



-- 
Bob Harold
hostmaster, UMnet, ITcom
Information and Technology Services (ITS)
rharolde at umich.edu
734-647-6524 desk

On Tue, Nov 25, 2014 at 1:05 PM, Márcio Merlone <marcio.merlone at a1.ind.br>
wrote:

>  Hi folks,
>
> I have a very basic knowledge about DHCP, so forgive this question. I need
> to assign my hosts to specific subnets without fixing their IP address and
> so I am learning about subclasses in the hope this may be my solution.
> Also, by subClassing my hosts I expect to be able to roam them to branch
> offices on different subnets without modification on their declaration or
> config (will use a replicated LDAP to hold confs).
>
> First things first I am managing to create a dhcpd.conf for the main
> office with the contents below. It has a subnet to my hosts, a guests
> subnet and a third to unknown hosts, which I believe is self-explanatory.
>
> What happens is that the clsDesktop host  08:00:27:12:34:56 ends up on the
> unknown hosts subnet instead of the 10.1.1.0/24 as desired. First
> question: is a subClassed host a "known-host" so I can, for example, deny
> it on the pool declaration? Why does the host flees the clsDesktop pool
> declaration? What am I missing?
>
> Appreciate if someone can enlighten me on the subject and how to achieve
> this goal.
>
> authoritative;
> always-broadcast    on;
>
> max-lease-time      86400; # 1 dias
> default-lease-time  7200;  # 2 horas
> min-lease-time      3600;  # 1 hora
>
> class "clsDesktop" {
>     match pick-first-value (option dhcp-client-identifier, hardware);
> }
> class "clsGuest" {
>     match pick-first-value (option dhcp-client-identifier, hardware);
> }
>
> shared-network Foo {
>     subnet 10.1.1.0 netmask 255.255.255.0 {
>         pool {
>             allow members of "clsDesktop";
>             range 10.1.1.20 10.1.1.254;
>             }
>         }
>     subnet 10.0.0.0 netmask 255.255.255.0 {
>         pool {
>             allow members of "clsGuest";
>             range 10.0.0.46 10.0.0.254;
>             }
>         }
>     subnet 172.16.0.0 netmask 255.255.255.0 {
>         pool {
>             allow unknown-clients;
>             range 172.16.0.1 172.16.0.254;
>             }
>         }
>     }
> subclass "clsDesktop" 1:08:00:27:12:34:56 { }
>
>
> Best regards.
>
> --
>  *Marcio Merlone*
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at 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/20141125/52436858/attachment-0001.html>


More information about the dhcp-users mailing list