Why does VNC connect to the wrong computer on my network?

When trying to connect to a computer on my network using TightVNC, UltraVNC or any other VNC I have always been able to connect using the computer name rather than by IP address.  Over time, I have been having issues where trying to connecty to some computers by computer name it will connect to a different computer on my network that is named something else. If I try to connect to the same computer using the IP address, it will connect to the right computer.  

Has anyone experienced the same issue or know why connection by computer name is taking me to a the wrong computers?


1st Computer Name / IP: danielsj
2nd Computer Name / IP: esbinterview

trying to connect to "danielsj" actually connects me to "esbinterview"

Things I have tried:
1.  Uninstalled / Re-install VNC software
2.  Flushed DNS on affected computers
3.  Reset TCP/IP on affected computers using: netsh int ip reset log.txt
4.  Removed / Re added danielsj from the domain and active directory computers
5.  Physically removed the computer danielsj from the network and loaded a different computer named as danielsj (danielsj still takes me to esbinterview)
Who is Participating?
SimplyRickConnect With a Mentor Commented:
No problem and totally understandable.

Maybe someone more enlightened will come to save the day. :-) But I'll take some more guesses and if you want, you can see if they work.

I'm assuming if you ping the host name, you also get the wrong IP address returned? Considering you've done just about everything you can do to fix an problems on the computers locally (reset TCP, flushed DNS etc..), this suggests it isn't isolated to just those computers. Rather, rather your DNS server (your router or domain server) could be to blame. Using Wireshark might be a good way to see what's going on under the hood. You can filter NetBIOS traffic only and see what kind of name resolution requests/replies you're getting and from where.

If the problem does stem from your router or DC (if you even have a domain controller), then you may need to shift your focus on fixing the problem there at the source. Something I'm curious about is what options are selected for resolving NetBIOS names? Under TCP/IP options on your Windows clients' network adapter settings, is NetBIOS over TCP/IP selected, or NetBIOS over DHCP? If you have DHCP selected, I could definitely see how the router could be at fault. In such a case, a quick router restart should at least temporarily resolve the issue and if it does, then you know where to troubleshoot. http://www.surfbouncer.com/images/netbios-tcp-ip.gif

If you have a domain controller setup the workstations should be using it as a DNS server too. It may be handing out the wrong NetBIOS information as well. So this is worth checking too and a ping to your NetBIOS names should reveal the right addresses. If they don't, then perhaps your DC is actually the problem.

I did read that resetting the windows catalog might fix this kind of issue. I'm skeptical, but perhaps it is worth a shot:  NETSH WINSOCK RESET  at the command prompt and restart. It won't hurt to try as I don't have many ideas. If I think of anything else, I'll respond again... but until then... Best of luck!
It sounds like you're already pretty familiar with computers, but how NETBIOS names are resolved on a Windows-based network without a domain configured tend to be somewhat peer-to-peer. DHCP is part of the problem here - computers only lease IP addresses for a short time before they are given new ones. I think when this happens, your Windows host names are still mistakenly assumed to be at the old addresses because of cacheing.

You can troubleshoot this by using the nbtstat utility in the command line prompt. nbtstat -c   -- for example -- will show you cached NetBIOS names for Windows clients/servers that you've connected to. You can clear your cache by issuing a nbtstat -R which should clear the problem.

It's more of a workaround, but making a batch script that clears your NetBIOS cache ( nbtstat -R ) and launches VNC should address your issue.

A permanent solution would be to use static IP addresses on your network for computers you plan on VNCing too and for added reliability, adding hosts entires for each of the network computer names/addresses.
DDPaLAuthor Commented:
I tried troubleshooting using the nbtstat utility as suggested and did not notice anything unusual.  I cleared the cache anyhow and was still not able to yield any different results when trying to connect.  I read into NETBIOS here: http://articles.techrepublic.com.com/5100-10878_11-5034239.html
and still trying to connect to danielsj takes me to esbinterview.  
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Would you mind posting the output from an "ipconfig /all" in command prompt? It may not be relevant to the final issue, but knowing your network configuration should be of some help.
DDPaLAuthor Commented:
Unfortunately I cannot.  We are a government agency and as harmless as it seems, it would stir up conflict with other personnel.
1) Does ping correctly work by name ?

If yues, then the problem is stored machines in VNC itself.

In VNC, I would delete all the machines you have accessed in the past, and start from scratch.

I hope this helps !
DDPaLAuthor Commented:
When I ping danielsj I get the IP address of which is what DHCP has given esbinterview.  I have just tried setting the ip addres of esbinterview to a static address of something else and when I ping danielsj it still tries to ping but fails to yield any pings.  

I'm leaning towards the domain controller and will try some of your suggestions tomorrow.
It definitely sounds like a DNS issue.

You need to check your DNS and see what is going on.  Perhaps the DHCP is not updating the DNS  ( DDNS )

Is this a native or mixed Domain ?

DDPaLAuthor Commented:
I ran nslookup several times in command prompt and each time returned a different name.  danielsj, car14cfpd, williamspc all associated with

I ran nslookup several times in command prompt and there were 2 different names danielsj, esbintervew associated with

On the DC - Forward Lookup Zones I found:
Name: daniels Type: Host (A) Data:
Name: esbinterview Type: Host (A) Data:

On the DC - Reverse Lookup Zones I found:
Name: Type: Pointer (PTR) Data: car14cfpd
Name: Type: Pointer (PTR) Data: danielsj
Name: Type: Pointer (PTR) Data: williamspc

Name: Type: Pointer (PTR) Data: car15cfpd
Name: Type: Pointer (PTR) Data: esbinterview
Name: Type: Pointer (PTR) Data: fdinsp1

Name: Type: Pointer (PTR) Data: danielsj
Name: Type: Pointer (PTR) Data: esbinterview

Tomorrow morning we plan on restarting DC1 and DC2.  Any chance that might clean up this mess?
I would check the DNS server and see what is happening there. Either DDNS is not working or there are other issues.

also do a DNSlint, netdiag and DCDIAG to verbose log files

Run dcdiag, netdiag and repadmin in verbose mode.
-> DCDIAG /V /C /D /E /s:yourdcname > c:\dcdiag.log
-> netdiag.exe /v > c:\netdiag.log (On each dc)
-> repadmin.exe /showrepl dc* /verbose /all /intersite > c:\repl.txt
-> dnslint /ad /s "ip address of your dc"

Description and download for dnslint

Ref: http://www.techtalkz.com/windows-server-2003/459203-ntds-kcc-1308-a.html

DDPaLAuthor Commented:
Thanks everyone for your help, I haven't had a chance yet to resolve the issue but I'm confident that the issue is with Scavenging on the DNS sever.  I'll run Scavenge Stale Resource Records next week and then setup scavenging.  
DDPaLAuthor Commented:
Suggestions pointed me in the right direction of the Source of the issue. The DC.  I researched a great deal on NetBios and how DHCP works with the DC and discovered Scavenging to cleanup stale resource records.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.