2

This question already has an answer here:

I have setuped a DNS server in Centos6.5 and its working with every client machines other than ubuntu, now i have issue with ubuntu While im trying to ping from desktop machine to DNS server as ping masterdns.arrivu.local i can't ping its return the as

sysadmin@localhost:~$ ping masterdns.arrivu.local
ping: unknown host masterdns.arrivu.local

But while i'm pinging with the ip address its working

sysadmin@localhost:~$ ping 192.168.1.15 -c 3
PING 192.168.1.15 (192.168.1.15) 56(84) bytes of data.
64 bytes from 192.168.1.15: icmp_seq=1 ttl=64 time=0.450 ms
64 bytes from 192.168.1.15: icmp_seq=2 ttl=64 time=0.445 ms
64 bytes from 192.168.1.15: icmp_seq=3 ttl=64 time=0.265 ms

--- 192.168.1.15 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.265/0.386/0.450/0.089 ms

Even i have checked using host its returning the IP

sysadmin@localhost:~$ host masterdns.arrivu.local
masterdns.arrivu.local has address 192.168.1.15

My issue is i want to ping and ssh using hostname instead of ip as below

ping masterdns.arrivu.local ssh root@masterdns.arrivu.local

IM using Desktop machine with ubuntu

sysadmin@localhost:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

My Desktop ip is 192.168.1.99

While i did a dig from my desktop i got the reply from DNS

sysadmin@localhost:~$ dig masterdns.arrivu.local

; <<>> DiG 9.9.5-3-Ubuntu <<>> masterdns.arrivu.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3101
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;masterdns.arrivu.local.        IN  A

;; ANSWER SECTION:
masterdns.arrivu.local. 86400   IN  A   192.168.1.15

;; AUTHORITY SECTION:
arrivu.local.       86400   IN  NS  secondarydns.arrivu.local.
arrivu.local.       86400   IN  NS  masterdns.arrivu.local.

;; ADDITIONAL SECTION:
secondarydns.arrivu.local. 86400 IN A   192.168.1.51

;; Query time: 3 msec
;; SERVER: 192.168.1.15#53(192.168.1.15)
;; WHEN: Mon May 12 10:45:42 IST 2014
;; MSG SIZE  rcvd: 124

NSlookup too worked

sysadmin@localhost:~$ nslookup arrivu.local

Server:     192.168.1.15
Address:    192.168.1.15#53

Name:   arrivu.local
Address: 192.168.1.15
Name:   arrivu.local
Address: 192.168.1.51
Name:   arrivu.local
Address: 192.168.1.155
Name:   arrivu.local
Address: 192.168.1.84
Name:   arrivu.local
Address: 192.168.1.99
Name:   arrivu.local
Address: 192.168.1.50
Name:   arrivu.local
Address: 192.168.1.145

My Desktop Interface Info's

sysadmin@localhost:~$ cat /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
        address 192.168.1.99
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
    dns-nameservers 192.168.1.15 192.168.1.51
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

sysadmin@localhost:~$ cat /etc/resolv.conf

# 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 192.168.1.15
nameserver 192.168.1.51
search arrivu.local

There is no iptables deployed in desktop machine's or what I'm using as DNS server too

[root@masterdns ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

DNS Forward Entry

[root@masterdns named]# cat forward.arrivu 
$TTL 86400
@   IN  SOA     masterdns.arrivu.local. root.arrivu.local. (
        2014051001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
@       IN  NS          masterdns.arrivu.local.
@       IN  NS          secondarydns.arrivu.local.
@       IN  A           192.168.1.15
@       IN  A           192.168.1.51
@       IN  A           192.168.1.155
@       IN  A           192.168.1.84
@       IN  A           192.168.1.99
@       IN  A           192.168.1.50
@   IN  A       192.168.1.145
masterdns       IN  A   192.168.1.15
secondarydns    IN  A   192.168.1.51
client          IN  A   192.168.1.155
sukumar         IN  A   192.168.1.84
babin           IN  A   192.168.1.99
server      IN  A   192.168.1.50
test        IN  A   192.168.1.145

DNS Reverse ENTRY

[root@masterdns named]# cat reverse.arrivu 
$TTL 86400
@   IN  SOA     masterdns.arrivu.local. root.arrivu.local. (
        2014051001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
@       IN  NS          masterdns.arrivu.local.
@       IN  NS          secondarydns.arrivu.local.
@       IN  PTR         arrivu.local.
masterdns       IN  A   192.168.1.15
secondarydns    IN  A   192.168.1.51
client          IN  A   192.168.1.155
sukumar     IN  A   192.168.1.84
babin       IN  A   192.168.1.99
server      IN  A   192.168.1.50
test        IN  A   192.168.1.145
15      IN  PTR         masterdns.arrivu.local.
51      IN  PTR         secondarydns.arrivu.local.
155     IN  PTR         client.arrivu.local.
84  IN  PTR     sukumar.arrivu.local.
99  IN  PTR     babin.arrivu.local.
50  IN  PTR     server.arrivu.local.
145 IN  PTR     test.arrivu.local.

guide me to get fix buddies

marked as duplicate by user.dz, Radu Rădeanu, Eric Carvalho, Danatela, BuZZ-dEE May 13 '14 at 19:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Hello im not talking about windows network, both are linux – Babin Lonston May 12 '14 at 5:41
  • Yeah, It is similar. Could you read its answer, it should work for you too. The problem is .local domain extension which is used by Avahi (a mDNS tool). – user.dz May 12 '14 at 5:48
  • @Sneetsher Could you please verify the above edit, i have added the forward and reverse Entry from DNS server too – Babin Lonston May 12 '14 at 6:18
  • 1
    DNS specific tool may resolve name, but that will fail for tools that relay on system to do that. Could add contents of /etc/nsswitch.conf – user.dz May 12 '14 at 6:27
  • Thank you @drgrog, the question you mention is more convenient duplicate. (exactly same problem description). Would you flag it (I have already used my flag) – user.dz May 12 '14 at 18:05