Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that this is a server-fault question, and I will most likely close this after it's answered. But I really need this answer now, and since it's Halloween, serverfault has very few people on there! I really appreciate it everyone.

Can someone tell me if I am doing this right?

I have 2 projects (dragon and falcon). I am setting up the servers like this. But, I am not using "DNS". It's just hostnames.

main.admin (controls all servers)

dragon.admin (SVN repository)
dragon.db1 (database)


Will I need "DNS" service? Or, can I do it like this...through hostnames?

Happy Halloween everyone!

share|improve this question

migrated from Nov 1 '09 at 16:53

This question came from our site for professional and enthusiast programmers.

Knowing that what you're doing is wrong, and doing it anyway, is sociopathic behavior. It's only a short step from there to becoming a serial killer :-) – paxdiablo Nov 1 '09 at 6:13
Yes, that's why I voted to close my own question ;) – Alex Nov 1 '09 at 11:01
up vote 4 down vote accepted


First off, are you sure you don't already have DNS?

  • If your PC is connected to an Active Directory Domain Controller, then you already have local DNS.
  • If you have a cheap Linux-based wireless router / firewall connecting your LAN to the Internet, then there is a fair chance it can provide local DNS for you.

So before we can help you more explicitly, we'll need to know what your network setup and client and server software looks like.

Second, I'm not sure about the "controls all servers" part, and the mapping of both project name and service name to a single hostname. What are you trying to accomplish?

A very common solution would be to:

  • Give every machine a machine specific hostname for life, unrelated to its functions (ex. SRV001, ELVIS, HYDROGEN, etc).
  • Create CNAMES mapping network level services to machines (ex. DB01 points to SRV014).
  • Create application-specific configuration files that tell each application (project) which resources to use by their service names (ex. "Falcon" knows from its config file that it should use DB03 and DB04).

Regarding what naming convention to use ... well, any convention that makes sense to you and your colleagues. In other words it is quite domain-specific. Here is the most upvoted thread on this site regarding server names. Regarding service name, I would propose to let go of old habits, and use some ASCII characters, they are not an endangered species... So DATABASE_01 is neater to my eyes than DB01. Another good option is subdomains, i.e. "a.database.server.localdomain", "b.database.server.localdomain" and so forth.

Will I need "DNS" service? Or, can I do it like this...through hostnames?

You will not need DNS, it's simply a better solution which is far easier to manage when you have more than a handful computers. Actually, in the very first days of the Internet, DNS did not exists, the Internet ran entirely on host files. You should not use "." as a separator, it is reserved -- use dashes or possibly underscores, like "falcon-admin".

share|improve this answer
+1 for the link to the cool server name question. I thought the same thing! – tomjedrz Nov 1 '09 at 23:07

You don't need DNS if the following is true:

  1. You control every computer that will talk to these services.
  2. You don't mind keeping the appropriate hosts file in sync if anything changes.

I suggest you at some point go back and set up DNS, but you don't need it to get going. Just add appropriate entries to the platform-specific hosts files.

share|improve this answer
Great. Is my naming convention correct? – Alex Nov 1 '09 at 4:55
Alex's previous question was about administering the hosts file to all involved hosts. 2+ hosts == time to use DNS. Who wants to sync every host when there's an established network resource & protocol for it's administration?! – OMG Ponies Nov 1 '09 at 4:58
Most conventions say you've got it backwards and the host specific part should be leftmost. – Jason Nov 1 '09 at 5:01
@Jim: A class A ip range is a tad large ;) DNS isn't a resource hog, and provides more value when configuration is centralized. Who knows what will happen to the network in the future... – OMG Ponies Nov 1 '09 at 5:09
@alex: Then make you life easier by implementing a DNS server... – OMG Ponies Nov 1 '09 at 5:11

Do you really want to have to sync the hosts file on every host involved, every time you make an update? It's fine to me if you're only dealing with 2 hosts.

The alternative is to setup a DNS server (typically BIND on *nix/BSD) - you can change entries as you like, just have to configure the network to point to the DNS server. DNS is fairly static - once setup, there isn't any maintainence.


share|improve this answer
Thanks Rexem. If I install DNS, how should I name the HOSTNAME? thanks. – Alex Nov 1 '09 at 5:16
@Alex: I don't understand your question. You can name a network resource whatever you like, so long as it is unique. A common convention I've seen is to use astrological (earth, sun, moon, mars, etc) or greek mythology (zeus, hera, apollo, etc). – OMG Ponies Nov 1 '09 at 5:21
@rexem, the Earth, Sun, Moon and Mars, aren't astrological, they really exist. Try astronomical ;-D – pavium Nov 1 '09 at 5:40
Dammit pavium - I'm a developer, not an astronomer :p – OMG Ponies Nov 1 '09 at 5:49

You should also look at using mDNS.

share|improve this answer

Your Answer


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.