Operating System - Linux
1833785 Members
2411 Online
110063 Solutions
New Discussion

ping xxx - returns unknow host xxx

 
SOLVED
Go to solution
John Waller
Esteemed Contributor

ping xxx - returns unknow host xxx

Before reading any further this is not going to an easy 10 pointer for anybody.

I have 2 Suse 9.0 Enterprise Linux servers, one at my office here and one out on a customers site both appear to be identically set up. The network files etc/hosts etc/nsswitch.conf etc/resolv.conf and etc/host.conf all contain the same information, the only difference is that my domain name is xxxxx.co.uk were the customers is yyy.local. Another difference, which may be unrelated, is that we use a seperate linux 9.1 server as our DNS server where the customer uses a Windows 2003 server.

The problem is that when I do a ping xxxx on the customers machine I get the responce
ping: unknown host xxxx for any machine not in the local etc/hosts file.

Looking further into the problem I issued the following command on both 9.0 servers:
tcpdump -v host and

On my machine when I issue a ping xxxx I see a request to the dnsserver for the address of "xxxx.xxxxx.co.uk" were as on the customers machine I only see a request for "xxxx.".
The command domainname on both machines returns nothing and dnsdomainname returns the correct domain name. On both machines the commands dig nslookup and host all work correctly.
Additionally it is not just ping which fails, ftp, ssh, telnet also fail with unknown host.

Many thanks for any assistance you may be able to give.

15 REPLIES 15
Dave Falloon
Trusted Contributor

Re: ping xxx - returns unknow host xxx

So all digs and hosts work, for example:

dig www.google.com
and
dig internal.hostname.local

returns a correct address on the customers Suse box?

What specifically does the domain line on the customer machines resolv.conf say, does it match the output from dnsdomainname command?

In the hosts file does the local machines address first have the short name or the fqdn, ie:

192.168.1.1 host host.domain.tld
or
192.168.1.1 host.domain.tld host

The resolv.conf man page says that the default domain is determined using the gethostname() sys call if a domain line is not present.

--Dave
Clothes make the man, Naked people have little to no effect on society
kcpant
Trusted Contributor

Re: ping xxx - returns unknow host xxx

Hi John,

May be unrelated, but can you try to make your SUSE box a slave zone for W2K3 DNS server, just for troubleshooting?
PreSales Specialist
Muthukumar_5
Honored Contributor

Re: ping xxx - returns unknow host xxx

Did you check into routing table entries??

check reachablity of remote hosts using traceroute utility. It will be useful when there is problem with ROUTING.

what is the entries in /etc/resolv.conf file? like..,

domain .yyy.local

domain .co.uk

If you are getting problem for ftp, ssh, telnet and ping then that will be a problem with ROUTING.

HTH.
Easy to suggest when don't know about the problem!
rick jones
Honored Contributor

Re: ping xxx - returns unknow host xxx

Couple things - does the customer's /etc/recolv.conf file have the proper domain entry? That would be one that is different from your own of course :)

Is there a search directive in the /etc/resolv.conf file?

Do FTP, SSH, Telnet and ping work when you use the FQDN rather than simply "xxxx?"
there is no rest for the wicked yet the virtuous have no pillows
John Waller
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

Many thanks for the answers so far, in response to your questions I will list the various files on the Non-working system

/etc/hosts:
127.0.0.1 localhost

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
xxxx.xx.x.6 hostname.ddd.local hostname

/etc/resolv.conf
domain ddd.local
nameserver xxx.xx.x.1
search ddd.local

/etc/nsswitch.conf
hosts: files dns
networks: files dns

/etc/host.conf
order hosts,bind
multi on

I have tried a ping host.ddd.local but again using the tcpdump the system only appears to request the ip address for "host.". To me this appears to be a problem with the system not recognising its own domain name. Is there another file other then etc/hosts and etc/resolv.conf where the host name can be specified. Looking at the network setup using yast etherything appears to be correct with regards to hostname, domain name, etc .

At this point I do not need to be be concerned about the routing table as the DNS server, linux server and other hosts are all on a local network.

Dave Falloon
Trusted Contributor

Re: ping xxx - returns unknow host xxx

Is there a local bind daemon running on the linux box?

If so, check to see if it is serving a .local zone, its a bit of a stretch but could be a problem.

Another thing to check would be the nscd, perhaps the caching daemon is breaking things.

I agree with you, the problem is that your linux box is not appending a domain name, whether thats because it doesn't recognize .local as a tld, or if there is an empty hostname file is yet to be determined.

On my debian system there is a hostname file, I have my fqdn in there. Specifically:

bofh.demoni.ca:/etc# cat /etc/hostname
bofh.demoni.ca
bofh.demoni.ca:/etc#

I don't fully understand why you would use a domain ending with .local, is that from an RFC regarding internal dns?

I've found it easier in the past just to use a real domain, or a subdomain of a real domain, is that not possible in this case?

Does the windows domain use a .local address space as well?

The reason I suggest that is because I'm not sure if something is choking on having a tld of local. I'm going to look through the RFC's to see if they have any suggestions or warnings.

--Dave
Clothes make the man, Naked people have little to no effect on society
Dave Falloon
Trusted Contributor

Re: ping xxx - returns unknow host xxx

Hey here's a link to some instructions on OSX, may be helpful in this case, might not:

http://www.afp548.com/article.php?story=20041228092123788

--Dave
Clothes make the man, Naked people have little to no effect on society
Paul Cross_1
Respected Contributor

Re: ping xxx - returns unknow host xxx

There are often many places that information like hostnames, domainnames can hide.
Can I ask how the machine was configured? Were the entries for hostname, dns, etc. entered at install time, with sys-unconfig (or similar), or were the entries done manually?

PS: The domainname command is related to NIS, it has nothing to do with the DNS domain name.
John Waller
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

We are not running any local bind/named services on the server. The /etc/nscd.conf file has the following:
enable-cache hosts no
positive-time-to-live hosts 3600
negative-time-to-live hosts 20
suggested-size hosts 211
check-files hosts yes
so I don't believe cache is a problem.

I've checked thge link regarding OSX but the man 5 resolver on SuSe indicates resolver uses /etc/resolv.conf and not a etc/resolver/nnn.local file.

In answer to the question about sysconfig, I manually edited the relevent files on both working and non-working servers.

I am now seriosly begining to wonder whether the problem is at the Windows 2003 server end as the person who set that up has very little knowledge on what he is doing and just followed an idiots guide from the web.
Mic V.
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

Since the 2003 server is suspect, what happens if you try stuff on it? Could be informative...

Mic
What kind of a name is 'Wolverine'?
Paul Cross_1
Respected Contributor

Re: ping xxx - returns unknow host xxx

And now for some shooting in the dark:

I would definitely try using sys-unconfig (or yast2) to configure the relevant networking. I have found that manual configurations can burn your butt in many cases. Yast will know exactly what to change.
John Waller
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

Tried reconfiguring with yast2 with no effect. The only change yast2 appeared to make was to remove the line:
domain xxx.local from etc/resolv.conf
I presume that this is because we hold the FQDN within etc/hosts.
Charles Holland
Trusted Contributor
Solution

Re: ping xxx - returns unknow host xxx

John,
I don't know if this will solve anything for you but I am going to throw it out. Another admin and myself have been working on the SAME problem on SuSE Professional 9.2 for longer than either of us are willing to admit. The symptoms were identical to what you were/are experiencing.

I was really hoping for a resolution at the end of your post to solve mine. Who knows this may indeed be it.

Take a look at this link........
http://support.novell.com/techcenter/tips/10034.html

Our glibc was already higher than the one mentiones so we simply added the entry to the /etc/host.conf file and the damn thing worked immediately. We were able ping by short host name and FQDN with ease. Telnet worked immediately. Hope this helps

Regards
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein
John Waller
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

Charles,

Many thanks for this link. Unfortunatly we have glibc version 2.3.3-98.28 not .38 but when I added the line into /etc/host.conf as a test, it imediatly reported:
/etc/host.conf: line 16: bad command `mdns off'

I believe once we have upgraded to SP1 then this will work. It's a bit more work to upgrade but it will be a lot less hassle than manually keeping /etc/hosts upto date.
John Waller
Esteemed Contributor

Re: ping xxx - returns unknow host xxx

Just to confirm, THIS DOES WORK !!!!!!.
Finally found the glibc rpm for ppc and installed the package, modified host.conf and hey presto ping telnet ftp all work.

Once again Charles, many thanks for your assistance, I'm sure I would never have found this without your help.