Today was the day to configure the network of my sandbox. My boss told me that in order to have a controlled test environment I should have my own router and switch. We have a Cisco router unused and a switch and I've set all up.

Basically the hardware was old and we didn't event knew the passwords to access so I've had to do a factory reset. On the switch has been really straightforward; there is a "Reset" mini-button on the chassis. Just press it when the device is on and all the configuration is gone.

On the router, though, is a little bit more difficult. First of all you need to connect to the router via a Serial cable. This can be done using the Serial cable and a USB-RS232 adapter. Once plugged in, is as easy as install "minicom and lrzsz", configure it and connect to the router. You can follow this guide were everything is explained [1]. Easy as pee.

Now that "we are in", we are unable to do anything because a password is required. You need to enter in "privileged" mode in order to remove the configuration and is an egg-chicken problem. What I've done is to power off the router, remove the Flash memory and boot up again; when the router starts without Flash memory enters in ROMMON mode - I think that pressing Control+Break key on the boot up does exactly the same. Anyway, on ROMMON mode you can execute a command basically saying "the next time you boot, please ignore the configuration file of the Flash". Then you just plug in the Flash memory and restart the router. On booting, will completely ignore the "old" configuration and will start from zero. If then you copy whats in the running-config (anything at all) to the startup-config, you will delete everything of the old configuration. Kinda cool. You can see how to do it here [2]

After I gained access to the router as admin I set up an IP, DHCP with "sticky IP's"[3], etc... I tested to connect directly connecting a Ethernet cable to my laptop and then connecting it to the switch. And everything worked just fine, so after an hour I had configured a basic network. Tomorrow I'll open the access to the router via HTTP and SSH and I will connect it to our corporative network in order to have access to the Internet and from my house.
Shortly I'll start RAID test that I'm really looking forward to start! :D
Stay tuned!

[1] http://www.phocean.net/2007/11/13/how-to-connect-to-a-cisco-device-using-the-serial-port-on-linux.html

[2] http://www.networkworld.com/community/node/27268

[3] http://networkingtips-tricks.blogspot.com.es/2010/05/how-to-configure-dhcp-on-cisco-router.html