cisco worldNovember 10, 2008 12:34 am

Step 1: Reset the console password.
Have a classmate change the console and vty passwords on the switch. Save the changes to the startup-
config file and reload the switch.  
Now, without knowing the passwords, try to gain access to the switch.  
Step 2: Recover access to the switch  
Make sure that a PC is connected to the console port and a HyperTerminal window is open. Turn the
switch off. Turn it back on while holding down the MODE button on the front of the switch at the same
time that the switch is powered on. Release the MODE button after the SYST LED stops blinking and
stays on.  
The following output should be displayed:  
The system has been interrupted prior to initializing the flash files
system. The following commands will initialize the flash files system,
and finish loading the operating system software:  
flash_init 

load_helper 
boot
 
To initialize the file system and finish loading the operating system, enter the following commands:
switch:flash_init 
switch:load_helper 
switch:dir flash:
Note: Do not forget to type the colon (:) after flash in the command dir flash:. 
Type rename flash:config.text flash:config.old to rename the configuration file. This file contains the
password definition. 

Step 3: Restart the system.
Type the boot command to boot the system. Enter n when prompted to continue the configuration dialog,
and y when asked if you want to terminate auto-install.
To rename the configuration file with its original name, type the command rename flash:config.old
flash:config.text at the privileged EXEC mode prompt. 

Copy the configuration file into memory: 
Switch#copy flash:config.text system:running-config 
Source filename [config.text]?[enter] 
Destination filename [running-config][enter] 
 
The configuration file is now reloaded. Change the old unknown passwords as follows: 
ALSwitch#configure terminal 
ALSwitch(config)#no enable secret 
ALSwitch(config)#enable secret class 
ALSwitch(config)#line console 0 
ALSwitch(config-line)#password cisco 
ALSwitch(config-line)#exit 
ALSwitch(config)#line vty 0 15 
ALSwitch(config-line)#password cisco 
ALSwitch(config-line)#end 
ALSwitch#copy running-config startup-config 
Destination filename [startup-config]?[enter] Building configuration… 
[OK] 
ALSwitch#  

cisco worldNovember 7, 2008 3:43 am
Basic Router Configuration Commands

Note: Erase the content of the NVRAM (for LAB only) before start.

TO ERASE CONTENT OF NVRAM

write erase

TO LOAD DEFAULT ROUTER CONFIGURATION

netload

TO SETUP ROUTER NAME

      enable
      config t
      hostname [name]

SETUP LOCAL PASSWORD      

enable secret [password]

SETUP TELNET SETTINGS AND PASSWORD

line vty 0 4
login
password cisco

SETUP CONSOLE AND PASSWORD

line console 0
login
password cisco

SETUP ROUTER ROUTING PROTOCOL

router rip
network (NW #)
network (NW#)
^Z

CONFIGURE THE ROUTER INTERFACES

int [int]          (i.e. e0, e1, S0, S1)
ip address [host address] [subnet mask]
No Shutdown
clockrate 56000    (note: valid for DCE interface only]
no shutdown
^Z

TO SETUP THE HOST NAMES

ip host [hostname] [ip addresses of interfaces]

TO SAVE THE CONFIGURATION TO NVRAM

copy running-config startup-config