LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bind HOST works but cannot ping (https://www.linuxquestions.org/questions/linux-networking-3/bind-host-works-but-cannot-ping-4175438193/)

metallica1973 11-21-2012 05:02 PM

Bind HOST works but cannot ping
 
I am using CentOS release 5.5 (Final),bind-9.3.6-20.P1.el5_8.5 as my DNS server and using Ubuntu 12.04 on my desktop. I created my forward zone lookup file along with the reverse. I can successfully use host using the ip address and or hostname:

Code:

host 10.7.0.46
46.0.7.10.in-addr.arpa domain name pointer Centos.NM.testnetwork.local.

and vice-versa with a slight delay

Code:

host Centos.NM.testnetwork.local
Centos.NM.testnetwork.local has address 10.7.0.46

When I attempt to ping via the name I cannot:

Code:

ping Centos.NM.testnetwork.local
ping: unknown host Centos.NM.testnetwork.local

Here is my named.caching-nameserver.conf file

Code:

[root@Centos ~]# cat /var/named/chroot/etc/named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver 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.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
        listen-on port 53 { 127.0.0.1; 10.7.0.46; };
        #listen-on-v6 port 53 { ::1; };
        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";
        forwarders { 127.0.0.1; 10.7.0.150; };
        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;       
        // query-source-v6 port 53;

        allow-query    { any; };
        //allow-query    { localhost; 127.0.0.1; 10.0.0.0/24; 10.7.0.0/24; };
        //allow-query-cache { localhost; 127.0.0.1; 10.0.0.0/24; 10.7.0.0/24; };
        //allow-transfer { localhost; 127.0.0.1; 10.0.0.0/24; 10.7.0.0/24; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients            { localhost; 10.0.0.0/24; 10.7.0.0/24; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

any suggestions ??

smallpond 11-22-2012 08:48 AM

What's in /etc/resolv.conf and /etc/nsswitch.conf?

metallica1973 11-28-2012 10:05 AM

Thanks for the reply.

The /etc/resolv.conf and /etc/nsswitch.conf from my local machine(Ubuntu 12.04).

resolv.conf

Code:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#    DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.7.0.46
nameserver 127.0.0.1
search local testnetwork.local othernetwork.LOCAL

nsswitch.conf

Code:

passwd:        compat
group:          compat
shadow:        compat
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:      files
protocols:      db files
services:      db files
ethers:        db files
rpc:            db files
netgroup:      nis

Interestingly I can ping and get a response via:

Code:

ping Centos.NM.testnetwork
PING Centos.NM.testnetwork.local (10.7.0.46) 56(84) bytes of data.
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=1 ttl=64 time=0.620 ms
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=2 ttl=64 time=0.470 ms
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=3 ttl=64 time=0.411 ms
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=4 ttl=64 time=0.389 ms
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=5 ttl=64 time=0.460 ms
^C
--- Centos.NM.testnetwork.local ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 0.389/0.470/0.620/0.080 ms

ping Centos.NM
PING Centos.NM.testnetwork.local (10.7.0.46) 56(84) bytes of data.
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=1 ttl=64 time=0.620 ms
64 bytes from Centos.NM.testnetwork.local (10.7.0.46): icmp_req=2 ttl=64 time=0.470 ms
^C
--- Centos.NM.testnetwork.local ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.477/0.578/0.679/0.101 ms

but not specifying the complete FQDN

Code:

ping Centos.NM.testnetwork.local
Regards

metallica1973 11-28-2012 12:02 PM

So it appears that I can ping everything using the name for example:

Domain:

testnetwork

Hosts:

dojo1.testnetwork
Centos.NM.testnetwork
redhat.5.5.32Bit.testnetwork

and

dojo1
Centos.NM
redhat.5.5.32Bit

but not:

dojo1.testnetwork.local
Centos.NM.testnetwork.local
redhat.5.5.32Bit.testnetwork.local

It must be a configuration that I am missing???

metallica1973 11-28-2012 03:08 PM

It appears to be an Ubuntu 12.04 issue using dnsmasq:

https://bugs.launchpad.net/ubuntu/+s...sq/+bug/998712

I used a Red Hat Enterprise Linux Server release 6.2 (Santiago) and configured the same DNS stuff and it work like a charm:

Code:

[root@redhat ~]# ping WIN8-141.testnetwork.local
PING WIN8-141.testnetwork.local (10.7.0.141) 56(84) bytes of data.
64 bytes from WIN8-141.testnetwork.local (10.7.0.141): icmp_seq=1 ttl=128 time=0.409 ms
^C
--- WIN8-141.testnetwork.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 261ms
rtt min/avg/max/mdev = 0.409/0.409/0.409/0.000 ms

[root@redhat ~]# ping WIN8-141
PING WIN8-141.testnetwork.local (10.7.0.141) 56(84) bytes of data.
64 bytes from WIN8-141.testnetwork.local (10.7.0.141): icmp_seq=1 ttl=128 time=0.275 ms
^C
--- WIN8-141.testnetwork.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 789ms
rtt min/avg/max/mdev = 0.275/0.275/0.275/0.000 ms



All times are GMT -5. The time now is 03:41 AM.