Lets take a little time to check out the Cisco hardware and operating system IOS. One of the reasons I went with building my own small rack was so that I could be familiar with the quirks and foibles of the Cisco hardware and OS. While there is no problem with simulators and emulators, sometimes there is no substitute for having the gear right in front of you.
For example, one of the faults I recently had involved a power cable. That is the sort of trouble shooting that simulators really don’t do that well. And well, all those flashing LEDs are somehow magical!
And with that, lets dive in to the hardware.
The Boot Sequence
The first thing you are going to do with your new pieces of Cisco hardware is plug ’em in and turn ’em on! So what happens when you do that? There is a clear boot sequence that all Cisco routers and switches run and in many ways it is just like your own PC in terms of what it does, although some of the terms used may not be all that familiar.
This is the Cisco graphic for the boot sequence. The first thing your router or switch does is check itself – does everything work? This is called POST (Power On Self Test) and is run out of the ROM monitor code.
Once the POST passes, the bootstrap part of the ROM code goes and looks for the operating system.
The OS could be in one of two places; the Flash or an external TFTP server. Flash is ‘essentially’ the same as your PC hard drive; someplace to keep the OS. If the OS is not in Flash, the bootloader will look for any TFTP servers (Port 69, UDP) that might have the OS image. Once it finds an image, it will load that image in RAM. Things run faster, much faster from RAM.
If however there is no IOS image, the bootloader fails and drops back into ROM MON mode. This is the monitor code, run out of ROM (like the BIOS on a PC) and it can be used to load IOS, and do basic troubleshooting IF the OS doesn’t load. ROM MON is also the mode you drop into if you interrupt the IOS loading and can be used to wipe passwords and configurations from the system. This can be extremely useful if you ever buy used equipment!
Once the IOS loads into RAM, the IOS takes over and goes looking for the initial configuration file. It checks NVRAM and if there is no config file there, it will check to see if there is a TFTP server with a config file. NVRAM is like your C drive – its where you keep handy files, like config files. If a config isn’t found, it will drop into configuration mode, which is the mode it drops into when you power up a new machine, or wipe a used machine of its config.
So the beast lives, what now?
Lets hook up your computer to the console port and see whats going on in that box. To do this, you need a console cable.
Here is a handy picture of one. You see the problem right away don’t you? Chances are, if your computer, be it a laptop or desktop, is even remotely modern, it doesn’t have a serial port and that DB9 won’t plug into a USB port, so you will need a USB to serial cable. There are quite a few around and they are cheap.
Once you have that connected, you can hook in via terminal emulator. Now I am a linux guy so you windows folks are on your own here, but I’m guessing you will use Hyper terminal. What ever you use and how ever you do it, you need to make sure your serial port settings are correct.
- 9600 / 8 / N / 1 – for 9600 baud, 8 data bits, 1 stop bit, no parity.
Hit return a few times and lo and behold, you should see signs of life. Probably the config questions or if the box is used, some configuration with some crazy looking hostname and perhaps a password requirement. Time to hit Google up for instructions on how to wipe and reconfig.
Once you have an open router or switch, meaning you can get in and type commands, we should discuss modes. IOS has various modes of operation, designed to keep us from inadvertently messing with the config. Now I know that sounds counter intuitive because we intend to mess with the config as much as possible, but in a production environment, this is exactly the kind of safeguards you need.
User Exec Mode
- Indicated by the > prompt
- Very limited commands
Use of the command enable will get you into: (enable might be password protected depending on configuration)
- Indicated by the # prompt
- Allows all verification command (like show)
- Good for trouble shooting and verifying correct operation and configuration
Using the command configure terminal (or conf t) gets you into:
Global Configuration Mode
- indicated by a (config)# prompt
- from here, all other config modes are available
- Changes can be made to configuration files
And remember kids, once you have written your new configuration (copy run start), try a reload command.
A few more things that might come in handy
The privilege and global config modes can be password protected to prevent unauthorized access.
enable secret will protect privilege mode
enable password will protect global configuration mode.
There are other ways of protecting your cisco hardware like adding logins to the console port and using SSH and telnet (with logins) but that will be discussed later.
When in any config mode, end will take you back to privilege mode
exit takes you back one mode
<ctrl> z backs you out from global config to privilege mode and writes your last command
<ctrl> c exits global config and does not apply the last command.
It took me a few weeks before I realized what the little mode button did on the front of the switches and I thought it worth highlighting simply for that reason. This may help with troubleshooting too.
The lights on the front of the switch have 4 modes:
- Stat (default) – – shows usage
- Util – – shows utilization
- Duplex – – shows full duplex
- Speed – – shows port speed.
Pressing the mode button will cycle you through these modes.
The system light should glow green for a good system. If it doesn’t glow green, its time to panic!
The RPS light should be off. It stands for Redundant Power Supply, so unless you have a redundant PSU, its not something you need to worry about.