Blog

Choosing a host naming convention

Choosing a host naming convention

Neil H. Watson

Abstract: Whether realizing it or not every organization goes through the process of selecting a naming convention. Often this is done without much forward planing resulting in unwieldy host and service names. In the worst cases host names are dropped completely and either by habit or lack of a proper DNS service only IP addresses are used.

In the following I will talk about the different types of naming conventions that I’ve experienced or read about. I’ll discuss the pros and cons of each. Before we get to that we’ll need to have a small refresher on domain name services.

1  DNS Review

Domain name service is probably the most important and most overlooked of all network services. In many cases unexplained network problems can be attributed to improper or missing DNS. Some view DNS as complicated voodoo that is more trouble than it is worth.

The goal of DNS is very simple. IP addresses are difficult to remember. This is especially true of IPV6 IP addresses. DNS allows you assign easy to remember names to associate with an IP address. DNS allows further fine grained identification through specialized name and IP address matches.

1.1  DNS versus host name

It is important to differentiate between a DNS name and a host name. A DNS name is the name record of an IP address. A host name is the name that a host is assigned when it is setup, or changed to. The host name is known only to the host. DNS names and host names independent. They do not always match and there is no guarantee that they will. This is why a proper DNS service is so important. Without one there is no centralized way to refer to a host without knowing its IP address.

2  Naming conventions

2.1  Purpose

This style names host after there purpose.

2.1.1  Examples

Printer1, router1, www and exchange1.

2.1.2  Pros

These host names are easy to remember.

2.1.3  Cons

2.2  Geographic

This style attempts to chose names base on location such as city, office or even floor.

2.2.1  Example

Toronto1, kingst1, and 2ndfloor2.

2.2.2  Pros

You know where to find the server.

2.2.3  Cons

2.3  Inventory

This style attempts to combine the purpose and geographic style in hopes of gaining an inventory system for all hosts. Some go even further to include the operating system in the host name.

2.3.1  Examples

tor-print01, 2ndflr-router02, kingst-exchange01, toronto-lnx-nfs1, kingst-csco-router1

2.3.2  Pros

This host name tells you a lot about the host.

2.3.3  Cons

2.4  Themes

We’ve all seen hosts with whimsical names that seem to serve no purpose.

2.4.1  Examples

zeus, maple, blue, pluto

2.4.2  Pros

To the newcomer such host names seem meaningless. However, as they are short they are very easy to remember and type. People will quickly learn to associate such names with their purpose. This is a common technique for code names in industry and the military. These types of host names are the only ones that I can remember even long after I’ve stopped working with them. Further You can never run out of unique names.

2.4.3  Cons

2.5  CNAMEs

Using CNAMEs allows you to combine all of the above naming conventions in a single flexible system. Since a CNAME is an alias it can be reassigned to another host without either host requiring a host name change. This allows services to be moved without customers being aware of it. A customer can be pointed to a new web server simply by assigning the CNAME www to another host. The change is transparent.

Considering what you now know about CNAMEs. Go back and look at our naming styles again. We can now combine them in a much more useful way. A host simply called blue can have CNAMEs printer1, tor-printer or even blue-lnx-toronto-printer1. For administrators blue is easy to remember and type. Even if blue is decommissioned we simply reassign the CNAME to its replacement server. If the server is moved, installed with a new operating system or assigned a new purposed simple change the CNAME.

2.5.1  Examples

blue, blue-lnx-toronto-printer1, mars, mars-csc-kingst-brouter1

2.5.2  Pros

2.5.3  Cons

2.6  TXT and HINFO

There are two little known DNS records called TXT and HINFO. These are mostly free form records used to store arbitrary host information. Unlike CNAMEs one should be able to query these fields via a client. However, like some of our other methods this can sometimes offer too much information to a cracker. For more information about the TXT and HINFO refer to RFCs 1464 and 1033.

Whatever method you choose, and this list is by no means complete, be sure to plan ahead. Think about how your naming convention can adapt to a growing network as you add more nodes and move existing ones.


This document was translated from LATEX by HEVEA.