How to configure Cisco switch?

In this article, we'll see how to configure a Cisco switch. Once you configure your Cisco switch, you can start managing your Cisco switch and maintain its versatility, power and performance. Learn how to configure and manage a Cisco Switch with the basic CLI switch commands and configuration steps.

Steps to configure Cisco switch using CLI

Step 1: Use an external emulator such as Telnet or a PuTTY to login to the switch.

  • Initial command prompt "Switch>" appears on the screen.
  • Type "enable" next to it and press "Enter".
  • This will take you into the "EXEC" mode, also known as the Global Configuration mode.
  • Go into configure mode using configure terminal.
  • Enter the configuration commands one per line.

Switch# configure terminal

Step 2: Provide a hostname for the switch to function in a particular network environment

Switch(config)#hostname switch

Step 3: Configure an administration password (enable secret password)

Switch(config)#enable secret somestrongpass

Note: This password will have to be given before entering into config mode, once it is configured.

Step 4: Configure default gateway

Switch(config)# ip default-gateway IP-address
Switch# show ip route

Step 5: Configure static route

Switch(config)# ip route dest_IP_address mask
Switch# show running-config

Step 6: Configure interface description

Switch(config)#interface fastethernet 0/1
Switch(config-if)#description Development VLAN

Step 7: Clear MAC address table

switch#clear mac address-table

Step 8: Set Duplex mode

Switch(config-if)#duplex full

Step 9: Exit interface configuration mode


Step 10: Exit config mode


Step 11: Copy the running configuration into startup configuration using below command

Switch#write memory
Building configuration... [OK]

How to configure a Cisco switch with Network Configuration Manager?

You can use Network Configuration Manager's Configlet feature to configure Cisco switch. You can automate the process by pushing the commands for configuring a switch to multiple devices at one go. In case, you want us to help you with configuring your switch on Network Configuration Manager's console, you can contact NCM support.

Configlet Name Configure Cisco Switch
Description Script execution mode
Execution Mode This configlet is used to configure Cisco switch along with basic configuration commands
Configlet Content

configure terminal
hostname switch
enable secret somestrongpass
ip default-gateway IP-address
show ip route
ip route dest_IP_address mask
show running-config
interface fastethernet 0/1
description Development VLAN
clear mac address-table
duplex full
write memory

The above table shows how the configuration commands will appear on Network Configuration Manager's Configlet command tab.