This link here explains how to reset passwords on a Cisco 3560 switch.
So how do we recover a lost or forgotten password on a 3560 switch?
There are two options, one when password recovery is enabled and one when it's disabled.
In our example, we have a default configuration where password recovery is permitted.
So we need to connect to the console of the device, now in packet tracer, we can either do that by
dragging a PC into the topology and then connecting it via a console cable.
So I could connect to the console of the switch and have a look
at the switch directly through the console, password here is unknown, I'm not going to do it that
way.
I'm simply going to click on the device, which gives me a console connection anyway
but please be aware that in the real world, you would need to physically connect a PC to the console
of your switch or router when doing password recovery.
Now, the next step is to make sure that you're using 9600 bits per second in your terminal emulation software
that's the default in packet tracer.
We need to power off of the switch and then reconnect the power cord and then within 15 seconds,
press the mode button while the system LED is still flashing green.
Continue pressing the mode button until the system LED turns briefly amber and then solid green
and then release the mode button.
In my example, I can't physically unplug the power through packet tracer.
So I'm going to power cycle the devices that power cycles all the devices, but I've already reset
the configuration of my routers, so that's fine.
I'm going to press the mode button on the switch, which then allows me to access ROM MON on the switch.
Now, some tips, if that doesn't work, power cycle the device and then click the mode button two or three
times
to get packet tracer to take you to ROM monitor mode.
So notice now that the boot process was terminated, question mark, Enter shows me that I'm in ROM MON
mode.
Now that we've got into ROM monitor mode, we need to use the command flash in it.
So here's the command flash in it, we're told that the flash is already initialized, so be aware that
packet tracer may be a little bit different to the real world.
This command, as an example, is not required and is not supported in packet tracer, so the next
command is to look at flash, so DIR flash,
there's the contents of flash on the switch.
We told to rename the config text file as config text old, so there's our config text file.
So rename flash config, text as flash config, text old before I press enter let's verify that.
That's what we're told to do, so that looks right, press enter DIR Flash, the file has been renamed.
So that was the original name.
This is the new name.
Now, in the real world, when you boot the switch, it will take you to the initial configuration
dialog.
So boot,
let's see if that actually works in Packet Tracer.
What we should be able to do is now bypass
the configuration and type enable
and then rename the config back to what it was, copy the configuration,
reset passwords and save the configuration and then reload the switch.
So for the real world, have a look at the Cisco documentation for your relevant device. In packet tracer
however, the original configuration has been applied, so that doesn't work entirely.
So what I'm going to do is erase the startup configuration, we do have the startup configuration in
Flash, we can't see that here
but if I go back to the physical device view and power cycle the device and press the mode button.
Notice in Flash, I can see the original configuration.
So I could use that to replace the running config on the switch.
So what I'm going to do is boot the switch
and then once it's booted
I'll be able to erase the NVRAM.
Switch is not booted up, again enabled doesn't work, I'm going to erase the NVRAM.
That actually has taken me directly to privilege mode in Packet Tracer.
That wouldn't happen in the real world.
What we need to do is power cycle the device again
and now when it reboots
we should see an initial configuration dialog.
Which we do, which I can now bypass.
So essentially in packet tracer we had to do an extra step.
We didn't just boot the device up, we had to erase the startup configuration in packet tracer and then boot
the device.
So if I type enable, I'm in privilege mode.
So show startup configuration shows us that no startup configuration exists
but I do have this file stored in Flash.
So I could now follow the steps on the Cisco documentation
and rename the file.
That command isn't supported in Packet Tracer
So what I'm going to do is simply copy the configuration to the running-config, so copy flash config
.text.old to running config.
Doesn't like that command so let's do a copy flash to running-config.
Source file will be config.text.old,
destination will be the running-config. Notice now that a loopback interfaces come up, switch name has
changed to switch 1.
Previously it was switched.
Now it's switch 1.
So show run shows us
the secret password of the switch, which we don't know, can see the hostname, we can see some other
configuration on the switch, including EIGRP and an IP address on the switch.