1

I have an instance of CentOS running in VMware on a Windows Server 2003 machine on my home network.

CentOS hostname: varia
Windows XP hostname: friend

From my Windows XP machine I am unable to ping the CentOS instance by its hostname. I can only ping it by IP address.

From my Mac I am able to ping the CentOS instance by its hostname.

From the CentOS instance I can ping my Windows XP machine.

What I have tried so far:

  • The firewall on my Windows XP machine it turned off.
  • There is no entry for this host in my hosts file.
  • I ran ipconfig /flushdns on friend.

When I attempt to ping the CentOS instance I receive the following error:

C:\Documents and Settings\Zachary>ping varia
Ping request could not find host varia. Please check the name and try again.

Update: nslookup varia results:

C:\Documents and Settings\Zachary>nslookup varia
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  192.168.1.1

Name:    varia
Address:  192.168.1.149

The resulting ip address is correct: 192.168.1.149 but pinging is still not possible.

3 Answers 3

1

You need to ensure that Samba, the Linux implementation of Windows' networky stuff, is properly configured and running.

Can you check whether nmbd (part of Samba) is running on the CentOS machine?

In a terminal, the command ps -A will give you a list of running processes.

Also have a look at /etc/samba/smb.conf to make sure it all looks sensible.

Here is a page about setting up name resolution in a mixed environment.

5
  • So, samba wasn't installed. I installed it via "yum install samba" and set my workgroup in smb.conf. I think that's progress but it hasn't yet solved my problem. Brian brings up a good point about my lack of a DNS server so I will try to resolve that first. Oct 23, 2009 at 4:36
  • Samba has nothing to do with the question, which is about getting the hostname of a real XP box recognized.
    – CarlF
    Oct 23, 2009 at 4:38
  • nmbd is part of the samba suite and it is used for NetbIOS in Linux. Therefore if Zack is using NetBIOS/WINS (and if he wasn't he'd know it) Samba is relevant. Whether NetBIOS/WINS should be used is a separate issue.
    – Neal
    Oct 23, 2009 at 9:08
  • In this case Zack has a working home network (presumably a small number of machines), to which he is adding a Virtual Machine. The VM is having trouble joining the existing infrastructure. The broadcast messages and browser elections are not exactly going to swamp the network: therefore I think that in this case the VM should fit in with the rest of the system. I am not saying that WINS is a good system, and would definitely not use it in a proper network, but I think its use is probably ok in this situation.
    – Neal
    Oct 23, 2009 at 9:11
  • Installing samba seems to have done the trick. I also took Brian's advice and explored some of the DNS settings of my router, adding a a domain name. I am able to ping varia from friend now. Thanks very much! Oct 23, 2009 at 16:09
1

How is your DNS setup?

On your Mac is there a search domain set in /etc/resolv.conf?

Normally you have a domain in addition to the hostname. The search option will set that so that it will append the default domain to a bare hostname. I'm not sure that's how it works in windows, but that's how Linux and Mac do it.

For example, inside my LAN I use .home as the domain and run a local DNS server that intercepts all .home requests and maps them to local IPs. My /etc/resolv.conf files have search home in them.

4
  • Almost has to be this, what is the FQDN for all the machines? Oct 23, 2009 at 3:54
  • This is on my home network and I do not have a domain controller (as far as I know). I have three WRT54G routers conntected to each other through the house. Only one of the routers has DHCP enabled as the other routers serve as wireless access points. Could there be a domain I don't know about? Oct 23, 2009 at 4:01
  • Ok, that's why you can't ping. You haven't setup DNS. The samba answer may work for you, but really, you should be using DNS style domains not the abomination that Windows tried to create. Oct 23, 2009 at 4:16
  • 1
    Brian, thank you for your advice. I added a domain name in my router's DNS settings and can ping all of my home PCs using that domain name as a suffix. Oct 23, 2009 at 16:11
0

Windows and Linux operating systems work differently with regards to DNS. With DHCP I believe Windows uses WINS and will not recognize the new Linux node. You can add it to your hosts file on Windows if you want or add the IPs to DNS. Also are you sure the machines are on the same subnet? Give nslookupa try.

4
  • Thanks for the suggestion, I updated the original question with the nslookup results. Oct 23, 2009 at 3:13
  • 1
    Please try to avoid using WINS, do the world a favor. Oct 23, 2009 at 3:54
  • If I disable WINS, what do I use as an alternative? Oct 23, 2009 at 4:02
  • From you Question: Server: UnKnown Address: 192.168.1.1 From other comments it looks like this is a WRT54G which I don't believe updates its DNS from DHCP, but it looks like its returning the correct name of your server. Are you running stock firmware on the router? Oct 23, 2009 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .