Configuring Catalyst Switches

When you power on a new purchased Switch for the first time, it runs a series of Power-On Self Tests (POSTs) operations. A  POST is designed to verify the basic operations of the network interfaces, memory, and CPU.

The following post results are visible when we power on a newly purchased switch or reload a freshly erased switch:

show version command

show version command provides information about the device, including its IOS version number, type of interface, device model number, and device serial number.

Configure console port protection with one password:

To configure the password on the switch, give the following commands:

Switch>enable //used to enter in the   privileged exec mode
Switch#configure terminal //used   to enter in the global configuration mode   Switch(config)#line console 0 //used   to enter in the line console   
Switch(config-line)#login //used   to login the switch   
Switch(config-line)#password charu //used to provide the password   
Switch(config-line)#^Z //used to move in the privileged exec mode   
Switch#    

To verify that password is configured, give “logout “command and if it is configured then “Password:” appears on the screen.

Switch#logout //used to exit from the switch
Switch con0 is now available
Press RETURN to get started.
User Access Verification
Password: //is seen if password   is configured   

Enable Password  

The enable password is used when we move from user EXEC mode to Privileged EXEC mode. Privileged EXEC mode gives an opportunity to view and change the configuration. The enable password is stored in the plain text in the configuration file.

Configuring the enable password

Switch>enable
Switch#configure terminal 
Switch(config)#enable
password gunjan
Switch(config)#exit
Switch#    

The enable password is not encrypted. We use “show running-config” command to see the enable password.

Switch#show
running-config    

Enable secret password

The enable secret password uses an encryption algorithm. It is more secure password as compared to the enable password. This password does not encode the password.

Configuring the enable secret password

Switch#configure terminal
Switch(config)#enable secret poonam
Switch(config)#exit
Switch#    

We use the “show running-config” command to see the encrypted password.

Switch#show
running-config 

Configuring an IP address in the Switch

The IP address configured on switch’s interface is used to manage the particular interface of the switch. To manage the entire switch, we have to configure an IP address to the interface VLAN1.

We use following commands to configure IP address in the switch:

Switch>enable
Switch#configure terminal
Switch(config)#interface vlan1
Switch(config-if)#ip address 192.168.10.2   255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#    

To verify that an IP address is configured on the switch, we use “show int vlan 1” command.

Switch#show
int vlan 1 

show flash

The show flush command will list the content of the flash memory. It is useful to know information about the size of IOS, name of IOS, and available memory space in a flash.

 Switch#show flash

show vlan

show vlan command displays the VLANs. For the administrative purpose, switch automatically creates VLAN 1.

 Switch#show vlan

show ip interface brief

We use “show ip interface brief” command to display all interfaces on the switch.

 Switch#show  ip interface brief

Saving running configuration in the switch

Switch stores all running configuration in RAM. All data is erased from the RAM when we turned off the device. To save the running configuration in the switch we use “copy running-config startup-config” command:

 Switch#copy running-config startup-config