4

Is there any way to define more matches with OR?

I would like to create a class with a mac address check, like

class "fixVms" {
match if substring (hardware, 1, 4) = 00:15:5d:aa;
}

but I would like to add another macs to it, like

subclass "fixVms" 1:00:15:5d:bb:00:00;

I tried to add

match pick-first-value (option dhcp-client-identifier, hardware);

to the class body but it did not work. The 2 things separetly does work.

2

I haven't been able to test it myself, and the DHCPD.conf man page isn't that great, but you could try something like the following:

match if ( substring(hardware,1,3) = 00:01:e6 ) or
         ( substring(hardware,1,3) = 00:60:b0 ) or
         ( substring(hardware,1,3) = 00:10:83 );

This came from the following mailing list message

http://marc.info/?l=dhcp-server&m=102521117221954&w=2

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.