-
-
Notifications
You must be signed in to change notification settings - Fork 317
/
Copy pathdhcp1.mcl
31 lines (25 loc) · 804 Bytes
/
dhcp1.mcl
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
#$iface = "lo" # replace with your desired interface like eth0
$iface = "enp0s31f6"
net $iface {
state => "up",
addrs => ["192.168.42.1/24",],
}
dhcp:server ":67" {
interface => $iface, # required for now
leasetime => "60s", # increase this for normal production
dns => ["8.8.8.8", "1.1.1.1",], # pick your own better ones!
routers => ["192.168.42.1",],
Depend => Net[$iface], # TODO: add autoedges
}
dhcp:range "192.168.42.0/24" {
skip => ["192.168.42.1/24",], # skip this host
}
dhcp:host "hostname1" {
mac => "00:11:22:33:44:55", # replace with your own!
ip => "192.168.42.101/24", # cidr notation is required
}
dhcp:host "hostname2" {
mac => "ba:98:76:54:32:11", # replace with your own!
ip => "192.168.42.102/24",
nbp => "tftp://192.168.42.1/pxelinux.0", # for bios clients
}