I'm setting up a domain on my home network for learning purposes, using BIND on CentOS to act as the name server. I've got the name server up and running as type master for my internal domain (plumbnicoll.family), and can do forward and reverse lookups from other computers in my LAN. For example, host office2.plumbnicoll.family correctly returns office2.plumbnicoll.family has address

What I'd like is to be able to resolve just office2 to its address, without needing to put .plumbnicoll.family at the end.

Is this possible, or even desirable to do? I'm running a mixed environment at home with both Linux and Windows computers.


It is possible and perfectly desirable. On the Linux machines:

  1. Add search plumnicoll.family to your /etc/resolv.conf

On the Windows machines (instructions for Windows XP, other versions will require adaptation but should be similar):

  1. go to Start > Settings > Network Connections
  2. right-click local network connection > Properties
  3. left-click Internet Protocol (TCP/IP)
  4. left-click Properties
  5. left-click Advanced
  6. left-click DNS tab
  7. left-click Append these DNS suffixes
  8. left-click Add
  9. type plumnicoll.family
  10. left-click Add
  11. left-click OK
  12. left-click OK
  13. left-click OK
| improve this answer | |
  • Ah! So that is what the "search xyz" lines are for. Doy! – Adam Plumb Jun 10 '09 at 15:13

This is a client config issue, not a server config issue. The recommendation to put the domain in the search path in resolv.conf is a client change. You would do the same thing (albeit with a GUI) on Windows or Mac OS X, or in the DHCP scope options of your DHCP server if you're using one.

| improve this answer | |
  • 1
    +1 for mentioning DHCP options. I would rather make one change on the DHCP server then on each client machine, even if it is only a few on a home network. – steve.lippert Jun 10 '09 at 16:04

This has to do with your default search domain. This is often pushed out by your DHCP server, or it can be set manually

(My computer | Propterties | Compuer Name | Change | primary domain suffix)

| improve this answer | |

Try putting your domain name as a search domain in /etc/resolv.conf, for example:

search plumbnicoll.family

That should allow you to use hostnames.

| improve this answer | |

If the domain exists on the same network then place the following in your /etc/resolv.conf:

domain plumbnicoll.family

You probably want to use domain in favour of search in this instance.

| improve this answer | |

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.