Chapter 3: Configuring the Switch

Commands:

3.2.1 Clearing a configuration and Cisco 2900 Series

IOS

Switch#show running-config

Switch#erase startup-config

Switch#copy running-config startup-config

CLI

Switch> (enable) clear config all

 

3.2.2 Setting a password

IOS

Set EXEC level password
Switch(config)#enable password level 1 password

Set privileged level password
Switch(config)#enable password level 15 password

Switch(config)#enable secret password

CLI

Set privileged level password
Switch> (enable) set enablepass

vty and con passwords
Switch> (enable) set password

 

3.2.3 Naming the switch

IOS

Switch(config)#hostname hostname

CLI

Switch> (enable) set system name name-string

Switch> (enable) set prompt name

 

3.2.4 Configuring the switch for remote access

IOS

The switch in-band management, management vlan
Switch(config)#interface vlan 1

Switch(config-if)#ip address ip-address netmask

Switch(config-if)#ip default-gateway ip-address

Switch#show ip interface

CLI

The switch in-band management, management vlan
Switch> (enable) set interface sc0 up

Switch> (enable) set interface sc0 ip-address netmask broad

Switch> (enable) set interface sc0 vlan

Switch> (enable) set ip route default gateway-address

Switch> (enable) show interface

 

3.2.5 Identifying individual ports

IOS

Switch(config-if)#description description-string

CLI

Switch> (enable) set port name mod/num description

Switch> (enable) show port name mod/num

 

3.2.6 Defining link speed

IOS

Switch(config-if)#speed [10 | 100 | auto]

CLI

Switch> (enable) set port speed mod/num [10 | 100 | auto]

 

3.2.7 Defining line mode on a switch

IOS

Switch(config-if)#uplex [auto | full | half]

CLI

Switch> (enable) set port duplex mod/num [auto | full | half]

Switch> (enable) set port enable mod/num

 

3.3.1 Command-line recall

history

 

3.3.3 Show commands

IOS

Switch#show running-config

Switch#show ip interface

CLI

Switch> (enable) show config [all]

Switch> (enable) show interface

Switch> (enable) show module

 

3.3.5 Setting idle timeout

IOS

Switch(config-line)#exec-timeout minutes

CLI

Switch> (enable) set logout minutes

 

3.3.6 Verifying connectivity

IOS

Switch#ping ip-address

CLI

Switch> (enable) ping ip-address

 

3.3.7 Backup and restoration of a configuration using a TFTP server

IOS

CLI

Switch> (enable) write net (upload)

Switch> (enable) configure net (download)

Switch> (enable) copy config [flash | file-id | tftp]

Switch> (enable) copy flash [flash | file-id | config

 

3.3.8 HTTP switch commands

IOS

CLI

Switch> (enable) set ip http server enable

Switch> (enable) set ip http port port-number default

Switch> (enable) set authentication login

Switch> (enable) show authentication