Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Understanding Hostnames

Almost all devices in your network have a hostname.

The hostname is the name that identifies the device on the network and is easier to remember than an IP address. When you first power on a Juniper Networks router, switch, or security device, the default hostname is Amnesiac. The Amnesiac prompt is indicative of a device that is booting from a factory-fresh Junos OS software load, which, by definition, does not have a hostname configured.

Administrators often follow conventions for naming devices. One such convention is to name the device based on its location, for example: germany-berlin-R1. The hostname should be unique within your network infrastructure, but there is no need for the local hostname to be globally unique.

A device's hostname usually has a corresponding entry in the domain name system (DNS) so that administrators can connect to the device using the hostname. The fully qualified domain name (FQDN), which is used in DNS, includes the hostname and the domain name. The hostname and the domain name labels are separated by periods or dots, as follows: hostname.domain. For example, if the hostname is germany-berlin-R1 and the domain name is emea, the FQDN is germany-berlin-R1.emea. If the emea domain is registered and can be reached as emea.net on the Internet, the FQDN for the device is germany-berlin-R1.emea.net. The FQDN is globally unique.

In Junos OS, the hostname can contain any combination of alphabetic characters, numbers, dashes, and underscores. No other special characters are allowed.

Although Junos OS allows hostnames to contain up to 255 characters, keep in mind that the total length of the hostname as an FQDN cannot exceed 255 characters (including the delimiting dots), with each domain name label having a maximum length of 63 characters. In any case, an overly long hostname is difficult to type and to remember, so short and meaningful hostnames are a best practice.

Published: 2013-10-28