Subnet assigment using subClass

Márcio Merlone marcio.merlone at a1.ind.br
Tue Nov 25 18:05:29 UTC 2014


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*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20141125/45a43d20/attachment.html>


More information about the dhcp-users mailing list