PDA

View Full Version : [all variants] [SOLVED] DNS resolution error on local network


josir
July 7th, 2008, 06:53 PM
Hi folks,

I have a weird problem with DNS resolution on a specific machine that don't recognize .local machines.

I have a local DNS 192.168.0.1 working fine with Linux and Windows clients. But on this Ubuntu 8.04 machine, it does not work.

$> cat /etc/resolv.conf
nameserver 192.168.0.1

$>nslookup wiki.local

Server: 192.168.0.1
Address: 192.168.0.1#53

wiki.local canonical name = linux05.local.
Name: linux05.local
Address: 192.168.0.5

$>ping wiki.local
ping: unknown host wiki.local

Probably it is a misconfiguration but I had no other ideas on how to fix it. What more can I do to find the problem?

Thanks in advance,
Josir

superprash2003
July 8th, 2008, 08:10 AM
are you able to ping the ip of wiki.local?

josir
July 8th, 2008, 10:27 AM
Yes. The ping works fine even from the browser/apache.

http://192.168.0.5

tcpip4lyfe
July 8th, 2008, 11:09 AM
what is the output of:

hostname
hostname -f

josir
July 8th, 2008, 02:08 PM
I found the problem! A stupid guy (me) added on /etc/hostname the server ip 192.168.0.5 and put another servername.... When I remove the line on /etc/hostname, ping worked fine.

Thanks to you all!
Josir Gomes

webweaver
September 23rd, 2008, 10:01 PM
I was having a similar problem, except my fix was different.
In my /etc/nsswitch.conf file I had the following line:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4


Which I had to change to:

hosts: files mdns4_minimal dns mdns4


Now I can ping other machines on the network using the local network domain. However... the ping is MASSIVELY slow...

My setup may be a bit different though, as I have an Ubuntu Server (8.04.1 64bit) setup as a Samba + LDAP domain controller, this has BIND9 for DNS.

Can anyone offer suggestions please?

UPDATE:
Nevermind, changing that same line again to:

hosts: files dns wins

Has fixed me up!