Naming convention for computers [duplicate]

Possible Duplicate:
Naming convention for PC in a network

What naming convention your organization uses for identifying computers within the organization. These are internal for the developers' desktops, server, etc. We are about to buy many new desktops and laptops. A few schemes I can think of:

  • companyNamePrefix#### : like so02, so03).
  • city names.
  • location prefixes.
  • role specifics: sourceControl.domain.com.
  • use configuration (ps01xp3, ps02ubuntu10).

Our servers have two names; a physical one and a logical one. The reason is that cabling doesnt care what a server is, just where it is; and logical names change more frequently than position.

Our physical names are composed like this;

Country code, data centre name, rack, blade enclosure/U-position, blade slot. i.e. 044THDBA410211 is in the UK (044), data centre called THD, rack BA41, blade enclosure 02, blade slot 11.

This way all cabling and labelling can stay in place for the duration of the server's life.

Then the server gets a logical name that typically states the platform it's part of, its OS and it's function but not its location as that will frequently change.

For VMs we just look in vCentre to find where it is, for physicals and VM hosts we simply have a lookup web page.

This works for us as it fixes a lot of the problems we've come across elsewhere.


I've had nearly ten years of experience with this, and I can tell you that embedding metadata in the hostname will lead to problems.

Hostname's are inherently difficult to change in the real world. Software applications embed them in strange places. Case in point, the MYSQL grant tables.

Pick some theme with a large number of proper nouns which have nothing to do with the systems and just pop them off the stack. These names should then be keys into a proper database containing metadata about the host.

Common themes are gods and goddesses, characters from your favorite TV show, artists, albums, songs, etc...

If you name you machines based on physical location in the datacenter, you will have nothing but headaches as soon as they move physical location.

If you absolutely must store metadata in DNS, use a TXT record rather than the A record.


There are many different schools of thoughts on how to assign a host name. There are also many considerations. For example, the hostname on a windows machine cannot be more that 15 characters. Also some switches (old cisco ones IIRC) used to have a problem with 12 or more characters in the hostname.

There are also other considerations when naming a machine. One may be a security issue, i.e. don't put windows, linux, sol5.2 or any identifiable information in the hostname that a casual observer would learn very quickly. While it in fact does nothing (nmap can determine the host os type) its just a good idea.

This has to be also pragmatic in implementation if you have lots of machines, you are going to need to be able identify what it does and whom is owner really quickly from say DNS reverse lookup. So this means you have to have common information shared amongst your admins.

The big thing here that you should achieve is uniformity across the enterprise and agreement from all the admins as to what the conventions are.

The current host name schema I use is;

aa-bb-cc-dd-ddd.domain.net

AA This is a two letter short code to identify the company whom owns the asset. In this case we'll give it MC for My Company

BB This is a two letter short code to identify the site the machine is located on OR the service provider whom hosts the machine. Here we run the computer in a site call Super Center so we have assigned it the short code SC. This could easily however be a two letter iso country code or even another companies short code.

CC A two letter short code identifying the role of the machine. These role designations are agreed by all in IT operations before assignment otherwise you end up with different meanings. In this instance we are assigning DM for database master but we alos use code like VJ for virtual jboss, or wk for workstation.

DD This is the customer identifier and may be a combination of letters or numbers. We'll give the 01 in this case

DDD Node number

So using the above a typical host would be

mc-sc-dm-01-010.domain.net

Thus I can derive form this host name that machine is operated by my company, located in super centre, its a database server, a master, serving the needs of customer 01 and they have 10 hosts that are database masters.

If your being observant, there is a problem with the last part of the hostname formula. The customer number cannot be more that 99 or z9 and the nodes can be 999. We have proposed altering this so that the customer can be 3 digits and nodes 2.

However, we also get the joy of being able to do neat tricks such as using the host name to determine what puppet should do with the hosts configuration (apply a common hosts file to all machines in my-sc for example)

The main thing here, is find whats right for you and what you can live with on a daily basis.


The naming schemes i've seen so far:

For developer workstations

<City><EmployeeID>
ny347 // Employee ID 347

This is also similar to the login account of that employee.

<City><Physical|Virtual><Linux|Windows><Department><Counter>
nyvlpro01 // New York, Virtual Machine, Linux OS, Products Departments, Machine 1

Other schemes also differentiate between development, test/qa and production environments, such as:

<Nickname>-<Dev|Test|Prod|>-<Clusternode>
foobar-prod-1 // machine called foobar, for production environment, cluster node 1

Others use the name of a dedicated software, such as

<Softwarename>-<Dev|Test|Prod>
wiki-dev // The Wiki for the development department

Or combined:

<Company><Country><Software><Environment><Node>
INUKDBD1 // INitrode, United Kingdom, Database, Development, Node 1

Or distinguishing for the role of the machine in home offices

<Role><Number>
SE001 // Server 1
PC001 // Desktop PC 1