dhcpd.conf:
log-facility local7;
option domain-name-servers 1.1.1.1;
subnet 10.1.1.0 netmask 255.0.0.0 {
range 10.1.6.0 10.1.10.255;
interface igb0;
option routers 10.1.1.1;
default-lease-time 1800;
max-lease-time 1800;
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
set ClientMac = binary-to-ascii(16, 8, ":", substring
(hardware, 1, 6));
set SwitchMac = "";
set SwitchPort ="";
if exists agent.circuit-id
{
set SwitchMac = binary-to-ascii(16, 8, ":",
suffix(option agent.remote-id, 6));
set SwitchPort = binary-to-ascii(10, 8, ":",
suffix(option agent.circuit-id, 1));
}
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "commit",
ClientIP, ClientMac, SwitchMac, SwitchPort);
}
on expiry {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "expiry",
ClientIP);
}
on release {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "release",
ClientIP);
}
}
subnet 100.1.1.0 netmask 255.255.248.0 {
range 100.1.4.0 100.1.7.255;
interface vlan201;
option routers 100.1.1.1;
default-lease-time 1800;
max-lease-time 1800;
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
set ClientMac = binary-to-ascii(16, 8, ":", substring
(hardware, 1, 6));
set SwitchMac = "";
set SwitchPort ="";
if exists agent.circuit-id
{
set SwitchMac = binary-to-ascii(16, 8, ":",
suffix(option agent.remote-id, 6));
set SwitchPort = binary-to-ascii(10, 8, ":",
suffix(option agent.circuit-id, 1));
}
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "commit",
ClientIP, ClientMac, SwitchMac, SwitchPort);
}
on expiry {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "expiry",
ClientIP);
}
on release {
set ClientIP = binary-to-ascii(10, 8, ".", leased-
address);
execute("/usr/bin/perl",
"/usr/local/nodeny/modules/dhcp/events.pl", "release",
ClientIP);
}
}
не запускается. В консоли выдается
/usr/local/etc/rc.d/isc-dhcpd: WARNING: failed to start dhcpd