LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-20-2012, 02:02 AM   #1
Shiva Pahwa
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Rep: Reputation: Disabled
DNS server not able to resolve host names to IP adresses


Hello All,

We recently configured a DNS server on a Red Hat Enterprise Linux Server release 6.2 (Santiago), we installed the following packages:

-bind (includes DNS server, named)
-bind-utils (utilities for querying DNS servers
about host information)
-bind-libs (libraries used by the bind server and
utils package)

[root@atvback-ben ~]# rpm -qa | grep bind*
bind-chroot-9.7.3-8.P3.el6_2.2.x86_64
binutils-devel-2.20.51.0.2-5.28.el6.x86_64
rpcbind-0.2.0-8.el6.x86_64
bind-9.7.3-8.P3.el6_2.2.x86_64
ypbind-1.20.4-29.el6.x86_64
bind-libs-9.7.3-8.P3.el6_2.2.x86_64
binutils-2.20.51.0.2-5.28.el6.x86_64
bind-utils-9.7.3-8.P3.el6_2.2.x86_64

The named.conf looks like below:
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
};

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

zone "8.10.10.in-addr.arpa" IN {
type master;
file "xyz.com.reverse";
allow-update { none; };
};
~


After installing the above packages we configured the zones:
atvserver[1-3] are static IP addresses

xyz.com.forward

$TTL 86400
@ IN SOA atvback-ben.hp.com. root.atvback-ben.xyz.com. (
42; serial(d. adams)
3H; refresh
15M; retry
1W; expiry
1D); minimum

IN NS atvback-ben.xyz.com.
IN A 10.10.8.14
;; IN A 127.0.0.1
atvserver1-ben IN A 10.10.8.14
atvserver2-ben IN A 10.10.8.15
atvserver3-ben IN A 10.10.8.16
~

xyz.com.reverse:

$TTL 86400
@ IN SOA atvback-ben.xyz.com. root.atvback-ben.xyz.com. (
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400 ); Minimum
IN NS atvback-ben.xyz.com.
IN A 10.10.8.14
;; IN A 127.0.0.1
14 IN PTR atvserver1-ben.xyz.com.
15 IN PTR atvserver2-ben.xyz.com.
16 IN PTR atvserver3-ben.xyz.com.


We are now able to resolve all the static IPs added in forward and reverse zone files.

We have configured a DHCP switch/router on which we have specified DNS or name server IP 10.10.8.14

When we issue a dig -x to atvback-ben.xyz.com from DHCP configured servers we are getting a answer:

[root@Changuch ~]# dig atvback-ben.xyz.com

; <<>> DiG 9.7.3-RedHat-9.7.3-2.el6 <<>> atvback-ben.xyz.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48680
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;atvback-ben.xyz.com. IN A

;; ANSWER SECTION:
atvback-ben.xyz.com. 86400 IN A 10.10.8.14

;; AUTHORITY SECTION:
hp.com. 86400 IN NS atvback-ben.xyz.com.

;; Query time: 0 msec
;; SERVER: 10.10.8.14#53(10.10.8.14)
;; WHEN: Sat May 21 22:02:17 2011
;; MSG SIZE rcvd: 66

But when we try to issue a dig to one of the DHCP configured servers, we do not get a answer:
[root@atvback-ben ~]# dig Changuch.xyz.com

; <<>> DiG 9.9.1-P1 <<>> Changuch.xyz.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 30842
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;Changuch.xyz.com. IN A

;; AUTHORITY SECTION:
hp.com. 86400 IN SOA atvback-ben.xyz.com. root.atvback-ben.xyz.com. 42 10800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 10.10.8.14#53(10.10.8.14)
;; WHEN: Wed Jun 20 12:19:16 2012
;; MSG SIZE rcvd: 97

The resolv.conf file on the DHCP configured server has:
# Generated by NetworkManager
nameserver 10.10.8.14

We have configured the DNS server for static IPs. Not sure how can we resolve both static and DHCP using the same zones.

Please Help!

Thanks,
Shiva Pahwa
 
Old 06-21-2012, 11:18 AM   #2
maccas17
Member
 
Registered: May 2010
Location: UK
Distribution: RHEL6
Posts: 70

Rep: Reputation: 10
Is this the DNS for Hewlett-Packard....me thinks not..

Why have you got this set in your forward zone?

Quote:
@ IN SOA atvback-ben.hp.com. root.atvback-ben.xyz.com. (
 
Old 06-22-2012, 12:52 AM   #3
Shiva Pahwa
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Sorry my bad, that was a typo. We just need a DNS that works locally in our lab environment. Thanks for identifying it. The issues still seems to persist even after fixing the typo.
 
Old 06-22-2012, 03:53 AM   #4
maccas17
Member
 
Registered: May 2010
Location: UK
Distribution: RHEL6
Posts: 70

Rep: Reputation: 10
Hi,

The response you are receiving back is saying that the hostname you're querying doesn't exist in your DNS.
You either need to manually add the servers missing (your DHCP ones I think in this case) and add new ones as they come along - though this might not be practical if you have short DHCP leases and or a lot of devices being added/removed in your environment.

In which case, you need to configure dynamic DNS updates. You will need to configure your DHCP server(s) to update your DNS. You might want to look into this and consider how to do it securely with dnssec. You will certainly need to change your allow-update lines in your zone configurations as well.

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS server not able to resolve host names to IP adresses Shiva Pahwa Linux - Server 4 08-07-2012 12:35 PM
windows XP machines can't resolve names on to redhat 5 dns server janniez Linux - Newbie 4 06-08-2010 03:57 PM
dns server not able to resolve local domain names mystika08 Linux - Networking 62 07-01-2009 05:23 AM
dns server not able to resolve local domain names mystika08 Linux - Newbie 3 03-19-2009 07:57 AM
Check if computer can resolve host names MicahCarrick Programming 3 01-02-2007 10:48 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration