hostname

To specify or modify the host name for the network server, use the hostname global configuration command. The host name is used in prompts and default configuration filenames. The setup command facility also prompts for a host name at startup.

hostname name
Syntax Description

name

New host name for the network server.

Defaults

The factory-assigned default host name is router.

Command Modes

Global configuration

Command History
Release Modification

10.0

This command was introduced.

Usage Guidelines

The order of display at startup is banner message-of-the-day (MOTD), then login and password prompts, then EXEC banner.

Do not expect case to be preserved. Upper- and lowercase characters look the same to many internet software applications (often under the assumption that the application is doing you a favor). It may seem appropriate to capitalize a name the same way you might do in English, but conventions dictate that computer names appear all lowercase. For more information, refer to RFC 1178, Choosing a Name for Your Computer.

The name must also follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphens. Names must be 63 characters or fewer. For more information, refer to RFC 1035, Domain Names—Implementation and Specification.

Examples

The following example changes the host name to sandbox:

hostname sandbox