Solved

ping of netbios name does not resolve to correct IP address

Posted on 2007-11-19
8
2,302 Views
Last Modified: 2013-12-23
Old Windows NT domain
Windows XP Pro workstation

I have a client that was trying to add an ODBC source on their XP Pro PC.  Whenever the tried to connect it failed.  I noticed that they were trying to connect to a standalone server that is on this network.  The server name is ERP1.  It has an internal IP Address of 192.168.1.6.

When I ping that server's netbios name (erp1), it resolves to an IP address that is not on our private network.  The ping goes on the internet and finally resolves to a 65.x.x.x address, which is our service provider.  I assume, for some reason the IP Address for ERP1 can NO T be found internally, so it is trying to resolve it elswhere.

I'm a little rusty on NT server configuration, so I tried some things on the XP Pro computer.

I added a line to an LMHOSTS file I created.
192.168.1.6 ERP1 #PRE

This seemd to solve the problem on one computer but the next day it did NOT work again.  This did NOT solve the problem on the original user's PC.

I also tried adding, in TCP/IP settings/advanced, the WINS server address.  Unfortunately, this did not help either.

Any suggestion would be appreciated.
0
Comment
Question by:yeller
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:eulac
ID: 20313097
try adding the line
   192.168.1.6 ERP1
in the winxp client
    c:\WINDOWS\system32\drivers\etc\hosts
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 20313172
Do you have an internal DNS server? If so add its IP to the network adapter as the first DNS server rather than the ISP's DNS. If this is a 2000/2003 domain (you mentioned NT) you should only use your DNS server, and the ISP only added as a Forwarder in the server's DNS.

LMHosts is usually used for NetBIOS names as you have done. Hosts is usually for DNS names. Odd that it would loose that, unless you have antispyware that is overwriting the LMhosts and Hosts files.
0
 

Author Comment

by:yeller
ID: 20313299
eulac,  I don't think adding the line
   192.168.1.6 ERP1
in the winxp client
    c:\WINDOWS\system32\drivers\etc\hosts
will help.  Hosts is usually for DNS names.
0
 

Author Comment

by:yeller
ID: 20313313
RobWill,

I do use Spybot, but it did NOT overwrite my LMHosts file.  It still contains:  192.168.1.6 ERP1 #PRE.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 77

Expert Comment

by:Rob Williams
ID: 20313328
From an earlier post of mine:
To check your LMHosts file entries are accepted at a command prompt enter
  nbtstat  -R
which will purge and reload the local name cache
then enter
  nbtstat  -c
to display the current name cache which should include your LMHosts file entries.
Note; the nbtstat "switches" R & c are case sensitive.
The names will only show up if you used the 'PRE' option, or if not, if you have used the name with a ping or similar command enabling them to be cached

There are a few oddities with the file, have a look at the following:
-Lmhosts file is useful for NetBIOS name resolution where other solutions are not available.
-LMHosts is located in the Windows directory under c:\Windows (or WINNT)\System32\Drivers\Etc\LMHosts.sam , instructions are included within the file. Any line starting with # is just a comment and is ignored. Open the file with Notepad and add entries for your computers as below;
192.168.0.101      CompName       #PRE
-Hit enter when each line is complete (important), then save the file without a file extension. To be sure there is no extension ,when saving enclose in quotations like "LMHosts".
-PRE has to be capitalized, however you do not need it, though should give you faster resolution where it is "pre-loaded"
-use a Tab between entries in a line rather than spaces (recommended but not necessary)
-if adding the domain and or domain controller the # of spaces used is even critical. See:
http://support.microsoft.com/kb/q180094/

0
 

Author Comment

by:yeller
ID: 20313472
RobWill,  I ran your commands.  Here are the results of nbtstat -c

Local Area Connection 2:
Node IpAddress: [192.168.1.101] Scope Id: []

                  NetBIOS Remote Cache Name Table

        Name              Type       Host Address    Life [sec]
    ------------------------------------------------------------
    DB02           <00>  UNIQUE          192.168.1.2         2
    ERP1           <03>  UNIQUE          192.168.1.6         -1
    ERP1           <00>  UNIQUE          192.168.1.6         -1
    ERP1           <20>  UNIQUE          192.168.1.6         -1
    SDP            <1C>  GROUP           192.168.1.2         600

I can see ERP1 but when I ping it it still resolves to a 65.x.x.x.
Any ideas?
0
 
LVL 77

Accepted Solution

by:
Rob Williams earned 250 total points
ID: 20313671
Very interesting.
What does the following show:
   ipconfig /displaydns
If it shows anything related to ERP1 run:
   ipconfig /flushdns

Do you have an internal DNS server?
Is this a domain?
Name resolution sequence of methods varies with the network configuration but the host and lmhost files usually precede DNS.
If it is a domain try adding the FQDN to the Hosts file as well such as:
192.168.1.6  ERP1.MyDomain.local

You can also add the domain to the LMHosts file:
10.0.0.1   PDCNAME #PRE #DOM:DOMAIN_NAME
 10.0.0.1   "DOMAIN_NAME    \0x1b"   #PRE
See: http://support.microsoft.com/kb/314108/EN-US/
Read carefully the notes about spacing.
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 20337167
Thanks yeller. I hope you were able to get it sorted.
Cheers !
--Rob
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

863 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

24 Experts available now in Live!

Get 1:1 Help Now