Troubleshooting: no free leases
timeless
timeless at gmail.com
Fri Jul 21 17:48:07 UTC 2017
Bill Shirley wrote:
Also, I don't think your "nes" class will ever match. You're comparing the
hardware
address to a string. Here's a snippet that might be useful:
# ------------------------------------------------------------
------------------
class "Apple_PC" {
match if (
substring(hardware, 1,3) = 38:c9:86
or substring(hardware, 1,3) = 00:26:08
);
}
# ------------------------------------------------------------
------------------
# ------------------------------------------------------------
------------------
class "mobile_device" {
match if (
option host-name ~~ "dhcpcd"
or option host-name ~~ "android"
or option host-name ~~ "iphone"
or option host-name ~~ "iphone-2"
or option host-name ~~ "ipod"
or option host-name ~~ "ipad"
);
# for those devices using the default name:
if (lcase(option host-name) = "iphone") { ddns-hostname =
concat("iPhone-", binary-to-ascii(16, 8, "", substring(hardware, 4, 3)));
}
if (lcase(option host-name) = "iphone-2") { ddns-hostname =
concat("iPhone2-", binary-to-ascii(16, 8, "", substring(hardware, 4, 3))); }
if (lcase(option host-name) = "ipod") { ddns-hostname =
concat("iPod-", binary-to-ascii(16, 8, "", substring(hardware, 4, 3))); }
if (lcase(option host-name) = "ipad") { ddns-hostname =
concat("iPad-", binary-to-ascii(16, 8, "", substring(hardware, 4, 3))); }
}
# ------------------------------------------------------------
------------------
Yeah, the NES thing was a poor and untested attempt. Thanks, I've adapted
both of your suggestions here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20170721/9630c3b7/attachment.html>
More information about the dhcp-users
mailing list