Solved

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

Posted on 2011-02-23
11
520 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:gem56
11 Comments
 
LVL 4

Expert Comment

by:Kendzast
Comment Utility
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.
0
 

Author Comment

by:gem56
Comment Utility
I am using a Netgear wireless router with a DHCP server enabled.
0
 

Author Comment

by:gem56
Comment Utility
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!
0
 
LVL 4

Accepted Solution

by:
Kendzast earned 250 total points
Comment Utility
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.  
0
 
LVL 17

Assisted Solution

by:Sikhumbuzo Ntsada
Sikhumbuzo Ntsada earned 250 total points
Comment Utility
Open up a command prompt:

After you the steps found on the code try again.

ipconfig /release

Then 

ipconfig /flushdns

Then

ipconfig /renew

Open in new window

0
Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

 

Author Comment

by:gem56
Comment Utility
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!
0
 
LVL 4

Expert Comment

by:ajaykerala
Comment Utility
restart the router and try again :)
0
 

Author Comment

by:gem56
Comment Utility
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.

0
 

Author Closing Comment

by:gem56
Comment Utility
Thanks guys.
0
 
LVL 4

Expert Comment

by:Kendzast
Comment Utility
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 :)
0
 

Author Comment

by:gem56
Comment Utility
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

0

Featured Post

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Join & Write a Comment

Suggested Solutions

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now