Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a virtual Windows 2008 domain controller with Dynamic IP and a CentOS box in the same network. I have created host record entries for the Linux server in both FLZ and RLZ on the Windows Server. However I cannot ping the Windows Server from the Linux Server using the Windows hostname.

I would prefer to ping the Windows Server by hostname without creating an entry for the Windows server under /etc/hosts file. Is there a way to do the same ?

share|improve this question
up vote 0 down vote accepted

Are you using the netbios name or the fully qualified domain name? If you want to use netbios names your going to need to specify a 'search domain' in your /etc/resolv.conf file. For example if you have a machine '' and want to access it by just giving 'dev' you would need to add the following line to your /etc/resolv.conf file:


You will also want to make sure that /etc/resolv.conf contains the correct DNS servers.

share|improve this answer
That did the trick. I didn't have to change my DC to static IP. Thanks a bunch. – user24715 Nov 3 '09 at 11:43

What server does the linux box use for DNS? (check /etc/resolv.conf)

If you give it the IP of the Windows DC then it should work. However, that requires a static IP for the DC.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.