Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 192.168.1.3.

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.

share|improve this question

5 Answers 5

up vote 5 down vote accepted

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
share|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.

share|improve this answer
    
+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

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

/etc/resolv.conf
search plumbnicoll.family

That should allow you to use hostnames.

share|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.

share|improve this answer

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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