File: dhcp0.mcl

package info (click to toggle)
mgmt 0.0.26.git.2024.10.25.85e1d6c0e8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,364 kB
  • sloc: sh: 2,471; yacc: 1,285; makefile: 543; python: 196; lisp: 77
file content (26 lines) | stat: -rw-r--r-- 700 bytes parent folder | download
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
$iface = "lo"	# replace with your desired interface like eth0

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: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
}