Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This is probably a very simple fix, but I can't figure out what is wrong. I have two computers connected to the LAN ports on a D-Link WiFi router. I do not have an internet connection. The WiFi router assigns both computers IP addresses, as expected. On one computer I am running Webmatrix and hosting a WCF service. I followed the instructions here on how to set this up correctly. When I navigate to the WCF service from the second computer, it cannot find the service. However, when I connect the WiFi router to the internet, it works just fine.

I've also tried adding an entry into the hosts file, but I still can't get it to work without the router being connected to the internet. Is there a way to make this work without internet access to the router?

EDIT: This works if I change it to use the IP address. How could I get it to work with just the machine name?

share|improve this question

migrated from stackoverflow.com Oct 6 '12 at 3:50

This question came from our site for professional and enthusiast programmers.

2  
What is the exact error that you're getting? It sounds like you're experiencing DNS lookup problems. Have you tried using the host machine's IP address instead? –  Ashley Ross Oct 3 '12 at 20:57
    
Yep, that worked. How would I get this to work with the machine name? –  Brent Oct 5 '12 at 16:18
    
You could set up a DNS server internally, or add the hostname -> IP mapping to the hosts file of the client computer. –  smithian Oct 19 '12 at 12:05
    
I did try adding the hostname and IP to the hosts file, but no luck. How would I set up a DNS server internally? –  Brent Oct 22 '12 at 2:49

1 Answer 1

up vote 0 down vote accepted

So it seems that your hosts query some other names than you think, and wait for DNS servers to respond.

The proper solution would be to determine what queries are sent (sniff udp/53 or tcp/53 outgoing communication via Sysinternals network monitor or via tcpdump or via wireshark). Then insert exactly these names in "hosts" files. The confusion may be that a host tries to query "hostA.subdomainB." or "hostA.subdomainB.domainC." or it performs reverse resolution with "1.2.3.4.in-addr.arpa" for its own IP. Also it might be that your "hosts" file is not parsed correctly for whatever reason.

A second solution is to have (1) an internal DNS server, serving (2) a local DNS domain (e.g. .local). Refer to a similar question and answer http://superuser.com/questions/368861/can-i-use-dir-655-for-internal-dns. The router is not the best place to run an internal DNS server, because there is a deal of difficulty with installing it and with maintaining it, even on more advanced firmware (like DD-WRT or similar custom firmware). The D-Link routers do not support DNS server I know of in their default firmware; they have DNS forwarder (aka DNS relay) or DynamicDNS client, but it's not what you need. So it could be on another box (Linux with bind?).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.