# dhcp.conf fait à la main... hum !?
# Des problèmes peuvent apparaitre. (s?rement !)
# Mais apr?s de multiples efforts cela fonctionne !
#
# Actif
# Les hôtes avec adresses IP dynamiques (hors PXE), ont un nom d'hôte
# fournis par le DHCP form?es par Adresse-IP et adresse MAC
# (ex : dhcp-hosts-SLN-192-168-1-251-0-14-2a-3e-ee-cb.system-linux.net)
# Voir la ligne 92 :
# ddns-hostname = binary-to-ascii (16,8, "-", substring (hardware, 1, 6));

# Clef secret de dialogue entre dhcpd et named
key "rndc-key" {
		algorithm hmac-md5;
		secret "****";
	};

server-identifier helios.system-linux.net;
ddns-update-style ad-hoc;
#ddns-update-style interim;
default-lease-time 360;
max-lease-time 360;
option domain-name		"system-linux.net";
option domain-name-servers	192.168.1.1;
option routers			192.168.1.1;
option netbios-dd-server 192.168.1.1;
option netbios-node-type 1;
DHCPD_INTERFACE = "eth0";
allow booting;
allow bootp;
authoritative;

option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;


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;
site-option-space "pxelinux";
option pxelinux.magic f1:00:74:7e;
option pxelinux.reboottime 30;
if exists dhcp-parameter-request-list {
	append dhcp-parameter-request-list 208, 209, 210, 211;
	append dhcp-parameter-request-list 208,211;
					}


class "Etherboot" {
match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
filename "/grubNBI/via_rhine/nbgrub";
#filename "/X86PC/linux/linux.0";
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
option vendor-class-identifier "Etherboot";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
next-server 192.168.1.1;
}



class "PXE" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
filename "/X86PC/linux/linux.0";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
next-server 192.168.1.1;
}

# Univers de SLN
subnet 192.168.1.0 netmask 255.255.255.0 {
	DHCPD_INTERFACE = "eth0";
	authoritative;
	allow client-updates;
#	ddns-hostname = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
#	send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
	option domain-name "system-linux.net";
	option domain-name-servers 192.168.1.1;
	option routers 192.168.1.1;
	option netbios-dd-server 192.168.1.1;
	option netbios-node-type 1;
	next-server 192.168.1.1;
	range 192.168.1.101 192.168.1.254;
	pool {
		range dynamic-bootp 192.168.1.71 192.168.1.100;
		allow members of "PXE";
		allow members of "Etherboot";
		}
}

zone system-linux.net. {
	primary system-linux.net;
	key rndc-key;
	}
# zone a mettre a jours
zone 1.168.192.in-addr.arpa. {
	primary 192.168.1.1;
	key rndc-key;
	}

#include "/etc/dhcpd.conf.terminal-server";