Problem with network shares

I have a laptop installed with Windows 7 that has problems in accessing network shares. Even if I am able to ping the computers containing the share then I get the infamous "Windows cannot access the ... share". At the beginning I hadn't netbios enabled so I was not able to reach the computers. After enabling netbios I ping the computers containing the shares correctly. I have an installation of VMPlayer, Virtual Box and Avira Antivir. No 3rd party firewall or other security software is installed.


Solution 1:

The issue is not with DNS the issue is with NetBIOS

DNS(Domain Name Service) resolves FQDN(Fully Qualified Domain Names) to IP addresses like http://www.google.com to http://74.125.229.84/

NetBIOS resolves local computer names(hostnames) to IP addresses like \\DAVES-PC to 192.168.1.190

The way NetBIOS resolves names is in this order

  1. Checks where the name in question is the local host name
  2. Checks DNS client resolver cache
  3. Checks Local NetBIOS name cache
  4. Contacts the configured WINS servers (You more than likely don't have any)
  5. Broadcasts NetBIOS Name Query Request messages to the local subnet
  6. Searches LMHosts file (Resolves names on remote subnets)

Option 1

You can try to clean out the cache by

Clicking Start -> Type cmd -> Right Click and "Run As Administrator" -> Click Yes

Execute these commands

  1. nbtstat -R
  2. ipconfig /flushdns

If you are still having issues make sure your computers are in the same workgroup this is typically named WORKGROUP

For Windows 7

Click Start -> Right Click on Computer -> Click Properties -> Click Advanced System Settings(on the left panel) -> Click Computer Name Tab -> Click Change

Here you can change the name of your workgroup make sure all your computers are in the same one.

Option 2

You can add manual entries into your hosts file these entries will be loaded into your DNS client resolver cache which is the second thing checked.

Click Start -> Type Notepad -> Right Click "Run As Administrator" -> Click Yes -> File Menu -> Open -> Navigate to C:\Windows\System32\drivers\etc -> Open hosts ->

Add you entries at the end of the file in this format

<IP Address> <Name>

Example:

192.168.1.190 DAVES-PC

This would work best with static IP addresses which are easy to configure but depend on the other OS you are using just google it.. it will work with DHCP as most home routers seem to repeatedly give the same IP to the same computer based on the MAC address at least in my experience... have changed OS's and kept the same IP on mine using DHCP lol.

From Comments

Check Share Settings in "Network and Sharing Center"

  1. Click "Start" -> Type "Network and Sharing Center" -> Click "Network and Sharing Center"
  2. Click "Change advanced sharing settings" on the left panel
  3. Expand out the menu for the type of Network you are set to Home, Work, or Public
  4. "Turn on" "network discovery" and "file and printer sharing"
  5. Adjust the other settings to your needs.

Reset the TCP/IP Stack. This will revert all your settings back to default so you may need to change some back e.g. Static IP will be reset to DHCP

  1. Open and administartor command prompt
  2. Execute netsh winsock reset catalog 2
  3. Execute netsh int ip reset reset.log

Check Services Computer Browser and TCP/IP NetBIOS Helper are running

  1. Click "Start" -> Type "Services" -> Click "Services"
  2. Find "Computer Browser" on the list and make sure it is "Started"
  3. Do the same for "TCP/IP NetBIOS Helper"

Make sure Windows firewall is not blocking the connection.

  1. Allow sharing as described Here or Here

Domain Issues

User not in a Domain accessing share in a Domain

  1. Clear the shares to prevent errors net use * /delete this will wipe all the mounted network shares.
  2. Connect to \\DAVES-PC
  3. Tick Connect using a different username
  4. Fill in valid credentials for that domain/share DOMAIN\Username and Password e.g. DAVEco\Dave for username.

User in different Domain requires there to be trust between the two domains read here for more information

Solution 2:

Try clearing the DNS cache. Run command prompt with elevated privilages and type

ipconfig /flushdns

May also be worth checking the details your network adapter is given by typeing

ipconfig /all

look for the Ethernet controller and see what gateway and dns is has been given.

Also try using tracert to the name you are trying to reach, e.g.

tracert www.yahoo.com

I had some trouble with DNS, turns out my laptop was trying to use my Wireless connection instead of my Ethernet connection to access it.