Windows – Get windows to resolve domain less names via dhcp

domain-name-systemwindows

I have couple of windows clients which connect to freebsd pptp vpn (using mpd). windows clients gets ip address and dhcp servers from pptp connection. The pptp adapter properties are as follows.

PPP adapter vpn:
    Connection-specific DNS Suffix  . :
    Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
    Physical Address. . . . . . . . . : 00-53-45-00-00-00
    Dhcp Enabled. . . . . . . . . . . : No
    IP Address. . . . . . . . . . . . : 192.168.10.16
    Subnet Mask . . . . . . . . . . . : 255.255.255.255
    Default Gateway . . . . . . . . . : 192.168.10.16
    DNS Servers . . . . . . . . . . . : 192.168.1.1
                                        203.xx.xx.xx

I can ping from my windows client to another machine in the lan if I give it's fqdn.

C:\Documents and Settings\Sankar>ping nas.xx.ac.in
Pinging nas.xx.ac.in [192.168.2.3] with 32 bytes of data:
Reply from 192.168.2.3: bytes=32 time=871ms TTL=63
Reply from 192.168.2.3: bytes=32 time=1056ms TTL=63
Reply from 192.168.2.3: bytes=32 time=148ms TTL=63
Reply from 192.168.2.3: bytes=32 time=136ms TTL=63

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

But by default, the dns server is not the one specefied from pptp server, but if I use the server specefied in dhcp it can resolve the name nas. (with out any domain part)

C:\Documents and Settings\Sankar>nslookup
Default Server:  agni.xx.blah.com
Address:  192.168.3.100

> server 192.168.1.1
Default Server:  [192.168.1.1]
Address:  192.168.1.1

> nas
Server:  [192.168.1.1]
Address:  192.168.1.1

Name:    nas
Address:  192.168.2.3

> exit

So my dns server is able to resolve domain less names. When I type

C:\Documents and Settings\Sankar>ping nas
Ping request could not find host nas. Please check the name and try again.

The query is not getting resolved. Running wireshark along showd that windows client is sending wins request which is obviously not getting answered.

77  23.928754   192.168.3.28    192.168.3.255   NBNS    Name query NB NAS<00>

My question is how can I get "ping nas" work with minimum effort (ie with out touching client) ? A sub problem is how to make it use the dns server sent to it via pptp rather than the one configured on lan interface when connected to pptp network.

with regards,

raj

Best Answer

You might try setting the "DNS Suffix for this connection" setting on your windows clients to the domain name. You should also be able to push that setting via DHCP.

To push it via DHCP it should be something like:

option domain-name "mydomain.com";