• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

Home network not able to resolve a host name but works ok using IP address

I have a home network with 3 laptops that basically work ok except for one thing.

Each laptop can see the others and can share files, etc. but recently I installed an application on Laptop1 that runs a service that allows web browsers from other laptops to communicate with it.

My problem is this. Laptop2 (running Vista) can communicate with Laptop1 by me entering http://Laptop1 or as the URL address however Laptop3 (also running Vista) can access the Laptop1 service only by me specifying its IP address ( and not its hostname .

The really silly thing is that only a few days ago that was working and I just can't think of anything that was done since then to screw that up so any help would be much appreciated.


P.S. As I'm using dynamic IP addressing I would really need to use the hostname and not the IP address.
2 Solutions
There is problem with name resolution. Are you using DNS of Netbios in private network ? You can chceck you DNS with nslookup.
Why are you using dynamic IP addresses ? You can use IP address reservation in DHCP so clients can get the same IP on renewal.
The second option is to use DDNS for dynamic address translation.
gem56Author Commented:
I am using a Netgear wireless router with a DHCP server enabled.
gem56Author Commented:
Sorry I forgot to say that I'm not fussed about using dynamic or static IP addresses I'm sort of confused why Laptop2 works OK and Laptop3 doesn't when they're both on the same network accessing the same service on Laptop1, and off course the fact that a few days earlier Laptop3 was able to resolve the hostname!
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

If you are using dynamic IP addresses (form DHCP) for end hosts and for name resolution using DNS then you know that DNS has newer worked and name resolution was done with netbios. This is the point why I was asking what you use for name resolution. If you can't translate hostname to ip address you still have problem with DNS and that's your case.  
Sikhumbuzo NtsadaSenior IT TechnicianCommented:
Open up a command prompt:

After you the steps found on the code try again.

ipconfig /release


ipconfig /flushdns


ipconfig /renew

Open in new window

gem56Author Commented:
I get the gist of what you're saying but I'm not sure where to go from here, sorry for my ignorance.

Are you saying that your preference would be to use "Address Reservation" function within the router to assign the same IP addresses to each device/laptop and access them using the IP address?

The part that confuses me is why one Laptop2 is able to use hostname whereas Laptop3 can't, even though they're both running Vista and off the same router!
restart the router and try again :)
gem56Author Commented:
Hi guys,

The problem is now resolved although I'm not exactly sure what did the trick. I don't think it was the restarting of the router (this time) as I did that several times today and the problem still persisted, even though it often clears up niggly connection issues.

Before seeing your suggestion Santasi24 I used "Address Reservation" in the router to ensure the same IP addresses are issued, which I think Kendzast was suggesting, and even though the router was still playing up a bit and didn't work immediately, I also tried your suggestion of /release, /flushdns and /renew and shortly thereafter it started working OK.

I generally don't try several things at the same time as it makes it harder to know what worked, that's what I did this time so I'm not sure if one or a combination of things did it.

So for now I'm grateful to all for your suggestions and if I get the same thing happening in future I now have a few things to try.

Thanks a lot guys.

gem56Author Commented:
Thanks guys.
Both devices are on the same switch/router. When you can access remote PC with his IP address then you know that the switch knows where the computer is (which port). Comunication based on IP address don't need to make address translation, so this traffic don't leave the switch. I was asking you if you use DNS or Netbios name resolution so we can identify where is the problem. Name resolution order is here:


So if you flushed your dns (ipconfig /flushdns) and still don't works then we know that the problem is not in cached dns record. Try to add record in host file for ip address The file is located in C:\Windows\System32\drivers\etc\hosts . Now if it work's then we are sure that problem is with name resolution :)
gem56Author Commented:
Sorry I didn't answer your questions properly as I wasn't sure whether I was using DNS or NetBios.

When I reserved the IP addresses in the router (after your initial comment) the problem was still there, even after the flushing, but soon thereafter it started working/reckognising the hostname. I then removed the IP address reservation in th erouter and it continued working so I'm not sure what went on here.

It's still working now wih Laptop1 using the same IP address assigned to it although I'm thinking hat it either can translate the hostname or it can't, unless it has a stale (but correct) translation in some cashe.

Anyway, apart from the leading comment lines ...\etc\hosts has the followingt:   localhost
    ::1             localhost

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now