I have set up a local network and it seems that some of us can use it properly while others can't. The problem seems to be that the local hostnames I setup don't get resolved for everyone.

To overview how the network is setup:

I am running an Ubuntu 10.01 server using dnsmasq, this server is setup to act as our primary DNS server, configured via our router.

dnsmasq is configured using the options of

domain-needed
bogus-priv

I use the /etc/hosts file to determain the hostnames

192.168.1.10    ra.xsi
192.168.1.10    test.xsi

From my machine:

If I dig the hostnames they resolve properly

; <<>> DiG 9.4.3-P1 <<>> ra.xsi
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61671
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ra.xsi.                IN  A

;; ANSWER SECTION:
ra.xsi.         0   IN  A   192.168.1.10

;; Query time: 9 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)
;; WHEN: Wed Nov  9 12:28:34 2011
;; MSG SIZE  rcvd: 40

Ping also works:

PING ra.xsi (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: icmp_seq=0 ttl=64 time=0.834 ms
64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.699 ms
^C
--- ra.xsi ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.699/0.766/0.834/0.068 ms

And login via SSH works using the hostname.

For those that cannot connect using hostnames, if I dig from their machine it appears the name is being resolved, but they cannot ping, SSH or http access the hostname.

; <<>> DiG 9.6.0-APPLE-P2 <<>> ra
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12554
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ra.xsi.                IN    A

;; ANSWER SECTION:
ra.xsi.           0    IN    A    192.168.1.10

;; Query time: 8 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)
;; WHEN: Wed Nov  9 12:05:50 2011
;; MSG SIZE  rcvd: 36

I've been banging my head at this and just can't seem to figure it out.

link|improve this question

75% accept rate
So if you cannot connect with ping/ssh/whatever, what ERROR do you get? Those tools almost always emit a useful error message that will give you a very useful hint about where you should be looking. – Zoredache Nov 9 '11 at 17:52
hostname not found – nwhiting Nov 9 '11 at 17:54
feedback

1 Answer

I would suspect the hosts that can't find the hostname are using some other DNS servers. There are a few reasons for this:

  • They have static addresses. These hosts will not received their DNS servers from the DHCP server (router).
  • Some hosts are getting their address from a DHCP server which isn't configured to send your DNS server in its response. This could be dnsmasq if you haven't disabled DHCP.
  • The DNS servers have been configured manually to something like OpenDNS, Google, or your ISP.
  • The hosts have been infected with malware which is redirecting DNS to some bogus DNS servers.

Try using the nslookup command on the server and specifying your dnsmasq server as the third parameter.

nslookup ra.xsi 192.168.1.10

If this works, then check the DNS configuration on the host.

link|improve this answer
Thanks for the response, we do have static IP's but I have confirmed their routing through the server for their first DNS. dnsmasq does not have DHCP enabled, we are using Google's DNS but as a secondary to dnsmasq. It seems all that was needed was to just reconfigure the setup and reboot the hardware, after that all works well. – nwhiting Nov 11 '11 at 16:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.