LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05:47 AM   #1
Shiva Pahwa
LQ Newbie
 
Registered: Jun 2012
Posts: 5

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


Hello All,

We recently configured a local DNS server in our lab. We have a switch that is configured to issues DHCP IPs. we have also configured the switch with the DNS IP. We are able to resolve all static IPs under forward and reverse zones but we are not able to resolve names with DHCP issued IPs.

We are able to issue dig to the DNS/NAME server but when we try to contact any other servers in the network using host name/fqdn we are not able to get a answer.

Please let us know if there is any DHCP configuration piece we are missing in the DNS server?

Thanks in advance for your time.

Below are the files we have configured in the DNS server:

[root@atvback-ben named]# pwd
/var/named
[root@atvback-ben named]# ls
chroot data dynamic xyz.com.forward xyz.com.reverse named.ca named.empty named.localhost named.loopback slaves

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


[root@atvback-ben named]# vi hp.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 atvback-ben.hp.com.
15 IN PTR atvweb1-ben.hp.com.
16 IN PTR atvweb2-ben.hp.com.
IN NS atvback-ben.xyz.com.
IN A 10.10.8.14
;; IN A 127.0.0.1
atvback-ben IN A 10.10.8.14
atvweb1-ben IN A 10.10.8.15
atvweb2-ben IN A 10.10.8.16

This is the resolv.conf of the static IPs that were added in the forward and reverse zones
[root@atvback-ben ~]# vi /etc/resolv.conf
# Generated by NetworkManager
search xyz.com
nameserver 10.10.8.14

dig command issued from a server which was configured using DHCP:

[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: 60320
;; 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: Sun May 22 01:47:43 2011
;; MSG SIZE rcvd: 66

dig issued from the DNS server to a server configured using DHCP:

[root@atvback-ben named]# dig Changuch

; <<>> DiG 9.9.1-P1 <<>> Changuch
;; global options: +cmd
;; connection timed out; no servers could be reached
[root@atvback-ben named]# dig Changuch.xyz.com

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

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;Changuch.hp.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 16:08:31 2012
;; MSG SIZE rcvd: 97


the following bind files are installed on the DNS server:
samba-winbind-clients-3.5.10-114.el6.x86_64
bind-chroot-9.7.3-8.P3.el6_2.2.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
bind-utils-9.7.3-8.P3.el6_2.2.x86_64
 
Old 06-28-2012, 08:20 AM   #2
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 224

Rep: Reputation: 9
Quote:
Originally Posted by Shiva Pahwa View Post
Hello All,

We recently configured a local DNS server in our lab. We have a switch that is configured to issues DHCP IPs. we have also configured the switch with the DNS IP. We are able to resolve all static IPs under forward and reverse zones but we are not able to resolve names with DHCP issued IPs.

We are able to issue dig to the DNS/NAME server but when we try to contact any other servers in the network using host name/fqdn we are not able to get a answer.

Please let us know if there is any DHCP configuration piece we are missing in the DNS server?

Thanks in advance for your time.

Below are the files we have configured in the DNS server:

[root@atvback-ben named]# pwd
/var/named
[root@atvback-ben named]# ls
chroot data dynamic xyz.com.forward xyz.com.reverse named.ca named.empty named.localhost named.loopback slaves

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


[root@atvback-ben named]# vi hp.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 atvback-ben.hp.com.
15 IN PTR atvweb1-ben.hp.com.
16 IN PTR atvweb2-ben.hp.com.
IN NS atvback-ben.xyz.com.
IN A 10.10.8.14
;; IN A 127.0.0.1
atvback-ben IN A 10.10.8.14
atvweb1-ben IN A 10.10.8.15
atvweb2-ben IN A 10.10.8.16

This is the resolv.conf of the static IPs that were added in the forward and reverse zones
[root@atvback-ben ~]# vi /etc/resolv.conf
# Generated by NetworkManager
search xyz.com
nameserver 10.10.8.14

dig command issued from a server which was configured using DHCP:

[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: 60320
;; 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: Sun May 22 01:47:43 2011
;; MSG SIZE rcvd: 66

dig issued from the DNS server to a server configured using DHCP:

[root@atvback-ben named]# dig Changuch

; <<>> DiG 9.9.1-P1 <<>> Changuch
;; global options: +cmd
;; connection timed out; no servers could be reached
[root@atvback-ben named]# dig Changuch.xyz.com

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

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;Changuch.hp.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 16:08:31 2012
;; MSG SIZE rcvd: 97


the following bind files are installed on the DNS server:
samba-winbind-clients-3.5.10-114.el6.x86_64
bind-chroot-9.7.3-8.P3.el6_2.2.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
bind-utils-9.7.3-8.P3.el6_2.2.x86_64
For some i am not able to understand what are you trying to do, also if you can post your named.conf that would help.
 
Old 07-02-2012, 12:54 AM   #3
Shiva Pahwa
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello Rohit,

We are trying to configure a DNS for our lab servers. We have added IPs for the static entries with in our forward and reverse zones, but we are not sure how to configure DNS for the reset of the servers that are configured with DHCP. thanks for the help.

Please find the named.conf file below:

[root@atvback-ben ~]# vi /etc/named.conf
//
// 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.
//
acl xyz-lan { any; };
options {
directory "/var/named";
allow-query { xyz-lan; };
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{ any;};
};

zone "8.10.10.in-addr.arpa" IN {
type master;
file "xyz.com.reverse";
allow-update { any; };
};
 
Old 07-02-2012, 08:21 AM   #4
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 224

Rep: Reputation: 9
Quote:
Originally Posted by Shiva Pahwa View Post
Hello Rohit,

We are trying to configure a DNS for our lab servers. We have added IPs for the static entries with in our forward and reverse zones, but we are not sure how to configure DNS for the reset of the servers that are configured with DHCP. thanks for the help.

Please find the named.conf file below:

[root@atvback-ben ~]# vi /etc/named.conf
//
// 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.
//
acl xyz-lan { any; };
options {
directory "/var/named";
allow-query { xyz-lan; };
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{ any;};
};

zone "8.10.10.in-addr.arpa" IN {
type master;
file "xyz.com.reverse";
allow-update { any; };
};
Hi Shiva,

In the DNS zone files you have to define the IPs for the hostname. So my suggestion here would be that you reserve the IPs for certain machines in your DHCP server and then put those IPs in the zone file. In this way the machines you want to add to your zone file would get the same IP everytime and thus you can add these IPs to zone file and resolution would work.
 
Old 08-07-2012, 12:35 PM   #5
Shiva Pahwa
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks Rohit!
 
  


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 3 06-22-2012 03:53 AM
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 11:40 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