Basics of Cisco IOS

The IOS (Internetworking Operating System) runs on all Cisco routers and also some Cisco switches and allows you to configure the devices as well. This lesson starts to build a foundation for understanding the standard Cisco IOS. In this lesson, you will also learn the IOS modes of operation, syntax, storage and organization to better understand the array of options within IOS. In addition to this, you will also learn how to start a router for the first time by using correct commands and start-up sequence.

Definition of IOS

IOS (inter-networking Operating Systems )  is the operating system which controls all the functions of the devices such as access lists to queuing and provides the User Interface (UI) for managing the device. Generally, UI is the command line interface (CLI) in Cisco devices which is similar to other popular CLIs such as DOS and C shell in UNIX.

IOS version and structure

Cisco IOS is versioned using three numbers and some letters, in the general form a.b(c.d)e, where:
  1. a is the major version number.
  2. b is the minor version number.
  3. c is the release number, which begins at one and increments as new releases in the same a.b train are released.
  4. d (omitted from general releases) is the interim build number.
  5. e (zero, one or two letters) is the release train identifier, such as none (which designates the mainline, see below), T (for Technology), E (for Enterprise), S (for Service provider), XA as a special functionality train, XB as a different special functionality train, etc.

Rebuilds : Often a rebuild is compiled to fix a single specific problem or vulnerability for a given IOS version. For example, 12.1(8)E14 is a Rebuild, the 14 denoting the 14th rebuild of 12.1(8)E. Rebuilds are produced to either quickly repair a defect, or to satisfy customers who do not want to upgrade to a later major revision because they may be running critical infrastructure on their devices, and hence prefer to minimize change and risk.

Interim releases : Are usually produced on a weekly basis, and form a roll-up of current development effort. The Cisco advisory web site may list more than one possible interim to fix an associated issue (the reason for this is unknown to the general public).

Maintenance releases : Rigorously tested releases that are made available and include enhancements and bug fixes. Cisco recommend upgrading to Maintenance releases where possible, over Interim and Rebuild releases.

The file naming convention is done by making use of the version of IOS and then adding all sorts of other specific information. The example, you may see an IOS image like this c4500-js40-120-3t-mz. To better understand this convention, read the steps below.
  • The c4500 is for platform and it indicates that this image is for 4500 series router.
  • The js40 indicates the feature set, in indicates that this image is for 4500 series router.
  • The 120-3t is the version (12.0(3)T)
  • M indicates that the software has to be executed from RAM.
  • Z indicates that the file is zipped or compressed and it has to be decompressed into executable .bin format before loading into the device. A decompressed file is usually denoted with a 1.
Cisco Router IOS

Cisco internetwork Operating System was developed to deliver network services. IOS runs on most Cisco routers and on some Cisco switches such as catalyst 2950.

IOS of Cisco router is responsible for
  • Carrying network protocols and
  • Prevent unauthorized use of network.
  • Providing network reliability for connecting to network resources.
Cisco ISO can be accessed through console port of a router, from a modem into the auxiliary port or even through Telnet.

Router Components

Cisco router use ROM and RAM similar to computers. Instead of hard drives, routers use special types of memory known as flash of NVRAM and these memories have unique function. The different types of memory include Random Access Memory, flash memory, Non-volatile memory and Read-Only Memory. Each of these are explained below

Random Access Memory (RAM) :

RAM is the only type of volatile memory in the router. With volatile memory, the contents are lost if the router loses power.

RAM contains a running copy of the Cisco IOS , which is loaded into RAM from the FLASH memory. It also contains the running copy of the configuration file which is loaded into the RAM from the NVRAM at start-up. In addition to this, it stores routing table, ARP tables and other data structures. RAM also provides packet buffering capabilities.

Non-volatile RAM (NVRAM) :

NVRAM (Nonvolatile RAM) is used to store the router’s startup configuration file and configuration register. It doesn’t lose data when power is switched off. So the contents of the start-up configuration file are maintained even when you switch off or restart the router

Flash Memory

Flash memory also holds a copy of IOS image. By flashing a new version on to the chip, this IOS image can be easily upgraded. Flash memory does not loss its contents when the router is switched off.

Read-Only Memory (ROM) :

ROM is used to store the router’s bootstrap start-up program, operating system software, and power-on diagnostic tests programs. ROM contains microcode for basic functions to start and maintain the router. RXBOOT is also contained in ROM. The table describes the major functions of Cisco router components.

Command-Line Interface (CLI IOS Command Modes)

IOS software uses a command-line (CLI as its traditional console environment. The
IOS interface is similar to a UNIX or DOS commands but the main difference is that IOS has a user interface with several command modes. Certain functions such as configuring a network interface can only be performed in a specific command mode. Each command mode permits to configure different configuration components.

User EXEC mode (user mode)

The first mode which is presented upon logging into the router is the user mode. In this mode, only a limited number of commands can be executed and no configuration parameters ca be read or modified. This mode will not help to perform any sort of debug and it does not contain informational (show) commands and also you cannot reconfigure device in any way. User mode helps to view some basic information such as routing table and the status of the components. In this mode, the prompt appears like this

Router> The greater than (>) symbol indicates that you are in user mode

Privileged EXEC Mode (enable mode)

The second mode is the privilege mode which is also known as enable mode. This mode allows users to view the system configuration, restart the system and enter configuration mode. It allows you to access all commands usable by the device and allows all the commands that are available in user mode.

To enter into the enable mode, type enable command which will ask for password (if password is set). This password will be either the enable secret of enable password. The user has to enter correct password or secret password to access privileged mode. Enable secret password will be in encrypted form when it is stored in the configuration and it is safer. Once you enter into the enable mode, the prompt will be changed to # sign it will be as shown below

Router>enable

Password:

Router#

In the privileged mode, you can use any standard commands such as show command and debug command. Debug command are special commands used to perform advanced diagnostics on the system. Few other configuration commands such as clear, clock, reload, copy and erase can be used in privilege mode. To exit the privileged mode, the user has to enter disable command.

To configure parameters of the router, one needs to proceed from privileged EXEC mode to the global configuration mode.

Global Configuration Mode

By typing configure terminal takes user to the global configurations mode from the enable mode which helps to configure the device. This mode allows users to modify the running system configuration. Once the user enter into the configuration mode, the prompt again changes which can be illustrated as shown below

Router # configure terminal

Router(config)#

This is also known as global configuration mode because all the commands used here will have an affect on the entire device.

Global configuration mode consists of sub modes  such as interface mode and line mode. As the configuration sub-modes changes depending on what is being configured, the words within the parenthesis also changes for example: when user enters interface configuration sub-mode, the prompt changes to (config-if)# following the router name.

To exit configuration mode, the user can enter end or press Ctrl+Z

Interface Mode

The commands entered in this mode affect the current interface only. Interface command can be used to modify the configuration of a specific interface. In order to perform any change enter into global configuration mode:

Router 1 (config)# interface serial 0

OR

Router 1 (config)# int serial 0

The result will be:

Router 1 (config-if)#

The prompt changes to Router (config-if) # which indicates that you are in interface configuration mode.

Line Mode

Line command helps to configure user-mode passwords. The prompt then changes to Route (config-line)#;

Router (config)# line con 0

OR

Router 1 (config)line vty 0 4

The result will be:

Router 1 (config-line)#

The line console 0 commands are called as major command and it is also known as global command. The commands which are entered from (config-line) prompt are known as global command.

Each mode is represented by a different prompt, as show in the table below:-

Command mode

Command and mode Prompt Command to enter mode
User EXEC Router> Login
Privileged EXEC Router# Enable
Global Configuration Router(config)# Configure terminal
Interface Configuration Router(config-if)# Interface type number ( from the global configuration mode )
Line Configuration Router(config-line)# Line line_type line_number editing_line_number ( from global configuration mode )


Enhanced Editing Commands and History Commands

The user interface contains an enhanced editing mode that provides a set of editing key functions. No terminal editing command at the privileged mode helps to disable advanced editing features. You can also re-enable these features bu using terminal editing command. The table below shows some of the editing commands and how it can be helpful while working on router

Editing commands

Command Meaning
Ctrl+A Will take cursor to the beginning of the current line
Ctrl+E Moves the cursor to the end of the line
Esc+B Moves back one word
Ctrl+B Moves back one character
Ctrl+F Move forward one character
Esc+F Moves forward one character
Ctrl+D Deleted the single character
Backspace Removes one character to the left of the cursor
Ctrl+R Redisplays a line
Ctrl+U Erases a line
Ctrl+W Erases a word
Ctrl+Z Ends configuration mode and returns to EXEC mode

Router Command History

Router command history will shown the commands which are typed previously. The history size can be changed and it can be verified by using show terminal command. The table below shows the router command history with the commands:

Command Meaning
Ctrl+P or up arrow Shows last command entered
Ctrl+N or down arrow Shows previous command entered
show history Shows last 10 commands typed by default
show terminal Shows terminal configuration and history buffer size
terminal history size Changes buffer size but the maximum size is 256

Cabling WAN - Part II

Physical Layer Implementations in WAN

Most physical implementation transmits data or traffic across WAN (wide Area Network). The requirement for physical implementation depends on distance of the equipment from the speed and the services itself. The selection of type of physical layer depends on distance. Speed and type of interface required to connect.

Figure below shows the lists of subset of the physical implementation which support most commonly used WAN solutions.

WAN Physical Layer Implementations
 Serial connections are used to support wireless serial such as dedicated leased lines that run point-to-point protocol (PPP), High-Level Data Link control (HDLC) or Frame Relay. The speed of the connection varies from 56kbps to T1/E1 (1.544/2.048 Mbps).ISDN (Integrated Services Digital Network) offer dial-on-demand connections or dial backup services. ISDN BRI (Basic Rate Interface) is made up of two 64kbps Bearer channel (B channel)for data and one 16kbs Delta channel (D channel) for signaling and other link management tasks. Point-to-point protocol is transmit data over B channel.

Difference between WAN serial connections

Long distance communication in WAN is performed using serial transmission. Serial transmission is a process in which bits are sent over single channel. Unlike parallel data transmitted at a time, serial transmission is one-at-a time transmission. This provides more reliably long distance communication. Serial channels employ electromagnetic or optical frequency range to carry bits.

The Frequency defined in terms of cycles per second (Hertz), function as band or spectrum required for communication. For example: the frequency of signals send over voice grade telephone lines is 3 kHz. The size of the frequency is also known as bandwidth.

Various types of physical connection enable to connect to serial WAN services. Depending on the selection of physical implementation given by the service provider, the type of serial cable to be used with router has to be selected.

Figure shows different type of serial connector

WAN Serial Connections Types

For Cisco router, physical connectivity at the customer site is provided by one of the two types of serial connectors. The first type of serial connection is 60-pin connector which is commonly used by Cisco routers. This indicates that the router end of most adapter cable use male 60-pin connector, so the network ends of the adapter cables has to match with particular WAN service hardware.



Bandwidth can also be expressed as bits per second (bps)which indicate the quantity of data in bits transmitted by using two physical layer implementation (EIA/TIA-232 and EIA/TIA-449). Table below shows the physical standards for WAN serial connections.

Cabling Routers for serial connections

In addition to determining cable type, one more factor which is very much essential is to determine whether the device is Data-terminal Equipment (DTE) or Data Circuit-terminating Equipment (DTE) device. These are the two types of devices that can communicate over serial interface. DCE provides physical connection to the network and forwards the data to the service provider.

If the connection is made directly to a service provider or a device that provides signal clocking such as channel or data service unit (CSU/DSU), the router will be data terminal equipment (DTE) and uses a DTE serial cable. Figure below shows DTE/DCE connections. In this example router which is DTE device is connected to CSU/DSU or modem, which are DCE devices. As the serial devices are DCE, DTE cable has to be used to connect router and CSU/DSU or modem.

DTE/DCE Connections
DTE/DCE Connections

In some cases router is required to provide the signal clocking, so it will use data communication equipment (DCE) signal cable. For example when performing back-to-back router scenario in a test environment, one router is DTE and other router is DCE.
When router has to be cabled in a serial connectivity, it may have fixed or modular ports. The type of ports either fixed or modular will have impact on the syntax which will be used to configure each interface.

Cisco 2500 Router

Figure shows an example of 2500 Router with fixed port. Each port is assigned with port type and port number for example “serial 0”. In order to configure fixed interface has to be specified using this convention.

Fixed serial ports on 2500 router

Routers with modular serial ports are also available. Typically, each port is assigned a label of port type, slot number and port number. In order to configure port on modular card, interfaces are specified using this convention:


<Port type><slot number>/<port number>. For example serial 1/0

Note: port designation convention changes with type of router used. For example: 7500 series router has virtual interface processor. The convention of this also include VIP slot

<Port type><slot number>/<port adapter number>/<port number> (serial 1/0/0)

Note: Using label of port type and port number such as serial 0, you can configure 1603 router (which both fixed and modular serial interface) as fixed interface.

Cabling Router for ISDN BRI connection

ISDN BRI standard defines several physical wiring interfaces, but the two common types of interfaces are BRI U-Interface and BRI S/T interface. U-Interface is the 2-wire interface provided by the service provider for connection to the NTI.U-Interface has built- in internal NT-1 devices. The S/T –interface is the 4-wire interface between NT1 and the ISDU networking equipment such as router. An S/ T interface is used when NT1 is a separate device. The type of interface required is determined depending on whether service provider will provide an NT1 device.NT1 refers to network termination type 1 device.

NTI is a simple  device that serves as an interface between router and ISDN equipment and it is used to connect four wire subscribes wiring to two-wire local loop.

Category 5 straight-through cables are required to interconnect ISDN BRI port to the service provider device

Note: cables from ISDN BRI port has to be properly inserted only to ISDN jack or switch. Because ISDN BRI uses high voltage and it may  effect non-ISDN devices



Setting up console  connection                       

To initially configure Cisco device, management connection has to be directly provided to a device. This management attachment is nothing but console port. Console port enables to configure Cisco hub, switch or router. The type of cable used to connect a console port and terminal is rollover or console cable with RJ-45 connector.

Figure below shows connecting device using console cable.

Steps to connect computer to console port:

Step 1: connect the device to the computer using console cable. RJ-45 to DB-9 or RJ-45 to DB-25 adapter may be required for computer or terminal.

Step 2: configure terminal emulation software for computer with above a default COM port settings: 9600bps, 8 data bits, no parity, 1 stop bit and no flow control.

Cabling WAN - Part I

The physical elements of router such as interfaces help to other terminals. In this lesson, you will learn the features of different types of physical interfaces such as console port, auxiliary port, Ethernet interface, serial port and modular interfaces. Ethernet interface is used to connect to Ethernet network and auxiliary ports are used to connect a modem to router. Modular interface allows to add new interface cards without a need to purchase a new router.

A connection between one networks to another some times make use of WAN services. These WAN services utilize various types of connection and cabling methods which is very much different from those of LAVs. So it is very important to understand the type of cabling required to connect to these services. In this lesson, you will learn the process of connecting Cisco devices to a terminal which enables to configure and monitor devices.

Physical Interfaces

A router has several physical interfaces which enables it to connect to different types of network media and terminals. The terms port and interfaces can be used interchangeably. Some of the physical interfaces normally found on Cisco router are listed below.

Console port

Console port is a point where you connect computer or terminal to router to access operating system. While connecting to the router console port is very much essential to configure other interfaces. ASCII terminal is the most commonly used computer running terminal emulation software for example Hyper Terminal in windows 98 can be connected to console port. Console port. Console port provides access to the command interpreter, so that it can be used to configure and maintain router.


Console cable is an asynchronous serial interface which uses RJ-45 connector and looks same phone jack but slightly larger. Adapters are also available which is required for connections to PC terminals, modems and other external communication equipment. RJ-45 crossover or console cable is required to connect computer or a laptop to router. Depending upon the size of the PC serial port, you rewire either RJ-45 to DB-9 female adapter or RJ-45 to DB-25 female adapter.

Cable pinout for: Cisco Console RJ45 to DB9 Pin
Use this cable to configure a Cisco router through the Console port at the router. 
This cable is also suitable to be used with Sun T2000. 

Console cable can be identified by comparing the modular ends of the cable. The wire connected to the pin on the outside of the left connector (pin 1) must have same color as the pin on the outside of the right connector (pin 8).  In Cisco cables, pin 1 is white on one connector and pin8 is white on the other connector.
Table shows the RJ-45 console cable pinouts


The default parameters for the console port are
  • 9600 bits per second.
  • 8 data bits
  • No parity generated or checked.
  • 1 stop bits












Auxiliary Port

Auxiliary (AUX) port is an asynchronous serial port which looks same as console port. Auxiliary port is used to connect modem to the router. The main difference between console port and auxiliary port provides hardware flow control enabling synchronized communication between sending and receiving device. When the buffer on receiving device gets full, it sends a message to the sending device asking to stop transmission speeds than terminal devices. Auxiliary port is suitable for high speed modem connection and the maximum speed is 38,400bps.

In order to connect auxiliary port to a modem, RJ-45 crossover cable is required. And RJ-45 to DB-25 male adaptor which is very compatible with the modems can be used.

Ethernet Interface

The Ethernet Interface is used to connect a router to a LAN and it is most common interface on a Cisco router. Ethernet interface uses RJ-45 connector or it may use 15-pin Attachment Unit Interface (AUI) connector Cisco routers are available with either 10 megabit or 100 megabit Ethernet interface. Cisco routers are also available in different configuration with either one or several Ethernet interface.

In some cases, you need to hook Ethernet interface to 10BaseT hub or switch. For this, you require AUI connector to 10BaseT transceiver.

Serial port

Serial port is an interface which is used to connect WAN links either a leased line or T1.Maximum speed at which the Cisco router’s serial port may operate is 115,200kbps. A router’s serial port is different from PC’s serial port. A router’s serial ports are synchronous which operate at higher speed than PC’s serial port.  PC’s serial ports are asynchronous. Serial port can be directly connected to Data communication Equipment for example Channel service Unit/Data Service Unit (CSU/DSU). A CSU/DSU which is required on both the ends of dedicated leased line is a high powered modem. The selection of cable type depends on DCE device. In lab environment, wide Area Network (WAN) can be simulated by directly connecting two serial ports using DCE/DTE cable.

Modular Interfaces

Most of the Cisco routers such as 3600 serial, 2600 serial have modular interface. Modular interface is an empty slot which enables to plug any other type interface. Serial and Ethernet interface can be added. Modular interface are available in various type such as Integrated Services Digital Network (ISDN), Frame Relay any voice interface cards. For T1 and ISDN lines, the modular interfaces have built-on CSU/DSUs and NT1s respectively which eliminates the need of additional router and line.

Note: The devices in synchronous communication synchronize by constantly transmitting bits over a wire or line. In synchronous communication, when there is data devices simply send idle characters to continue the synchronization. In asynchronous communication, a start bit and stop bit are added to each segment. For synchronous communication, both start and stop bits are eliminated, so faster transmission speed is achieved.

Cabling LAN - Part II

Crossover Cables & straight Through Cables

Ethernet cables can be wired in three different ways. The two main ways are straight through and Cross over. The third type is called as Rolled. Straight through cables are generally used to connect different types of equipment; for example, a computer  and a hub. Crossover cables are generally used to connect similar types of equipment like a computer to another computer. Inside the UTP cable there are 8 physical wires. The 8 wires are arranged in pairs: one pair is used to send information and other pair is used to receive information. For computers to communicate, the sending pair of one computer has to be connected to receiving pair of another computer. So crossover cables are required.

T568B Termination
T568A Termination

RJ45 Jack
Straight-through Cable
The straight- through cable is used to connect:
  • Host to switch or hub
  • Router to switch or hub
Straight through Cable
Straight Through Cable
In the above figure you can see only 1,2,3 and 6 pins are used. Connect pin 1 to pin 1,2 to 2,3 to 3 and 6 to 6. Remember this would be an Ethernet cable and it will not work with voice, Token Ring, and ISDN.
Crossover cable
The Crossover cable be used to connect:
  • Switch to switch
  • Hub to hub
  • Host to host
  • Hub to switch
  • Router direct to host

Same four wires are used in the cable as in the straight-through cable but different pins are connected together. In the  following figure, can see how four wires are used in crossover Ethernet cable. And notice that instead of connecting 1to1, 2to2 etc, pins 1 is connected 3, pin 2 is connected to 6 on each side of the cable.

Crossover cable pinouts

Two pairs crossed, two pairs uncrossed
Certain equipment or installations, including those in which phone and/or power are mixed with data in the same cable, may require that the "non-data" pairs 1 and 4 (pins 4, 5, 7 and 8) remain un-crossed.
T568A  - All Four Pairs Crossed
T568B  - All Four Pairs Crossed
Rolled cable
Roll Over or Console Cable

Rolled cables are not used to connect any Ethernet connections together, but rolled Ethernet cable can be used to connect a host to a router console serial communication port. Rolled cable is also used to connect PC running Hyper- Terminal to the Cisco hardware. Eight wires are used in rolled cable to connect serial devices, although not all eight are  used to send information just as in Ethernet networking. Figure below shows eight cables used in a rolled cable.