Or, “So You Bought This Thing on eBay, Now What?”

TL;DR version: The important bits

If you need to do a factory reset on a Linksys SRW2024P, you will need a DB9 female-to-female straight through cable, not a null modem cable or a typical Cisco cable or anything else. Connect at 38400 8N1, turn the switch on while holding down Ctrl-U in the terminal, at the firmware menu select “D” for delete, and then delete the “startup-config” file. Reboot the switch and it should be reset to and username ‘admin’ without a password.

The whole story

By way of background, I’d been looking for a new ‘core switch’ for my home network for a while, to replace the grown-not-designed arrangement of crummy 5-port desktop switches that had been slowly proliferating throughout the house. A while back in a fit of DIY hubris, I managed to run a lot of Cat 5e cabling through the walls of the house, end-running them to allow me to get a single big switch.

While Ethernet switches are not exactly expensive these days, I had a couple of requirements: I wanted Gigabit, and not just on a couple of uplink ports, but on every port, and I also wanted Power Over Ethernet, so that I could drive IP phones, cameras, wireless APs, and other gadgets in the future without individual power supplies.

While Ethernet switches in general are cheap, GigE + PoE switches are not. You can easily drop several hundred dollars on a new one, and you have to get fairly high up into ‘business class’ territory to find the right mix of features (which is fine, since consumer networking equipment is largely garbage). However, after trolling through eBay for a few days, I noticed an exception: the Linksys SRW2024P. For reasons that aren’t immediately clear, there were a fair number of these things on the ‘bay for around $100, which is a pretty great deal for a managed GigE switch, even before the POE feature.

So, of course, I bought one. And then the fun began.

First, a few notes about the SRW2024P, in case you are thinking about buying one: first, they are loud. One discussion thread described them as “datacenter loud”, and that’s probably fair. You do not want to have one of them in your bedroom or home-office, even in a closet. You might not even want it on the same floor as your bedroom or office, depending on how big your house is. It has a couple of very high-RPM fans that are just obnoxious. Second, the switch you buy will almost certainly not be factory-reset. At least, mine wasn’t, and most people asking questions on support forums don’t seem to have gotten them that way, either.

I think the current crop of eBay specials must be corporate datacenter pulls, and whoever previously owned them was smart enough not to leave them in their default configuration. Good for them, annoying for the next person.

The SRW2024P doesn’t have an easily-accessible reset button. In fact, as far as I can tell, it doesn’t have a reset button anywhere. To do a factory reset, you have to log into the switch via the serial port and wipe the settings file from the firmware. And this is where things get really fun, and brings me to the whole point of this post.

Linksys, aka Cisco, in their infinite wisdom and/or greed, decided against putting a regular serial-console port on the SRW2024P. The port that’s on the front of the unit is a RS232 port, but with the pins arranged in such a way that virtually no widely-available serial cable will work.

There is a lot of misinformation floating around concerning the SRW2024P’s serial port. In particular, there are many suggestions online that you need to use an RS232 null modem cable to connect it to a computer. This is incorrect, and a null modem cable will not work.

What you need is a DB9 female-to-female, straight through cable. Which is not a null modem cable. A null modem cable has the Transmit and Receive Data pins crossed, so that “transmit” at one end of the cable arrives on the “receive” pin at the other; this allows two computers (“DTEs” or “data terminal equipment” in RS232 lingo) to communicate without a pair of modems (“DCEs”, “data communication equipment”, in the middle). Hence the ‘null modem’ name.

Typically, devices with DB9 male ports are DTEs, and female DB9 or DB25 ports are DCEs. If you still have a box of 1990s junk around somewhere, feel free to look at an actual modem. RS232 straight-through cables are typically Male to Female, while null modem cables are typically Female to Female. This is by convention, not Galactic Law or anything, but it’s widely followed.

Except by the SRW2024P. It won’t work with a null modem cable, despite the male DB9 port on the front leading you to (reasonably) think that it would. I tried a number of null modem cables, including the programming cables used by a variety of other switches and routers. None of them worked.

Basically, the SRW2024P has the TXD and RXD pins already swapped inside its DB9 Male connector on the front. This is stupid, because it means you can’t use either a standard null modem cable or a standard straight through cable, because the genders don’t match, but that’s what Linksys did. When the switches were sold new they reportedly came with a special cable, but good luck finding one now.

I wasn’t able to easily find any DB9 F-F straight-through cables, locally or for a reasonable price online; they just aren’t something that get used very often. The cheapest and easiest route was just to create one. To do the job, I just used a couple of these DB9 screw terminal breakout boards, but you could also use a couple of DB9-to-8P8C adapters and a piece of straight-through Cat5. Whatever works. But the important part is that the TXD at one end is wired to TXD at the other, RXD to RXD, and Ground to Ground. None of the other pins seem to matter, since there’s no flow control.

Anyway, once you get the correct cable, the reset process is pretty straightforward:

  1. Connect up the cable

  2. Configure your terminal for 38400 baud, 8 data bits, 1 stop bit, no parity. (Aka “38400 8N1”) I used Minicom on Linux, but you could use any terminal emulator; nothing fancy.

  3. Turn the switch on, while watching the terminal. You should at least see some boot messages. It’s possible for the switch to be set to serial settings other than 38400 8N1, but it seems as though the firmware is always set that way. So if the switch is working and the serial connection is correct, you should see something.

  4. “Try before you pry”, as the fire service saying goes. Before screwing around with the factory reset, it’s worth giving the default login password a try. (It’s ‘admin’ as the user with no password.) In my case this didn’t work, but it’s always worth a shot.

  5. Power cycle the switch. As you turn it back on, press Ctrl-U on the terminal. Within the first second or so of boot, this should drop you into a firmware menu. Pressing ‘D’ for Delete will show you a list of files in the switch’s firmware.

  6. Delete the ‘startup-config’ file but nothing else. Power cycle the switch again. Don’t be alarmed if it takes a while to boot back up. (I had to power cycle it twice; the first time I don’t think I left it unplugged long enough. Give it 10s or so.)

What you should end up with is what you probably wanted in the first place: a switch in factory-fresh condition. From there, you can either continue configuring it via the serial connection, or use the web interface. Beware that the web interface seems to perform poorly on anything except for IE, though.

References and Anti-Insomnia Treatments:

  • How to reset the Switch??? - one of the only useful threads I found on Linksys’ support forums.

  • Real console on Linksys 2024P - I haven’t tried this procedure yet, but it’s allegedly a way of getting a ‘power user’ console on the switch via Telnet, once you’ve factory reset it.

  • Linksys SRW models password reset - One of the few articles that correctly identified the necessary straight-through cable, but it tells you to press Esc on boot to access the firmware reset menu; on mine, I had to press Ctrl-U as documented elsewhere. Perhaps other SRW models use Esc?