Link to home
Start Free TrialLog in
Avatar of gem56
gem56

asked on

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

Hi,
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 http://192.168.0.3 as the URL address however Laptop3 (also running Vista) can access the Laptop1 service only by me specifying its IP address (http://192.168.0.3) 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.

Thanks.

P.S. As I'm using dynamic IP addressing I would really need to use the hostname and not the IP address.
Avatar of Kendzast
Kendzast
Flag of Slovakia image

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.
Avatar of gem56
gem56

ASKER

I am using a Netgear wireless router with a DHCP server enabled.
Avatar of gem56

ASKER

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!
ASKER CERTIFIED SOLUTION
Avatar of Kendzast
Kendzast
Flag of Slovakia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gem56

ASKER

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 :)
Avatar of gem56

ASKER

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.

Avatar of gem56

ASKER

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:

http://www.scribd.com/doc/2554845/Name-Resolution-Methods-and-Order-in-Windows

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 192.168.0.3. 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 :)
Avatar of gem56

ASKER

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 192.168.0.3 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:
   127.0.0.1   localhost
    ::1             localhost