DHCP and 2 subnets

Chris Arnold carnold at electrichendrix.com
Thu Apr 10 17:36:34 UTC 2008


>Simplest is probably using classes, there's a section in "man 
>dhcpd.conf" about classes and subclasses that gives an example of 
>assigning devices to classes based on MAC address. All you need to do 
>is "allow" a class in one subnet, and "deny" it in the other - then 
>list all the members of that class. You don't need to list all 
>clients, only the ones to be in the 'non default' subnet.

>But really, using classes you can do it based on anything you can 
>write a match expression for.

Ok, so here is my dhcp.conf file. Is it in the correct syntax:
option domain-name "domain here";
option domain-name-servers 192.168.123.x;
option ntp-servers 192.168.123.x;
ddns-update-style none;
default-lease-time 14400;
max-lease-time 172800;
class "123 DHCP Clients" {
         match pick-first-value (option dhcp-client-identifier, hardware);
       }

       subclass "123 DHCP Clients" 1:8:0:2b:4c:39:ad;
       subclass "123 DHCP Clients" 1:8:0:2b:a9:cc:e3;
       subclass "123 DHCP Clients" 1:0:0:c4:aa:29:44;

       subnet 192.168.123.x netmask 255.255.255.0 {
         pool {
           allow members of "123 DHCP Clients";
           range 192.168.123.x 192.168.123.x;
         }
       }

A couple of things i don't understand is what is the match pick-first-value (option dhcp-client-identifier, hardware);
If i want to match MAC's, do i need this?
Do i need to do this for both subnets? If it already gives out on 192.168.124 network, why would i have to include that network in this file?


More information about the dhcp-users mailing list