Mark
asked on
Host not found: 3(NXDOMAIN)
I keep having trouble with this one. I have implemented DNS with DHCP update on my Linux Slackware distro 14.1, bind version 9.9.3. I did have this working once, I was able to resolve dhcp clients:
My named.conf:
Interestingly, a db.192.169.0.jnl file *is* created and I can resolve by IP:
$ host hplaptop
hplaptop.hprs.local has address 192.168.0.100
I don't know that I've done anything at all to this basic bind/dhcpd configuration, but now I cannot resolve them:$ host hplaptop
Host hplaptop not found: 3(NXDOMAIN)
I need help!My named.conf:
options {
directory "/var/named";
forwarders { // These are the ISP provided name servers
66.193.88.3;
66.192.88.4;
};
allow-query { // Permit querying by others in the domain
192.168.0.0/24;
127.0.0.1;
};
};
zone "localhost" {
type master;
file "db.local";
};
zone "127.in-addr.arpa" {
type master;
file "db.127";
};
zone "hprs.local" in {
type master;
allow-update { 192.168.0.2; 127.0.0.1; }; // local DHCP server
file "db.hprs.local";
};
zone "0.168.192.in-addr.arpa" in {
type master;
allow-update { 192.168.0.2; 127.0.0.1; }; // local DHCP server
file "db.192.168.0";
};
Zone file /var/named/db.hprs.local$ORIGIN .
$TTL 14400 ; 4 hours
hprs.local IN SOA mail.hprs.local. sysadmin.mail.ohprs.org. (
3 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
3600 ; minimum (1 hour)
)
NS mail.hprs.local.
$ORIGIN hprs.local.
$TTL 14400 ; 4 hours
mail A 192.168.0.2
$TTL 14400 ; 4 hours
richo A 192.168.0.20
dhcpd.conf:authoritative;
ddns-updates on;
update-static-leases on;
allow unknown-clients;
ddns-update-style interim;
default-lease-time 86400;
zone hprs.local. { primary 192.168.0.2; }
zone 0.168.192.in-addr.arpa. { primary 192.168.0.2; }
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.2;
range 192.168.0.100 192.168.0.254;
option domain-name-servers 192.168.0.2;
option domain-name "hprs.local";
ddns-domainname = "hprs.local.";
ddns-rev-domainname = "in-addr.arpa.";
}
Releasing/renewing the client appears to work:Jul 24 16:07:01 mail named[4966]: client 192.168.0.2#62764: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 24 16:07:01 mail dhcpd: DHCPRELEASE of 192.168.0.100 from 00:25:b3:bf:f5:42 (hplaptop) via eth1 (found)
Jul 24 16:07:01 mail dhcpd: Removed reverse map on 100.0.168.192.in-addr.arpa.
Jul 24 16:07:01 mail dhcpd: DHCPDISCOVER from 00:25:b3:bf:f5:42 via eth1
Jul 24 16:07:01 mail dhcpd: DHCPOFFER on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 24 16:07:01 mail named[4966]: client 192.168.0.2#62764: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 24 16:07:01 mail named[4966]: client 192.168.0.2#62764: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '100.0.168.192.in-addr.arpa' PTR
Jul 24 16:07:01 mail dhcpd: DHCPREQUEST for 192.168.0.100 (192.168.0.2) from 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 24 16:07:01 mail dhcpd: DHCPACK on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 24 16:07:02 mail dhcpd: Added reverse map from 100.0.168.192.in-addr.arpa. to hplaptop.hprs.local
But I can't resolve hplaptop from the Linux DNS server and there is no db.hprs.local.jnl file created.Interestingly, a db.192.169.0.jnl file *is* created and I can resolve by IP:
$ host 192.168.0.100
100.0.168.192.in-addr.arpa domain name pointer hplaptop.hprs.local.
Please help! I'm stuck!
ASKER
I believe I've figured this one out. I needed "ignore client-updates" in my dhcpd.conf file in the general option section. I'm going to give it a day or so because I've had this problem intermittently in the past.
Were both host commands done on the same computer?
If not, I would also verify your resolver.conf file on each computer is correct. Make sure you have the "search hprs.local" Since you are just putting in the host name and not the FQDN it will try to look up just plain "hplaptop", which would not exist on DNS server. It might exist in a local hosts file, but not on a DNS server.
If not, I would also verify your resolver.conf file on each computer is correct. Make sure you have the "search hprs.local" Since you are just putting in the host name and not the FQDN it will try to look up just plain "hplaptop", which would not exist on DNS server. It might exist in a local hosts file, but not on a DNS server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my solution of "ignore client-updates" did the trick
ASKER
Open in new window
Odd that it can update the reverse zone file, but not the forward zone file.