Basic Commands

To enter Enable mode from a User mode;
Router> enable [Enter
Router #
All 'show' commands work only in Enable mode. 
To go back to Enable mode;
Router # exit [Enter]
Router>

To enter Configuration mode you will have to first enter Enable mode.
Router> enable [Enter]
Router # configure terminal [Enter]   (*Note: You can also type conf t)
Router<config> #  

To go back to Enable mode from any higher modes just press [CTRL]+Z on the keyboard.


Commands that are commonly used in Enable mode;
Router # show version [Enter]
- To find the version of the router you are connected to

Router # show clock [Enter]
- To display the date and time which is set on the router
You can manually set the date and time in Enable mode
Router # clock set 12:35:45 27 July 2011 [Enter]
                            hh:mm:ss  

Router # show history [Enter]
- To display the commands that you used previously

Router # show terminal [Enter]
- To show the size of the history set on your router.

This history size can be manually changed in Enable mode
Router # terminal history size 30 [Enter(*Note: The maximum size you can give is 256)

As mentioned before any configurations that you do on a router are stored temporarly in RAM. These configurations can be displayed using the show command.
Router # show running-config  [Enter] (*Note: You can also use show run)


Commands in Configuration mode;
To change the host name of the router you need to first enter configuration mode.
Router # conf t [Enter]
Router<config> # hostname R1 [Enter]
R1<config> #
You can remove the host name as well
R1<config> # no hostname [Enter]
Router<config> #

You can set a password for Enable mode in configuration mode
Router<config> # enable password cisco  (*Note: Where cisco is the password you entered)
Doing so will always prompt you for a password when you try to enter Enable mode from User mode.
You can remove the password as follows;
Router<config> # no enable password [Enter]

The password that you set for Enable mode can be viewed easily using the show run command. So to encrypt a password we do as follows;
Router<config> # enable secret ccna [Enter]
Now if you use the show run command in Enable mode, it will display the configurations from RAM, but the password will show encrypted (ie, non human readable form)

Entering a Router -
There are three ways you can access a router;
- through the Console Port
- through Auxilary Port
- through VTY (Virtual Tele Type)
Console Port and Auxilary Ports are normally found at the back of the routers. They are physical access to a router. A Console Cable is used to connect a router with a PC.
Console Cable
The RJ45 part of the cable is connected to the Console Port at the back of the router and the other part of the cable is connected to the Serial COM Port at the back of a PC. So the PC becomes a Console machine.

Console access to a router has to be always protected by a password. This is done as follows;
Router<config> # line console 0 [Enter]
Router<config> # password cisco [Enter]
Router<config> # login [Enter]  
By doing so if anyone tries to access the router from the console machine it will prompt them for a password.
If you dont want command to be asked (Not recommended), do as follows;
Router<config> # line console 0 [Enter]
Router<config> # no password [Enter]
Router<config> # login [Enter]  

To set a password for Auxilary access the process is the same;
Router<config> # line aux 0 [Enter]
Router<config> # password cisco [Enter]
Router<config> # login [Enter]
To disable the password;
Router<config> # line aux 0 [Enter]
Router<config> # no password [Enter]
Router<config> # login [Enter]

VTY (Virtual Tele Type) -
Lets consider the figure below.
We have 10 PCs connected to a Switch. The Switch is connected to a router using an Ethernet cable. Now these 10 PCs would like to access the router. This is possible using the telnet command in the command terminal (which you will learn a little later). For this telnet command to work on these PCs the router needs to be first configured with the vty command. This is done as follows;
Router<config> # line vty 0 10 [Enter]
Router<config> # password cisco [Enter]  
Router<config> # login [Enter]
This will prompt the PCs trying to access the router to provide a password to access it.
Instead of 'line vty 0 10' if we put 'line vty 0', this means that the first PC to access the router will be asked for the password and the rest 9 PCs will not be asked for the password. 
You can also do as follows;
Router<config> # line vty 0 10 [Enter]
Router<config> # no login [Enter]
Doing so will not prompt for a password  for vty (telnet) users.

If you would like to encrypt passwords for Enable mode, Console access, Vty access using a single command, you can do so as follows;
Router<config> # service password-encryption [Enter] 
To disable this do as follows;
Router<config> # no service password-encryption [Enter]