hostname
Syntax
hostname <HOSTNAME>
no hostname [<HOSTNAME>]
Description
Sets the host name of the switch.
The
no
form of this command sets the host name to the default value, which is
switch
.
Command context
config
Parameters
<HOSTNAME>
Specifies the host name. The first character of the host name must be a letter or a number. Length: 1 to 32 characters. Default:
switch
Authority
Administrators or local user group members with execution rights for this command.
Examples
Setting and showing the host name:
switch# show hostname switch switch# config switch(config)# hostname myswitch myswitch(config)# show hostname myswitch
Setting the host name to the default value:
myswitch(config)# no hostname switch(config)#