Configuring Hostname

You can set the hostname using the below command:

pbnoscli# configure terminal 
pbnoscli(config)# hostname Switch-1
Switch-1(config)#
pbnoscli(config)# hostname Device_1
% Error: Invalid hostname 'Device_1'. Allowed: A-Z, a-z, 0-9, hyphen (-), cannot start or end with '-'. Max 63 chars.
pbnoscli(config)# 

save config after changing hostname using 'save' command

Switch-1# show running-config 
configure terminal
hostname Switch-1
!
Switch-1# 

Last updated