config files seem ok.
Googling around it seems somebody also experienced similar issues; not clear if and how they cleared the problem though..
First thing you could try to exclude problems with the internal nameservers you are using.
If you can, try reproduce the problem by ping/nslookup to an external site (i.e.: www. google.com).
If the above can be done, try also to use some external dns server (i.e. opendns) and repeat the test against an external host (i.e. www. google.com again).
If you can execute the above tests and if the results of the above tests replay the problem already posted, we can exclude a problem with internal dns servers.
Next thing I could suggest is verifying the shared libraries used by nslookup and by ping:
this can be done by:
looking for the full paths to nslookup and ping:
which nslookup
which ping
then listing the shared libraries to check for problems:
ldd -v /path/to/nslookup
ldd -v /path/to/ping
and verifying that the required libraries are actually available (in particular, the libdns* and libresolv* ones).
- Reverse the order "files dns" in /etc/nsswitch.conf and /etc/host.conf to have proper search as well
- Verified shared libraries of ping and nslookup using ldd -v /path/to/ping and verified that the required libraries are actually available (in particular, the libdns* and libresolv* )
- Tried to switch off network_ipv6 in /etc/sysconfig/network
- Interchange IP address of eth0 and eth1
- Even turn off the iptables firewall service to make sure there is no something blocking from the firewall
[LEFT]- I can dig the clients and get the proper replies
I can nslookup and get the proper replies[/LEFT]
[LEFT]Still, haven't figured it out yet
Btw, my OS is Redhat 5.4 and it is a vm machine.
[/LEFT]
just for sake of completeness: did you experience this issue after an update/installazion of obsolete/new software, just after installation or all of a sudden?
there is no new updates/installation of software or packages. The server is in lab environment and what is newly configured is NAT to connect it in production network. now, it is connected to prod by pinging the IP address of servers but can't ping by hostname. already exported the dns servers from prod network to the server but still encountered the same.
would it be possible to see if the problem is in the network between the problematic server, the dns servers and the target server?
May you use tcpdump (or wireshark, or other network traffic sniffers you're comfortable with) to look at what happens between the systems when you do a dns query via nslookup and when you try to ping the target hostname?