Score:0

ddns update multiple zones in a single lan from dhcp server

us flag

I am trying to make the following setup to work but i'm failing :

A isc-dhcp server (debian) to update a bind9 server (debian).

The bind server has 2 zones: dev.toto and prod.toto, all servers (whatever their domains are, are in the same lan 10.5.0.0/16).

What I'm failing to achieve is to have the the dhcp server to add the correct entry to the correct zone.

Examples :

client1.dev.toto ask for a lease, the dhcp serves an ip and add an entry to the dev.toto zone file.

client1.prod.toto ask for a lease, the dhcp serves an ip and add an entry to the prod.toto zone file.

I tried to use :

option server.ddns-hostname = option fqdn.hostname;
option server.ddns-domainname = option fqdn.domainname;

To try and get / define the zone file automatically but it does not work as I expect, there is no more zone update.

/etc/dhcp/dhcpd.conf :

########### DNS UPDATE CONFIG
ddns-update-style standard;
allow client-updates;
update-conflict-detection false;
include "/root/dns.key";

option domain-name-servers 192.168.12.242;
option routers 10.5.255.241;

default-lease-time 1800;
max-lease-time 7200;

authoritative;

zone dev.toto. {
   primary 10.5.0.250;
   key rndc-key;
 }

zone prod.toto. {
   primary 10.5.0.250;
   key rndc-key;
 }

########### SUBNET DECLARATION
subnet 10.5.0.0 netmask 255.255.0.0 {
  range 10.5.1.1 10.5.1.254;
  option server.ddns-hostname = option fqdn.hostname;
  option server.ddns-domainname = option fqdn.domainname;
}

I can provide the named.conf.local if needed given that before trying to get this config working I did get the ddns update working so I guess there is nothing wrong with the bind9 side of the setup.

[EDIT 1]

I have the feeling that option 81 is what could fix my problem, or using some CLASS/SUBCLASS but: I cannot understand how to set up option 81, if anyone has an example I'd love that...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.