Sunday, June 22, 2008

Spanning Tree Protocol Verification

Spanning-Tree Verification

Cisco IOS Software Release 12.0

2900#show spanning-tree brief

Displays the spanning-tree table of the switch

Cisco IOS Software Release 12.1

Switch#show spanning-tree

Displays the spanning-tree table of the switch


2950#show spanning-tree int fa 0/17

Displays spanning-tree info for port fa 0/17


2950#show spanning-tree vlan x

Displays spanning-tree info for the specific VLAN


2950#debug spanning-tree {all}

Displays all informational messages about changes in the spanning-tree topology


Wednesday, June 18, 2008

Setting IP Address and Default Gateway on a Cisco Switch

Setting IP Address and Default Gateway

1900 Series Switch

1900Switch(config)#ip address 172.16.10.2 255.255.255.0

Sets the IP address and mask to allow for remote access to the switch

1900Switch(config)#ip default-gateway 172.16.10.1

Sets the default gateway address to allow IP information an exit past the local network

1900Switch(config)#


2900/2950 Series Switch

2900Switch(config)#int vlan1

Enters virtual interface for VLAN 1, the default VLAN on the switch

2900Switch(config-if)#ip address 172.16.10.2 255.255.255.0

Sets the IP address and mask to allow for remote access to the switch

2900Switch(config-if)#exit

2900Switch(config)#ip default-gateway 172.16.10.1

To allow IP information an exit past the local network


Tip:

For the 2900/2950 series switches, the IP address of the switch is just thatthe IP address for the entire switch. That is why you set the address in VLAN 1the default VLAN of the switchand not in a specific Ethernet interface.

Friday, June 13, 2008

Password Recovery on a Cisco Switch

Procedure for performing a password recovery on a Cisco 2950 switch (and probably other models, as well).

1. Unplug the power cable

2. Hold down the mode button while replugging the power cable

3. Type flash_init over the console

4. Type load_helper

5. Type Dir flash :
//make sure to type the semi-colons

6. Type rename flash:config.txt flash:config.old
//the password is contained in the config.txt file

7. Type boot
//this reboots the system

8. Type n to skip the initial setup configuration

9. Type enable
//this takes you to the enable mode

10. Type rename flash:config.old flash:config.txt

11. Save config.txt to system
#copy flash:config.txt system:running-config

12. Enter config mode and change the password
# config t
# no enable secret
//this applies only if the enable secret password was created

13. Finally, write the changes to memory
# write memory