Solved

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

Posted on 2011-02-23
11
522 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
ID: 34958963
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
ID: 34958988
I am using a Netgear wireless router with a DHCP server enabled.
0
 

Author Comment

by:gem56
ID: 34959039
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 4

Accepted Solution

by:
Kendzast earned 250 total points
ID: 34959382
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
ID: 34959424
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
 

Author Comment

by:gem56
ID: 34959471
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
ID: 34959484
restart the router and try again :)
0
 

Author Comment

by:gem56
ID: 34959823
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
ID: 34959834
Thanks guys.
0
 
LVL 4

Expert Comment

by:Kendzast
ID: 34959839
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
ID: 34960018
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

810 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