1834909 Members
2851 Online
110071 Solutions
New Discussion

Help!!

 
Allan Pincus
Frequent Advisor

Help!!

I rebooted my server today, and now when I try and ping a host, I get the message "unknown host" error.

I use /etc/hosts for my lookup, and everything in the file looks fine, and has not changed in ages.

"named" is running, but I did not turn it on, so I don't know if it has been running, or if I should turn it off.

Can someone give me a clue as to what might be going on? I am NOT using resolv.conf and checked to make sure that it does not exist.

Thanks!
6 REPLIES 6
Joaquin Gil de Vergara
Respected Contributor

Re: Help!!

the /etc/nsswitch.conf file define the name resolution policy (hosts, NIS, DNS) to hosts, networks etc...

you have some examples in /etc/nsswitch.* files

the /etc/resolv.conf defines name servers to resolve names by DNS domain, but you must enable dns to use it

named is the name server daemon. If you host not is a name server you can stop it

How is your nsswitch.conf and hosts files?
Teach is the best way to learn
Sridhar Bhaskarla
Honored Contributor

Re: Help!!

If you are not using resolv.conf, then you are not using named. Use "sig_named kill" to stop named. Also disable it permanently in /etc/rc.config.d/namesvrs file.

ALso look at your /etc/nsswitch.conf file and make sure files is first in the order.

Grep for the host in /etc/hosts and see if the entry is there.

Finally look for the permissions on /etc/hosts and /etc/nsswitch.conf. They should have read permissions for the world and won't work if you are running as an ordinary user.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MANOJ SRIVASTAVA
Honored Contributor

Re: Help!!

try this


reanme /etc/resolv.conf to some other file and than do a nslookup and chech whter it is reoslved correclty or not.


Manoj Srivastava
RAC_1
Honored Contributor

Re: Help!!

stop named in /etc/rc.config.d/namesvrs.
Check /etc/nsswitch.conf file.
It should look like as follows if you are using /etc/hosts for name lookup.
#
# /etc/nsswitch.files:
#
# @(#)B.11.11_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files

also check resolv.conf in /etc dir.
There is no substitute to HARDWORK
Anil C. Sedha
Trusted Contributor

Re: Help!!

Check the following

/etc/nsswitch.conf

hosts files dns

If this is fine then verify that you have the correct entry in your /etc/hosts file once again for the IP address.

Verify that your /etc/rc.config.d/namesvrs file has correct nameservers listed.

Check your /etc/netconf file for the gateway defined. You may also check this via the command

netstat -rn

If you see the correct gateway defined then problem is in DNS probably.

Verify by pinging with hostname and ipaddress.


If you are able to ping a hostname then no problems with dns. Try stopping and restarting your network services.

Let us know if you don't succeed even after doing this.

Regards,
Anil
If you need to learn, now is the best opportunity
Magic_Wand
Advisor

Re: Help!!

try doing a lookup of your system name **AND** IP address. It should show it's using FILES and return correctly.
================================
SELECT * FROM users WHERE clue > 0