Site icon

How to configure hostname on cisco switch?

cisco switch

The hostname is used to identify the switch on the network, and it is displayed in the command prompt. You can choose any hostname that is meaningful to you, as long as it meets the naming conventions for network devices, which usually require the hostname to start with a letter and consist of alphanumeric characters.

To configure the hostname on a Cisco switch, follow these steps:

  1. Connect to the switch via a console or Telnet connection and log in with your credentials.
  2. Enter configuration mode by typing configure terminal:

switch> configure terminal

Set the hostname with the following command:

switch(config)# hostname <new_hostname>

Replace <new_hostname> with the desired hostname.

  1. To make the change persistent across reboots, save the configuration:
switch(config)# end
switch# copy running-config startup-config
  1. Verify the new hostname with the show running-config command:
switch# show running-config | include hostname
Exit mobile version