25. Can Access computers by IP addresses, but not by Computer Name

Problem :

On my local network, I can type the ip address like so: \\xxx.xxx.xxx.xxx of a computer and access the shared files/printers of that computer.

But when I try by computer name, it does not let me. Any reason why?

Solution:

If you're running a standard environment, where there's only your modem / router and a smaller number of devices - access your local gateway (usually 192.168.0.1, 10.0.0.138 or 192.168.1.1), enter your credentials (usually admin/admin) and check under the configuration that the DNS service is turned on. If not, you will need to enable this, save the settings and possibly restart your modem/router.

If you're running a server which runs the DHCP & DNS services on your network, ensure that the DNS service has started correctly. It's probably worth restarting the services regardless, just to be sure. Open the DNS MMC and check to see if there are any records in the Forward Lookup Zone. If not, you've got an issue with computers registering their details in DNS. Ensure that it has been configured correctly and that PC's are able to update their own records.

Useful commands:

ipconfig / flushdns

Flushes all locally cached DNS records, may resolve a problem where an IP address has not been updated by the local system.

ipconfig /all

look for DNS server under the connected interface, if there is none then the IP settings are probably set to static and you will need to set the DNS manually under your network interface card settings.

nslookup <pcname>

Will give you the IP address assigned to the computer you are looking up according to the DNS table in the DNS.

ping <pcname>

Ping the computer you are trying to access via PC name, if it resolves an IP, run ipconfig on the computer you are trying to access and make sure the IP matches.

netsh int ip reset C:\reset.log

Completely reset the NIC, clearing cache and network settings.

If you're still having problems, perhaps try restarting the modem/router/server and clients PC's. This will usually fix quite a few problems.

Source : Microsoft Forum