У меня проблемы с классами DHCP, соответствующими MAC-адресам.
У нас много машин одного типа, и я хочу, чтобы карты IPMI были в одном пуле.
Я пробовал следующее:
class "IPMI" {
match if (substring(hardware, 0, 3) = 0c:c4:7a);
}
subnet 10.0.0.0 netmask 255.255.0.0 {
option routers 10.0.0.1;
pool {
range 10.0.1.0 10.0.1.255;
allow members of "IPMI";
}
}
По какой-то причине ничего не подбирается, и машины не принимают заказы.
Oct 14 11:32:52 gotti dhcpd: DHCPDISCOVER from 0c:c4:7a:1c:d4:37 via em1: network LAN: no free leases
Есть идеи?
С dhcp-eval(5)
:
hardware
The hardware operator returns a data string whose first element is
the type of network interface indicated in packet being considered,
and whose subsequent elements are client’s link-layer address. If
there is no packet, or if the RFC2131 hlen field is invalid, then
the result is null. Hardware types include ethernet (1), token-
Скорее всего, вам нужно либо добавить тип сети к поиску:
match if (substring(hardware, 0, 3) = 01:0c:c4:7a);
, либо вслепую предположить ethernet и начать поиск не с первой позиции:
match if (substring(hardware, 1, 3) = 0c:c4:7a);
При тестировании, "тип сети" в качестве ведущего 1:
или 01:
не получилось, в то время как следующее получилось:
class "FOO" {
match if substring(hardware, 1, 3) = 08:00:27;
}
subnet 192.168.33.0 netmask 255.255.255.0 {
option routers 192.168.33.1;
pool {
range 192.168.33.110 192.168.33.120;
allow members of "FOO";
}
}