"ping winpc" resolves to wrong ip address

I have a Suse 11.2 machine named “susepc” on a network with some other windows machines. From the Suse 11.2 machine, I try

ping winpc

where winpc is the name of a windows machine on the LAN but the name resolves to an odd ip address:

PING winpc.HOMENET (72.215.225.9)

The “HOMENET” is the correct name of the windows workgroup, but the ip address is completely wrong. My LAN is based on 10.20.x.x and the winpc ip address should be 10.20.0.100. I can “ping 10.20.0.100” and it works correctly.

Some things:

  • DHCP server is on the router
  • pinging from winpc to susepc works perfectly (“ping susepc” resolves to the correct IP address 10.20.0.101 and the pings respond)
  • “net view” on winpc lists the susepc
  • SAMBA is installed on susepc
  • the Netbios name is set to susepc
  • I have a shared folder on susepc that I can see, create files in, etc. on winpc with no problems.
  • IPV6 is disabled on susepc
  • I have tried setting up susepc as a WINS server (Wins Support)
  • I have tried setting up susepc as a Local Network Browser

Not sure what else to try. Any ideas?

Thanks in advance,
John

NetBIOS names are in a separate namespace from domain names. winpc appears to be only a NetBIOS name. You could try adding winpc to /etc/hosts.

To simplify the problem I said there’s only one windows pc (winpc), but there’s actually more than one (under a dozen).

I’d prefer not to maintain the /etc/hosts manually. I’ve done that in the past and it becomes a big pain to keep everything straight. And besides, Samba, WINS and Netbios are there to manage all of the names!

Hi
Have a read through swerdna’s howto’s should help you.
http://opensuse.swerdna.org/index.html


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 6 days 16:36, 4 users, load average: 1.31, 1.02, 0.67
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Another piece of data. I did:

nmblookup -f winpc

followed by

ping winpc

and it’s working! In fact the ping is working for all the windows PCs now.

Does this make sense to anyone? I’d like to understand what I did so I can make it work again if it ever fails!