Problem with configuring host name in Redhat Linux 5

Hi All

when I give the command,
$ ping <hostname>

I get the following error
ping: unknown host <hostname>

I have checked in the following files,

/etc/sysconfig/network
/etc/hosts
/etc/resolv.conf
/etc/nsswitch.conf

Every where in these files host name and IP address are given properly but still when I ping the host name its not pinging. Could any one please help me in this.

Thanks
Pradeep

The DNS server will translate the name to an IP. So you probably need to contact your DNS admin. Are any name lookups working? Can you even ping the DNS server? When you run nslookup <hostname>, what is returned? My guess is that it won't give you a valid match for the hostname you give. What if you enter the IP number in place of the hostname to do a reverse lookup? You should have your DNS servers listed by IP in your resolv.conf file. Be sure you don't have type-o's. And another common problem is not getting your subnet mask correct or entering an incorrect gateway address. You can use traceroute to see where your packets are getting hung up.

Do you have a domain append? Are you using a hostname without the fully qualified domain name? If not, add the domain append in /etc/resolv.conf