LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   DNS server not able to resolve host names to IP adresses (https://www.linuxquestions.org/questions/linux-server-73/dns-server-not-able-to-resolve-host-names-to-ip-adresses-4175412433/)

Shiva Pahwa 06-20-2012 05:47 AM

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

Rohit_4739 06-28-2012 08:20 AM

Quote:

Originally Posted by Shiva Pahwa (Post 4707626)
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.

Shiva Pahwa 07-02-2012 12:54 AM

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; };
};

Rohit_4739 07-02-2012 08:21 AM

Quote:

Originally Posted by Shiva Pahwa (Post 4716862)
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.

Shiva Pahwa 08-07-2012 12:35 PM

Thanks Rohit!


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