# This config is put together with valuable inspiration from the following sources:
#   http://cd-linux.org/nfs-howto.htm
#   http://www.netbsd.org/Documentation/network/netboot/intro.i386.html
#   http://www.pcxperience.org/thinclient/documentation/thinclientdesign.html
#   http://www.nominum.com/resources/faqs/dhcp-faq.html

authoritative;
#deny-unknown-clients;
ddns-update-style		none;
use-host-decl-names		on; # This avoids setting "option host-name" for each host
#always-reply-rfc1048		on;

default-lease-time		21600;
max-lease-time			21600;

option subnet-mask		255.255.255.0;
option broadcast-address	192.168.102.255;
option routers			192.168.102.1;
option domain-name-servers	192.168.102.75;
option domain-name		"107b.dk";
option time-servers		ntp;
option ntp-servers		ntp;
option log-servers		log;

# FAI (Fully Automated Install) options
option fai-location		code 170 = text;
option fai-action		code 171 = text;
option fai-flags		code 172 = text;

# Etherboot options
option eb-magic			code 128 = string;	# Magic string for reading more options
option eb-bootopts		code 129 = text;	# Boot options passed on to the kernel
option eb-menuopts		code 160 = text;	# EtherBoot menu options
option eb-motd1			code 184 = text;	# MOTD
option eb-motd2			code 185 = text;
option eb-motd3			code 186 = text;
option eb-motd4			code 187 = text;
option eb-motd5			code 188 = text;
option eb-motd6			code 189 = text;
option eb-motd7			code 190 = text;
option eb-motd8			code 191 = text;
option eb-menuitem1		code 192 = text;	# Menu items: "label:server:gateway:filename:passwd:flags:cmdline"
option eb-menuitem2		code 193 = text;
option eb-menuitem3		code 194 = text;
option eb-menuitem4		code 195 = text;
option eb-menuitem5		code 196 = text;
option eb-menuitem6		code 197 = text;
option eb-menuitem7		code 198 = text;
option eb-menuitem8		code 199 = text;
option eb-menuitem9		code 200 = text;
option eb-menuitem10		code 201 = text;
option eb-menuitem11		code 202 = text;
option eb-menuitem12		code 203 = text;
option eb-menuitem13		code 204 = text;
option eb-menuitem14		code 205 = text;
option eb-menuitem15		code 206 = text;
option eb-menuitem16		code 207 = text;
option space pxelinux;
option pxelinux.magic		code 208 = string;
option pxelinux.configfile	code 209 = text;
option pxelinux.pathprefix	code 210 = text;
option pxelinux.reboottime	code 211 = unsigned integer 32;

# Web Proxy Auto-Discovery Protocol (described in RFC 3040, used in MS IE 5.0 and later and maybe Mozilla)
option wpad-url			code 252 = text;

# GRUB (GRand Unified Boot-loader) options
option grub-configfile	code 150 = text;

class "PXE" {
	match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

	# Always include the following lines for all PXELINUX clients
	site-option-space		"pxelinux"; # Works with isc-dhcpd-V3.0.1rc9 but not isc-dhcpd-V3.0.1rc10 for some reason
	option pxelinux.magic		f1:00:74:7e;
	if exists dhcp-parameter-request-list {
		# Always send the PXELINUX options
		append dhcp-parameter-request-list 208, 209, 210, 211;
	}
#	option pxelinux.configfile = concat("pxelinux.cfg/", binary-to-ascii(16, 8, ":", hardware));
#	option pxelinux.reboottime	30;
	filename			"pxelinux.0";
}

class "Etherboot" {
	match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
}

# Open Transport 2.5.1 and 2.5.2 fails with lease times larger than 1 hour
class "Macintosh_a" {
	match if substring (hardware, 0, 3) = 00:05:02;

	default-lease-time	3599;
	max-lease-time		3599;
	min-lease-time		3599;
}
class "Macintosh_b" {
	match if substring (hardware, 0, 3) = 00:61:61;

	default-lease-time	3599;
	max-lease-time		3599;
	min-lease-time		3599;
}

subnet 192.168.102.0 netmask 255.255.255.0 {
	range 192.168.102.100 192.168.102.200;
}

include "/etc/dhcp3/dhcpd.hosts.fai";
include "/etc/dhcp3/dhcpd.hosts.ltsp";
include "/etc/dhcp3/dhcpd.hosts.grub";
include "/etc/dhcp3/dhcpd.hosts.plain";