Reset the Switch

Disclosure:  I’m not a network engineer and I’m not Cisco certified.  In fact, I’m not a network certified anything and never will be.

Whew, glad that’s out of the way.  So, I found two old, old, old switches lying around.  They were both 100Mbs Cisco Catalyst 2900 Series XL to be exact.  The dates on the fans showed 1999 and I talked to a guy that said they “were here before he got here” which would confirm the date sticker and explain all the dust they had collected.  Why not just e-waste them?  Well, I’ll tell you why.

There happened to be an older 100Mbs switch in operation.  And it didn’t have any backup.  If it died you could just replace it with a new switch.  Easy enough.  But, it seemed like such a waste to have things just collecting dust.  Light bulb, I have a plan!  Keep reading and you’ll find out that after all this work they’ll just keep collecting dust anyhow.  Sweet!

Here’s an inventory of all the stuff

cisco2900seriesxlThis is the switch I was working on

powercableThis is the power cable I used to power up the switch

ciscobluecableThis is a RJ45 cable I found to connect to the switch

rj45todb9This is a RJ45 to DB9 pin connector I used to connect the blue cable above to a laptop (had to find a computer with an I/O port, that’s tough these days; I found an old Dell Win XP laptop that did the trick)

rubberfeetDidn’t have ’em, but these are nifty rubber feet pads I wish I had to avoid scratching up the table

First switch

First things first, I needed to find some kind of administrator’s manual or something.  So I started googling around using terms like “access old Cisco switch” and “connect to Cisco switch.”  Finally though, I got smart and found a link to an actual Cisco’s administrator’s guide to the exact model I was researching.  In the manual (it’s really old), it said you connect to the switch using its command line interface through terminal-emulation software.  Ok, great, that sounds antiquated.  It is, but it’s also trivial and relevant.

Here’s what was involved.

Step 1.  Hook the switch up to the wall for power

Step 2.  Hook the RJ45 cable to the Console port on the switch.  Hook the other end to the DB9 connector and hook that up to the I/O port on the back of the laptop

Step 3.  Power up everything

Step 4.  Launch Hyperterminal (that program buried down in Program Files -> Accessories or something like that)

Step 5.  Connect to it on COM1 using 9600 baud, no parity, 8 data bits, 1 stop bit

That’s it.  I’m in!  I see a command prompt and everything.  There was a moment when I tried to connect through Hyperterminal that I thought to myself there’s no way this will actually work.  But it did and I felt like MacGyver.  So to wipe the device, here’s the commands I ran.

switch>write erase
switch>show vlan (you should now see that only default vlan settings are present indicating everything has been wiped)

Nice, I’m back to an original default settings 100Mbs switch.

Second switch

Now this one was a bit more interesting.  In the end, I did all the things I did on the first switch, but something snagged me at first.  If I recall correctly, it was after I typed “en” at the switch prompt.  It asked for a password and of course I had no idea what that might be.  So I tried “cheeseburger” and “ghost” and for some reason neither worked.  Hmmm…there has to be a way to reset a password.  You’ll destroy the settings, but that’s ok, I’m after that anyhow.

Here’s what was involved.

Step 1.  Unplug the switch (remember it turns on as soon as it is plugged in)

Step 2.  Step 2 above

Step 3.  Hold down the mode button located on the left side of the front panel and then power up the switch

Step 4.  Release the Mode button when the LED above Port1x goes out.

Step 5.  Once on the switch prompt, issue these commands

  • flash_init
  • load_helper
  • dir flash: (make sure you type the colon)
  • rename flash:config.text flash:config.old (password definitions)
  • boot
  • (abort the initial configuration dialog)
  • en
  • rename flash:config.old flash:config.text
  • copy flash:config.text system:running-config (copy the config into memory)

Step 6.  Now let’s work on the passwords

  • conf t
  • enable secret <new secret> (this is what I needed)
  • If you need to do the vty and console passwords, best of luck.  Ok, here’s how you do it
  • line vty 0 15
  • password <new password>
  • login
  • line con 0
  • password <new password>

Step 7.  Finally, write that to memory using write memory

Whala (how do you spell that) – that’s it, password reset to what I want it to be.

Saving the running configuration

Ah, I learned something else too.  I setup a separate VLAN on one of the switches only to find that after reboots, my settings were lost.  Argh!

Turns out, a Cisco IOS router stores configurations in two locations – RAM and NVRAM.  The running configuration is stored in RAM and is used by the router during operation.  Any configuration changes to the router are made to the running-configuration and take effect immediately after the command is entered.  The startup-configuration is saved in NVRAM and is loaded into the router’s running-configuration when the router boots up.  If a router loses power or is reloaded, changes to the running configuration will be lost unless they are saved to the startup-configuration.

To save the running-configuration to the startup configuration, type the following from privileged EXEC mode (i.e. at the “Router#” prompt.)

Router# copy running-config startup-config

Collecting dust

At the beginning of this post I mentioned that these units went back collecting dust.  That’s true.  Why?  There’s no use for them as the original switches are still operational.  Good stuff.

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: