Windows 7 sometimes fails to resolve hostnames correctly

2

I have a Problem with my PC sometimes resolving the wrong IPs for some hostnames.

Network setup
I'm currently forced to use a o2 Box 6431 with Firmware 1.01.23b installed. Connected to this network are the following devices:

Hostname             IP               Device
-----------------------------------------------------
o2.box               192.168.1.1      router
root                 192.168.1.2      desktop PC
BRN30055C0E3804      192.168.1.3      network printer
NAS                  192.168.1.4      QNAP nas

The PC runs windows 7 64 bit. The NAS provides samba shares and I sometimes have SSH and ftp connections to it.

The Problem
Lately my pc sometimes fails to connect to my network shares that I've mounted using the \\NAS syntax. However it works when I connect using \\192.168.1.4. My printer is also affectet, I'm unable to print when the error occurs, however I can access it's web interface just fine using a browser and pointing it to http://192.168.1.3:80.
When the error is occuring the commands ping NAS and ping BRN30055C0E3804 both ping 192.168.1.2, which is my desktop PC.

youR.Fate

Posted 2013-12-13T19:04:42.897

Reputation: 374

When this error is occuring, try using nslookup and nslookup <hostname> to see where the DNS record is coming from. It could be that your router's DNS server is the issue. Also, have you thought about putting those domains and IPs into your hosts file? – hololeap – 2013-12-13T19:59:21.860

nslookup NAS and nslookup BRN30055C0E3804 both returned the following, while the error was present:

Server: o2.box Address: 192.168.1.1

Name: BRN30055C0E3804.localdomain Address: 192.168.1.2 – youR.Fate – 2013-12-13T20:37:53.180

Answers

0

Are NAS and printer always connected to the network and switched on? Are the IP-addresses assigned always to the same device, meaning is the DHCP-Server on the o2-box configured to give the same IP-address to the printer and the NAS?

If the IP-addresses are static (=always the same) you can manually edit your hosts-file, which is residing in C:\Windows\System32\drivers\etc, just add the following entries:

192.168.1.3 BRN30055C0E3804
192.168.1.4 NAS

Background: Name-Resolution via NETBIOS is not the most reliable.

Graphfoto

Posted 2013-12-13T19:04:42.897

Reputation: 140

these devices are always turned on. They get their IPs via reserved DHCP from the router. I will test your solution as soon as the Problem comes up next time. I just fixed it by rebooting, but it will surely come back. – youR.Fate – 2013-12-13T20:34:41.417

Problem came back, your solution fixed it. I will use this as a temporary workaround until I can use my good router again. Thanks – youR.Fate – 2013-12-13T20:42:25.853