Solved

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

Posted on 2010-08-24
12
1,212 Views
Last Modified: 2013-11-30
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?

Example:

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

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)
0
Comment
Question by:DDPaL
  • 6
  • 3
  • 3
12 Comments
 
LVL 6

Expert Comment

by:SimplyRick
ID: 33513167
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.
0
 
LVL 1

Author Comment

by:DDPaL
ID: 33514389
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.  
0
 
LVL 6

Expert Comment

by:SimplyRick
ID: 33514588
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.
0
 
LVL 1

Author Comment

by:DDPaL
ID: 33514744
Unfortunately I cannot.  We are a government agency and as harmless as it seems, it would stir up conflict with other personnel.
0
 
LVL 6

Accepted Solution

by:
SimplyRick earned 500 total points
ID: 33515071
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!
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 33515297
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 !
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Author Comment

by:DDPaL
ID: 33515530
When I ping danielsj I get the IP address of 172.16.206.88 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 172.16.206.88 but fails to yield any pings.  

I'm leaning towards the domain controller and will try some of your suggestions tomorrow.
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 33515689
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 ?

0
 
LVL 1

Author Comment

by:DDPaL
ID: 33537121
I ran nslookup 172.16.200.15 several times in command prompt and each time returned a different name.  danielsj, car14cfpd, williamspc all associated with 172.16.200.15

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

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

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

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

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

Tomorrow morning we plan on restarting DC1 and DC2.  Any chance that might clean up this mess?
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 33537587
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
http://support.microsoft.com/kb/321045

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

0
 
LVL 1

Author Comment

by:DDPaL
ID: 33562065
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.  
0
 
LVL 1

Author Closing Comment

by:DDPaL
ID: 33562122
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.  
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now