Solved

How to detect a virtual network name

Posted on 2008-06-17
8
420 Views
Last Modified: 2011-09-20
I'm looking for a way to determine if a host name is actually a virtual name. For example if you have a two node cluster where the following network names and IP addresses are used:

Node1   192.168.10.5
Node2   192.168.10.6
and the cluster name and IP:
Cluster  192.168.10.10

'Cluster' is a virtual name that point to the node where the quorum is located at any given time.
If you browse the network you get back all three names. I'd like to know if there is a way to determine if the host name is a 'real' host name or a virtual name.
Of course you don't have to use clusters to have virtual names. You can have the same thing with exchange on a single node.
0
Comment
Question by:softbreeze
  • 3
  • 3
  • 2
8 Comments
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 21811219
what does this give ?
ping 192.168.10.5 /a
ping 192.168.10.6 /a
ping 192.168.10.10 /a

0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 21811233
shoud have been
ping -a 192.168.10.5
ping -a 192.168.10.6
ping -a 192.168.10.10
0
 
LVL 1

Author Comment

by:softbreeze
ID: 21811775
'ping -a' resolves address to host name. Since the virtual name is in DNS the ping -a will return the virtual name when it's IP is ping'd. Therefore 'ping -a' will not answer my question. It looks like the virtual ip is added to the network interface along with the hosts ip and the names are added to DNS. I don't believe that programmaticly you can identify virtual names. Currently I can figure this out on a cluster node by examining the registry. It would be easier if the cluster api was ported for Delphi.

Thanks for your suggestion though.
0
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 21812126
open the registry on that ip address ...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 18

Expert Comment

by:Johnjces
ID: 21813175
Simply put, you can't.

Using the MS Clustering solution (poor) and also now using Marathon virtual clusters (good) and believing you have a good understanding of clustering, you should understand why.

In a cluster or virtual cluster,  there is of course added software to the OS and added stuff in lan manager which allows a virtual IP to be assigned to a virtual PC name. This name could be resolved through the lmhosts or dns or through NetBeui/NetBIOS and the TCP protocol via standard broadcasts and of course being handled by your master browser and/or WINS.

There is no added packet or signifying bit advising that this broadcast is virtual. It is all standards based. Google NetBIOS protocol as an example. The master browser does not know and the only "thing" that could know would be the human who set it up or administers the cluster.

Another example might be to run a virtualized XP OS on Vista. One can set up a different host name and IP, and both are visible to the LAN.

Simply, there is no difference in how a virtual server, cluster server etc, broadcasts its NetBIOS name.

John
0
 
LVL 1

Author Comment

by:softbreeze
ID: 21813447
I fully understand clusters and understand how it broadcasts it NETBIOS name. Virtual Names and IPs are not limited to clusters, as my initial question stated. Geert's comment got me thinking in a different direction, which is what I needed. I have a little over 100 servers that are all in Active Directory. I have a SQL stored procedure that queries the AD Database and returns all the computer accounts along with some of the properties. Since Cluster virtual name and Exchange virtual name can and do (based on version) show up as computer accounts, I needed a way to distiguish between them and the real computer accounts.

In the registry at
'HKLM\System\CurrentControlSet\Services\tcpip\Parameters\DNSRegisteredAdapters\{GUID}'.
The Key 'HostName' is the host name of the computer, not the virtual name. So you can match the host name from the Active Directory list and determine if the name is a virtual name or a 'real' host name.

If you match the {GUID} at
'HKLM\System\CurrentControlSet\Services\tcpip\Parameters\Interfaces\{GUID}' you can get the IPAddress of the registered adapter as well.

Maybe this is not the best solution but it works for me. Thanks Geert
0
 
LVL 1

Author Closing Comment

by:softbreeze
ID: 31468041
I've worked on this for a long time and never thought to try this. Thanks again for getting my brain directed in a new direction.
Ken
0
 
LVL 18

Expert Comment

by:Johnjces
ID: 21813493
Outstanding! I thought you were after some form of remote "socketized" or IP method for determining such.

Good luck!

John
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

20 Experts available now in Live!

Get 1:1 Help Now