Hi there, I'm new here!

I have a situation where I need to pass different vendor options to identical pieces of hardware.

I've thought of two different ways of going about this, but I'm very green to messing about with the dhcpd.conf file and don't understand how it's parsed.

Here's an example of my original file:
Code:
option space COLOUR;
option COLOUR.address    code 1 = ip-address;
option COLOUR.port       code 2 = integer 16;

class "RedClass" { 
  match if (option vendor-class-identifier = "Rainbow1"); 
  
  vendor-option-space COLOUR; 
  option COLOUR.address 192.168.0.5; 
  option COLOUR.port 8080;
}

class "BlueClass" { 
  match if (option vendor-class-identifier = "Rainbow2"); 
  
  vendor-option-space COLOUR;
  option COLOUR.address 192.168.0.5; 
  option COLOUR.port 8090;
}

subnet 192.168.0.0 netmask 255.255.255.0 {
  option routers 192.168.0.1;
  option subnet-mask 255.255.255.0;

  pool { 
    range 192.168.0.10 192.168.0.20;

    allow members of "RedClass";
    allow members of "BlueClass";
  }
}
Rainbow1 and Rainbow2 represent two different hardware models and their communication ports are configured as 8080 and 8090 respectively.

But I have multiple Rainbow1s and multiple Rainbow2s and I want to pass them different configuration values, hopefully based on MAC-address. Here are my best guesses as to achieve this:

1:
Code:
group {
  allow members of "RedClass";

  host Rainbow1a { hardware ethernet 00:00:00:00:00:01; }
  host Rainbow1b { hardware ethernet 00:00:00:00:00:02; }
}

group {
  allow members of "BlueClass";

  host Rainbow2a { hardware ethernet 00:00:00:00:00:03; }
  host Rainbow2b { hardware ethernet 00:00:00:00:00:04; }
}
Here I'm hoping that the "allow members" syntax normally seen in a subnet/pool declaration can also be used in group. (I don't think this will work.)

2:
Code:
class "RedClass_1" { 
  match if (option dhcp-client-identifier = "custom_unit")
             and (option vendor-class-identifier = "Rainbow1"); 
  
  vendor-option-space COLOUR; 
  option COLOUR.address 192.168.0.5; 
  option COLOUR.port 8080;
}

class "RedClass_2" { 
  match if (not (option dhcp-client-identifier = "custom_unit"))
             and (option vendor-class-identifier = "Rainbow1"); 
  
  vendor-option-space COLOUR; 
  option COLOUR.address 192.168.0.5; 
  option COLOUR.port 8181;
}

group {
	option dhcp-client-identifier "custom_unit";

	host custom_001 { hardware ethernet: 00:00:00:00:00:01; }
	host custom_002 { hardware ethernet: 00:00:00:00:00:02; }
}
Here I'm hoping to alter the dhcp-client-identifier for certain MAC addresses to a value that I can test for in my classes. I don't think this will work either because a) I don't think I can modify values like this, and b) The man-page infers that even if I can change a value in one scope, it won't carry over to another.

Unfortunately because of my limited knowledge I'm afraid to jump in and start testing since I don't really know how the dhcpd.conf is parsed, and wouldn't know where to start troubleshooting. Am I barking up the wrong tree or just plain barking?

Thanks in advance for any assistance!