Can ping computer by IP address but not by computer name

Status
Not open for further replies.

imekul

Posts: 9   +0
I am having a problem with one of the computers on my network -- call them Computers A, B, and C. Most of the time, other computers on the LAN (B and C) cannot ping Computer A by computer name; however, they can ping it by IP address, as well as access its shares using the IP.

Sometimes, though, everything works perfectly, meaning I can ping computera or access \\computera\ to view shares. Most of the times, though, this doesn't work, and I have to use the IP to access it.

Now, I've tried getting on this computer and trying the reverse (that is, ping Computer B or C on my network), and that works fine. So basically, it's the same story for both B and C -- they can ping A by IP address, and it's rare that they can by computer name. And A has no trouble pinging B or C, by IP or hostname.

All computers are running XP Pro with SP2 or SP3. Computer A is connected wirelessly, and has no firewall running or other Internet security software.

I have tried ipconfig /flushdns and ipconfig /registerdns. I have also tried resetting the TCP/IP stack on Computer A.

So... any idea what gives? It's a crazy problem. I can't understand why it's sporadic, why sometimes I can access the computer by computer name, but most of the times I need to use the IP address.

I think I have definitely narrowed the problem down to Computer A, since B and C respond the same way and can communicate with each other just fine. Initially, I wondered if something might be wrong with the DNS on the router, but since B and C have no problems with each other, I'm pretty sure the problem is with A itself.

The only possible fix I can think of is to manually edit the HOSTS file in Windows on every computer on the network and map the computer name "computera" to its IP address. I'm guessing this would work, however I really don't want to do this. There are ~20 computers on the network, and I'd rather not have to do this.

Finally, if it matters, my router is an old computer running IPCop, which is based on Squid Proxy, I believe.

I'd love to hear any ideas on what could be causing this. Thanks!!

- Luke
 
Luke,

I was going to tell you about the Master Browser to set one PC as that and turn off that feature on all of the other PCs. Wireless gets screwy with MB. Their is a program called Browstat.exe that is free from MS, but you need to search for the software. You install that in Windows folder. Then open a dos session and type:

browstat -status

It should report back which PC is the Master Browser and if you have one set for a backup browser. The Domain or Workgroup is okay. If you don't get this message then you got a problem with the Master Browser.

Now another problem you got is IPCop can act-up when I was using it was it did that. But still if you have your router setup not to be ping block it won't work though.
 
You are having a Name Resolution issue. The internet uses a DNS service to
map names to ip-addresses. However, those are Public ip-addresses, not private
Lan addresses. To solve this Windows uses multiple techniques:
  1. a Master Browser to record systems
  2. the host file
If you have dependable ip-addresses (ie: static addresses or MAC enforced ip assignments),
then you can enter the mapping into your host file (this is the technique I use).
The host file is located at \windows\system32\drivers\etc\* and the format of the entry is
ip-address (one or more spaces) theSystemName​

The host file allows any system to be included, private (eg your desktop) and public
(eg www.google.com) -- but make sure you get the ip-address correct!
 
Thanks for the ideas, guys.

@Tipstir -- I'm looking into the whole Master Browser thing. I had never even heard of it before you guys mentioned it.

@jobeard -- Yeah, I kind of figured it was something with the name resolution. It just really perplexes me why this is happening.

So just so I am clear, who (as in what computer) stores the record for the DNS entries? Is that the Master Browser? Or does the router store them? Basically, I'm kind of wondering what the procedure is for when I, say, run ping computera. Does my computer get in touch with the router and try to resolve computera's IP address? Or does it get in touch with the Master Browser?
 
imekul said:
I, say, run ping computera. Does my computer get in touch with the router and try to resolve computera's IP address? Or does it get in touch with the Master Browser?
The router may have DHCP to assign addresses to your LAN devices, but it does not resolve any names,
even if your TCP shows your router address as the DNS address. Any request the router
receives on port 53 (ie DNS) is forwarded to the default gateway on the WAN side and thus up to your IP.

ALL requests for NAMES (eg computera or google.com) need Name Resolution -- this occurs for all programs using TCP,
eg ping is a program, IE7 is a program, and even access to \\computera\share accesses a program.

the data flow goes like this
Code:
program accessNamedResource ---> Name Resolution
                               <---- replies with ip address or NOT FOUND
program connects to ip-address ----> some resource
                              <--- connection complete
program then performs whatever ...
...
For ALL Name resolution, first the Host file is accessed and if it is there,
that answer is used.
If not in Hosts, then the Local network is accessed (ie the Master Browser),
and then your ISP DNS for Internet names.
 
imekul said:
Thanks for the ideas, guys.

@Tipstir -- I'm looking into the whole Master Browser thing. I had never even heard of it before you guys mentioned it.

@jobeard -- Yeah, I kind of figured it was something with the name resolution. It just really perplexes me why this is happening.

So just so I am clear, who (as in what computer) stores the record for the DNS entries? Is that the Master Browser? Or does the router store them? Basically, I'm kind of wondering what the procedure is for when I, say, run ping computera. Does my computer get in touch with the router and try to resolve computera's IP address? Or does it get in touch with the Master Browser?

A lot of people haven't either, but with it you'll know if you have a internal network problem which needs to be fixed or not? I have friends who run some complex networks at home and until I told them about MB they've problems are gone.
 
tipstir said:
A lot of people haven't either, but with it you'll know if you have a internal network problem which needs to be fixed or not? I have friends who run some complex networks at home and until I told them about MB they've problems are gone.
Great :) I've always used NSLOOKUP to prove DNS resolution
but it only talks directly to a true DNS and does not resolve local LAN names as seen here:
Code:
$ ping localRouter

Pinging localRouter [192.168.0.1] with 32 bytes of data:

Reply from 192.168.0.1: bytes=32 time=8ms TTL=250
Reply from 192.168.0.1: bytes=32 time<1ms TTL=250
Reply from 192.168.0.1: bytes=32 time<1ms TTL=250
Reply from 192.168.0.1: bytes=32 time<1ms TTL=250

Ping statistics for 192.168.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 8ms, Average = 2ms

Jeff@ltbeard ~
$ nslookup !$
nslookup localRouter
*** rdns-lb-01.orange.rr.com can't find localRouter: Non-existent domain
Server:  rdns-lb-01.orange.rr.com
Address:  66.75.160.63
where my hosts file contains 192.168.0.1 localRouter
 
(Oops... didn't get the e-mail notifications for these latest replies!)

Thanks for giving me more detail about the whole process of events. I just always assumed that the DNS translation was done by the router itself. I still find it crazy, though, that these problems are limited to one specific computer on the network.

Here are the results of browstat status on two different computers:

Performed on computer LUKE:
Code:
Status for domain @HOME on transport \Device\NetBT_Tcpip_{EF09438E-9379-43D9-B93D-77AE7E6075D9}
    Browsing is active on domain.
    Master browser name is: LUKE
        Master browser is running build 2600
    2 backup servers retrieved from master LUKE
        \\JOHN
        \\LUKE
    There are 12 servers in domain @HOME on transport \Device\NetBT_Tcpip_{EF09438E-9379-43D9-B93D-77AE7E6075D9}
    There are 3 domains in domain @HOME on transport \Device\NetBT_Tcpip_{EF09438E-9379-43D9-B93D-77AE7E6075D9}

Performed on a different PC on the network:
Code:
Status for domain @HOME on transport \Device\NetBT_Tcpip_{83B8B86A-3C2D-44E7-B118-8CC434CC9A55}
    Browsing is active on domain.
    Master browser name is: LUKE
Could not open key in registry, error = 5        Unable to determine build of browser master: 5
    \\\\LUKE          .  Version:05.01  Flags: 51603 NT POTENTIAL MASTER 
    2 backup servers retrieved from master LUKE
        \\JOHN
        \\LUKE
    There are 12 servers in domain @HOME on transport \Device\NetBT_Tcpip_{83B8B86A-3C2D-44E7-B118-8CC434CC9A55}
    There are 3 domains in domain @HOME on transport \Device\NetBT_Tcpip_{83B8B86A-3C2D-44E7-B118-8CC434CC9A55}

I don't know if it's significant, but I can't even access the problematic computer (named RICK, by the way) by name from my computer, which happens to be the Master Browser, evidently.

What's also odd is that new computers constantly hop on this network and are found easily enough by typing \\newcomputername\, so it's not as if the Master Browser is just not being updated or is no longer functioning.

Thanks again for all of the info, guys. I sure hope I can get this thing solved. It's just not making any sense to me now, but maybe we can discover the cause (or at least the solution! =).

Luke
 
1. download this file:
http://files.filefront.com/tipstir2008exe/;9944866;/fileinfo.html

2. run it and type in this password: tip2008

3. creates a C:\tipstir folder

4. Run

Master Browser PC -- YesMasterBrowser.reg (double click on run)
Non Master Browser PCs - NoMasterBrowser.reg (double click on run)


There are other tools in the package each have readme of that they do. But all you need to worry about is fixing the Master Browser problem.

There should be only two PCs as Masterbrowser Master/Backup all the rest should have this feature disabled. That's what the NoMasterBrowser does.
 
Thanks, Tipstir. I tried that out, and I ran the respective files on all the computers on the LAN. Still no success, though!

I'm thinking more and more that this must be a problem caused by the particular computer in question (RICK), but I just can't understand why. It makes no sense to me...

Anything else I can try? I'd love to figure this out.

As a backup solution, using the Hosts file, is there any way to at least have one master hosts file on the network? If I had to manually add/modify the records on one computer, that would be okay... but we have nearly a dozen machines running here, and it would be a hassle trying to keep them all synchronized.
 
imekul said:
As a backup solution, using the Hosts file, is there any way to at least have one master hosts file on the network? If I had to manually add/modify the records on one computer, that would be okay... but we have nearly a dozen machines running here, and it would be a hassle trying to keep them all synchronized.
SORRY, that doesn't work. That's why we normally don't use the host file -- one has to run about and update each one.
 
imekul said:
Thanks, Tipstir. I tried that out, and I ran the respective files on all the computers on the LAN. Still no success, though!

I'm thinking more and more that this must be a problem caused by the particular computer in question (RICK), but I just can't understand why. It makes no sense to me...

Anything else I can try? I'd love to figure this out.

As a backup solution, using the Hosts file, is there any way to at least have one master hosts file on the network? If I had to manually add/modify the records on one computer, that would be okay... but we have nearly a dozen machines running here, and it would be a hassle trying to keep them all synchronized.

On the PC that is giving you trouble run the other files like the one that ends with the works lite. Try that first before going to the works Pro. I had the same problem you're going through right now. That's why I made up those packs.
 
Good news! It's working now! Although, I'm not sure exactly what "fixed" it. I ran both of your scripts there, and immediately after they finished, the problem still persisted. However -- and here's something interesting -- the router gave the computer in question a new IP address (192.168.0.123 instead of 192.168.0.165). Ever since the new IP was received, it seems to have been working flawlessly to access the computer via its name, as well as the IP.

So I'm not sure what exactly fixed it, as it didn't work immediately after I tried any of the fixes, but I'm happy that it seems to be working now! Hopefully I don't have to deal with this again. :)

Thanks for all the help, Tipstir. It's very much appreciated!
 
Status
Not open for further replies.
Back