How to configure Hostname in Cisco Catalyst 9200?

To Configure the hostname on a Cisco Catalyst 9200 switch is a straightforward process. You’ll need to enter the global configuration mode and then specify the hostname. Here are the steps:

To configure Hostname on a Cisco Catalyst 9200 switch, you need to perform the following steps using the Cisco IOS command-line interface (CLI):

  • Access the Command Line Interface (CLI)

Connect to the switch either via console, SSH, or Telnet.

  • Enter Privileged EXEC Mode

If you’re not already in privileged mode, type enable and then enter the enable password if prompted.

Switch> enable
  • Enter Global Configuration Mode

Type configure terminal or simply conf t.

Switch# configure terminal
  • Set the Hostname

Type hostname <your_desired_hostname> where <your_desired_hostname> is the name you want to assign to the switch.

Switch(config)# hostname MySwitch
  • Exit Configuration Mode

Type exit to exit from global configuration mode.

MySwitch(config)# exit
  • Verify the Configuration

You can verify that the hostname has been set correctly by typing show running-config or show startup-config. Look for the line that starts with hostname to confirm.

  • Save the Configuration

If you’re satisfied with the changes, make sure to save the configuration by typing write memory or copy running-config startup-config.  

MySwitch# write memory

After these steps, your Cisco Catalyst 9200 switch will have the hostname “MySwitch”.

The summary of the configuration steps would be as per below :-

Switch> enable
Switch# configure terminal
Switch(config)# hostname MySwitch
MySwitch(config)# exit
MySwitch# write memory