1833323 Members
3091 Online
110051 Solutions
New Discussion

dns headache

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

dns headache

Hi everyone

I have an external address that I can resolve through DNS, returned are 5 ip addresses for the one host

When I try to

telnet 25

or

ping

I get the message "unknown host"

I have this working ok on linux and windowz

I have the domain set in /etc/resolv.conf

I have my ip,fqdn and host set in /etc/hosts for the localhost

Any ideas why this is not working

Regards

Steve
take your time and think things through
7 REPLIES 7
D Block 2
Respected Contributor
Solution

Re: dns headache

steve, did someone change your /etc/nsswitch.conf file ?
Golf is a Good Walk Spoiled, Mark Twain.
Geoff Wild
Honored Contributor

Re: dns headache

Try FQDN:

telnet hostname.somedomain.com 25



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
D Block 2
Respected Contributor

Re: dns headache

traceroute

traceroute <- should return unknown.
Golf is a Good Walk Spoiled, Mark Twain.
C. Beerse_1
Regular Advisor

Re: dns headache

'unknown host' mostly points to host-lookup problems. If you can ping/telnet the machine by ip-address, then it is definitly host-lookup.

Try a 'nslookup' of the machine by its name and by its full name .your .domain.

If nslookup fails on both, then most likely your nsswitch (search order) and/or /etc/hosts is not properly configured. Also check what is searched in nsswitch, dns should be one of them.

If nslookup fails on but succeeds on the full name, update /etc/resolv.conf with the (all) local used domainnames.

make everything as simple as possible, not simpler (A.Einstein??)
Muthukumar_5
Honored Contributor

Re: dns headache

What you are getting for,

nslookup

what is in /etc/nsswitch.conf file for hosts: entry.

nsquery

what you are getting there.

Check tracerouting path with,

tracert(windows) or traceroute (unix)

hth.
Easy to suggest when don't know about the problem!
Suraj Singh_1
Trusted Contributor

Re: dns headache

Files you need to look for:

i) /etc/rc.config.d/netconf
Check if the IP Address, Netmask and default gateway is set up correctly.

ii) /etc/resolv.conf
Check the DNS server's entry, it should have at least one line:

nameserver xx.xx.xx.xx ; Enter the DNS servers IP address here

iii) /etc/nsswitch.conf
Look for the line starting with "hosts", it should be something like:
hosts: dns [NOTFOUND=return] nis [NOTFOUND=return] files
NOTE: You may remove nis portion if nis is not configured in your environment.

~Suraj
What we cannot speak about we must pass over in silence.
steven Burgess_2
Honored Contributor

Re: dns headache

Tom get's the rabbit

The plonker that added the entries to /etc/nsswitch.conf disregarded the entry that was already in there. When I built the machines here on site I had to force files as we didn't have dns setup. He added a new entry at the bottom of the file which was correct but was never referenced as the initial entry took precedence.

Thanks everyone

Steve
take your time and think things through