Can't access PC by name, but can by IP address

3

2

I'm currently having a problem where my computers B and C can access computer A by name (ie. \\computerA), but computer D cannot use the name.

Computer D can only access A through its IP address (ie. \\192.168.0.xxx).

Computer D is on Windows 10 and A is in Windows XP.

This isn't a huge problem, but I would like to solve it and use computer name always.

timoseewho

Posted 2016-04-22T08:28:32.313

Reputation: 495

How do you have your network setup? also what is Computer C's OS? – NetworkKingPin – 2016-04-22T08:32:00.293

@NetworkKingPin A is connected to the router via cable, B cable, C (Win8) wireless, and D wireless. duDE sorry, but how would i check for that>_< – timoseewho – 2016-04-22T08:55:31.733

Answers

5

You should double check that your Network Discovery is enabled. Here are the steps to turn it on (based on Windows 10):

  1. Go to Control Panel by opening Advanced sharing settings (from Start button).
  2. Type network and open Network and Sharing Center and select Change advanced sharing settings.
  3. Turn on network discovery and Save changes.

See: What is network discovery?

It is also important, when you connect to the network, to choose type of Network location such as: Home, Work, Public, and Domain. Based on this, Windows assigns a network discovery state and appropriate configure your Windows Firewall ports for that state.

Preferably choose Home location, where Network discovery is turned on, which allows you to see other computers and devices and allows other network users to see your computer on the network.

You can change your location, by choosing option in Network and Sharing Center (either Work network, Home network, or Public network).

Network and Sharing Center - Click Work network, Home network, or Public network, and then click the network location you want

See: Choosing a network location

If your computer is visible through \\192.168.0.xxx), then your local network should work, so maybe you just need to re-login to the right Workgroup. If it's all about the name discovery, you should check if your broadcasting IP address matches.


Troubleshooting

In case this still doesn't work, check that:

  • you've disabled any other firewall (for testing purposes, disable temporary your anti-virus),
  • your computer responds to pings from other computers, e.g. in command line (change IP into your relevant computer IPs):

    ping 192.168.0.2
    ping 192.168.0.3
    
  • you're connected to the same network,

  • your IP is within the same range (and your network mask matches),

    This is required for broadcast packets being send to the same broadcasting IP address (e.g. 192.168.255.255).

    All computers must be on the same local network or subnet.

  • computers are within the same workgroup and homegroup (could be not mandatory),

  • check if your computer has file sharing ports open (ports 139 and 445), e.g.

    telnet 192.168.0.xxx 139
    telnet 192.168.0.xxx 445
    

    If telnet is missing, install it via (run as admin):

    dism /online /Enable-Feature /FeatureName:TelnetClient
    
  • you've CIFS File Sharing Support enabled in Windows Features

  • re-login or restart your computer, so your computer can logs into local network

kenorb

Posted 2016-04-22T08:28:32.313

Reputation: 16 795

i'll double check, but it'd make sense if all the pc's couldn't connect to D via its name, but what's happening here is 2/3 of my pc's can – timoseewho – 2016-04-22T08:58:04.327

@timoseewho From my experience, on Windows there was always problem connecting few computers since forever. I never haven't bulletproof steps to fix it. Especially when they're in different major versions. – kenorb – 2016-04-22T09:03:42.660

hehe, would Workgroup make a difference? i think ultimately i may just have to accept that the only way to connect is using its ip;p – timoseewho – 2016-04-22T09:06:02.760

@timoseewho Normally you should see all Workgroups, but to be on safe side, it's better to have the same. I think the most reliable way would be to use ping and telnet to see all the computers have 139 and 445 ports open and the network mask is the same, so they can discover them-self using broadcasting packets. – kenorb – 2016-04-22T09:07:50.867

@timoseewho However you mentioned it works via //IP, so the network is working fine, maybe you just need to login to the network again (the one which is not visible yet) – kenorb – 2016-04-22T09:17:18.507

@kenorb, I notice that I bring my PC to my work office, and I can access it from my laptop using it's computer name; but on my home ISP provided gateway / router all-in-one I cannot. My office is small and we have a similar piece of hardware connecting us all- what else could possibly give? Particularly that is commonly configurable in home wireless-all-in-one routes. – Gus Crawford – 2018-07-31T13:18:17.557

Difficult to say the cause. If you checked all the steps and it doesn't work, consider asking a new question pointing what you've tried so far. – kenorb – 2018-08-01T15:56:16.520

2

A solution that worked for me was to:

add the IP & shared name to the Client Host file

example

192.168.0.100 server

Or as a batch file (run as admin)

@echo off

SET NEWLINE=^& echo.

FIND /C /I "servername" %WINDIR%\system32\drivers\etc\hosts

IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^ 192.168.1.100 server>>%WINDIR%\System32\drivers\etc\hosts

Rem The Line Above is where you add the OP & Server name

Terry Grigg

Posted 2016-04-22T08:28:32.313

Reputation: 17

Adding the ip and server names manually in the hosts file did it for me – Hylle – 2018-10-29T09:27:57.217

Only problem with this is it only works for the one machine the hosts file lives on. Other machines may still have problems depending on the network configuration. – eidylon – 2018-12-23T00:44:31.500

0

One way I was able to resolve this issue is by stopping and starting the computer browser service from services.msc.

  1. Windows + R
  2. Type Services.msc and hit enter
  3. find computer browser service
  4. Stop and start the service.

jatin patel

Posted 2016-04-22T08:28:32.313

Reputation: 1

-2

You may have a DNS issue if it's happening on a Work PC, I would delete your DNS record and then renew your IP address on the Computer.

IT Guy

Posted 2016-04-22T08:28:32.313

Reputation: 1