-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdhcp.conf
34 lines (29 loc) · 1.22 KB
/
dhcp.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
subnet 192.168.1.0 netmask 255.255.255.0 {
on commit {
set clip = binary-to-ascii(10, 8, ".", leased-address);
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
execute("/usr/local/bin/dhcpd-event", "--command", "commit", "--address", clip, "--mac", clhw, "--hostname", host-decl-name);
}
on release {
set clip = binary-to-ascii(10, 8, ".", leased-address);
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
execute("/usr/local/bin/dhcpd-event", "--command", "release", "--address", clip, "--mac", clhw, "--hostname", host-decl-name);
}
on expiry {
set clip = binary-to-ascii(10, 8, ".", leased-address);
set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
execute("/usr/local/bin/dhcpd-event", "--command", "expiry", "--address", clip, "--mac", clhw, "--hostname", host-decl-name);
}
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option domain-name "local";
ddns-domainname = "local";
pool {
range 192.168.1.180 192.168.1.200;
allow unknown clients;
filename "pxelinux.0";
next-server 192.168.1.1;
}
}