# IPv6 address valid lifetime
#  (at the end the address is no longer usable by the client)
#  (set to 30 days, the usual IPv6 default)
default-lease-time 2592000;

# IPv6 address preferred lifetime
#  (at the end the address is deprecated, i.e., the client should use
#   other addresses for new connections)
#  (set to 7 days, the	usual IPv6 default)
preferred-lifetime 604800;

# T1, the delay before Renew
#  (default is 1/2 preferred lifetime)
#  (set to 1 hour)
option dhcp-renewal-time 3600;

# T2, the delay before Rebind (if Renews failed)
#  (default is 3/4 preferred lifetime)
#  (set to 2 hours)
option dhcp-rebinding-time 7200;

# Enable RFC 5007 support (same than for DHCPv4)
allow leasequery;

# Global definitions for name server address(es) and domain search list
option dhcp6.name-servers 2001:0908:0706::1;
option dhcp6.domain-search "intranet.mydomain.tld";

# Set preference to 255 (maximum) in order to avoid waiting for
# additional servers when there is only one
option dhcp6.preference 255;

# Server side command to enable rapid-commit (2 packet exchange)
##option dhcp6.rapid-commit;

# The delay before information-request refresh
#  (minimum is 10 minutes, maximum one day, default is to not refresh)
#  (set to 6 hours)
option dhcp6.info-refresh-time 21600;

option ntp-servers ntp1.ptb.de;
option lpr-servers druckknecht1.intranet.mydomain.tld;
option netbios-name-servers samba.intranet.mydomain.tld;
option domain-name "intranet.mydomain.tld";

include "/etc/named.d/dhcp_dyn_dns.key";

ddns-domainname "ipv6.intranet.mydomain.tld";
ddns-update-style interim;
ignore client-updates;
ddns-updates on;
ddns-rev-domainname "ip6.arpa.";

#this subnet is served by us
authoritative;

subnet6 2001:0908:0706::/48 {

	# Debugging aids, can be removed
	log(debug,concat("Client duid: ",binary-to-ascii(16,8,":",option dhcp6.client-id)));
      log(debug,concat("option fqdn.hostname: ", option fqdn.hostname));
       	log(debug,concat("option fqdn.fqdn: ", option fqdn.fqdn));

	zone mydomain.tld. 
	{ 
		primary localhost; 
		key DHCP_UPDATER; 
	}
	zone 6.0.7.0.8.0.9.0.1.0.0.2.ip6.arpa. 
	{ 
		primary localhost; 
		key DHCP_UPDATER; 
	}

	# Range for clients
	range6 2001:0908:0706:FFFF::/64;
	
	host other-pc { 
		host-identifier option dhcp6.client-id 00:01:00:01:25:89:AA:2F:00:1F:DD:A0:9C:1A;	
		fixed-address6 2001:0908:0706::c0a8:10c;
	}
  	host some-pc {
		host-identifier option dhcp6.client-id 00:01:00:01:0F:3A:AA:28:9D:88:72:4F:EE:A0;;
    		fixed-address6 2001:0908:0706::c0a8:111;
  	}
} 
