Saturday, August 15, 2009

Getting To Know The IOS & The Device

I'll just quickly explain in the best way I can a few things about Cisco IOS. Cisco IOS is loaded from flash into RAM when the router boots (thats all the ##### you see). After the IOS has loaded you have have yourself a nice little OS running in memory. By typing a ? at whichever prompt you are at you will see the commands available. And by typing a ? after a command you will see all the subcommands available. This is super cool if you get stuck and need to know what comes next.

After IOS loads it will look in a number of places for the startup-config (NVRAM, Network), but generally it will load this from NVRAM. If it's a new router with no startup-config you'll be prompted to configure the router (don't do this though, it's boring!). As you type commands and change the configuration the changes are entered into the running-config which is in RAM. It's only when you save the running-config that this configuration overwrites the startup-config. So if a mistake is made and you mess up bad and you haven't saved the running-config to the startup-config the router can be simply rebooted to revert back to the startup-config or to a blank configuration.

So i've heard, during the CCNA exam the whole command needs to be typed (or use tab to complete) so i'll be doing that here to get familiar with the commands. In reality only enough of the command needs to be typed to make it unambiguous. So for example:

conf t
configure terminal

These are both the same command. You could press tab after typing "conf" and it would complete the command for you. The commands are not case sensitive and if you screw up IOS will tell you and show you where with a ^ symbol. I know what your thinking, sweet!

Also, IOS is really helpful, if you don't know what to type next just type ? at the end of the command and it will tell you what can come next. Have a play, you'll soon get the hang of it. I suggest though that if your going to take a Cisco exam just get used to using the tab key because if you use "sh run" instead of "show running-config" in the exam they'll have you for it!

Right, after connecting to the device, in GSN3 this is as simple as starting the device and clicking the console option. If your in Windows and physically connecting to a device you will need one of the blue cisco console cables connected to the console port on the device and HyperTerminal. HyperTerminal needs to be configured with:

Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None

Once the device boots, just type no when prompted to enter the initial configuration dialog and you'll be sitting at a > prompt. By typing ? at the prompt you'll see available options. From here you can use network diagnostic tools such as Ping and Traceroute as well as a few others.

From here we can look at the some information on the device.

Router>show version

As you can see from the output we can see all sorts of details on the device such as the types of interfaces, the memory, the configuration register (we'll get back to this later),

Also by typing show ? you will see a list of the other settings you can view, such as SNMP Statistics, Telnet user sessions, memory, IP information, Flash etc...

Router>show ?

From the user mode we are currently at you can't really do much in the way of changing the config on the device. You need to enter into Enable mode to do that. To enter into Enable mode just type enable. Notice that the prompt changes from the > to a # . This is a good indicator of what mode your in. From here type ? to see the additional options available.


Have a look around at the additional options and the new show options ( show ? ) and to return to user mode just type disable.

In this post we have just looked at the IOS and started to get familiar with it. Notice how we have been able to navigate round the IOS pretty freely without needing any credentials. In the next post i'll be locking the router down.

No comments: