Host command

hi guys

I have standalone Suse 10 SP3 that when I run

# hostname
webserver

but when I run host command

# host webserver
;; connection timed out; no servers could be reached 

I would like to get the IP when I issue

host webserver
x.x.x.x

and the name when

host x.x.x.x
webserver

in /etc/hosts I have

x.x.x.x  webserver

in /etc/HOSTNAME

webserver

I don't know what to put in /etc/resolv.conf

any idea how to make to resolve to itself?

thanks a lot

check /etc/nsswitch.conf, if has this line:

hosts: dns  files

Then add your DNS server IP in /etc/resolv.conf

domain xxxx.com      
nameserver 123.234.123.234

you need restart the DNS services, or reboot the server.

/sbin/services network restart