OcNOS-SP : System Management Guide : System Management Command Reference : Basic Commands : hostname
hostname
Use this command to set the network name for the device. OcNOS uses this name in system prompts and default configuration filenames.
Setting a host name using this command also sets the host name in the kernel.
Note: After giving the hostname command, you must write to memory using the terminal monitor command. If you do not write to memory, the change made by this command (the new host name) is not set after the device reboots.
Use the no parameter to disable this function.
Command Syntax
hostname WORD
no hostname (WORD|)
Parameter
WORD
Network name for a system. Per RFC 952 and RFC 1123, a host name string can contain only the special characters period (“.”) and hyphen (“-”). These special characters cannot be at the start or end of a host name.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#hostname ABC
(config)#
 
(config)#no hostname
(config)#exit
Last modified date: 10/19/2023