Adding via logic multiple devices to a CLASS

Patrick Trapp ptrapp at nex-tech.com
Sun Jul 2 23:04:14 UTC 2017


Sorry, I have not been following this closely and may not be understanding your requirements. I had a problem in my dhcp.conf where I needed to isolate specific MAC addresses and did so with host entries.

To make them more manageable, I am using an include file consisting of only related host entries, as in all devices of type X are in the same include file. When I need to add a new one, I can copy one of the existing entries, very important for those folks that assist me irregularly that don't know why or how it works. I name the device to facilitate finding it later (they are end-user devices associated with customer accounts and occasionally need to be removed or rarely modified) and use grep on all files in the parent directory to find them.

If this is sounding remotely pertinent, I would be happy to share specifics when I return to my office tomorrow.

Patrick

On Jul 2, 2017, at 4:13 PM, Tom Priore <tom.priore at gmail.com<mailto:tom.priore at gmail.com>> wrote:

Thanks for the help. I have no way of controlling or predicting the vendor identifiers.  Anything from that agent.id<http://agent.id> will end up in the same range.

On Jun 28, 2017 4:49 AM, "Simon Hobson" <dhcp1 at thehobsons.co.uk<mailto:dhcp1 at thehobsons.co.uk>> wrote:
Tom Priore <tom.priore at gmail.com<mailto:tom.priore at gmail.com>> wrote:

> 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?

I suspect that subclasses are what you are after. Not sure from looking at the examples in the man page how it would work with two match clauses (ie substring(option vendor-class-identifier,0,6) != "docsis" and a MAC address) as the examples only show a single match on MAC address. I suspect you might end up with something like :

class "MODEMCLIENT" {
  match concat ( substring(option vendor-class-identifier,0,6), suffix( option agent.remote-id, 6) )
  ...
}

subclass "MODEMCLIENT" concat("??????", 1:7c:b2:1b:9d:7e:fc) ;

Do you know what the vendor class identifiers are for the devices you are trying to serve (ie the ?????? above) ? I take it you can't just use the agent.remote-id on it's own ?

_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170702/0a1eb211/attachment.html>


More information about the dhcp-users mailing list