0

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?

Brent
  • 53
  • 4
  • 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 03 '12 at 20:57
  • Yep, that worked. How would I get this to work with the machine name? – Brent Oct 05 '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 02:49

1 Answers1

0

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 https://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?).

kubanczyk
  • 13,502
  • 5
  • 40
  • 55