Adding via logic multiple devices to a CLASS

Tom Priore tom.priore at gmail.com
Tue Jun 27 20:28:03 UTC 2017


I have a dhcpd.conf file thats getting very hard to manage.  Part of the
problem is I'm building alot of classes base on matching MAC address of
remote agent IDs.  Is there a way to make a single class that will multiple
mac matches?

Here is what I have for example:

class "WAP-CM-13104A" {
  match if ((substring(option vendor-class-identifier,0,6) != "docsis") and
(binary-to-ascii(16, 8, ":", suffix( option agent.remote-id, 6)) =
"78:71:9c:f5:ea:db"));
  spawn with hardware;
}

class "WAP-CM-512A" {
  match if ((substring(option vendor-class-identifier,0,6) != "docsis") and
(binary-to-ascii(16, 8, ":", suffix( option agent.remote-id, 6)) =
"7c:b2:1b:9e:3:26"));
  spawn with hardware;
}

class "WAP-CM-514A" {
  match if ((substring(option vendor-class-identifier,0,6) != "docsis") and
(binary-to-ascii(16, 8, ":", suffix( option agent.remote-id, 6)) =
"7c:b2:1b:9d:7e:fc"));
  spawn with hardware;
}

I would like to have a single class with all 3 macs in it.

Is that possible? Does anyone know the syntax?  Would something like this
work?  Is there a less clunky way?  Note, I still need multiple classes. I
cant dump all the docis devices into on class.


class "MODEMCLIENT" {
   match if ((substring(option vendor-class-identifier,0,6) != "docsis")
and ((binary-to-ascii(16, 8, ":", suffix( option agent.remote-id, 6)) =
"7c:b2:1b:9d:7e:fc") or (binary-to-ascii(16, 8, ":", suffix( option
agent.remote-id, 6)) = "7c:b2:1b:9e:3:26") or (binary-to-ascii(16, 8, ":",
suffix( option agent.remote-id, 6)) = "78:71:9c:f5:ea:db"));
  spawn with hardware;
}

Thanks
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170627/882bbae7/attachment.html>


More information about the dhcp-users mailing list