I've set up my Windows Server 2008 box to act as a DNS server for our network at work. I've got a couple machines with A records in the DNS record. Is there a way I can automatically include the domain in DNS queries so I don't have to use the fully qualified domain name? That is, I have a computer named dev1. Is there a way I can set up the DNS server so that I can ssh dev1 instead of ssh dev1.dev.mycompany.com? The A record for dev1 includes the IP address for the machine, so I can successfully access the machine using dev1.dev.mycompany.com.

In addition, is there a way I can connect to machines by host name instead of IP? In the A record, it looks like whatever name I put will get mapped to the IP address. I'd like that to be the hostname of the machine. Is there a way to do that? Or do I just need to manually create the correct A records?

  • 2
    That's why they invented search domains (DNS suffix in Windows terminology). It's in the advanced TCP/IP settings. – billc.cn Oct 27 '11 at 21:19
  • @billc.cn - please add answers as answers so they can be accepted and closed. – Paul Oct 27 '11 at 22:41

To append a suffix to every DNS query, use the conveniently named DNS suffix feature in Windows. Simply open the properties window of your main network adapter and double click on your main TCP/IP protocol (the name has changed since Vista and you must choose IPv6 if you have a working IPv6 DNS server on your network). In the new window, click "Advanced" and switch to the DNS pane. In there you'll find a connection DNS suffix option and a list of extra DNS suffixes to search.

For your second question:

In the main function of the DNS system is to translate domain names (including host names) into IP addresses. If you want to setup automatic mapping, you have the following choices:

  • Use a Dynamic DNS server. For Windows, you either have to join the computers to a domain or use some third-party DDNS client and service.
  • Use non-DNS name resolution systems like NetBIOS or mDNS (Apple Bonjour).
    • NetBIOS only work inside a broadcast LAN, but you can use a WINS server to make it "universal".
    • mDNS can work on a wider network, but you must configure all the devices correctly.
  • Microsoft DNS server allows you to sync a domain with WINS. Maybe that can be hacked to run with NetBIOS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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