[DHCP] group ip ranges

Ashley M. Kirchner ashley at pcraft.com
Sat Nov 10 00:30:43 UTC 2007

Ken Appell wrote:
> I have a small network with different appliances on it that all 
> connect to the same DHCP server to get their IP addresses. In order to 
> simplify maintenance, I'd like to group the IP addresses according to 
> appliance type. I know my example below doesn't work, but is there 
> another way to do it?

    At the office, I group machines by department and give them a 
specific range.  This way when I see an IP on the network, I know what 
department it belongs to.  Here's a snippet of one such "group":

option routers    ;
option broadcast-address;
option subnet-mask;
option domain-name-servers;
deny unknown-clients;

class "digital_rats" {
  match pick-first-value (option dhcp-client-identifier, hardware);
group {
  ddns-hostname = pick (option host-name,  

  use-host-decl-names on;
  host server_1  { hardware ethernet 00:0A:95:7C:E7:34;
                   ddns-hostname server_1; }
  host server_2  { hardware ethernet 00:03:93:53:BE:58;
                   ddns-hostname server_2; }
  host server_3  { hardware ethernet 00:0D:93:4A:8A:64;
                   ddns-hostname server_3; }
  host server_4  { hardware ethernet 00:0A:95:E8:CE:4A;
                   ddns-hostname server_4; }
subclass "digital_rats" 1:00:0A:95:7C:E7:34;
subclass "digital_rats" 1:00:03:93:53:BE:58;
subclass "digital_rats" 1:00:0D:93:4A:8A:64;
subclass "digital_rats" 1:00:0A:95:E8:CE:4A;

# ... define more classes and groups here ...

subnet netmask {
  # Digital Rats
  pool {
    allow members of "digital_rats";

# ... add more pools here, each one corresponding to a class/group above ...

    As I mentioned, this allows me to designate all the machines within 
a department to have a specific range of IP.  I would suspect you could 
do the same for your setup and define your appliances in a class/group 
and then set the appropriate pools for them.

More information about the dhcp-users mailing list