tags:

views:

8014

answers:

7

I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no TLD. It's just an internal domain.)

This works fine on my Ubuntu laptop.

On all my Windows PCs (Vista and XP) I get the following from the command prompt:

C:\Users\Giles Roadnight>nslookup weddinglist
Server:  UnKnown
Address:  192.168.0.40

Name:    weddinglist
Address:  192.168.0.41


C:\Users\Giles Roadnight>ping 192.168.0.41

Pinging 192.168.0.41 with 32 bytes of data:
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.0.41:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\Giles Roadnight>ping weddinglist
Ping request could not find host weddinglist. Please check the name and try again.

My ipconfig:

C:\Users\Giles Roadnight>ipconfig -all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Giles-Desktop
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller
   Physical Address. . . . . . . . . : **-**-**-**-**-**
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::f179:680f:f313:5448%8(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1
   DNS Servers . . . . . . . . . . . : 192.168.0.40
   NetBIOS over Tcpip. . . . . . . . : Enabled

I am pretty sure that I have the DNS set up OK as the nslookup is OK but I can't ping and I can't access webpages at weddinglist.

How can I make ping work for the Windows PCs?

+7  A: 

It's possible that the Windows internal resolver is adding '.local' to the domain name because there's no dots in it. nslookup wouldn't do that.

To verify this possiblity, install 'Wireshark' (previously aka Ethereal) on your client machine and observe any DNS request packets leaving it when you run the ping command.


OK, further investigation on my own XP machine at home reveals that for single label names (i.e. "foo", or "foo.") the system doesn't use DNS at all, and instead uses NBNS (NetBios Name Service).

Using a hint found at http://www.chicagotech.net/netforums/viewtopic.php?t=1476, I found that I was able to force DNS lookups for single label domains by putting a single entry reading "." in the "Append these DNS suffixes (in order)" in the "Advanced TCP/IP settings" dialog

Alnitak
This was exactly what I was looking for. Thanks!
Andy S
Thank you so much !
Pondidum
+1  A: 

Do you have an entry for weddinglist in your hosts file? You can find this in "C:\WINDOWS\system32\drivers\etc". nslookup always uses DNS whereas ping uses other methods for finding hostnames as well.

Stephen Darlington
A: 

I'm not a big infrastructure monkey, but the first thing is obvious to me is that nslookup is able to query domains, whereas pinging and connecting to sites requires an IP or hostname.

Given that weddinglist is actually a zone, it doesn't resolve to a single machine. That is, it's not a host. If you want to connect via the web or ping, you need a valid host. The results for nslookup probably give you the ip address of the DC or machine that controls/owns the zone.

OJ
Sorry, completely wrong explanation, downvoted
bortzmeyer
A: 

Alnitak - is there any way of disabling that behaviour? If not then it'll not be possible to use domains like this? I could use a full domain but it would be interesting to find out why this doesn't work.

Stephen - nothing in my hosts file. I did have it in there but have removed it. Other machines that I have this issue on never had anything in the hosts file.

Thanks

Please don't use "answers" to post comments.
Darron
A: 

I think this behavior can be turned off, but Window's online help wasn't extremely clear:

If you disable NetBIOS over TCP/IP, you cannot use broadcast-based NetBIOS name resolution to resolve computer names to IP addresses for computers on the same network segment. If your computers are on the same network segment, and NetBIOS over TCP/IP is disabled, you must install a DNS server and either have the computers register with DNS (or manually configure DNS records) or configure entries in the local Hosts file for each computer.

In Windows XP, there is a checkbox:

Advanced TCP/IP Settings

[ ] Enable LMHOSTS lookup

There is also a book that covers this at length, "Networking Personal Computers with TCP/IP: Building TCP/IP Networks (old O'Reilly book)". Unfortunately, I cannot look it up because I disposed of my copy a while ago.

benc
A: 

I found answer to solve this problem here http://forums.techarena.in/server-dns/1053886.htm you just should disable dns client service.

A: 

To avoid the problems explained by Alnitak (software adding ".something" when they find no dot), I suggest to work with names with dots, using, if necessary, official TLD like ".example". If you use "www.mysite.example" for your tests, you'll be free from these issues.

bortzmeyer