Google Answers Logo
View Question
 
Q: computer name resolution on Windows XP/98 (NETBios? WINS?) ( Answered,   2 Comments )
Question  
Subject: computer name resolution on Windows XP/98 (NETBios? WINS?)
Category: Computers > Operating Systems
Asked by: rakesh-ga
List Price: $10.00
Posted: 16 May 2002 09:52 PDT
Expires: 23 May 2002 09:52 PDT
Question ID: 16597
I have a home network and each PC on my network is running Windows XP.
 One machine is running Windows 98.  Each machine has a Computer Name
set in Windows -- HOMEPC1, HOMEPC2, and HOMEPC3.  Each machine is
running a web server on port 80.  When I enter HOMEPC1 in the Address
bar of the web browser on any machine, I am taken to the web server
running at that machine -- ie somehow that Windows Computer Name is
resolved, from any PC on the network, to its corresponding IP address
(which is how the web browser gets to the web server on the right
machine).  How does
this resolution take place and how can I give a PC more than one such
name (ie I want for the first machine to have the name HOMEPC1 and
MUSIC)?
Answer  
Subject: Re: computer name resolution on Windows XP/98 (NETBios? WINS?)
Answered By: netcrazy-ga on 16 May 2002 11:11 PDT
 
Hi Rakesh,
This is a simple question with a simple answer. What you are looking
for is DNS name resolution and "Name-alias based virtual hosting"
where you've single IP and multiple dns names.

To find out more about DNS name resolution, check this site:
http://www.j51.com/~sshay/tcpip/dns/dns.htm

A detailed info on DNS resolution is over here:
http://rute.sourceforge.net/node30.html

I'm assuming that you are using IIS webserver here. Basically you'll
have to make changes at your webserver level for assigning multiple
names to a single IP.

For IIS, check this out
[http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/core/iinmres.htm].
It clearly explains about how the resolution is done and how different
names can be assigned to a single IP.

The FAQs on using IIS Host Headers:
http://www.serverautomationtools.com/iisfaqs/2.html

HOW TO: Use Host Header Names to Host Multiple Sites from One IP
Address in IIS 5.0
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q190008

How can I host multiple Web sites by using a single Internet Protocol
(IP) address?
http://www.jsifaq.com/SUBI/tip4400/rh4484.htm

This doc gives info about setting up a Home network with XP.
http://www.microsoft.com/windowsxp/pro/techinfo/administration/homenetbridge/default.asp

For iPlanet webserver, check this one:
http://docs.iplanet.com/docs/manuals/enterprise/41/ag/escontnt.htm#1025402

Search strings used:
dns name resolution
://www.google.com/search?q=dns+name+resolution&hl=en&lr=&start=10&sa=N

how to assign multiple dns names to a single IP
://www.google.com/search?hl=en&lr=&q=how+to+assign+multiple+dns+names+to+a+single+IP

I hope this will clarify your query.
Regards,
netcrazy

Request for Answer Clarification by rakesh-ga on 17 May 2002 13:21 PDT
I'm looking for a solution that doesn't require any additional
configuration on other PCs on the home network.  This requirement
rules out the LMHOSTS file and it rules out the use of a DNS server.

LMHOSTS won't fulfill my requirement because then the new name would
need to be inserted into the LMHOSTS file on each PC.

DNS server won't work because then each host PC would need to be
reconfigured to point at the DNS server for DNS resolution.

NetBIOS over TCP/IP (NETBT) is how your PC's Computer Name gets
resolved to an IP address from any machine on the home network (the
machine looking for an IP address for any name entered sends out a
broadcast asking for a system with that name and the NETBT component
on that other system responds to the request with its IP address).

So it seems that to achieve what I want to achieve, some modifications
to the NetBIOS over TCP/IP will be required.

Clarification of Answer by netcrazy-ga on 19 May 2002 14:48 PDT
Hello Rakesh,
Sorry for the confusion. 
I again checked for this over net and found that one PC can be
assigned only one name if you don't want to make any setup changes.
But if you want slight changes, then as browolf-ga gave in the
comments that LMHOSTS is the best and easy solution w/o adding any
costs to your budget.

Check this one out.
http://www.ehsco.com/reading/19960915ncw1.html
It gives details about NBT and many other things related to NetBios.

As you wrote in your comments that you even don't want to go for
lmhosts as you'll have to update each PC in your network but to ease
this job, you can write a small script and this you can run whenever
you make any changes to your lmhosts file. This script will then
update you lmhost file on other PCs in your network.
I hope this will give you a solution to start with.

Feel free to ask if you are still in doubt.

Regards
netcrazy-ga
Comments  
Subject: Re: computer name resolution on Windows XP/98 (NETBios? WINS?)
From: browolf-ga on 16 May 2002 14:04 PDT
 
This has nothing to do with dns.
You are mixing up the abilities of dns and netbios. The homepc1 etc 
are the "computer name" which is part of the network setup. These have
to be unique and a computer can not have more than one.  Computers
find each other on a network by using Netbios. Home variants of
windows do not contain dns servers and there isnt really any reason
why you would install one.

Domain names are not computer names. The computer name is a unique
windows identifier necessary when networking computers.
The computers on this network are using netbios to resolve the
computernames.
I'm dont know much about the actual working of netbios but a website
on a computer can be loaded by 4 means. the network ip address,
127.0.0.1, localhost and so it seems the computername. obviously from
a different computer on the network you can only use the ip address
and the computername.
I think netbios is applied ontop of TCP/IP in someway. i think this
because on my network at work (which doesnt have any dns capabilities)
I can do either of these in dos:

dir \\cache\c$ or dir \\192.168.0.1\c$

looking on the technet cd i have, it sometimes refers to netbios over
tcp/ip
so clearly netbios is linked to tcp/ip.

info about name resolution:
http://nameresolution.tcp-ip.nu/
i think in your case i think it either uses the net bios cache or
queries the network

Netbios cache
http://netbiosnamecache.tcp-ip.nu/

how netbios works:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/reskit/prjj_ipa_jhzw.asp



======================
So the answer to the question is resolution takes place using Netbios
over TCP/IP in the manner described in the above articles. A computer
can not have more than one computer name.

However, there is a hosts file somewhere on the drive. i think it is
called hosts.
with this you can give the computers on your network madeup domain
names. In the file you write the domain name you want and the ip
address of the appropriate computer. All the computers need a copy of
the file and it has to be the same. Then you can use these domain
names in the browsers and the computers know how to resolve them.
These domain won't work on the internet. it's purely for internal
usage.

I will try and find our hosts file. i got it. it is called "hosts."

here are our contents:
127.0.0.1       localhost
192.168.0.4     lsahtc_nt1
192.168.70.1    lsahtc_nt2
192.168.0.4     intranet.lsahtc.net
192.168.0.1     cache.lsahtc.net

that's it. it's a text file, so you can edit it with notepad. I think
you will have one already. a sample one.

hth

browolf
Subject: Re: computer name resolution on Windows XP/98 (NETBios? WINS?)
From: chrismbg-ga on 16 May 2002 15:39 PDT
 
If you're running Windows 95/98, HOSTS is located in C:\Windows (or
whatever folder you installed Windows to) and if you are running
Windows NT/2000/XP it will be located in
%Systemroot%\System32\Drivers\etc. %systemroot% is c:\winnt for
NT/2000 and C:\Windows for XP by default.

When you edit a HOSTS file, you are substituting for DNS, i.e. if DNS
can't resolve a name it looks at the HOSTS file before it gives up. If
you add to the LMHSOTS file, when NetBIOS names are attempting to be
resolved Windows looks at the LMHSOTS file last. Either way will work.

I suggest if you are adding second names purely for web server access
to use HOSTS. If you are going to use a second name for file/print
sharing, edit LMHOSTS and add (example)

10.1.1.1   MyHost   #PRE

#PRE tells it to pre-cache the name. If you don't see it right away go
to a command prompt and type 'nbtstat -R' without the quotes.

Happy networking :)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy