# Sample DHCPD configuration file for Grecs testsuite.

authoritative;
pid-file-name "/var/run/dhcpd.pid";
log-facility daemon;

default-lease-time 28800;
max-lease-time 86400;

ddns-update-style none;
get-lease-hostnames yes;
ddns-update-style interim;
ignore client-updates;      # Overwrite client configured FQHNs
ddns-rev-domainname "in-addr.arpa.";
use-host-decl-names on;

include "bind.keys";
    
zone lan.example.com. {
	primary 127.0.0.1;
	key "foo";
}

option domain-search "example.com", "example.org", "example.net";

if option dhcp-user-class = "accounting" {
	max-lease-time 17600;
        option domain-name "accounting.example.org";
        option domain-name-servers ns1.accounting.example.org,
                           ns2.accounting.example.org;
} elsif option dhcp-user-class = "sales" {
        max-lease-time 17600;
        option domain-name "sales.example.org";
        option domain-name-servers ns1.sales.example.org,
                           ns2.sales.example.org;
} elsif option dhcp-user-class = "engineering" {
        max-lease-time 17600;
        option domain-name "engineering.example.org";
        option domain-name-servers ns1.engineering.example.org,
                           ns2.engineering.example.org;
} else {
        max-lease-time 600;
        option domain-name "misc.example.org";
        option domain-name-servers ns1.misc.example.org,
                          ns2.misc.example.org;
}

shared-network "LAN" { 
	subnet 192.168.0.0 netmask 255.255.255.0 {
  		option routers 192.168.0.1;
		option domain-name-servers 192.168.0.1;
  		update-static-leases on;

		pool {
			range 192.168.0.1 192.168.0.254;
			deny known-clients;
			ddns-hostname = binary-to-ascii(10, 8, "-", leased-address);
		}
	}
}

