Cisco Switch Commands
Cisco Switch Commands
commands (CCNA)
Command descriptions
switch#show running-
config Displays the current configuration in DRAM.
switch#show startup-
config Displays the current configuration in NVRAM.
Switch#delete
flash:vlan.dat Removes the VLAN database from flash memory.
Delete filename
[vlan.dat]? Press Enter
Delete flash:vlan.dat?
[confirm] Press Enter
Switch#erase startup-
config Erases the file from NVRAM.
Switch#configure
terminal Moves to global configuration mode
Switch1(config)#
To Set Passwords
Switch(config)#enable
password vinita Sets the enable password to vinita
Switch(config)#enable
secret nikki Sets the encrypted secret password to nikki
Switch(config)#line
console 0 Enters line console mode
Switch(config-
line)#password vinita Sets the password to vinita
Switch(config-line)#exit Exits line console mode
Switch(config-line)#line
vty 0 4 Enters line vty mode for all five virtual ports
Switch(config-
line)#password vinita Sets the password to vinita
Switch(config)#
Switch(config-if)#ip
Sets the IP address and netmask to allow for
address 192.168.0.10
255.255.255.0 remote access to the switch
Switch(config-if)#exit
Switch(config)#ip
Allows IP information an exit past the local
default-gateway
192.168.0.5 network
Switch(config)#interface
fastethernet 0/1 Enters interface configuration mode
Switch(config-
if)#description Finance Adds a description of the interface
VLAN
Switch(config-if)#duplex
full Forces full-duplex operation
Switch(config-if)#duplex
auto Enables auto-duplex config
Switch(config-if)#duplex
half Forces half-duplex operation
Switch(config)#interface
fastethernet 0/1
Switch(config-if)#speed
10 Forces 10-Mbps operation
Switch(config-if)#speed
100 Forces 100-Mbps operation
Switch(config-if)#speed
auto Enables autospeed configuration
switch#show mac
address-table Displays current MAC address forwarding table
switch#clear mac
address-table dynamic Deletes only dynamic entries from table