Cisco IOS - basic operations

Cisco IOS (originally Internetwork Operating System) is the software used on the vast majority of Cisco Systems routers and current Cisco network switches. (Earlier switches ran CatOS). IOS is a package of routing, switching, internetworking and telecommunications functions tightly integrated with a multitasking operating system.

Default user interface   -   Command line interface (CLI)

Versioning
Cisco IOS is versioned using three numbers and some letters, in the general form a.b(c.d)e, where:
 - a is the major version number.
 - b is the minor version number.
 - c is the release number, which begins at one and increments as new releases in the same a.b train are released.
 - d (omitted from general releases) is the interim build number.
 - e (zero, one or two letters) is the release train identifier.

Trains
Cisco IOS releases are split into several "trains", each containing a different set of features. Trains more or less map onto distinct markets or groups of customers that Cisco is targeting.
 - The mainline train is designed to be the most stable release the company can offer, and its feature set never expands during its lifetime. Updates are released only to address bugs in the product. The previous technology train becomes the source for the current mainline train — for example, the 12.1T train becomes the basis for the 12.2 mainline. Therefore, to determine the features available in a particular mainline release, look at the previous T train release.
 - The T - Technology train, gets new features and bug fixes throughout its life, and is therefore less stable than the mainline. (In releases prior to Cisco IOS Release 12.0, the P train served as the Technology train.) Cisco doesn't recommend usage of T train in production environments unless there is urgency to implement a certain T train's new IOS feature.
 - The S - Service Provider train, runs only on the company's core router products and is heavily customized for Service Provider customers.
 - The E - Enterprise train, is customized for implementation in enterprise environments.
 - The B - broadband train, support internet based broadband features.
 - The X* - The XA, XB ... special functionality train, needs to be documented

There are other trains from time to time, designed for specific needs — for example, the 12.0AA train contained new code required for Cisco's AS5800 product.

For example, release 12.3(1) is the first mainline Cisco IOS release of version 12.3. 12.3(2) is the next release, and so on. 12.3(1)T is the first release of the T train, 12.3(2)T the next, and so on. Interim builds are candidates for the next release, and are frequently made available by Cisco support as a faster way to provide fixes for bugs before the next release is available. For example, 12.3(1.2)T is the 2nd interim build after release 12.3(1)T.

Cisco IOS commands

Usefool Commands

Router(config-line)# logging synchronous
When you work on the Cisco Router or Catalyst Switch console, it would be annoying to have the console or terminal (telnet/ssh) logs to pop in between your commands. This can be even more irritating when it is busy switch or a router spitting messages continuously.

Router# terminal monitor
To display debug command output and system error messages for the current terminal and session

Router# show memory
                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor   622E1E00    97640960    25784424    71856536    68734068    68167868
      I/O   40000000    16777216     9593064     7184152     6576392     6686144
check the amount of a router's free memory.

Router# show processes cpu
CPU utilization for five seconds: 37%/31%; one minute: 39%; five minutes: 40%

displays your router's CPU utilization and a list of active processes along with their corresponding process ID, priority, scheduler test (status), CPU time used, number of times invoked, and so on. This command is also very useful when you are evaluating your router's performance and CPU utilization.

Restarting or Rebooting
Restart immediately - To restart or reboot a Cisco immediately, in enable mode:
Router#reload
Restart or Reload in N Minutes
Router#reload in 5
Extra Tip: This is useful when you are afraid that the configuration changes you are about to make might break something or lock you out of the router. You tell the router to reload in a certain number of minutes, then make your changes. If it turns out your changes are catastrophic and you can't log back into the router to fix them, the router will reload in a few minutes and go back to its previous configuration.


Router Models
Router> User mode
Router# Privileged mode
Router(config)# Global configuration mode
Router(config-if)# Interface mode
Router(config-subif)# Subinterface mode
Router(config-line)# Line mode
Router(config-router)# Router configuration mode
Router(config-if)#exit Exit interface mode, return you mode before
Router(config)#
Router(config-if)#end
Router#
Exit interface mode, return to global configuration mode,  (CTRL+Z)
Global Configuration Mode
Router> Can see config but not change
Router# Can see config, and move to make changes
Router# conf t Moves to global config mode
Router(config)#
Router(config)#no ip domain-lookup Disable IP domain name system hostname translation
Router(config)#banner motd ^Hello^ Sets Hello like message of the day banner
Router(config)#hostname RNAME  Name can be any word you choose
RNAME(config)# After Change was made
Configure Passwords
Router(config)#service password-encryption
Applies a weak encryption to passwords
Router(config)#enable password cisco
Set enable password
Router(config)#enable secret class 
Set enable secret password
Router(config)#line con 0
Router(config-line)#password console
Router(config-line)#login
Router(config-line)#loggin synchronous
Enter console line mode, sets console-line mode password to console, enable password checking at login and
enable synchronized message output.
Router(config)#line vty 0 4
Router(config-line)#password telnet
Router(config-line)#login
Router(config-line)#loggin synchronous
Enter vty mode for all 5 vty lines, sets vty password to telnet, enable passowrd checking at login and enablesynchronized message output.

Show Commands
Router#show startup-config
Displays configuration saved in NVRAM
Router#show running-config
Displays configuration currently running in RAM
Router#show protocols 
Displays status of configured Layer 3 protocols
Router#show ip route
Displays routing table
Router#show ip protocols 
Displays IP routing protocols process parameters and statistics
Router#show vlan
Displays VLAN status
Router#show vtp
Displays VTP information
Router#show spanning-tree 
Displays spanning tree topology
Router#show mac-address-table 
Displays MAC table
Router#show ip interface brief 
Displays summary of interface IP status and configuration
Router#show cdp neghbors 
Displays neighbor entries
Router#show version 
Displays info about loaded software version
Router#show flash
Displays info about Flash memory
Router#show arp
Displays the ARP table (IP to MAC Correspondence)
Router#show history 
Displays history of commands used
Router#show users 
Displays all users connected to device
Router#show clock 
Displays time set on device
Router#show controllers serial 0 
Displays statistics for interface hardware. Statistics display if the clock
rate is set and if the cable is DCE or DTE or not attached
Router#show sessions 
Displays all telnet connections to
Router#sh access-lists
Show how much is blocked by access lists


Sources:
http://cisco.com
http://en.wikipedia.org
http://vty.me
http://www.joshgentry.com