4

I have two servers running BIND, the first is setup as the master of two zones and the second as a slave for those zones. The zones are example.com and ddns.example.com. I have DDNS running and thousands of device entries are dynamically created in ddns.example.com. I wanted to keep DDNS separate from the main example.com, so I created a separate zone that the DHCP servers update.

Considering these zones are hosted on the same server, is it possible to have delegation working from example.com to ddns.example.com? For example if my workstation's search domain is example.com and pointed towards 10.1.10.1 for its DNS provider, I would like to be able to resolve hostname.ddns. As it is, I can resolve hostname.ddns.example.com, but would like to be able to resolve just hostname.ddns.

Alternatively, if the workstation's search domain is ddns.example.com, what settings do I need to be able to change to be able to resolve web, ftp, etc, which are all hosts in the parent, example.com zone? Does the ddns.example.com zone need to forward to the example.com zone? Again, all the zones are setup on the same server with a second server setup as a slave.

named.conf:

zone "example.com" IN {
    type master;
    file "example.com";
    allow-update { none; };
}

zone "ddns.example.com" IN {
    type master;
    file "ddns.example.com";
    allow-update { key dhcp-update; };
}

example.com zone file:

$ORIGIN .
$TTL 86400
example.com    IN    SOA    ns1.example.com. hostmaster.example.com. (
                                serial, refresh, retry, etc.
                            )
                            NS    ns1.example.com.
                            NS    ns2.example.com.
$ORIGIN example.com.
ns1                         A     10.1.10.1
ns2                         A     10.1.10.2
web                         A     10.1.15.30
ftp                         A     10.1.15.31
host3                       A     10.1.15.32
$ORIGIN ddns.example.com
                            NS    ns1
                            NS    ns2
ns1                         A     10.1.10.1
ns2                         A     10.1.10.2
Austin
  • 41
  • 1

2 Answers2

0

It seems that your question have nothing to do with bind itself or DNS servers at all. There's no such thing as "delegation" or "forwarding" from child zone to parent. You can of course add CNAME for ftp and www to the ddns.example.com zone that will point to ftp.example.com and www.example.com respectively, I'm not sure if that is what you asking for.

All you actually need to do is correctly configure domain suffix search list on client computers. If it's windows, you list example.com AND ddns.example.com somewhere in TCP/IP properties.

Sandman4
  • 4,045
  • 2
  • 20
  • 27
0

From the description of your question, I see two possible solutions:

  1. Simply list both domains in the search list. However, this would mean that "hostname.ddns.example.com" would resolve from simply "hostname", although, obviously, "hostname.example.com" could take precedence, depending on the order of domains within your search list.

  2. Configure your nameservers to serve the ddns zone as if it was an TLD, in addition to being served as part of example.com. It's pretty straightforward to use the same zone file to actually serve more than one zone — simply make sure to only use relative names within the file itself (might be problematic if you have it autogenerated with not much control of what goes in or not).

cnst
  • 12,948
  • 7
  • 51
  • 75