LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ddns reverse zone updates add subdomain twice to each entry (https://www.linuxquestions.org/questions/linux-server-73/ddns-reverse-zone-updates-add-subdomain-twice-to-each-entry-867266/)

Fireforger 03-08-2011 01:13 PM

ddns reverse zone updates add subdomain twice to each entry
 
Hi everybody,

I've run into a strange issue with a DHCP/DDNS setup whereby when the DHCP server asks the DNS server to add a new host, the forward map is added correctly but the reverse map has the subdomain added twice (e.g. 192.168.25.192.168.25.250)

I'm running ISC DHCPd version 3.0.1 and BIND version 9.2.3 on SuSE 9.2 - 32bit.

Here is my dhcpd.conf file:

****

# dhcpd.conf
authoritative;
include "/etc/named.keys";
ddns-update-style interim;
ignore client-updates;
ddns-updates on;
update-static-leases on;
subnet 192.168.25.0 netmask 255.255.255.0 {
option routers 192.168.25.254;
option subnet-mask 255.255.255.0;
option domain-name "internal.dw.com";
option domain-name-servers 192.168.25.11;
option netbios-name-servers 192.168.25.11;
authoritative ;
range 192.168.25.80 192.168.25.253;
ddns-domainname "internal.dw.com";
ddns-rev-domainname "25.168.192.in-addr.arpa";
default-lease-time 86400;
allow unknown-clients;
max-lease-time 172800;
zone internal.dw.com. { primary 127.0.0.1; key DHCP_UPDATER; }
zone 25.168.192.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; }
}

*****

Here is my named.conf file:

****
# named.conf

acl clients {
127.0.0.1;
192.168.0.0/16;
10.0.0.0/8;
172.16.0.0/16;
};

options {

allow-recursion { clients; };
directory "/var/lib/named";
dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";
forwarders { 207.181.101.4; 207.181.101.5; };
forward first;

listen-on-v6 { none; };

notify no;
};

include "/etc/named.keys";

zone "." in {
type hint;
file "root.hint";
};

zone "localhost" in {
type master;
file "localhost.zone";
allow-transfer { localhost; };
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
allow-transfer { localhost; };
};

zone "internal.dw.com" in {
allow-update { key DHCP_UPDATER; 192.168.25.11; };
file "dyn/internal.dw.com";
type master;
};

zone "25.168.192.in-addr.arpa" in {
allow-update { key DHCP_UPDATER; 192.168.25.11; };
file "dyn/25.168.192.in-addr.arpa";
type master;
};


*****

Here is my forward zone file:

****

$ORIGIN .
$TTL 604800 ; 1 week
internal.dw.com IN SOA gateway.internal.dw.com. root.gateway.internal.dw.com. (
59650 ; serial
172800 ; refresh (2 days)
14400 ; retry (4 hours)
3628800 ; expire (6 weeks)
604800 ; minimum (1 week)
)
NS gateway.internal.dw.com.

******

Here is my reverse zone file:

****

$ORIGIN .
$TTL 604800 ; 1 week
25.168.192.in-addr.arpa IN SOA gateway.internal.dw.com. root.gateway.internal.dw.com. (
2011030656 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS gateway.internal.dw.com.

*****

And here is the type of log entry I'm getting when the reverse zone is being modified:

****

Mar 8 10:43:12 gateway dhcpd: DHCPDISCOVER from 00:1b:d3:e0:03:7c via eth0
Mar 8 10:43:13 gateway dhcpd: DHCPOFFER on 192.168.25.96 to 00:1b:d3:e0:03:7c (tj-cfs9) via eth0
Mar 8 10:43:13 gateway named[31001]: client 127.0.0.1#32825: updating zone 'internal.dw.com/IN': adding an RR
Mar 8 10:43:13 gateway named[31001]: client 127.0.0.1#32825: updating zone 'internal.dw.com/IN': adding an RR
Mar 8 10:43:13 gateway dhcpd: Added new forward map from tj-cfs9.internal.dw.com to 192.168.25.96
Mar 8 10:43:13 gateway named[31001]: client 127.0.0.1#32825: updating zone '25.168.192.in-addr.arpa/IN': deleting an rrset
Mar 8 10:43:13 gateway named[31001]: client 127.0.0.1#32825: updating zone '25.168.192.in-addr.arpa/IN': adding an RR
Mar 8 10:43:13 gateway dhcpd: added reverse map from 96.25.168.192.25.168.192.in-addr.arpa to tj-cfs9.internal.dw.com
Mar 8 10:43:13 gateway dhcpd: DHCPREQUEST for 192.168.25.96 (192.168.25.11) from 00:1b:d3:e0:03:7c (tj-cfs9) via eth0
Mar 8 10:43:13 gateway dhcpd: DHCPACK on 192.168.25.96 to 00:1b:d3:e0:03:7c (tj-cfs9) via eth0
Mar 8 10:43:27 gateway dhcpd: DHCPINFORM from 192.168.25.96 via eth0
Mar 8 10:43:27 gateway dhcpd: DHCPACK to 192.168.25.96


*****

Any help would be greatly appreciated.

Noway2 03-10-2011 04:29 AM

I suspect that you have two options that are performing the same task. I am not expert enough in DHCP configuration to tell you exactly which those are. However, I have posted my DHCP configuration, which correctly performs dynamic dns updates. As you can see, it is a lot smaller. I suggest paring back your configuration, trying to remove items to see if you can find the redundant one.

Code:

ddns-update-style interim;
ignore client-updates;      # Overwrite client configured FQHNs
default-lease-time 86400;
max-lease-time 604800;
authoritative;
log-facility local7;
key DHCP_UPDATER {
    algorithm HMAC-MD5.SIG-ALG.REG.INT;
    # Important: Replace this key with your generated key.
    # Also note that the key should be surrounded by quotes.
    secret "<shared-dhcp-dns-key>";
};

Then I have subnet declarations. Note, I use two DHCP servers for failover and load sharing
Code:


subnet 192.168.10.0 netmask 255.255.255.0 {
  ddns-domainname "my.lan.";
  ddns-rev-domainname "in-addr.arpa.";
  pool {
        failover peer "dhcp";
        range 192.168.10.1 192.168.10.254;
        allow unknown-clients;
  }
  option broadcast-address 192.168.10.255;
  option domain-name "my.lan";
  option domain-name-servers 192.168.10.199, 192.168.10.200;
  option routers 192.168.0.254;
  zone my.lan. { primary 192.168.10.199; key DHCP_UPDATER;}
  zone 10.168.192.in-addr.arpa. { primary 192.168.10.199; key DHCP_UPDATER;}
}


Fireforger 03-10-2011 12:25 PM

Thanks Noway2. I looked at your config files and changed the my ddns-rev-domainname line from "25.168.192.in-addr.arpa" to "in-addr.arpa." and that fixed the problem. Looks like you've solved my issue, much appreciated :-)


All times are GMT -5. The time now is 09:09 PM.